language
stringclasses 1
value | code
stringlengths 6
12.3k
| avg_line_length
float64 2.79
91
| line_count
float64 1
367
| lang_specific_parse
stringlengths 60
1.08M
| ast_node_count
int64 2
6.81k
| num_errors
int64 0
499
| universal_schema
stringlengths 799
825k
| __index_level_0__
int64 0
81.2k
|
|---|---|---|---|---|---|---|---|---|
c
|
/******************************************************************************
* Copyright 2017 - 2018, Opulinks Technology Ltd.
* ---------------------------------------------------------------------------
* Statement:
* ----------
* This software is protected by Copyright and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of Opulinks Technology Ltd. (C) 2018
******************************************************************************/
#ifndef _BLE_UTIL_H_
#define _BLE_UTIL_H_
#include <stdint.h>
#include <assert.h>
#include <string.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "ble_type_define.h"
#define ForEach(idx, max) for (idx = 0; idx < (max); idx++)
#define UINT16_LO(x) ((x) & 0xFF)
#define UINT16_HI(x) (((x) >> 8) & 0xFF)
#define LE_MIN(x, y) ((x) > (y) ? (y) : (x))
#define LE_MAX(x, y) ((x) < (y) ? (y) : (x))
void* Malloc(UINT16 size);
void FreeMem(void *m);
void MemSet(void *s, UINT8 val, UINT16 len);
void MemCopy(void *d, const void *s, UINT16 len);
INT8 MemCmp(void *d, const void *s, UINT16 len);
UINT16 StrLen(void *s);
void* PanicUnlessMalloc(UINT16 size);
void Panic(void);
void LeHostEnterPanic(char *cfile, int cline);
void BufToOctets(UINT8 **octets, const void *buf, UINT16 len);
void OctetsToBuf(const void *buf, UINT8 **octets, UINT16 len);
UINT16 OctetsToDec16(UINT8 **octets);
void Dec16ToOctets(UINT8 **octets, UINT16 dec);
UINT32 BufToDec32(void *buf);
BOOL IsEqualVal(void *data, UINT8 val, UINT16 len);
void GenerateRandom(void *buf, UINT16 len);
void SwapBuf(UINT8 *dst, const UINT8 *src, UINT16 len);
void SwapInPlace(void *buf, UINT16 len);
#endif
| 36.73
| 48
|
(translation_unit) "/******************************************************************************\n* Copyright 2017 - 2018, Opulinks Technology Ltd.\n* ---------------------------------------------------------------------------\n* Statement:\n* ----------\n* This software is protected by Copyright and the information contained\n* herein is confidential. The software may not be copied and the information\n* contained herein may not be used or disclosed except with the written\n* permission of Opulinks Technology Ltd. (C) 2018\n******************************************************************************/\n\n#ifndef _BLE_UTIL_H_\n#define _BLE_UTIL_H_\n\n#include <stdint.h>\n#include <assert.h>\n#include <string.h>\n#include <errno.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <time.h>\n\n\n#include "ble_type_define.h"\n\n\n#define ForEach(idx, max) for (idx = 0; idx < (max); idx++)\n\n#define UINT16_LO(x) ((x) & 0xFF)\n#define UINT16_HI(x) (((x) >> 8) & 0xFF)\n#define LE_MIN(x, y) ((x) > (y) ? (y) : (x))\n#define LE_MAX(x, y) ((x) < (y) ? (y) : (x))\n\n\nvoid* Malloc(UINT16 size);\nvoid FreeMem(void *m);\nvoid MemSet(void *s, UINT8 val, UINT16 len);\nvoid MemCopy(void *d, const void *s, UINT16 len);\nINT8 MemCmp(void *d, const void *s, UINT16 len);\nUINT16 StrLen(void *s);\n\n\nvoid* PanicUnlessMalloc(UINT16 size);\n\nvoid Panic(void);\n\nvoid LeHostEnterPanic(char *cfile, int cline);\n\nvoid BufToOctets(UINT8 **octets, const void *buf, UINT16 len);\n\nvoid OctetsToBuf(const void *buf, UINT8 **octets, UINT16 len);\n\nUINT16 OctetsToDec16(UINT8 **octets);\n\nvoid Dec16ToOctets(UINT8 **octets, UINT16 dec);\n\nUINT32 BufToDec32(void *buf);\n\nBOOL IsEqualVal(void *data, UINT8 val, UINT16 len);\n\nvoid GenerateRandom(void *buf, UINT16 len);\n\nvoid SwapBuf(UINT8 *dst, const UINT8 *src, UINT16 len);\n\nvoid SwapInPlace(void *buf, UINT16 len);\n\n#endif\n"
(comment) "/******************************************************************************\n* Copyright 2017 - 2018, Opulinks Technology Ltd.\n* ---------------------------------------------------------------------------\n* Statement:\n* ----------\n* This software is protected by Copyright and the information contained\n* herein is confidential. The software may not be copied and the information\n* contained herein may not be used or disclosed except with the written\n* permission of Opulinks Technology Ltd. (C) 2018\n******************************************************************************/"
(preproc_ifdef) "#ifndef _BLE_UTIL_H_\n#define _BLE_UTIL_H_\n\n#include <stdint.h>\n#include <assert.h>\n#include <string.h>\n#include <errno.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <time.h>\n\n\n#include "ble_type_define.h"\n\n\n#define ForEach(idx, max) for (idx = 0; idx < (max); idx++)\n\n#define UINT16_LO(x) ((x) & 0xFF)\n#define UINT16_HI(x) (((x) >> 8) & 0xFF)\n#define LE_MIN(x, y) ((x) > (y) ? (y) : (x))\n#define LE_MAX(x, y) ((x) < (y) ? (y) : (x))\n\n\nvoid* Malloc(UINT16 size);\nvoid FreeMem(void *m);\nvoid MemSet(void *s, UINT8 val, UINT16 len);\nvoid MemCopy(void *d, const void *s, UINT16 len);\nINT8 MemCmp(void *d, const void *s, UINT16 len);\nUINT16 StrLen(void *s);\n\n\nvoid* PanicUnlessMalloc(UINT16 size);\n\nvoid Panic(void);\n\nvoid LeHostEnterPanic(char *cfile, int cline);\n\nvoid BufToOctets(UINT8 **octets, const void *buf, UINT16 len);\n\nvoid OctetsToBuf(const void *buf, UINT8 **octets, UINT16 len);\n\nUINT16 OctetsToDec16(UINT8 **octets);\n\nvoid Dec16ToOctets(UINT8 **octets, UINT16 dec);\n\nUINT32 BufToDec32(void *buf);\n\nBOOL IsEqualVal(void *data, UINT8 val, UINT16 len);\n\nvoid GenerateRandom(void *buf, UINT16 len);\n\nvoid SwapBuf(UINT8 *dst, const UINT8 *src, UINT16 len);\n\nvoid SwapInPlace(void *buf, UINT16 len);\n\n#endif"
(#ifndef) "#ifndef"
(identifier) "_BLE_UTIL_H_"
(preproc_def) "#define _BLE_UTIL_H_\n"
(#define) "#define"
(identifier) "_BLE_UTIL_H_"
(preproc_include) "#include <stdint.h>\n"
(#include) "#include"
(system_lib_string) "<stdint.h>"
(preproc_include) "#include <assert.h>\n"
(#include) "#include"
(system_lib_string) "<assert.h>"
(preproc_include) "#include <string.h>\n"
(#include) "#include"
(system_lib_string) "<string.h>"
(preproc_include) "#include <errno.h>\n"
(#include) "#include"
(system_lib_string) "<errno.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 <time.h>\n"
(#include) "#include"
(system_lib_string) "<time.h>"
(preproc_include) "#include "ble_type_define.h"\n"
(#include) "#include"
(string_literal) ""ble_type_define.h""
(") """
(string_content) "ble_type_define.h"
(") """
(preproc_function_def) "#define ForEach(idx, max) for (idx = 0; idx < (max); idx++)\n"
(#define) "#define"
(identifier) "ForEach"
(preproc_params) "(idx, max)"
(() "("
(identifier) "idx"
(,) ","
(identifier) "max"
()) ")"
(preproc_arg) "for (idx = 0; idx < (max); idx++)"
(preproc_function_def) "#define UINT16_LO(x) ((x) & 0xFF)\n"
(#define) "#define"
(identifier) "UINT16_LO"
(preproc_params) "(x)"
(() "("
(identifier) "x"
()) ")"
(preproc_arg) "((x) & 0xFF)"
(preproc_function_def) "#define UINT16_HI(x) (((x) >> 8) & 0xFF)\n"
(#define) "#define"
(identifier) "UINT16_HI"
(preproc_params) "(x)"
(() "("
(identifier) "x"
()) ")"
(preproc_arg) "(((x) >> 8) & 0xFF)"
(preproc_function_def) "#define LE_MIN(x, y) ((x) > (y) ? (y) : (x))\n"
(#define) "#define"
(identifier) "LE_MIN"
(preproc_params) "(x, y)"
(() "("
(identifier) "x"
(,) ","
(identifier) "y"
()) ")"
(preproc_arg) "((x) > (y) ? (y) : (x))"
(preproc_function_def) "#define LE_MAX(x, y) ((x) < (y) ? (y) : (x))\n"
(#define) "#define"
(identifier) "LE_MAX"
(preproc_params) "(x, y)"
(() "("
(identifier) "x"
(,) ","
(identifier) "y"
()) ")"
(preproc_arg) "((x) < (y) ? (y) : (x))"
(declaration) "void* Malloc(UINT16 size);"
(primitive_type) "void"
(pointer_declarator) "* Malloc(UINT16 size)"
(*) "*"
(function_declarator) "Malloc(UINT16 size)"
(identifier) "Malloc"
(parameter_list) "(UINT16 size)"
(() "("
(parameter_declaration) "UINT16 size"
(type_identifier) "UINT16"
(identifier) "size"
()) ")"
(;) ";"
(declaration) "void FreeMem(void *m);"
(primitive_type) "void"
(function_declarator) "FreeMem(void *m)"
(identifier) "FreeMem"
(parameter_list) "(void *m)"
(() "("
(parameter_declaration) "void *m"
(primitive_type) "void"
(pointer_declarator) "*m"
(*) "*"
(identifier) "m"
()) ")"
(;) ";"
(declaration) "void MemSet(void *s, UINT8 val, UINT16 len);"
(primitive_type) "void"
(function_declarator) "MemSet(void *s, UINT8 val, UINT16 len)"
(identifier) "MemSet"
(parameter_list) "(void *s, UINT8 val, UINT16 len)"
(() "("
(parameter_declaration) "void *s"
(primitive_type) "void"
(pointer_declarator) "*s"
(*) "*"
(identifier) "s"
(,) ","
(parameter_declaration) "UINT8 val"
(type_identifier) "UINT8"
(identifier) "val"
(,) ","
(parameter_declaration) "UINT16 len"
(type_identifier) "UINT16"
(identifier) "len"
()) ")"
(;) ";"
(declaration) "void MemCopy(void *d, const void *s, UINT16 len);"
(primitive_type) "void"
(function_declarator) "MemCopy(void *d, const void *s, UINT16 len)"
(identifier) "MemCopy"
(parameter_list) "(void *d, const void *s, UINT16 len)"
(() "("
(parameter_declaration) "void *d"
(primitive_type) "void"
(pointer_declarator) "*d"
(*) "*"
(identifier) "d"
(,) ","
(parameter_declaration) "const void *s"
(type_qualifier) "const"
(const) "const"
(primitive_type) "void"
(pointer_declarator) "*s"
(*) "*"
(identifier) "s"
(,) ","
(parameter_declaration) "UINT16 len"
(type_identifier) "UINT16"
(identifier) "len"
()) ")"
(;) ";"
(declaration) "INT8 MemCmp(void *d, const void *s, UINT16 len);"
(type_identifier) "INT8"
(function_declarator) "MemCmp(void *d, const void *s, UINT16 len)"
(identifier) "MemCmp"
(parameter_list) "(void *d, const void *s, UINT16 len)"
(() "("
(parameter_declaration) "void *d"
(primitive_type) "void"
(pointer_declarator) "*d"
(*) "*"
(identifier) "d"
(,) ","
(parameter_declaration) "const void *s"
(type_qualifier) "const"
(const) "const"
(primitive_type) "void"
(pointer_declarator) "*s"
(*) "*"
(identifier) "s"
(,) ","
(parameter_declaration) "UINT16 len"
(type_identifier) "UINT16"
(identifier) "len"
()) ")"
(;) ";"
(declaration) "UINT16 StrLen(void *s);"
(type_identifier) "UINT16"
(function_declarator) "StrLen(void *s)"
(identifier) "StrLen"
(parameter_list) "(void *s)"
(() "("
(parameter_declaration) "void *s"
(primitive_type) "void"
(pointer_declarator) "*s"
(*) "*"
(identifier) "s"
()) ")"
(;) ";"
(declaration) "void* PanicUnlessMalloc(UINT16 size);"
(primitive_type) "void"
(pointer_declarator) "* PanicUnlessMalloc(UINT16 size)"
(*) "*"
(function_declarator) "PanicUnlessMalloc(UINT16 size)"
(identifier) "PanicUnlessMalloc"
(parameter_list) "(UINT16 size)"
(() "("
(parameter_declaration) "UINT16 size"
(type_identifier) "UINT16"
(identifier) "size"
()) ")"
(;) ";"
(declaration) "void Panic(void);"
(primitive_type) "void"
(function_declarator) "Panic(void)"
(identifier) "Panic"
(parameter_list) "(void)"
(() "("
(parameter_declaration) "void"
(primitive_type) "void"
()) ")"
(;) ";"
(declaration) "void LeHostEnterPanic(char *cfile, int cline);"
(primitive_type) "void"
(function_declarator) "LeHostEnterPanic(char *cfile, int cline)"
(identifier) "LeHostEnterPanic"
(parameter_list) "(char *cfile, int cline)"
(() "("
(parameter_declaration) "char *cfile"
(primitive_type) "char"
(pointer_declarator) "*cfile"
(*) "*"
(identifier) "cfile"
(,) ","
(parameter_declaration) "int cline"
(primitive_type) "int"
(identifier) "cline"
()) ")"
(;) ";"
(declaration) "void BufToOctets(UINT8 **octets, const void *buf, UINT16 len);"
(primitive_type) "void"
(function_declarator) "BufToOctets(UINT8 **octets, const void *buf, UINT16 len)"
(identifier) "BufToOctets"
(parameter_list) "(UINT8 **octets, const void *buf, UINT16 len)"
(() "("
(parameter_declaration) "UINT8 **octets"
(type_identifier) "UINT8"
(pointer_declarator) "**octets"
(*) "*"
(pointer_declarator) "*octets"
(*) "*"
(identifier) "octets"
(,) ","
(parameter_declaration) "const void *buf"
(type_qualifier) "const"
(const) "const"
(primitive_type) "void"
(pointer_declarator) "*buf"
(*) "*"
(identifier) "buf"
(,) ","
(parameter_declaration) "UINT16 len"
(type_identifier) "UINT16"
(identifier) "len"
()) ")"
(;) ";"
(declaration) "void OctetsToBuf(const void *buf, UINT8 **octets, UINT16 len);"
(primitive_type) "void"
(function_declarator) "OctetsToBuf(const void *buf, UINT8 **octets, UINT16 len)"
(identifier) "OctetsToBuf"
(parameter_list) "(const void *buf, UINT8 **octets, UINT16 len)"
(() "("
(parameter_declaration) "const void *buf"
(type_qualifier) "const"
(const) "const"
(primitive_type) "void"
(pointer_declarator) "*buf"
(*) "*"
(identifier) "buf"
(,) ","
(parameter_declaration) "UINT8 **octets"
(type_identifier) "UINT8"
(pointer_declarator) "**octets"
(*) "*"
(pointer_declarator) "*octets"
(*) "*"
(identifier) "octets"
(,) ","
(parameter_declaration) "UINT16 len"
(type_identifier) "UINT16"
(identifier) "len"
()) ")"
(;) ";"
(declaration) "UINT16 OctetsToDec16(UINT8 **octets);"
(type_identifier) "UINT16"
(function_declarator) "OctetsToDec16(UINT8 **octets)"
(identifier) "OctetsToDec16"
(parameter_list) "(UINT8 **octets)"
(() "("
(parameter_declaration) "UINT8 **octets"
(type_identifier) "UINT8"
(pointer_declarator) "**octets"
(*) "*"
(pointer_declarator) "*octets"
(*) "*"
(identifier) "octets"
()) ")"
(;) ";"
(declaration) "void Dec16ToOctets(UINT8 **octets, UINT16 dec);"
(primitive_type) "void"
(function_declarator) "Dec16ToOctets(UINT8 **octets, UINT16 dec)"
(identifier) "Dec16ToOctets"
(parameter_list) "(UINT8 **octets, UINT16 dec)"
(() "("
(parameter_declaration) "UINT8 **octets"
(type_identifier) "UINT8"
(pointer_declarator) "**octets"
(*) "*"
(pointer_declarator) "*octets"
(*) "*"
(identifier) "octets"
(,) ","
(parameter_declaration) "UINT16 dec"
(type_identifier) "UINT16"
(identifier) "dec"
()) ")"
(;) ";"
(declaration) "UINT32 BufToDec32(void *buf);"
(type_identifier) "UINT32"
(function_declarator) "BufToDec32(void *buf)"
(identifier) "BufToDec32"
(parameter_list) "(void *buf)"
(() "("
(parameter_declaration) "void *buf"
(primitive_type) "void"
(pointer_declarator) "*buf"
(*) "*"
(identifier) "buf"
()) ")"
(;) ";"
(declaration) "BOOL IsEqualVal(void *data, UINT8 val, UINT16 len);"
(type_identifier) "BOOL"
(function_declarator) "IsEqualVal(void *data, UINT8 val, UINT16 len)"
(identifier) "IsEqualVal"
(parameter_list) "(void *data, UINT8 val, UINT16 len)"
(() "("
(parameter_declaration) "void *data"
(primitive_type) "void"
(pointer_declarator) "*data"
(*) "*"
(identifier) "data"
(,) ","
(parameter_declaration) "UINT8 val"
(type_identifier) "UINT8"
(identifier) "val"
(,) ","
(parameter_declaration) "UINT16 len"
(type_identifier) "UINT16"
(identifier) "len"
()) ")"
(;) ";"
(declaration) "void GenerateRandom(void *buf, UINT16 len);"
(primitive_type) "void"
(function_declarator) "GenerateRandom(void *buf, UINT16 len)"
(identifier) "GenerateRandom"
(parameter_list) "(void *buf, UINT16 len)"
(() "("
(parameter_declaration) "void *buf"
(primitive_type) "void"
(pointer_declarator) "*buf"
(*) "*"
(identifier) "buf"
(,) ","
(parameter_declaration) "UINT16 len"
(type_identifier) "UINT16"
(identifier) "len"
()) ")"
(;) ";"
(declaration) "void SwapBuf(UINT8 *dst, const UINT8 *src, UINT16 len);"
(primitive_type) "void"
(function_declarator) "SwapBuf(UINT8 *dst, const UINT8 *src, UINT16 len)"
(identifier) "SwapBuf"
(parameter_list) "(UINT8 *dst, const UINT8 *src, UINT16 len)"
(() "("
(parameter_declaration) "UINT8 *dst"
(type_identifier) "UINT8"
(pointer_declarator) "*dst"
(*) "*"
(identifier) "dst"
(,) ","
(parameter_declaration) "const UINT8 *src"
(type_qualifier) "const"
(const) "const"
(type_identifier) "UINT8"
(pointer_declarator) "*src"
(*) "*"
(identifier) "src"
(,) ","
(parameter_declaration) "UINT16 len"
(type_identifier) "UINT16"
(identifier) "len"
()) ")"
(;) ";"
(declaration) "void SwapInPlace(void *buf, UINT16 len);"
(primitive_type) "void"
(function_declarator) "SwapInPlace(void *buf, UINT16 len)"
(identifier) "SwapInPlace"
(parameter_list) "(void *buf, UINT16 len)"
(() "("
(parameter_declaration) "void *buf"
(primitive_type) "void"
(pointer_declarator) "*buf"
(*) "*"
(identifier) "buf"
(,) ","
(parameter_declaration) "UINT16 len"
(type_identifier) "UINT16"
(identifier) "len"
()) ")"
(;) ";"
(#endif) "#endif"
| 413
| 0
|
{"language": "c", "success": true, "metadata": {"lines": 48, "avg_line_length": 36.73, "nodes": 313, "errors": 0, "source_hash": "c0bf660b891e8e614c63ec7bc94df0776ab89b488600353611b662f9b14099e0", "categorized_nodes": 197}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef _BLE_UTIL_H_\n#define _BLE_UTIL_H_\n\n#include <stdint.h>\n#include <assert.h>\n#include <string.h>\n#include <errno.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <time.h>\n\n\n#include \"ble_type_define.h\"\n\n\n#define ForEach(idx, max)\t\t\t\tfor (idx = 0; idx < (max); idx++)\n\n#define UINT16_LO(x)\t\t\t\t\t((x) & 0xFF)\n#define UINT16_HI(x)\t\t\t\t\t(((x) >> 8) & 0xFF)\n#define LE_MIN(x, y)\t\t\t\t\t((x) > (y) ? (y) : (x))\n#define LE_MAX(x, y)\t\t\t\t\t((x) < (y) ? (y) : (x))\n\n\nvoid* Malloc(UINT16 size);\nvoid FreeMem(void *m);\nvoid MemSet(void *s, UINT8 val, UINT16 len);\nvoid MemCopy(void *d, const void *s, UINT16 len);\nINT8 MemCmp(void *d, const void *s, UINT16 len);\nUINT16 StrLen(void *s);\n\n\nvoid* PanicUnlessMalloc(UINT16 size);\n\nvoid Panic(void);\n\nvoid LeHostEnterPanic(char *cfile, int cline);\n\nvoid BufToOctets(UINT8 **octets, const void *buf, UINT16 len);\n\nvoid OctetsToBuf(const void *buf, UINT8 **octets, UINT16 len);\n\nUINT16 OctetsToDec16(UINT8 **octets);\n\nvoid Dec16ToOctets(UINT8 **octets, UINT16 dec);\n\nUINT32 BufToDec32(void *buf);\n\nBOOL IsEqualVal(void *data, UINT8 val, UINT16 len);\n\nvoid GenerateRandom(void *buf, UINT16 len);\n\nvoid SwapBuf(UINT8 *dst, const UINT8 *src, UINT16 len);\n\nvoid SwapInPlace(void *buf, UINT16 len);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 37, 43, 49, 56, 63, 73, 83, 99, 117, 135, 145, 155, 162, 175, 195, 215, 227, 242, 252, 268, 281, 299, 312], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 66, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 2, "type": "identifier", "text": "_BLE_UTIL_H_", "parent": 0, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 20}}, {"id": 3, "type": "preproc_def", "text": "#define _BLE_UTIL_H_\n", "parent": 0, "children": [4, 5], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 5, "type": "identifier", "text": "_BLE_UTIL_H_", "parent": 3, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 20}}, {"id": 6, "type": "preproc_include", "text": "#include <stdint.h>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<stdint.h>", "parent": 6, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include <assert.h>\n", "parent": 0, "children": [10, 11], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<assert.h>", "parent": 9, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 19}}, {"id": 12, "type": "preproc_include", "text": "#include <string.h>\n", "parent": 0, "children": [13, 14], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<string.h>", "parent": 12, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 19}}, {"id": 15, "type": "preproc_include", "text": "#include <errno.h>\n", "parent": 0, "children": [16, 17], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<errno.h>", "parent": 15, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 18}}, {"id": 18, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": 0, "children": [19, 20], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 8}}, {"id": 20, "type": "system_lib_string", "text": "<stdio.h>", "parent": 18, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 18}}, {"id": 21, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": 0, "children": [22, 23], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 8}}, {"id": 23, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 21, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 19}}, {"id": 24, "type": "preproc_include", "text": "#include <time.h>\n", "parent": 0, "children": [25, 26], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 8}}, {"id": 26, "type": "system_lib_string", "text": "<time.h>", "parent": 24, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 17}}, {"id": 27, "type": "preproc_include", "text": "#include \"ble_type_define.h\"\n", "parent": 0, "children": [28, 29], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 8}}, {"id": 29, "type": "string_literal", "text": "\"ble_type_define.h\"", "parent": 27, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 28}}, {"id": 30, "type": "preproc_function_def", "text": "#define ForEach(idx, max)\t\t\t\tfor (idx = 0; idx < (max); idx++)\n", "parent": 0, "children": [31, 32, 33, 36], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 31, "type": "#define", "text": "#define", "parent": 30, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 7}}, {"id": 32, "type": "identifier", "text": "ForEach", "parent": 30, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 15}}, {"id": 33, "type": "preproc_params", "text": "(idx, max)", "parent": 30, "children": [34, 35], "start_point": {"row": 26, "column": 15}, "end_point": {"row": 26, "column": 25}}, {"id": 34, "type": "identifier", "text": "idx", "parent": 33, "children": [], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 19}}, {"id": 35, "type": "identifier", "text": "max", "parent": 33, "children": [], "start_point": {"row": 26, "column": 21}, "end_point": {"row": 26, "column": 24}}, {"id": 36, "type": "preproc_arg", "text": "for (idx = 0; idx < (max); idx++)", "parent": 30, "children": [], "start_point": {"row": 26, "column": 29}, "end_point": {"row": 26, "column": 62}}, {"id": 37, "type": "preproc_function_def", "text": "#define UINT16_LO(x)\t\t\t\t\t((x) & 0xFF)\n", "parent": 0, "children": [38, 39, 40, 42], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 0}}, {"id": 38, "type": "#define", "text": "#define", "parent": 37, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 7}}, {"id": 39, "type": "identifier", "text": "UINT16_LO", "parent": 37, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 17}}, {"id": 40, "type": "preproc_params", "text": "(x)", "parent": 37, "children": [41], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 20}}, {"id": 41, "type": "identifier", "text": "x", "parent": 40, "children": [], "start_point": {"row": 28, "column": 18}, "end_point": {"row": 28, "column": 19}}, {"id": 42, "type": "preproc_arg", "text": "((x) & 0xFF)", "parent": 37, "children": [], "start_point": {"row": 28, "column": 25}, "end_point": {"row": 28, "column": 37}}, {"id": 43, "type": "preproc_function_def", "text": "#define UINT16_HI(x)\t\t\t\t\t(((x) >> 8) & 0xFF)\n", "parent": 0, "children": [44, 45, 46, 48], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 0}}, {"id": 44, "type": "#define", "text": "#define", "parent": 43, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 7}}, {"id": 45, "type": "identifier", "text": "UINT16_HI", "parent": 43, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 17}}, {"id": 46, "type": "preproc_params", "text": "(x)", "parent": 43, "children": [47], "start_point": {"row": 29, "column": 17}, "end_point": {"row": 29, "column": 20}}, {"id": 47, "type": "identifier", "text": "x", "parent": 46, "children": [], "start_point": {"row": 29, "column": 18}, "end_point": {"row": 29, "column": 19}}, {"id": 48, "type": "preproc_arg", "text": "(((x) >> 8) & 0xFF)", "parent": 43, "children": [], "start_point": {"row": 29, "column": 25}, "end_point": {"row": 29, "column": 44}}, {"id": 49, "type": "preproc_function_def", "text": "#define LE_MIN(x, y)\t\t\t\t\t((x) > (y) ? (y) : (x))\n", "parent": 0, "children": [50, 51, 52, 55], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 31, "column": 0}}, {"id": 50, "type": "#define", "text": "#define", "parent": 49, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 7}}, {"id": 51, "type": "identifier", "text": "LE_MIN", "parent": 49, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 14}}, {"id": 52, "type": "preproc_params", "text": "(x, y)", "parent": 49, "children": [53, 54], "start_point": {"row": 30, "column": 14}, "end_point": {"row": 30, "column": 20}}, {"id": 53, "type": "identifier", "text": "x", "parent": 52, "children": [], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 30, "column": 16}}, {"id": 54, "type": "identifier", "text": "y", "parent": 52, "children": [], "start_point": {"row": 30, "column": 18}, "end_point": {"row": 30, "column": 19}}, {"id": 55, "type": "preproc_arg", "text": "((x) > (y) ? (y) : (x))", "parent": 49, "children": [], "start_point": {"row": 30, "column": 25}, "end_point": {"row": 30, "column": 48}}, {"id": 56, "type": "preproc_function_def", "text": "#define LE_MAX(x, y)\t\t\t\t\t((x) < (y) ? (y) : (x))\n", "parent": 0, "children": [57, 58, 59, 62], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 57, "type": "#define", "text": "#define", "parent": 56, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 7}}, {"id": 58, "type": "identifier", "text": "LE_MAX", "parent": 56, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 14}}, {"id": 59, "type": "preproc_params", "text": "(x, y)", "parent": 56, "children": [60, 61], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 20}}, {"id": 60, "type": "identifier", "text": "x", "parent": 59, "children": [], "start_point": {"row": 31, "column": 15}, "end_point": {"row": 31, "column": 16}}, {"id": 61, "type": "identifier", "text": "y", "parent": 59, "children": [], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 19}}, {"id": 62, "type": "preproc_arg", "text": "((x) < (y) ? (y) : (x))", "parent": 56, "children": [], "start_point": {"row": 31, "column": 25}, "end_point": {"row": 31, "column": 48}}, {"id": 63, "type": "declaration", "text": "void* Malloc(UINT16 size);", "parent": 0, "children": [64, 65], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 26}}, {"id": 64, "type": "primitive_type", "text": "void", "parent": 63, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 4}}, {"id": 65, "type": "pointer_declarator", "text": "* Malloc(UINT16 size)", "parent": 63, "children": [66, 67], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 25}}, {"id": 66, "type": "*", "text": "*", "parent": 65, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 5}}, {"id": 67, "type": "function_declarator", "text": "Malloc(UINT16 size)", "parent": 65, "children": [68, 69], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 25}}, {"id": 68, "type": "identifier", "text": "Malloc", "parent": 67, "children": [], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 12}}, {"id": 69, "type": "parameter_list", "text": "(UINT16 size)", "parent": 67, "children": [70], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 25}}, {"id": 70, "type": "parameter_declaration", "text": "UINT16 size", "parent": 69, "children": [71, 72], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 24}}, {"id": 71, "type": "type_identifier", "text": "UINT16", "parent": 70, "children": [], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 19}}, {"id": 72, "type": "identifier", "text": "size", "parent": 70, "children": [], "start_point": {"row": 34, "column": 20}, "end_point": {"row": 34, "column": 24}}, {"id": 73, "type": "declaration", "text": "void FreeMem(void *m);", "parent": 0, "children": [74, 75], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 22}}, {"id": 74, "type": "primitive_type", "text": "void", "parent": 73, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 4}}, {"id": 75, "type": "function_declarator", "text": "FreeMem(void *m)", "parent": 73, "children": [76, 77], "start_point": {"row": 35, "column": 5}, "end_point": {"row": 35, "column": 21}}, {"id": 76, "type": "identifier", "text": "FreeMem", "parent": 75, "children": [], "start_point": {"row": 35, "column": 5}, "end_point": {"row": 35, "column": 12}}, {"id": 77, "type": "parameter_list", "text": "(void *m)", "parent": 75, "children": [78], "start_point": {"row": 35, "column": 12}, "end_point": {"row": 35, "column": 21}}, {"id": 78, "type": "parameter_declaration", "text": "void *m", "parent": 77, "children": [79, 80], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 20}}, {"id": 79, "type": "primitive_type", "text": "void", "parent": 78, "children": [], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 17}}, {"id": 80, "type": "pointer_declarator", "text": "*m", "parent": 78, "children": [81, 82], "start_point": {"row": 35, "column": 18}, "end_point": {"row": 35, "column": 20}}, {"id": 81, "type": "*", "text": "*", "parent": 80, "children": [], "start_point": {"row": 35, "column": 18}, "end_point": {"row": 35, "column": 19}}, {"id": 82, "type": "identifier", "text": "m", "parent": 80, "children": [], "start_point": {"row": 35, "column": 19}, "end_point": {"row": 35, "column": 20}}, {"id": 83, "type": "declaration", "text": "void MemSet(void *s, UINT8 val, UINT16 len);", "parent": 0, "children": [84, 85], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 44}}, {"id": 84, "type": "primitive_type", "text": "void", "parent": 83, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 4}}, {"id": 85, "type": "function_declarator", "text": "MemSet(void *s, UINT8 val, UINT16 len)", "parent": 83, "children": [86, 87], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 43}}, {"id": 86, "type": "identifier", "text": "MemSet", "parent": 85, "children": [], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 11}}, {"id": 87, "type": "parameter_list", "text": "(void *s, UINT8 val, UINT16 len)", "parent": 85, "children": [88, 93, 96], "start_point": {"row": 36, "column": 11}, "end_point": {"row": 36, "column": 43}}, {"id": 88, "type": "parameter_declaration", "text": "void *s", "parent": 87, "children": [89, 90], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 19}}, {"id": 89, "type": "primitive_type", "text": "void", "parent": 88, "children": [], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 16}}, {"id": 90, "type": "pointer_declarator", "text": "*s", "parent": 88, "children": [91, 92], "start_point": {"row": 36, "column": 17}, "end_point": {"row": 36, "column": 19}}, {"id": 91, "type": "*", "text": "*", "parent": 90, "children": [], "start_point": {"row": 36, "column": 17}, "end_point": {"row": 36, "column": 18}}, {"id": 92, "type": "identifier", "text": "s", "parent": 90, "children": [], "start_point": {"row": 36, "column": 18}, "end_point": {"row": 36, "column": 19}}, {"id": 93, "type": "parameter_declaration", "text": "UINT8 val", "parent": 87, "children": [94, 95], "start_point": {"row": 36, "column": 21}, "end_point": {"row": 36, "column": 30}}, {"id": 94, "type": "type_identifier", "text": "UINT8", "parent": 93, "children": [], "start_point": {"row": 36, "column": 21}, "end_point": {"row": 36, "column": 26}}, {"id": 95, "type": "identifier", "text": "val", "parent": 93, "children": [], "start_point": {"row": 36, "column": 27}, "end_point": {"row": 36, "column": 30}}, {"id": 96, "type": "parameter_declaration", "text": "UINT16 len", "parent": 87, "children": [97, 98], "start_point": {"row": 36, "column": 32}, "end_point": {"row": 36, "column": 42}}, {"id": 97, "type": "type_identifier", "text": "UINT16", "parent": 96, "children": [], "start_point": {"row": 36, "column": 32}, "end_point": {"row": 36, "column": 38}}, {"id": 98, "type": "identifier", "text": "len", "parent": 96, "children": [], "start_point": {"row": 36, "column": 39}, "end_point": {"row": 36, "column": 42}}, {"id": 99, "type": "declaration", "text": "void MemCopy(void *d, const void *s, UINT16 len);", "parent": 0, "children": [100, 101], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 49}}, {"id": 100, "type": "primitive_type", "text": "void", "parent": 99, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 4}}, {"id": 101, "type": "function_declarator", "text": "MemCopy(void *d, const void *s, UINT16 len)", "parent": 99, "children": [102, 103], "start_point": {"row": 37, "column": 5}, "end_point": {"row": 37, "column": 48}}, {"id": 102, "type": "identifier", "text": "MemCopy", "parent": 101, "children": [], "start_point": {"row": 37, "column": 5}, "end_point": {"row": 37, "column": 12}}, {"id": 103, "type": "parameter_list", "text": "(void *d, const void *s, UINT16 len)", "parent": 101, "children": [104, 109, 114], "start_point": {"row": 37, "column": 12}, "end_point": {"row": 37, "column": 48}}, {"id": 104, "type": "parameter_declaration", "text": "void *d", "parent": 103, "children": [105, 106], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 20}}, {"id": 105, "type": "primitive_type", "text": "void", "parent": 104, "children": [], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 17}}, {"id": 106, "type": "pointer_declarator", "text": "*d", "parent": 104, "children": [107, 108], "start_point": {"row": 37, "column": 18}, "end_point": {"row": 37, "column": 20}}, {"id": 107, "type": "*", "text": "*", "parent": 106, "children": [], "start_point": {"row": 37, "column": 18}, "end_point": {"row": 37, "column": 19}}, {"id": 108, "type": "identifier", "text": "d", "parent": 106, "children": [], "start_point": {"row": 37, "column": 19}, "end_point": {"row": 37, "column": 20}}, {"id": 109, "type": "parameter_declaration", "text": "const void *s", "parent": 103, "children": [110, 111], "start_point": {"row": 37, "column": 22}, "end_point": {"row": 37, "column": 35}}, {"id": 110, "type": "primitive_type", "text": "void", "parent": 109, "children": [], "start_point": {"row": 37, "column": 28}, "end_point": {"row": 37, "column": 32}}, {"id": 111, "type": "pointer_declarator", "text": "*s", "parent": 109, "children": [112, 113], "start_point": {"row": 37, "column": 33}, "end_point": {"row": 37, "column": 35}}, {"id": 112, "type": "*", "text": "*", "parent": 111, "children": [], "start_point": {"row": 37, "column": 33}, "end_point": {"row": 37, "column": 34}}, {"id": 113, "type": "identifier", "text": "s", "parent": 111, "children": [], "start_point": {"row": 37, "column": 34}, "end_point": {"row": 37, "column": 35}}, {"id": 114, "type": "parameter_declaration", "text": "UINT16 len", "parent": 103, "children": [115, 116], "start_point": {"row": 37, "column": 37}, "end_point": {"row": 37, "column": 47}}, {"id": 115, "type": "type_identifier", "text": "UINT16", "parent": 114, "children": [], "start_point": {"row": 37, "column": 37}, "end_point": {"row": 37, "column": 43}}, {"id": 116, "type": "identifier", "text": "len", "parent": 114, "children": [], "start_point": {"row": 37, "column": 44}, "end_point": {"row": 37, "column": 47}}, {"id": 117, "type": "declaration", "text": "INT8 MemCmp(void *d, const void *s, UINT16 len);", "parent": 0, "children": [118, 119], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 48}}, {"id": 118, "type": "type_identifier", "text": "INT8", "parent": 117, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 4}}, {"id": 119, "type": "function_declarator", "text": "MemCmp(void *d, const void *s, UINT16 len)", "parent": 117, "children": [120, 121], "start_point": {"row": 38, "column": 5}, "end_point": {"row": 38, "column": 47}}, {"id": 120, "type": "identifier", "text": "MemCmp", "parent": 119, "children": [], "start_point": {"row": 38, "column": 5}, "end_point": {"row": 38, "column": 11}}, {"id": 121, "type": "parameter_list", "text": "(void *d, const void *s, UINT16 len)", "parent": 119, "children": [122, 127, 132], "start_point": {"row": 38, "column": 11}, "end_point": {"row": 38, "column": 47}}, {"id": 122, "type": "parameter_declaration", "text": "void *d", "parent": 121, "children": [123, 124], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 19}}, {"id": 123, "type": "primitive_type", "text": "void", "parent": 122, "children": [], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 16}}, {"id": 124, "type": "pointer_declarator", "text": "*d", "parent": 122, "children": [125, 126], "start_point": {"row": 38, "column": 17}, "end_point": {"row": 38, "column": 19}}, {"id": 125, "type": "*", "text": "*", "parent": 124, "children": [], "start_point": {"row": 38, "column": 17}, "end_point": {"row": 38, "column": 18}}, {"id": 126, "type": "identifier", "text": "d", "parent": 124, "children": [], "start_point": {"row": 38, "column": 18}, "end_point": {"row": 38, "column": 19}}, {"id": 127, "type": "parameter_declaration", "text": "const void *s", "parent": 121, "children": [128, 129], "start_point": {"row": 38, "column": 21}, "end_point": {"row": 38, "column": 34}}, {"id": 128, "type": "primitive_type", "text": "void", "parent": 127, "children": [], "start_point": {"row": 38, "column": 27}, "end_point": {"row": 38, "column": 31}}, {"id": 129, "type": "pointer_declarator", "text": "*s", "parent": 127, "children": [130, 131], "start_point": {"row": 38, "column": 32}, "end_point": {"row": 38, "column": 34}}, {"id": 130, "type": "*", "text": "*", "parent": 129, "children": [], "start_point": {"row": 38, "column": 32}, "end_point": {"row": 38, "column": 33}}, {"id": 131, "type": "identifier", "text": "s", "parent": 129, "children": [], "start_point": {"row": 38, "column": 33}, "end_point": {"row": 38, "column": 34}}, {"id": 132, "type": "parameter_declaration", "text": "UINT16 len", "parent": 121, "children": [133, 134], "start_point": {"row": 38, "column": 36}, "end_point": {"row": 38, "column": 46}}, {"id": 133, "type": "type_identifier", "text": "UINT16", "parent": 132, "children": [], "start_point": {"row": 38, "column": 36}, "end_point": {"row": 38, "column": 42}}, {"id": 134, "type": "identifier", "text": "len", "parent": 132, "children": [], "start_point": {"row": 38, "column": 43}, "end_point": {"row": 38, "column": 46}}, {"id": 135, "type": "declaration", "text": "UINT16 StrLen(void *s);", "parent": 0, "children": [136, 137], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 23}}, {"id": 136, "type": "type_identifier", "text": "UINT16", "parent": 135, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 6}}, {"id": 137, "type": "function_declarator", "text": "StrLen(void *s)", "parent": 135, "children": [138, 139], "start_point": {"row": 39, "column": 7}, "end_point": {"row": 39, "column": 22}}, {"id": 138, "type": "identifier", "text": "StrLen", "parent": 137, "children": [], "start_point": {"row": 39, "column": 7}, "end_point": {"row": 39, "column": 13}}, {"id": 139, "type": "parameter_list", "text": "(void *s)", "parent": 137, "children": [140], "start_point": {"row": 39, "column": 13}, "end_point": {"row": 39, "column": 22}}, {"id": 140, "type": "parameter_declaration", "text": "void *s", "parent": 139, "children": [141, 142], "start_point": {"row": 39, "column": 14}, "end_point": {"row": 39, "column": 21}}, {"id": 141, "type": "primitive_type", "text": "void", "parent": 140, "children": [], "start_point": {"row": 39, "column": 14}, "end_point": {"row": 39, "column": 18}}, {"id": 142, "type": "pointer_declarator", "text": "*s", "parent": 140, "children": [143, 144], "start_point": {"row": 39, "column": 19}, "end_point": {"row": 39, "column": 21}}, {"id": 143, "type": "*", "text": "*", "parent": 142, "children": [], "start_point": {"row": 39, "column": 19}, "end_point": {"row": 39, "column": 20}}, {"id": 144, "type": "identifier", "text": "s", "parent": 142, "children": [], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 21}}, {"id": 145, "type": "declaration", "text": "void* PanicUnlessMalloc(UINT16 size);", "parent": 0, "children": [146, 147], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 37}}, {"id": 146, "type": "primitive_type", "text": "void", "parent": 145, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 4}}, {"id": 147, "type": "pointer_declarator", "text": "* PanicUnlessMalloc(UINT16 size)", "parent": 145, "children": [148, 149], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 36}}, {"id": 148, "type": "*", "text": "*", "parent": 147, "children": [], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 5}}, {"id": 149, "type": "function_declarator", "text": "PanicUnlessMalloc(UINT16 size)", "parent": 147, "children": [150, 151], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 36}}, {"id": 150, "type": "identifier", "text": "PanicUnlessMalloc", "parent": 149, "children": [], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 23}}, {"id": 151, "type": "parameter_list", "text": "(UINT16 size)", "parent": 149, "children": [152], "start_point": {"row": 42, "column": 23}, "end_point": {"row": 42, "column": 36}}, {"id": 152, "type": "parameter_declaration", "text": "UINT16 size", "parent": 151, "children": [153, 154], "start_point": {"row": 42, "column": 24}, "end_point": {"row": 42, "column": 35}}, {"id": 153, "type": "type_identifier", "text": "UINT16", "parent": 152, "children": [], "start_point": {"row": 42, "column": 24}, "end_point": {"row": 42, "column": 30}}, {"id": 154, "type": "identifier", "text": "size", "parent": 152, "children": [], "start_point": {"row": 42, "column": 31}, "end_point": {"row": 42, "column": 35}}, {"id": 155, "type": "declaration", "text": "void Panic(void);", "parent": 0, "children": [156, 157], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 17}}, {"id": 156, "type": "primitive_type", "text": "void", "parent": 155, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 4}}, {"id": 157, "type": "function_declarator", "text": "Panic(void)", "parent": 155, "children": [158, 159], "start_point": {"row": 44, "column": 5}, "end_point": {"row": 44, "column": 16}}, {"id": 158, "type": "identifier", "text": "Panic", "parent": 157, "children": [], "start_point": {"row": 44, "column": 5}, "end_point": {"row": 44, "column": 10}}, {"id": 159, "type": "parameter_list", "text": "(void)", "parent": 157, "children": [160], "start_point": {"row": 44, "column": 10}, "end_point": {"row": 44, "column": 16}}, {"id": 160, "type": "parameter_declaration", "text": "void", "parent": 159, "children": [161], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 15}}, {"id": 161, "type": "primitive_type", "text": "void", "parent": 160, "children": [], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 15}}, {"id": 162, "type": "declaration", "text": "void LeHostEnterPanic(char *cfile, int cline);", "parent": 0, "children": [163, 164], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 46}}, {"id": 163, "type": "primitive_type", "text": "void", "parent": 162, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 4}}, {"id": 164, "type": "function_declarator", "text": "LeHostEnterPanic(char *cfile, int cline)", "parent": 162, "children": [165, 166], "start_point": {"row": 46, "column": 5}, "end_point": {"row": 46, "column": 45}}, {"id": 165, "type": "identifier", "text": "LeHostEnterPanic", "parent": 164, "children": [], "start_point": {"row": 46, "column": 5}, "end_point": {"row": 46, "column": 21}}, {"id": 166, "type": "parameter_list", "text": "(char *cfile, int cline)", "parent": 164, "children": [167, 172], "start_point": {"row": 46, "column": 21}, "end_point": {"row": 46, "column": 45}}, {"id": 167, "type": "parameter_declaration", "text": "char *cfile", "parent": 166, "children": [168, 169], "start_point": {"row": 46, "column": 22}, "end_point": {"row": 46, "column": 33}}, {"id": 168, "type": "primitive_type", "text": "char", "parent": 167, "children": [], "start_point": {"row": 46, "column": 22}, "end_point": {"row": 46, "column": 26}}, {"id": 169, "type": "pointer_declarator", "text": "*cfile", "parent": 167, "children": [170, 171], "start_point": {"row": 46, "column": 27}, "end_point": {"row": 46, "column": 33}}, {"id": 170, "type": "*", "text": "*", "parent": 169, "children": [], "start_point": {"row": 46, "column": 27}, "end_point": {"row": 46, "column": 28}}, {"id": 171, "type": "identifier", "text": "cfile", "parent": 169, "children": [], "start_point": {"row": 46, "column": 28}, "end_point": {"row": 46, "column": 33}}, {"id": 172, "type": "parameter_declaration", "text": "int cline", "parent": 166, "children": [173, 174], "start_point": {"row": 46, "column": 35}, "end_point": {"row": 46, "column": 44}}, {"id": 173, "type": "primitive_type", "text": "int", "parent": 172, "children": [], "start_point": {"row": 46, "column": 35}, "end_point": {"row": 46, "column": 38}}, {"id": 174, "type": "identifier", "text": "cline", "parent": 172, "children": [], "start_point": {"row": 46, "column": 39}, "end_point": {"row": 46, "column": 44}}, {"id": 175, "type": "declaration", "text": "void BufToOctets(UINT8 **octets, const void *buf, UINT16 len);", "parent": 0, "children": [176, 177], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 62}}, {"id": 176, "type": "primitive_type", "text": "void", "parent": 175, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 4}}, {"id": 177, "type": "function_declarator", "text": "BufToOctets(UINT8 **octets, const void *buf, UINT16 len)", "parent": 175, "children": [178, 179], "start_point": {"row": 48, "column": 5}, "end_point": {"row": 48, "column": 61}}, {"id": 178, "type": "identifier", "text": "BufToOctets", "parent": 177, "children": [], "start_point": {"row": 48, "column": 5}, "end_point": {"row": 48, "column": 16}}, {"id": 179, "type": "parameter_list", "text": "(UINT8 **octets, const void *buf, UINT16 len)", "parent": 177, "children": [180, 187, 192], "start_point": {"row": 48, "column": 16}, "end_point": {"row": 48, "column": 61}}, {"id": 180, "type": "parameter_declaration", "text": "UINT8 **octets", "parent": 179, "children": [181, 182], "start_point": {"row": 48, "column": 17}, "end_point": {"row": 48, "column": 31}}, {"id": 181, "type": "type_identifier", "text": "UINT8", "parent": 180, "children": [], "start_point": {"row": 48, "column": 17}, "end_point": {"row": 48, "column": 22}}, {"id": 182, "type": "pointer_declarator", "text": "**octets", "parent": 180, "children": [183, 184], "start_point": {"row": 48, "column": 23}, "end_point": {"row": 48, "column": 31}}, {"id": 183, "type": "*", "text": "*", "parent": 182, "children": [], "start_point": {"row": 48, "column": 23}, "end_point": {"row": 48, "column": 24}}, {"id": 184, "type": "pointer_declarator", "text": "*octets", "parent": 182, "children": [185, 186], "start_point": {"row": 48, "column": 24}, "end_point": {"row": 48, "column": 31}}, {"id": 185, "type": "*", "text": "*", "parent": 184, "children": [], "start_point": {"row": 48, "column": 24}, "end_point": {"row": 48, "column": 25}}, {"id": 186, "type": "identifier", "text": "octets", "parent": 184, "children": [], "start_point": {"row": 48, "column": 25}, "end_point": {"row": 48, "column": 31}}, {"id": 187, "type": "parameter_declaration", "text": "const void *buf", "parent": 179, "children": [188, 189], "start_point": {"row": 48, "column": 33}, "end_point": {"row": 48, "column": 48}}, {"id": 188, "type": "primitive_type", "text": "void", "parent": 187, "children": [], "start_point": {"row": 48, "column": 39}, "end_point": {"row": 48, "column": 43}}, {"id": 189, "type": "pointer_declarator", "text": "*buf", "parent": 187, "children": [190, 191], "start_point": {"row": 48, "column": 44}, "end_point": {"row": 48, "column": 48}}, {"id": 190, "type": "*", "text": "*", "parent": 189, "children": [], "start_point": {"row": 48, "column": 44}, "end_point": {"row": 48, "column": 45}}, {"id": 191, "type": "identifier", "text": "buf", "parent": 189, "children": [], "start_point": {"row": 48, "column": 45}, "end_point": {"row": 48, "column": 48}}, {"id": 192, "type": "parameter_declaration", "text": "UINT16 len", "parent": 179, "children": [193, 194], "start_point": {"row": 48, "column": 50}, "end_point": {"row": 48, "column": 60}}, {"id": 193, "type": "type_identifier", "text": "UINT16", "parent": 192, "children": [], "start_point": {"row": 48, "column": 50}, "end_point": {"row": 48, "column": 56}}, {"id": 194, "type": "identifier", "text": "len", "parent": 192, "children": [], "start_point": {"row": 48, "column": 57}, "end_point": {"row": 48, "column": 60}}, {"id": 195, "type": "declaration", "text": "void OctetsToBuf(const void *buf, UINT8 **octets, UINT16 len);", "parent": 0, "children": [196, 197], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 62}}, {"id": 196, "type": "primitive_type", "text": "void", "parent": 195, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 4}}, {"id": 197, "type": "function_declarator", "text": "OctetsToBuf(const void *buf, UINT8 **octets, UINT16 len)", "parent": 195, "children": [198, 199], "start_point": {"row": 50, "column": 5}, "end_point": {"row": 50, "column": 61}}, {"id": 198, "type": "identifier", "text": "OctetsToBuf", "parent": 197, "children": [], "start_point": {"row": 50, "column": 5}, "end_point": {"row": 50, "column": 16}}, {"id": 199, "type": "parameter_list", "text": "(const void *buf, UINT8 **octets, UINT16 len)", "parent": 197, "children": [200, 205, 212], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 61}}, {"id": 200, "type": "parameter_declaration", "text": "const void *buf", "parent": 199, "children": [201, 202], "start_point": {"row": 50, "column": 17}, "end_point": {"row": 50, "column": 32}}, {"id": 201, "type": "primitive_type", "text": "void", "parent": 200, "children": [], "start_point": {"row": 50, "column": 23}, "end_point": {"row": 50, "column": 27}}, {"id": 202, "type": "pointer_declarator", "text": "*buf", "parent": 200, "children": [203, 204], "start_point": {"row": 50, "column": 28}, "end_point": {"row": 50, "column": 32}}, {"id": 203, "type": "*", "text": "*", "parent": 202, "children": [], "start_point": {"row": 50, "column": 28}, "end_point": {"row": 50, "column": 29}}, {"id": 204, "type": "identifier", "text": "buf", "parent": 202, "children": [], "start_point": {"row": 50, "column": 29}, "end_point": {"row": 50, "column": 32}}, {"id": 205, "type": "parameter_declaration", "text": "UINT8 **octets", "parent": 199, "children": [206, 207], "start_point": {"row": 50, "column": 34}, "end_point": {"row": 50, "column": 48}}, {"id": 206, "type": "type_identifier", "text": "UINT8", "parent": 205, "children": [], "start_point": {"row": 50, "column": 34}, "end_point": {"row": 50, "column": 39}}, {"id": 207, "type": "pointer_declarator", "text": "**octets", "parent": 205, "children": [208, 209], "start_point": {"row": 50, "column": 40}, "end_point": {"row": 50, "column": 48}}, {"id": 208, "type": "*", "text": "*", "parent": 207, "children": [], "start_point": {"row": 50, "column": 40}, "end_point": {"row": 50, "column": 41}}, {"id": 209, "type": "pointer_declarator", "text": "*octets", "parent": 207, "children": [210, 211], "start_point": {"row": 50, "column": 41}, "end_point": {"row": 50, "column": 48}}, {"id": 210, "type": "*", "text": "*", "parent": 209, "children": [], "start_point": {"row": 50, "column": 41}, "end_point": {"row": 50, "column": 42}}, {"id": 211, "type": "identifier", "text": "octets", "parent": 209, "children": [], "start_point": {"row": 50, "column": 42}, "end_point": {"row": 50, "column": 48}}, {"id": 212, "type": "parameter_declaration", "text": "UINT16 len", "parent": 199, "children": [213, 214], "start_point": {"row": 50, "column": 50}, "end_point": {"row": 50, "column": 60}}, {"id": 213, "type": "type_identifier", "text": "UINT16", "parent": 212, "children": [], "start_point": {"row": 50, "column": 50}, "end_point": {"row": 50, "column": 56}}, {"id": 214, "type": "identifier", "text": "len", "parent": 212, "children": [], "start_point": {"row": 50, "column": 57}, "end_point": {"row": 50, "column": 60}}, {"id": 215, "type": "declaration", "text": "UINT16 OctetsToDec16(UINT8 **octets);", "parent": 0, "children": [216, 217], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 37}}, {"id": 216, "type": "type_identifier", "text": "UINT16", "parent": 215, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 6}}, {"id": 217, "type": "function_declarator", "text": "OctetsToDec16(UINT8 **octets)", "parent": 215, "children": [218, 219], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 36}}, {"id": 218, "type": "identifier", "text": "OctetsToDec16", "parent": 217, "children": [], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 20}}, {"id": 219, "type": "parameter_list", "text": "(UINT8 **octets)", "parent": 217, "children": [220], "start_point": {"row": 52, "column": 20}, "end_point": {"row": 52, "column": 36}}, {"id": 220, "type": "parameter_declaration", "text": "UINT8 **octets", "parent": 219, "children": [221, 222], "start_point": {"row": 52, "column": 21}, "end_point": {"row": 52, "column": 35}}, {"id": 221, "type": "type_identifier", "text": "UINT8", "parent": 220, "children": [], "start_point": {"row": 52, "column": 21}, "end_point": {"row": 52, "column": 26}}, {"id": 222, "type": "pointer_declarator", "text": "**octets", "parent": 220, "children": [223, 224], "start_point": {"row": 52, "column": 27}, "end_point": {"row": 52, "column": 35}}, {"id": 223, "type": "*", "text": "*", "parent": 222, "children": [], "start_point": {"row": 52, "column": 27}, "end_point": {"row": 52, "column": 28}}, {"id": 224, "type": "pointer_declarator", "text": "*octets", "parent": 222, "children": [225, 226], "start_point": {"row": 52, "column": 28}, "end_point": {"row": 52, "column": 35}}, {"id": 225, "type": "*", "text": "*", "parent": 224, "children": [], "start_point": {"row": 52, "column": 28}, "end_point": {"row": 52, "column": 29}}, {"id": 226, "type": "identifier", "text": "octets", "parent": 224, "children": [], "start_point": {"row": 52, "column": 29}, "end_point": {"row": 52, "column": 35}}, {"id": 227, "type": "declaration", "text": "void Dec16ToOctets(UINT8 **octets, UINT16 dec);", "parent": 0, "children": [228, 229], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 47}}, {"id": 228, "type": "primitive_type", "text": "void", "parent": 227, "children": [], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 4}}, {"id": 229, "type": "function_declarator", "text": "Dec16ToOctets(UINT8 **octets, UINT16 dec)", "parent": 227, "children": [230, 231], "start_point": {"row": 54, "column": 5}, "end_point": {"row": 54, "column": 46}}, {"id": 230, "type": "identifier", "text": "Dec16ToOctets", "parent": 229, "children": [], "start_point": {"row": 54, "column": 5}, "end_point": {"row": 54, "column": 18}}, {"id": 231, "type": "parameter_list", "text": "(UINT8 **octets, UINT16 dec)", "parent": 229, "children": [232, 239], "start_point": {"row": 54, "column": 18}, "end_point": {"row": 54, "column": 46}}, {"id": 232, "type": "parameter_declaration", "text": "UINT8 **octets", "parent": 231, "children": [233, 234], "start_point": {"row": 54, "column": 19}, "end_point": {"row": 54, "column": 33}}, {"id": 233, "type": "type_identifier", "text": "UINT8", "parent": 232, "children": [], "start_point": {"row": 54, "column": 19}, "end_point": {"row": 54, "column": 24}}, {"id": 234, "type": "pointer_declarator", "text": "**octets", "parent": 232, "children": [235, 236], "start_point": {"row": 54, "column": 25}, "end_point": {"row": 54, "column": 33}}, {"id": 235, "type": "*", "text": "*", "parent": 234, "children": [], "start_point": {"row": 54, "column": 25}, "end_point": {"row": 54, "column": 26}}, {"id": 236, "type": "pointer_declarator", "text": "*octets", "parent": 234, "children": [237, 238], "start_point": {"row": 54, "column": 26}, "end_point": {"row": 54, "column": 33}}, {"id": 237, "type": "*", "text": "*", "parent": 236, "children": [], "start_point": {"row": 54, "column": 26}, "end_point": {"row": 54, "column": 27}}, {"id": 238, "type": "identifier", "text": "octets", "parent": 236, "children": [], "start_point": {"row": 54, "column": 27}, "end_point": {"row": 54, "column": 33}}, {"id": 239, "type": "parameter_declaration", "text": "UINT16 dec", "parent": 231, "children": [240, 241], "start_point": {"row": 54, "column": 35}, "end_point": {"row": 54, "column": 45}}, {"id": 240, "type": "type_identifier", "text": "UINT16", "parent": 239, "children": [], "start_point": {"row": 54, "column": 35}, "end_point": {"row": 54, "column": 41}}, {"id": 241, "type": "identifier", "text": "dec", "parent": 239, "children": [], "start_point": {"row": 54, "column": 42}, "end_point": {"row": 54, "column": 45}}, {"id": 242, "type": "declaration", "text": "UINT32 BufToDec32(void *buf);", "parent": 0, "children": [243, 244], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 29}}, {"id": 243, "type": "type_identifier", "text": "UINT32", "parent": 242, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 6}}, {"id": 244, "type": "function_declarator", "text": "BufToDec32(void *buf)", "parent": 242, "children": [245, 246], "start_point": {"row": 56, "column": 7}, "end_point": {"row": 56, "column": 28}}, {"id": 245, "type": "identifier", "text": "BufToDec32", "parent": 244, "children": [], "start_point": {"row": 56, "column": 7}, "end_point": {"row": 56, "column": 17}}, {"id": 246, "type": "parameter_list", "text": "(void *buf)", "parent": 244, "children": [247], "start_point": {"row": 56, "column": 17}, "end_point": {"row": 56, "column": 28}}, {"id": 247, "type": "parameter_declaration", "text": "void *buf", "parent": 246, "children": [248, 249], "start_point": {"row": 56, "column": 18}, "end_point": {"row": 56, "column": 27}}, {"id": 248, "type": "primitive_type", "text": "void", "parent": 247, "children": [], "start_point": {"row": 56, "column": 18}, "end_point": {"row": 56, "column": 22}}, {"id": 249, "type": "pointer_declarator", "text": "*buf", "parent": 247, "children": [250, 251], "start_point": {"row": 56, "column": 23}, "end_point": {"row": 56, "column": 27}}, {"id": 250, "type": "*", "text": "*", "parent": 249, "children": [], "start_point": {"row": 56, "column": 23}, "end_point": {"row": 56, "column": 24}}, {"id": 251, "type": "identifier", "text": "buf", "parent": 249, "children": [], "start_point": {"row": 56, "column": 24}, "end_point": {"row": 56, "column": 27}}, {"id": 252, "type": "declaration", "text": "BOOL IsEqualVal(void *data, UINT8 val, UINT16 len);", "parent": 0, "children": [253, 254], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 51}}, {"id": 253, "type": "type_identifier", "text": "BOOL", "parent": 252, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 4}}, {"id": 254, "type": "function_declarator", "text": "IsEqualVal(void *data, UINT8 val, UINT16 len)", "parent": 252, "children": [255, 256], "start_point": {"row": 58, "column": 5}, "end_point": {"row": 58, "column": 50}}, {"id": 255, "type": "identifier", "text": "IsEqualVal", "parent": 254, "children": [], "start_point": {"row": 58, "column": 5}, "end_point": {"row": 58, "column": 15}}, {"id": 256, "type": "parameter_list", "text": "(void *data, UINT8 val, UINT16 len)", "parent": 254, "children": [257, 262, 265], "start_point": {"row": 58, "column": 15}, "end_point": {"row": 58, "column": 50}}, {"id": 257, "type": "parameter_declaration", "text": "void *data", "parent": 256, "children": [258, 259], "start_point": {"row": 58, "column": 16}, "end_point": {"row": 58, "column": 26}}, {"id": 258, "type": "primitive_type", "text": "void", "parent": 257, "children": [], "start_point": {"row": 58, "column": 16}, "end_point": {"row": 58, "column": 20}}, {"id": 259, "type": "pointer_declarator", "text": "*data", "parent": 257, "children": [260, 261], "start_point": {"row": 58, "column": 21}, "end_point": {"row": 58, "column": 26}}, {"id": 260, "type": "*", "text": "*", "parent": 259, "children": [], "start_point": {"row": 58, "column": 21}, "end_point": {"row": 58, "column": 22}}, {"id": 261, "type": "identifier", "text": "data", "parent": 259, "children": [], "start_point": {"row": 58, "column": 22}, "end_point": {"row": 58, "column": 26}}, {"id": 262, "type": "parameter_declaration", "text": "UINT8 val", "parent": 256, "children": [263, 264], "start_point": {"row": 58, "column": 28}, "end_point": {"row": 58, "column": 37}}, {"id": 263, "type": "type_identifier", "text": "UINT8", "parent": 262, "children": [], "start_point": {"row": 58, "column": 28}, "end_point": {"row": 58, "column": 33}}, {"id": 264, "type": "identifier", "text": "val", "parent": 262, "children": [], "start_point": {"row": 58, "column": 34}, "end_point": {"row": 58, "column": 37}}, {"id": 265, "type": "parameter_declaration", "text": "UINT16 len", "parent": 256, "children": [266, 267], "start_point": {"row": 58, "column": 39}, "end_point": {"row": 58, "column": 49}}, {"id": 266, "type": "type_identifier", "text": "UINT16", "parent": 265, "children": [], "start_point": {"row": 58, "column": 39}, "end_point": {"row": 58, "column": 45}}, {"id": 267, "type": "identifier", "text": "len", "parent": 265, "children": [], "start_point": {"row": 58, "column": 46}, "end_point": {"row": 58, "column": 49}}, {"id": 268, "type": "declaration", "text": "void GenerateRandom(void *buf, UINT16 len);", "parent": 0, "children": [269, 270], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 43}}, {"id": 269, "type": "primitive_type", "text": "void", "parent": 268, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 4}}, {"id": 270, "type": "function_declarator", "text": "GenerateRandom(void *buf, UINT16 len)", "parent": 268, "children": [271, 272], "start_point": {"row": 60, "column": 5}, "end_point": {"row": 60, "column": 42}}, {"id": 271, "type": "identifier", "text": "GenerateRandom", "parent": 270, "children": [], "start_point": {"row": 60, "column": 5}, "end_point": {"row": 60, "column": 19}}, {"id": 272, "type": "parameter_list", "text": "(void *buf, UINT16 len)", "parent": 270, "children": [273, 278], "start_point": {"row": 60, "column": 19}, "end_point": {"row": 60, "column": 42}}, {"id": 273, "type": "parameter_declaration", "text": "void *buf", "parent": 272, "children": [274, 275], "start_point": {"row": 60, "column": 20}, "end_point": {"row": 60, "column": 29}}, {"id": 274, "type": "primitive_type", "text": "void", "parent": 273, "children": [], "start_point": {"row": 60, "column": 20}, "end_point": {"row": 60, "column": 24}}, {"id": 275, "type": "pointer_declarator", "text": "*buf", "parent": 273, "children": [276, 277], "start_point": {"row": 60, "column": 25}, "end_point": {"row": 60, "column": 29}}, {"id": 276, "type": "*", "text": "*", "parent": 275, "children": [], "start_point": {"row": 60, "column": 25}, "end_point": {"row": 60, "column": 26}}, {"id": 277, "type": "identifier", "text": "buf", "parent": 275, "children": [], "start_point": {"row": 60, "column": 26}, "end_point": {"row": 60, "column": 29}}, {"id": 278, "type": "parameter_declaration", "text": "UINT16 len", "parent": 272, "children": [279, 280], "start_point": {"row": 60, "column": 31}, "end_point": {"row": 60, "column": 41}}, {"id": 279, "type": "type_identifier", "text": "UINT16", "parent": 278, "children": [], "start_point": {"row": 60, "column": 31}, "end_point": {"row": 60, "column": 37}}, {"id": 280, "type": "identifier", "text": "len", "parent": 278, "children": [], "start_point": {"row": 60, "column": 38}, "end_point": {"row": 60, "column": 41}}, {"id": 281, "type": "declaration", "text": "void SwapBuf(UINT8 *dst, const UINT8 *src, UINT16 len);", "parent": 0, "children": [282, 283], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 55}}, {"id": 282, "type": "primitive_type", "text": "void", "parent": 281, "children": [], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 4}}, {"id": 283, "type": "function_declarator", "text": "SwapBuf(UINT8 *dst, const UINT8 *src, UINT16 len)", "parent": 281, "children": [284, 285], "start_point": {"row": 62, "column": 5}, "end_point": {"row": 62, "column": 54}}, {"id": 284, "type": "identifier", "text": "SwapBuf", "parent": 283, "children": [], "start_point": {"row": 62, "column": 5}, "end_point": {"row": 62, "column": 12}}, {"id": 285, "type": "parameter_list", "text": "(UINT8 *dst, const UINT8 *src, UINT16 len)", "parent": 283, "children": [286, 291, 296], "start_point": {"row": 62, "column": 12}, "end_point": {"row": 62, "column": 54}}, {"id": 286, "type": "parameter_declaration", "text": "UINT8 *dst", "parent": 285, "children": [287, 288], "start_point": {"row": 62, "column": 13}, "end_point": {"row": 62, "column": 23}}, {"id": 287, "type": "type_identifier", "text": "UINT8", "parent": 286, "children": [], "start_point": {"row": 62, "column": 13}, "end_point": {"row": 62, "column": 18}}, {"id": 288, "type": "pointer_declarator", "text": "*dst", "parent": 286, "children": [289, 290], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 62, "column": 23}}, {"id": 289, "type": "*", "text": "*", "parent": 288, "children": [], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 62, "column": 20}}, {"id": 290, "type": "identifier", "text": "dst", "parent": 288, "children": [], "start_point": {"row": 62, "column": 20}, "end_point": {"row": 62, "column": 23}}, {"id": 291, "type": "parameter_declaration", "text": "const UINT8 *src", "parent": 285, "children": [292, 293], "start_point": {"row": 62, "column": 25}, "end_point": {"row": 62, "column": 41}}, {"id": 292, "type": "type_identifier", "text": "UINT8", "parent": 291, "children": [], "start_point": {"row": 62, "column": 31}, "end_point": {"row": 62, "column": 36}}, {"id": 293, "type": "pointer_declarator", "text": "*src", "parent": 291, "children": [294, 295], "start_point": {"row": 62, "column": 37}, "end_point": {"row": 62, "column": 41}}, {"id": 294, "type": "*", "text": "*", "parent": 293, "children": [], "start_point": {"row": 62, "column": 37}, "end_point": {"row": 62, "column": 38}}, {"id": 295, "type": "identifier", "text": "src", "parent": 293, "children": [], "start_point": {"row": 62, "column": 38}, "end_point": {"row": 62, "column": 41}}, {"id": 296, "type": "parameter_declaration", "text": "UINT16 len", "parent": 285, "children": [297, 298], "start_point": {"row": 62, "column": 43}, "end_point": {"row": 62, "column": 53}}, {"id": 297, "type": "type_identifier", "text": "UINT16", "parent": 296, "children": [], "start_point": {"row": 62, "column": 43}, "end_point": {"row": 62, "column": 49}}, {"id": 298, "type": "identifier", "text": "len", "parent": 296, "children": [], "start_point": {"row": 62, "column": 50}, "end_point": {"row": 62, "column": 53}}, {"id": 299, "type": "declaration", "text": "void SwapInPlace(void *buf, UINT16 len);", "parent": 0, "children": [300, 301], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 40}}, {"id": 300, "type": "primitive_type", "text": "void", "parent": 299, "children": [], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 4}}, {"id": 301, "type": "function_declarator", "text": "SwapInPlace(void *buf, UINT16 len)", "parent": 299, "children": [302, 303], "start_point": {"row": 64, "column": 5}, "end_point": {"row": 64, "column": 39}}, {"id": 302, "type": "identifier", "text": "SwapInPlace", "parent": 301, "children": [], "start_point": {"row": 64, "column": 5}, "end_point": {"row": 64, "column": 16}}, {"id": 303, "type": "parameter_list", "text": "(void *buf, UINT16 len)", "parent": 301, "children": [304, 309], "start_point": {"row": 64, "column": 16}, "end_point": {"row": 64, "column": 39}}, {"id": 304, "type": "parameter_declaration", "text": "void *buf", "parent": 303, "children": [305, 306], "start_point": {"row": 64, "column": 17}, "end_point": {"row": 64, "column": 26}}, {"id": 305, "type": "primitive_type", "text": "void", "parent": 304, "children": [], "start_point": {"row": 64, "column": 17}, "end_point": {"row": 64, "column": 21}}, {"id": 306, "type": "pointer_declarator", "text": "*buf", "parent": 304, "children": [307, 308], "start_point": {"row": 64, "column": 22}, "end_point": {"row": 64, "column": 26}}, {"id": 307, "type": "*", "text": "*", "parent": 306, "children": [], "start_point": {"row": 64, "column": 22}, "end_point": {"row": 64, "column": 23}}, {"id": 308, "type": "identifier", "text": "buf", "parent": 306, "children": [], "start_point": {"row": 64, "column": 23}, "end_point": {"row": 64, "column": 26}}, {"id": 309, "type": "parameter_declaration", "text": "UINT16 len", "parent": 303, "children": [310, 311], "start_point": {"row": 64, "column": 28}, "end_point": {"row": 64, "column": 38}}, {"id": 310, "type": "type_identifier", "text": "UINT16", "parent": 309, "children": [], "start_point": {"row": 64, "column": 28}, "end_point": {"row": 64, "column": 34}}, {"id": 311, "type": "identifier", "text": "len", "parent": 309, "children": [], "start_point": {"row": 64, "column": 35}, "end_point": {"row": 64, "column": 38}}, {"id": 312, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 6}}]}, "node_categories": {"declarations": {"functions": [30, 37, 43, 49, 56, 67, 75, 85, 101, 119, 137, 149, 157, 164, 177, 197, 217, 229, 244, 254, 270, 283, 301], "variables": [63, 70, 73, 78, 83, 88, 93, 96, 99, 104, 109, 114, 117, 122, 127, 132, 135, 140, 145, 152, 155, 160, 162, 167, 172, 175, 180, 187, 192, 195, 200, 205, 212, 215, 220, 227, 232, 239, 242, 247, 252, 257, 262, 265, 268, 273, 278, 281, 286, 291, 296, 299, 304, 309], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 32, 34, 35, 39, 41, 45, 47, 51, 53, 54, 58, 60, 61, 68, 71, 72, 76, 82, 86, 92, 94, 95, 97, 98, 102, 108, 113, 115, 116, 118, 120, 126, 131, 133, 134, 136, 138, 144, 150, 153, 154, 158, 165, 171, 174, 178, 181, 186, 191, 193, 194, 198, 204, 206, 211, 213, 214, 216, 218, 221, 226, 230, 233, 238, 240, 241, 243, 245, 251, 253, 255, 261, 263, 264, 266, 267, 271, 277, 279, 280, 284, 287, 290, 292, 295, 297, 298, 302, 308, 310, 311, 312], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23, 26, 29], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 30, "universal_type": "function", "name": "unknown", "text_snippet": "#define ForEach(idx, max)\t\t\t\tfor (idx = 0; idx < (max); idx++)\n"}, {"node_id": 37, "universal_type": "function", "name": "unknown", "text_snippet": "#define UINT16_LO(x)\t\t\t\t\t((x) & 0xFF)\n"}, {"node_id": 43, "universal_type": "function", "name": "unknown", "text_snippet": "#define UINT16_HI(x)\t\t\t\t\t(((x) >> 8) & 0xFF)\n"}, {"node_id": 49, "universal_type": "function", "name": "unknown", "text_snippet": "#define LE_MIN(x, y)\t\t\t\t\t((x) > (y) ? (y) : (x))\n"}, {"node_id": 56, "universal_type": "function", "name": "unknown", "text_snippet": "#define LE_MAX(x, y)\t\t\t\t\t((x) < (y) ? (y) : (x))\n"}, {"node_id": 67, "universal_type": "function", "name": "unknown", "text_snippet": "Malloc(UINT16 size)"}, {"node_id": 75, "universal_type": "function", "name": "unknown", "text_snippet": "FreeMem(void *m)"}, {"node_id": 85, "universal_type": "function", "name": "unknown", "text_snippet": "MemSet(void *s, UINT8 val, UINT16 len)"}, {"node_id": 101, "universal_type": "function", "name": "*s,", "text_snippet": "MemCopy(void *d, const void *s, UINT16 len)"}, {"node_id": 119, "universal_type": "function", "name": "*s,", "text_snippet": "MemCmp(void *d, const void *s, UINT16 len)"}, {"node_id": 137, "universal_type": "function", "name": "unknown", "text_snippet": "StrLen(void *s)"}, {"node_id": 149, "universal_type": "function", "name": "unknown", "text_snippet": "PanicUnlessMalloc(UINT16 size)"}, {"node_id": 157, "universal_type": "function", "name": "unknown", "text_snippet": "Panic(void)"}, {"node_id": 164, "universal_type": "function", "name": "cline)", "text_snippet": "LeHostEnterPanic(char *cfile, int cline)"}, {"node_id": 177, "universal_type": "function", "name": "*buf,", "text_snippet": "BufToOctets(UINT8 **octets, const void *buf, UINT16 len)"}, {"node_id": 197, "universal_type": "function", "name": "*buf,", "text_snippet": "OctetsToBuf(const void *buf, UINT8 **octets, UINT16 len)"}, {"node_id": 217, "universal_type": "function", "name": "unknown", "text_snippet": "OctetsToDec16(UINT8 **octets)"}, {"node_id": 229, "universal_type": "function", "name": "unknown", "text_snippet": "Dec16ToOctets(UINT8 **octets, UINT16 dec)"}, {"node_id": 244, "universal_type": "function", "name": "unknown", "text_snippet": "BufToDec32(void *buf)"}, {"node_id": 254, "universal_type": "function", "name": "unknown", "text_snippet": "IsEqualVal(void *data, UINT8 val, UINT16 len)"}, {"node_id": 270, "universal_type": "function", "name": "unknown", "text_snippet": "GenerateRandom(void *buf, UINT16 len)"}, {"node_id": 283, "universal_type": "function", "name": "unknown", "text_snippet": "SwapBuf(UINT8 *dst, const UINT8 *src, UINT16 len)"}, {"node_id": 301, "universal_type": "function", "name": "unknown", "text_snippet": "SwapInPlace(void *buf, UINT16 len)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <stdint.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <assert.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <string.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <errno.h>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <stdio.h>\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <stdlib.h>\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include <time.h>\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include \"ble_type_define.h\"\n"}, {"node_id": 28, "text": "#include"}]}, "original_source_code": "/******************************************************************************\n* Copyright 2017 - 2018, Opulinks Technology Ltd.\n* ---------------------------------------------------------------------------\n* Statement:\n* ----------\n* This software is protected by Copyright and the information contained\n* herein is confidential. The software may not be copied and the information\n* contained herein may not be used or disclosed except with the written\n* permission of Opulinks Technology Ltd. (C) 2018\n******************************************************************************/\n\n#ifndef _BLE_UTIL_H_\n#define _BLE_UTIL_H_\n\n#include <stdint.h>\n#include <assert.h>\n#include <string.h>\n#include <errno.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <time.h>\n\n\n#include \"ble_type_define.h\"\n\n\n#define ForEach(idx, max)\t\t\t\tfor (idx = 0; idx < (max); idx++)\n\n#define UINT16_LO(x)\t\t\t\t\t((x) & 0xFF)\n#define UINT16_HI(x)\t\t\t\t\t(((x) >> 8) & 0xFF)\n#define LE_MIN(x, y)\t\t\t\t\t((x) > (y) ? (y) : (x))\n#define LE_MAX(x, y)\t\t\t\t\t((x) < (y) ? (y) : (x))\n\n\nvoid* Malloc(UINT16 size);\nvoid FreeMem(void *m);\nvoid MemSet(void *s, UINT8 val, UINT16 len);\nvoid MemCopy(void *d, const void *s, UINT16 len);\nINT8 MemCmp(void *d, const void *s, UINT16 len);\nUINT16 StrLen(void *s);\n\n\nvoid* PanicUnlessMalloc(UINT16 size);\n\nvoid Panic(void);\n\nvoid LeHostEnterPanic(char *cfile, int cline);\n\nvoid BufToOctets(UINT8 **octets, const void *buf, UINT16 len);\n\nvoid OctetsToBuf(const void *buf, UINT8 **octets, UINT16 len);\n\nUINT16 OctetsToDec16(UINT8 **octets);\n\nvoid Dec16ToOctets(UINT8 **octets, UINT16 dec);\n\nUINT32 BufToDec32(void *buf);\n\nBOOL IsEqualVal(void *data, UINT8 val, UINT16 len);\n\nvoid GenerateRandom(void *buf, UINT16 len);\n\nvoid SwapBuf(UINT8 *dst, const UINT8 *src, UINT16 len);\n\nvoid SwapInPlace(void *buf, UINT16 len);\n\n#endif\n"}
| 81,200
|
c
|
#include "km0/device/boardIo.h"
#include "km0/device/boardIoImpl.h"
#include "km0/kernel/commandDefinitions.h"
#include "km0/kernel/configManager.h"
#include "neoPixelCore.h"
#include "pico_sdk/src/common/include/pico/stdlib.h"
#ifndef KM0_RP_BOARD_IO_RGBLED__PIO_INSTANCE
#define KM0_RP_BOARD_IO_RGBLED__PIO_INSTANCE pio0
#endif
#ifndef KM0_RP_BOARD_IO_RGBLED__PIO_SM
#define KM0_RP_BOARD_IO_RGBLED__PIO_SM 0
#endif
static const uint8_t brightness_b = 60;
static const uint8_t brightness_g = 15;
static const PIO pio_rgbled = KM0_RP_BOARD_IO_RGBLED__PIO_INSTANCE;
static const int sm_rgbled = KM0_RP_BOARD_IO_RGBLED__PIO_SM;
static bool led_states[2] = { false, false };
static inline uint32_t pixelRGB(uint8_t r, uint8_t g, uint8_t b) {
return (uint32_t)(r) << 16 | ((uint32_t)(g) << 8) | (uint32_t)(b);
}
static void updateLedColor() {
uint8_t rr = 0;
uint8_t gg = led_states[0] ? brightness_g : 0;
uint8_t bb = led_states[1] ? brightness_b : 0;
uint32_t color = pixelRGB(rr, gg, bb);
neoPixelCore_putPixel(pio_rgbled, sm_rgbled, color);
}
static void handleBoardLedOperation(int index, int op) {
if (op != LedOp_Toggle) {
bool value = op == LedOp_TurnOn;
led_states[index] = value;
} else {
led_states[index] = !led_states[index];
}
updateLedColor();
}
void boardIoImpl_setupLedsRgb(int8_t pin_led, int8_t pin_led_power) {
neoPixelCore_initialize(pio_rgbled, sm_rgbled, pin_led);
if (pin_led_power != -1) {
gpio_init(pin_led_power);
gpio_set_dir(pin_led_power, GPIO_OUT);
gpio_put(pin_led_power, 1);
}
boardIo_internal_setLedFunction(handleBoardLedOperation);
configManager_setParameterExposeFlag(SystemParameter_HeartbeatLed);
configManager_setParameterExposeFlag(SystemParameter_KeyHoldIndicatorLed);
}
void boardIoImpl_setupLeds_proMicroRp() {
boardIoImpl_setupLedsRgb(25, -1);
}
void boardIoImpl_setupLeds_qtPyRp() {
boardIoImpl_setupLedsRgb(12, 11);
}
| 35.25
| 53
|
(translation_unit) "#include "km0/device/boardIo.h"\n#include "km0/device/boardIoImpl.h"\n#include "km0/kernel/commandDefinitions.h"\n#include "km0/kernel/configManager.h"\n#include "neoPixelCore.h"\n#include "pico_sdk/src/common/include/pico/stdlib.h"\n\n#ifndef KM0_RP_BOARD_IO_RGBLED__PIO_INSTANCE\n#define KM0_RP_BOARD_IO_RGBLED__PIO_INSTANCE pio0\n#endif\n\n#ifndef KM0_RP_BOARD_IO_RGBLED__PIO_SM\n#define KM0_RP_BOARD_IO_RGBLED__PIO_SM 0\n#endif\n\nstatic const uint8_t brightness_b = 60;\nstatic const uint8_t brightness_g = 15;\n\nstatic const PIO pio_rgbled = KM0_RP_BOARD_IO_RGBLED__PIO_INSTANCE;\nstatic const int sm_rgbled = KM0_RP_BOARD_IO_RGBLED__PIO_SM;\n\nstatic bool led_states[2] = { false, false };\n\nstatic inline uint32_t pixelRGB(uint8_t r, uint8_t g, uint8_t b) {\n return (uint32_t)(r) << 16 | ((uint32_t)(g) << 8) | (uint32_t)(b);\n}\n\nstatic void updateLedColor() {\n uint8_t rr = 0;\n uint8_t gg = led_states[0] ? brightness_g : 0;\n uint8_t bb = led_states[1] ? brightness_b : 0;\n uint32_t color = pixelRGB(rr, gg, bb);\n neoPixelCore_putPixel(pio_rgbled, sm_rgbled, color);\n}\n\nstatic void handleBoardLedOperation(int index, int op) {\n if (op != LedOp_Toggle) {\n bool value = op == LedOp_TurnOn;\n led_states[index] = value;\n } else {\n led_states[index] = !led_states[index];\n }\n updateLedColor();\n}\n\nvoid boardIoImpl_setupLedsRgb(int8_t pin_led, int8_t pin_led_power) {\n neoPixelCore_initialize(pio_rgbled, sm_rgbled, pin_led);\n if (pin_led_power != -1) {\n gpio_init(pin_led_power);\n gpio_set_dir(pin_led_power, GPIO_OUT);\n gpio_put(pin_led_power, 1);\n }\n boardIo_internal_setLedFunction(handleBoardLedOperation);\n configManager_setParameterExposeFlag(SystemParameter_HeartbeatLed);\n configManager_setParameterExposeFlag(SystemParameter_KeyHoldIndicatorLed);\n}\n\nvoid boardIoImpl_setupLeds_proMicroRp() {\n boardIoImpl_setupLedsRgb(25, -1);\n}\n\nvoid boardIoImpl_setupLeds_qtPyRp() {\n boardIoImpl_setupLedsRgb(12, 11);\n}\n"
(preproc_include) "#include "km0/device/boardIo.h"\n"
(#include) "#include"
(string_literal) ""km0/device/boardIo.h""
(") """
(string_content) "km0/device/boardIo.h"
(") """
(preproc_include) "#include "km0/device/boardIoImpl.h"\n"
(#include) "#include"
(string_literal) ""km0/device/boardIoImpl.h""
(") """
(string_content) "km0/device/boardIoImpl.h"
(") """
(preproc_include) "#include "km0/kernel/commandDefinitions.h"\n"
(#include) "#include"
(string_literal) ""km0/kernel/commandDefinitions.h""
(") """
(string_content) "km0/kernel/commandDefinitions.h"
(") """
(preproc_include) "#include "km0/kernel/configManager.h"\n"
(#include) "#include"
(string_literal) ""km0/kernel/configManager.h""
(") """
(string_content) "km0/kernel/configManager.h"
(") """
(preproc_include) "#include "neoPixelCore.h"\n"
(#include) "#include"
(string_literal) ""neoPixelCore.h""
(") """
(string_content) "neoPixelCore.h"
(") """
(preproc_include) "#include "pico_sdk/src/common/include/pico/stdlib.h"\n"
(#include) "#include"
(string_literal) ""pico_sdk/src/common/include/pico/stdlib.h""
(") """
(string_content) "pico_sdk/src/common/include/pico/stdlib.h"
(") """
(preproc_ifdef) "#ifndef KM0_RP_BOARD_IO_RGBLED__PIO_INSTANCE\n#define KM0_RP_BOARD_IO_RGBLED__PIO_INSTANCE pio0\n#endif"
(#ifndef) "#ifndef"
(identifier) "KM0_RP_BOARD_IO_RGBLED__PIO_INSTANCE"
(preproc_def) "#define KM0_RP_BOARD_IO_RGBLED__PIO_INSTANCE pio0\n"
(#define) "#define"
(identifier) "KM0_RP_BOARD_IO_RGBLED__PIO_INSTANCE"
(preproc_arg) "pio0"
(#endif) "#endif"
(preproc_ifdef) "#ifndef KM0_RP_BOARD_IO_RGBLED__PIO_SM\n#define KM0_RP_BOARD_IO_RGBLED__PIO_SM 0\n#endif"
(#ifndef) "#ifndef"
(identifier) "KM0_RP_BOARD_IO_RGBLED__PIO_SM"
(preproc_def) "#define KM0_RP_BOARD_IO_RGBLED__PIO_SM 0\n"
(#define) "#define"
(identifier) "KM0_RP_BOARD_IO_RGBLED__PIO_SM"
(preproc_arg) "0"
(#endif) "#endif"
(declaration) "static const uint8_t brightness_b = 60;"
(storage_class_specifier) "static"
(static) "static"
(type_qualifier) "const"
(const) "const"
(primitive_type) "uint8_t"
(init_declarator) "brightness_b = 60"
(identifier) "brightness_b"
(=) "="
(number_literal) "60"
(;) ";"
(declaration) "static const uint8_t brightness_g = 15;"
(storage_class_specifier) "static"
(static) "static"
(type_qualifier) "const"
(const) "const"
(primitive_type) "uint8_t"
(init_declarator) "brightness_g = 15"
(identifier) "brightness_g"
(=) "="
(number_literal) "15"
(;) ";"
(declaration) "static const PIO pio_rgbled = KM0_RP_BOARD_IO_RGBLED__PIO_INSTANCE;"
(storage_class_specifier) "static"
(static) "static"
(type_qualifier) "const"
(const) "const"
(type_identifier) "PIO"
(init_declarator) "pio_rgbled = KM0_RP_BOARD_IO_RGBLED__PIO_INSTANCE"
(identifier) "pio_rgbled"
(=) "="
(identifier) "KM0_RP_BOARD_IO_RGBLED__PIO_INSTANCE"
(;) ";"
(declaration) "static const int sm_rgbled = KM0_RP_BOARD_IO_RGBLED__PIO_SM;"
(storage_class_specifier) "static"
(static) "static"
(type_qualifier) "const"
(const) "const"
(primitive_type) "int"
(init_declarator) "sm_rgbled = KM0_RP_BOARD_IO_RGBLED__PIO_SM"
(identifier) "sm_rgbled"
(=) "="
(identifier) "KM0_RP_BOARD_IO_RGBLED__PIO_SM"
(;) ";"
(declaration) "static bool led_states[2] = { false, false };"
(storage_class_specifier) "static"
(static) "static"
(primitive_type) "bool"
(init_declarator) "led_states[2] = { false, false }"
(array_declarator) "led_states[2]"
(identifier) "led_states"
([) "["
(number_literal) "2"
(]) "]"
(=) "="
(initializer_list) "{ false, false }"
({) "{"
(false) "false"
(,) ","
(false) "false"
(}) "}"
(;) ";"
(function_definition) "static inline uint32_t pixelRGB(uint8_t r, uint8_t g, uint8_t b) {\n return (uint32_t)(r) << 16 | ((uint32_t)(g) << 8) | (uint32_t)(b);\n}"
(storage_class_specifier) "static"
(static) "static"
(storage_class_specifier) "inline"
(inline) "inline"
(primitive_type) "uint32_t"
(function_declarator) "pixelRGB(uint8_t r, uint8_t g, uint8_t b)"
(identifier) "pixelRGB"
(parameter_list) "(uint8_t r, uint8_t g, uint8_t b)"
(() "("
(parameter_declaration) "uint8_t r"
(primitive_type) "uint8_t"
(identifier) "r"
(,) ","
(parameter_declaration) "uint8_t g"
(primitive_type) "uint8_t"
(identifier) "g"
(,) ","
(parameter_declaration) "uint8_t b"
(primitive_type) "uint8_t"
(identifier) "b"
()) ")"
(compound_statement) "{\n return (uint32_t)(r) << 16 | ((uint32_t)(g) << 8) | (uint32_t)(b);\n}"
({) "{"
(return_statement) "return (uint32_t)(r) << 16 | ((uint32_t)(g) << 8) | (uint32_t)(b);"
(return) "return"
(binary_expression) "(uint32_t)(r) << 16 | ((uint32_t)(g) << 8) | (uint32_t)(b)"
(binary_expression) "(uint32_t)(r) << 16 | ((uint32_t)(g) << 8)"
(binary_expression) "(uint32_t)(r) << 16"
(cast_expression) "(uint32_t)(r)"
(() "("
(type_descriptor) "uint32_t"
(primitive_type) "uint32_t"
()) ")"
(parenthesized_expression) "(r)"
(() "("
(identifier) "r"
()) ")"
(<<) "<<"
(number_literal) "16"
(|) "|"
(parenthesized_expression) "((uint32_t)(g) << 8)"
(() "("
(binary_expression) "(uint32_t)(g) << 8"
(cast_expression) "(uint32_t)(g)"
(() "("
(type_descriptor) "uint32_t"
(primitive_type) "uint32_t"
()) ")"
(parenthesized_expression) "(g)"
(() "("
(identifier) "g"
()) ")"
(<<) "<<"
(number_literal) "8"
()) ")"
(|) "|"
(cast_expression) "(uint32_t)(b)"
(() "("
(type_descriptor) "uint32_t"
(primitive_type) "uint32_t"
()) ")"
(parenthesized_expression) "(b)"
(() "("
(identifier) "b"
()) ")"
(;) ";"
(}) "}"
(function_definition) "static void updateLedColor() {\n uint8_t rr = 0;\n uint8_t gg = led_states[0] ? brightness_g : 0;\n uint8_t bb = led_states[1] ? brightness_b : 0;\n uint32_t color = pixelRGB(rr, gg, bb);\n neoPixelCore_putPixel(pio_rgbled, sm_rgbled, color);\n}"
(storage_class_specifier) "static"
(static) "static"
(primitive_type) "void"
(function_declarator) "updateLedColor()"
(identifier) "updateLedColor"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{\n uint8_t rr = 0;\n uint8_t gg = led_states[0] ? brightness_g : 0;\n uint8_t bb = led_states[1] ? brightness_b : 0;\n uint32_t color = pixelRGB(rr, gg, bb);\n neoPixelCore_putPixel(pio_rgbled, sm_rgbled, color);\n}"
({) "{"
(declaration) "uint8_t rr = 0;"
(primitive_type) "uint8_t"
(init_declarator) "rr = 0"
(identifier) "rr"
(=) "="
(number_literal) "0"
(;) ";"
(declaration) "uint8_t gg = led_states[0] ? brightness_g : 0;"
(primitive_type) "uint8_t"
(init_declarator) "gg = led_states[0] ? brightness_g : 0"
(identifier) "gg"
(=) "="
(conditional_expression) "led_states[0] ? brightness_g : 0"
(subscript_expression) "led_states[0]"
(identifier) "led_states"
([) "["
(number_literal) "0"
(]) "]"
(?) "?"
(identifier) "brightness_g"
(:) ":"
(number_literal) "0"
(;) ";"
(declaration) "uint8_t bb = led_states[1] ? brightness_b : 0;"
(primitive_type) "uint8_t"
(init_declarator) "bb = led_states[1] ? brightness_b : 0"
(identifier) "bb"
(=) "="
(conditional_expression) "led_states[1] ? brightness_b : 0"
(subscript_expression) "led_states[1]"
(identifier) "led_states"
([) "["
(number_literal) "1"
(]) "]"
(?) "?"
(identifier) "brightness_b"
(:) ":"
(number_literal) "0"
(;) ";"
(declaration) "uint32_t color = pixelRGB(rr, gg, bb);"
(primitive_type) "uint32_t"
(init_declarator) "color = pixelRGB(rr, gg, bb)"
(identifier) "color"
(=) "="
(call_expression) "pixelRGB(rr, gg, bb)"
(identifier) "pixelRGB"
(argument_list) "(rr, gg, bb)"
(() "("
(identifier) "rr"
(,) ","
(identifier) "gg"
(,) ","
(identifier) "bb"
()) ")"
(;) ";"
(expression_statement) "neoPixelCore_putPixel(pio_rgbled, sm_rgbled, color);"
(call_expression) "neoPixelCore_putPixel(pio_rgbled, sm_rgbled, color)"
(identifier) "neoPixelCore_putPixel"
(argument_list) "(pio_rgbled, sm_rgbled, color)"
(() "("
(identifier) "pio_rgbled"
(,) ","
(identifier) "sm_rgbled"
(,) ","
(identifier) "color"
()) ")"
(;) ";"
(}) "}"
(function_definition) "static void handleBoardLedOperation(int index, int op) {\n if (op != LedOp_Toggle) {\n bool value = op == LedOp_TurnOn;\n led_states[index] = value;\n } else {\n led_states[index] = !led_states[index];\n }\n updateLedColor();\n}"
(storage_class_specifier) "static"
(static) "static"
(primitive_type) "void"
(function_declarator) "handleBoardLedOperation(int index, int op)"
(identifier) "handleBoardLedOperation"
(parameter_list) "(int index, int op)"
(() "("
(parameter_declaration) "int index"
(primitive_type) "int"
(identifier) "index"
(,) ","
(parameter_declaration) "int op"
(primitive_type) "int"
(identifier) "op"
()) ")"
(compound_statement) "{\n if (op != LedOp_Toggle) {\n bool value = op == LedOp_TurnOn;\n led_states[index] = value;\n } else {\n led_states[index] = !led_states[index];\n }\n updateLedColor();\n}"
({) "{"
(if_statement) "if (op != LedOp_Toggle) {\n bool value = op == LedOp_TurnOn;\n led_states[index] = value;\n } else {\n led_states[index] = !led_states[index];\n }"
(if) "if"
(parenthesized_expression) "(op != LedOp_Toggle)"
(() "("
(binary_expression) "op != LedOp_Toggle"
(identifier) "op"
(!=) "!="
(identifier) "LedOp_Toggle"
()) ")"
(compound_statement) "{\n bool value = op == LedOp_TurnOn;\n led_states[index] = value;\n }"
({) "{"
(declaration) "bool value = op == LedOp_TurnOn;"
(primitive_type) "bool"
(init_declarator) "value = op == LedOp_TurnOn"
(identifier) "value"
(=) "="
(binary_expression) "op == LedOp_TurnOn"
(identifier) "op"
(==) "=="
(identifier) "LedOp_TurnOn"
(;) ";"
(expression_statement) "led_states[index] = value;"
(assignment_expression) "led_states[index] = value"
(subscript_expression) "led_states[index]"
(identifier) "led_states"
([) "["
(identifier) "index"
(]) "]"
(=) "="
(identifier) "value"
(;) ";"
(}) "}"
(else_clause) "else {\n led_states[index] = !led_states[index];\n }"
(else) "else"
(compound_statement) "{\n led_states[index] = !led_states[index];\n }"
({) "{"
(expression_statement) "led_states[index] = !led_states[index];"
(assignment_expression) "led_states[index] = !led_states[index]"
(subscript_expression) "led_states[index]"
(identifier) "led_states"
([) "["
(identifier) "index"
(]) "]"
(=) "="
(unary_expression) "!led_states[index]"
(!) "!"
(subscript_expression) "led_states[index]"
(identifier) "led_states"
([) "["
(identifier) "index"
(]) "]"
(;) ";"
(}) "}"
(expression_statement) "updateLedColor();"
(call_expression) "updateLedColor()"
(identifier) "updateLedColor"
(argument_list) "()"
(() "("
()) ")"
(;) ";"
(}) "}"
(function_definition) "void boardIoImpl_setupLedsRgb(int8_t pin_led, int8_t pin_led_power) {\n neoPixelCore_initialize(pio_rgbled, sm_rgbled, pin_led);\n if (pin_led_power != -1) {\n gpio_init(pin_led_power);\n gpio_set_dir(pin_led_power, GPIO_OUT);\n gpio_put(pin_led_power, 1);\n }\n boardIo_internal_setLedFunction(handleBoardLedOperation);\n configManager_setParameterExposeFlag(SystemParameter_HeartbeatLed);\n configManager_setParameterExposeFlag(SystemParameter_KeyHoldIndicatorLed);\n}"
(primitive_type) "void"
(function_declarator) "boardIoImpl_setupLedsRgb(int8_t pin_led, int8_t pin_led_power)"
(identifier) "boardIoImpl_setupLedsRgb"
(parameter_list) "(int8_t pin_led, int8_t pin_led_power)"
(() "("
(parameter_declaration) "int8_t pin_led"
(primitive_type) "int8_t"
(identifier) "pin_led"
(,) ","
(parameter_declaration) "int8_t pin_led_power"
(primitive_type) "int8_t"
(identifier) "pin_led_power"
()) ")"
(compound_statement) "{\n neoPixelCore_initialize(pio_rgbled, sm_rgbled, pin_led);\n if (pin_led_power != -1) {\n gpio_init(pin_led_power);\n gpio_set_dir(pin_led_power, GPIO_OUT);\n gpio_put(pin_led_power, 1);\n }\n boardIo_internal_setLedFunction(handleBoardLedOperation);\n configManager_setParameterExposeFlag(SystemParameter_HeartbeatLed);\n configManager_setParameterExposeFlag(SystemParameter_KeyHoldIndicatorLed);\n}"
({) "{"
(expression_statement) "neoPixelCore_initialize(pio_rgbled, sm_rgbled, pin_led);"
(call_expression) "neoPixelCore_initialize(pio_rgbled, sm_rgbled, pin_led)"
(identifier) "neoPixelCore_initialize"
(argument_list) "(pio_rgbled, sm_rgbled, pin_led)"
(() "("
(identifier) "pio_rgbled"
(,) ","
(identifier) "sm_rgbled"
(,) ","
(identifier) "pin_led"
()) ")"
(;) ";"
(if_statement) "if (pin_led_power != -1) {\n gpio_init(pin_led_power);\n gpio_set_dir(pin_led_power, GPIO_OUT);\n gpio_put(pin_led_power, 1);\n }"
(if) "if"
(parenthesized_expression) "(pin_led_power != -1)"
(() "("
(binary_expression) "pin_led_power != -1"
(identifier) "pin_led_power"
(!=) "!="
(number_literal) "-1"
()) ")"
(compound_statement) "{\n gpio_init(pin_led_power);\n gpio_set_dir(pin_led_power, GPIO_OUT);\n gpio_put(pin_led_power, 1);\n }"
({) "{"
(expression_statement) "gpio_init(pin_led_power);"
(call_expression) "gpio_init(pin_led_power)"
(identifier) "gpio_init"
(argument_list) "(pin_led_power)"
(() "("
(identifier) "pin_led_power"
()) ")"
(;) ";"
(expression_statement) "gpio_set_dir(pin_led_power, GPIO_OUT);"
(call_expression) "gpio_set_dir(pin_led_power, GPIO_OUT)"
(identifier) "gpio_set_dir"
(argument_list) "(pin_led_power, GPIO_OUT)"
(() "("
(identifier) "pin_led_power"
(,) ","
(identifier) "GPIO_OUT"
()) ")"
(;) ";"
(expression_statement) "gpio_put(pin_led_power, 1);"
(call_expression) "gpio_put(pin_led_power, 1)"
(identifier) "gpio_put"
(argument_list) "(pin_led_power, 1)"
(() "("
(identifier) "pin_led_power"
(,) ","
(number_literal) "1"
()) ")"
(;) ";"
(}) "}"
(expression_statement) "boardIo_internal_setLedFunction(handleBoardLedOperation);"
(call_expression) "boardIo_internal_setLedFunction(handleBoardLedOperation)"
(identifier) "boardIo_internal_setLedFunction"
(argument_list) "(handleBoardLedOperation)"
(() "("
(identifier) "handleBoardLedOperation"
()) ")"
(;) ";"
(expression_statement) "configManager_setParameterExposeFlag(SystemParameter_HeartbeatLed);"
(call_expression) "configManager_setParameterExposeFlag(SystemParameter_HeartbeatLed)"
(identifier) "configManager_setParameterExposeFlag"
(argument_list) "(SystemParameter_HeartbeatLed)"
(() "("
(identifier) "SystemParameter_HeartbeatLed"
()) ")"
(;) ";"
(expression_statement) "configManager_setParameterExposeFlag(SystemParameter_KeyHoldIndicatorLed);"
(call_expression) "configManager_setParameterExposeFlag(SystemParameter_KeyHoldIndicatorLed)"
(identifier) "configManager_setParameterExposeFlag"
(argument_list) "(SystemParameter_KeyHoldIndicatorLed)"
(() "("
(identifier) "SystemParameter_KeyHoldIndicatorLed"
()) ")"
(;) ";"
(}) "}"
(function_definition) "void boardIoImpl_setupLeds_proMicroRp() {\n boardIoImpl_setupLedsRgb(25, -1);\n}"
(primitive_type) "void"
(function_declarator) "boardIoImpl_setupLeds_proMicroRp()"
(identifier) "boardIoImpl_setupLeds_proMicroRp"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{\n boardIoImpl_setupLedsRgb(25, -1);\n}"
({) "{"
(expression_statement) "boardIoImpl_setupLedsRgb(25, -1);"
(call_expression) "boardIoImpl_setupLedsRgb(25, -1)"
(identifier) "boardIoImpl_setupLedsRgb"
(argument_list) "(25, -1)"
(() "("
(number_literal) "25"
(,) ","
(number_literal) "-1"
()) ")"
(;) ";"
(}) "}"
(function_definition) "void boardIoImpl_setupLeds_qtPyRp() {\n boardIoImpl_setupLedsRgb(12, 11);\n}"
(primitive_type) "void"
(function_declarator) "boardIoImpl_setupLeds_qtPyRp()"
(identifier) "boardIoImpl_setupLeds_qtPyRp"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{\n boardIoImpl_setupLedsRgb(12, 11);\n}"
({) "{"
(expression_statement) "boardIoImpl_setupLedsRgb(12, 11);"
(call_expression) "boardIoImpl_setupLedsRgb(12, 11)"
(identifier) "boardIoImpl_setupLedsRgb"
(argument_list) "(12, 11)"
(() "("
(number_literal) "12"
(,) ","
(number_literal) "11"
()) ")"
(;) ";"
(}) "}"
| 474
| 0
|
{"language": "c", "success": true, "metadata": {"lines": 53, "avg_line_length": 35.25, "nodes": 276, "errors": 0, "source_hash": "6ec0bce09d3736f4b5160f40ad3a24b1c7c1ae4dea54b47bf1f588f53650da8b", "categorized_nodes": 188}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"km0/device/boardIo.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": "\"km0/device/boardIo.h\"", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 31}}, {"id": 3, "type": "preproc_include", "text": "#include \"km0/device/boardIoImpl.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": "\"km0/device/boardIoImpl.h\"", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 35}}, {"id": 6, "type": "preproc_include", "text": "#include \"km0/kernel/commandDefinitions.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"km0/kernel/commandDefinitions.h\"", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 42}}, {"id": 9, "type": "preproc_include", "text": "#include \"km0/kernel/configManager.h\"\n", "parent": null, "children": [10, 11], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"km0/kernel/configManager.h\"", "parent": 9, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 37}}, {"id": 12, "type": "preproc_include", "text": "#include \"neoPixelCore.h\"\n", "parent": null, "children": [13, 14], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"neoPixelCore.h\"", "parent": 12, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 25}}, {"id": 15, "type": "preproc_include", "text": "#include \"pico_sdk/src/common/include/pico/stdlib.h\"\n", "parent": null, "children": [16, 17], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"pico_sdk/src/common/include/pico/stdlib.h\"", "parent": 15, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 52}}, {"id": 18, "type": "preproc_ifdef", "text": "#ifndef KM0_RP_BOARD_IO_RGBLED__PIO_INSTANCE\n#define KM0_RP_BOARD_IO_RGBLED__PIO_INSTANCE pio0\n#endif", "parent": null, "children": [19, 20, 21, 25], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 9, "column": 6}}, {"id": 19, "type": "#ifndef", "text": "#ifndef", "parent": 18, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 20, "type": "identifier", "text": "KM0_RP_BOARD_IO_RGBLED__PIO_INSTANCE", "parent": 18, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 44}}, {"id": 21, "type": "preproc_def", "text": "#define KM0_RP_BOARD_IO_RGBLED__PIO_INSTANCE pio0\n", "parent": 18, "children": [22, 23, 24], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 22, "type": "#define", "text": "#define", "parent": 21, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 23, "type": "identifier", "text": "KM0_RP_BOARD_IO_RGBLED__PIO_INSTANCE", "parent": 21, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 44}}, {"id": 24, "type": "preproc_arg", "text": "pio0", "parent": 21, "children": [], "start_point": {"row": 8, "column": 45}, "end_point": {"row": 8, "column": 49}}, {"id": 25, "type": "#endif", "text": "#endif", "parent": 18, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 6}}, {"id": 26, "type": "preproc_ifdef", "text": "#ifndef KM0_RP_BOARD_IO_RGBLED__PIO_SM\n#define KM0_RP_BOARD_IO_RGBLED__PIO_SM 0\n#endif", "parent": null, "children": [27, 28, 29, 33], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 13, "column": 6}}, {"id": 27, "type": "#ifndef", "text": "#ifndef", "parent": 26, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 28, "type": "identifier", "text": "KM0_RP_BOARD_IO_RGBLED__PIO_SM", "parent": 26, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 38}}, {"id": 29, "type": "preproc_def", "text": "#define KM0_RP_BOARD_IO_RGBLED__PIO_SM 0\n", "parent": 26, "children": [30, 31, 32], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 30, "type": "#define", "text": "#define", "parent": 29, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 31, "type": "identifier", "text": "KM0_RP_BOARD_IO_RGBLED__PIO_SM", "parent": 29, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 38}}, {"id": 32, "type": "preproc_arg", "text": "0", "parent": 29, "children": [], "start_point": {"row": 12, "column": 39}, "end_point": {"row": 12, "column": 40}}, {"id": 33, "type": "#endif", "text": "#endif", "parent": 26, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 6}}, {"id": 34, "type": "declaration", "text": "static const uint8_t brightness_b = 60;", "parent": null, "children": [35, 36], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 39}}, {"id": 35, "type": "primitive_type", "text": "uint8_t", "parent": 34, "children": [], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 20}}, {"id": 36, "type": "init_declarator", "text": "brightness_b = 60", "parent": 34, "children": [37, 38, 39], "start_point": {"row": 15, "column": 21}, "end_point": {"row": 15, "column": 38}}, {"id": 37, "type": "identifier", "text": "brightness_b", "parent": 36, "children": [], "start_point": {"row": 15, "column": 21}, "end_point": {"row": 15, "column": 33}}, {"id": 38, "type": "=", "text": "=", "parent": 36, "children": [], "start_point": {"row": 15, "column": 34}, "end_point": {"row": 15, "column": 35}}, {"id": 39, "type": "number_literal", "text": "60", "parent": 36, "children": [], "start_point": {"row": 15, "column": 36}, "end_point": {"row": 15, "column": 38}}, {"id": 40, "type": "declaration", "text": "static const uint8_t brightness_g = 15;", "parent": null, "children": [41, 42], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 39}}, {"id": 41, "type": "primitive_type", "text": "uint8_t", "parent": 40, "children": [], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 20}}, {"id": 42, "type": "init_declarator", "text": "brightness_g = 15", "parent": 40, "children": [43, 44, 45], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 38}}, {"id": 43, "type": "identifier", "text": "brightness_g", "parent": 42, "children": [], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 33}}, {"id": 44, "type": "=", "text": "=", "parent": 42, "children": [], "start_point": {"row": 16, "column": 34}, "end_point": {"row": 16, "column": 35}}, {"id": 45, "type": "number_literal", "text": "15", "parent": 42, "children": [], "start_point": {"row": 16, "column": 36}, "end_point": {"row": 16, "column": 38}}, {"id": 46, "type": "declaration", "text": "static const PIO pio_rgbled = KM0_RP_BOARD_IO_RGBLED__PIO_INSTANCE;", "parent": null, "children": [47, 48], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 67}}, {"id": 47, "type": "type_identifier", "text": "PIO", "parent": 46, "children": [], "start_point": {"row": 18, "column": 13}, "end_point": {"row": 18, "column": 16}}, {"id": 48, "type": "init_declarator", "text": "pio_rgbled = KM0_RP_BOARD_IO_RGBLED__PIO_INSTANCE", "parent": 46, "children": [49, 50, 51], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 66}}, {"id": 49, "type": "identifier", "text": "pio_rgbled", "parent": 48, "children": [], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 27}}, {"id": 50, "type": "=", "text": "=", "parent": 48, "children": [], "start_point": {"row": 18, "column": 28}, "end_point": {"row": 18, "column": 29}}, {"id": 51, "type": "identifier", "text": "KM0_RP_BOARD_IO_RGBLED__PIO_INSTANCE", "parent": 48, "children": [], "start_point": {"row": 18, "column": 30}, "end_point": {"row": 18, "column": 66}}, {"id": 52, "type": "declaration", "text": "static const int sm_rgbled = KM0_RP_BOARD_IO_RGBLED__PIO_SM;", "parent": null, "children": [53, 54], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 60}}, {"id": 53, "type": "primitive_type", "text": "int", "parent": 52, "children": [], "start_point": {"row": 19, "column": 13}, "end_point": {"row": 19, "column": 16}}, {"id": 54, "type": "init_declarator", "text": "sm_rgbled = KM0_RP_BOARD_IO_RGBLED__PIO_SM", "parent": 52, "children": [55, 56, 57], "start_point": {"row": 19, "column": 17}, "end_point": {"row": 19, "column": 59}}, {"id": 55, "type": "identifier", "text": "sm_rgbled", "parent": 54, "children": [], "start_point": {"row": 19, "column": 17}, "end_point": {"row": 19, "column": 26}}, {"id": 56, "type": "=", "text": "=", "parent": 54, "children": [], "start_point": {"row": 19, "column": 27}, "end_point": {"row": 19, "column": 28}}, {"id": 57, "type": "identifier", "text": "KM0_RP_BOARD_IO_RGBLED__PIO_SM", "parent": 54, "children": [], "start_point": {"row": 19, "column": 29}, "end_point": {"row": 19, "column": 59}}, {"id": 58, "type": "declaration", "text": "static bool led_states[2] = { false, false };", "parent": null, "children": [59, 60], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 45}}, {"id": 59, "type": "primitive_type", "text": "bool", "parent": 58, "children": [], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 11}}, {"id": 60, "type": "init_declarator", "text": "led_states[2] = { false, false }", "parent": 58, "children": [61, 64, 65], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 21, "column": 44}}, {"id": 61, "type": "array_declarator", "text": "led_states[2]", "parent": 60, "children": [62, 63], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 21, "column": 25}}, {"id": 62, "type": "identifier", "text": "led_states", "parent": 61, "children": [], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 21, "column": 22}}, {"id": 63, "type": "number_literal", "text": "2", "parent": 61, "children": [], "start_point": {"row": 21, "column": 23}, "end_point": {"row": 21, "column": 24}}, {"id": 64, "type": "=", "text": "=", "parent": 60, "children": [], "start_point": {"row": 21, "column": 26}, "end_point": {"row": 21, "column": 27}}, {"id": 65, "type": "initializer_list", "text": "{ false, false }", "parent": 60, "children": [66, 67], "start_point": {"row": 21, "column": 28}, "end_point": {"row": 21, "column": 44}}, {"id": 66, "type": "false", "text": "false", "parent": 65, "children": [], "start_point": {"row": 21, "column": 30}, "end_point": {"row": 21, "column": 35}}, {"id": 67, "type": "false", "text": "false", "parent": 65, "children": [], "start_point": {"row": 21, "column": 37}, "end_point": {"row": 21, "column": 42}}, {"id": 68, "type": "function_definition", "text": "static inline uint32_t pixelRGB(uint8_t r, uint8_t g, uint8_t b) {\n return (uint32_t)(r) << 16 | ((uint32_t)(g) << 8) | (uint32_t)(b);\n}", "parent": null, "children": [69, 71, 72], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 69, "type": "storage_class_specifier", "text": "inline", "parent": 68, "children": [70], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 13}}, {"id": 70, "type": "inline", "text": "inline", "parent": 69, "children": [], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 13}}, {"id": 71, "type": "primitive_type", "text": "uint32_t", "parent": 68, "children": [], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 22}}, {"id": 72, "type": "function_declarator", "text": "pixelRGB(uint8_t r, uint8_t g, uint8_t b)", "parent": 68, "children": [73, 74], "start_point": {"row": 23, "column": 23}, "end_point": {"row": 23, "column": 64}}, {"id": 73, "type": "identifier", "text": "pixelRGB", "parent": 72, "children": [], "start_point": {"row": 23, "column": 23}, "end_point": {"row": 23, "column": 31}}, {"id": 74, "type": "parameter_list", "text": "(uint8_t r, uint8_t g, uint8_t b)", "parent": 72, "children": [75, 78, 81], "start_point": {"row": 23, "column": 31}, "end_point": {"row": 23, "column": 64}}, {"id": 75, "type": "parameter_declaration", "text": "uint8_t r", "parent": 74, "children": [76, 77], "start_point": {"row": 23, "column": 32}, "end_point": {"row": 23, "column": 41}}, {"id": 76, "type": "primitive_type", "text": "uint8_t", "parent": 75, "children": [], "start_point": {"row": 23, "column": 32}, "end_point": {"row": 23, "column": 39}}, {"id": 77, "type": "identifier", "text": "r", "parent": 75, "children": [], "start_point": {"row": 23, "column": 40}, "end_point": {"row": 23, "column": 41}}, {"id": 78, "type": "parameter_declaration", "text": "uint8_t g", "parent": 74, "children": [79, 80], "start_point": {"row": 23, "column": 43}, "end_point": {"row": 23, "column": 52}}, {"id": 79, "type": "primitive_type", "text": "uint8_t", "parent": 78, "children": [], "start_point": {"row": 23, "column": 43}, "end_point": {"row": 23, "column": 50}}, {"id": 80, "type": "identifier", "text": "g", "parent": 78, "children": [], "start_point": {"row": 23, "column": 51}, "end_point": {"row": 23, "column": 52}}, {"id": 81, "type": "parameter_declaration", "text": "uint8_t b", "parent": 74, "children": [82, 83], "start_point": {"row": 23, "column": 54}, "end_point": {"row": 23, "column": 63}}, {"id": 82, "type": "primitive_type", "text": "uint8_t", "parent": 81, "children": [], "start_point": {"row": 23, "column": 54}, "end_point": {"row": 23, "column": 61}}, {"id": 83, "type": "identifier", "text": "b", "parent": 81, "children": [], "start_point": {"row": 23, "column": 62}, "end_point": {"row": 23, "column": 63}}, {"id": 84, "type": "return_statement", "text": "return (uint32_t)(r) << 16 | ((uint32_t)(g) << 8) | (uint32_t)(b);", "parent": 68, "children": [85], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 68}}, {"id": 85, "type": "binary_expression", "text": "(uint32_t)(r) << 16 | ((uint32_t)(g) << 8) | (uint32_t)(b)", "parent": 84, "children": [86, 104], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 67}}, {"id": 86, "type": "binary_expression", "text": "(uint32_t)(r) << 16 | ((uint32_t)(g) << 8)", "parent": 85, "children": [87, 95], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 51}}, {"id": 87, "type": "binary_expression", "text": "(uint32_t)(r) << 16", "parent": 86, "children": [88, 93, 94], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 28}}, {"id": 88, "type": "cast_expression", "text": "(uint32_t)(r)", "parent": 87, "children": [89, 91], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 22}}, {"id": 89, "type": "type_descriptor", "text": "uint32_t", "parent": 88, "children": [90], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 18}}, {"id": 90, "type": "primitive_type", "text": "uint32_t", "parent": 89, "children": [], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 18}}, {"id": 91, "type": "parenthesized_expression", "text": "(r)", "parent": 88, "children": [92], "start_point": {"row": 24, "column": 19}, "end_point": {"row": 24, "column": 22}}, {"id": 92, "type": "identifier", "text": "r", "parent": 91, "children": [], "start_point": {"row": 24, "column": 20}, "end_point": {"row": 24, "column": 21}}, {"id": 93, "type": "<<", "text": "<<", "parent": 87, "children": [], "start_point": {"row": 24, "column": 23}, "end_point": {"row": 24, "column": 25}}, {"id": 94, "type": "number_literal", "text": "16", "parent": 87, "children": [], "start_point": {"row": 24, "column": 26}, "end_point": {"row": 24, "column": 28}}, {"id": 95, "type": "parenthesized_expression", "text": "((uint32_t)(g) << 8)", "parent": 86, "children": [96], "start_point": {"row": 24, "column": 31}, "end_point": {"row": 24, "column": 51}}, {"id": 96, "type": "binary_expression", "text": "(uint32_t)(g) << 8", "parent": 95, "children": [97, 102, 103], "start_point": {"row": 24, "column": 32}, "end_point": {"row": 24, "column": 50}}, {"id": 97, "type": "cast_expression", "text": "(uint32_t)(g)", "parent": 96, "children": [98, 100], "start_point": {"row": 24, "column": 32}, "end_point": {"row": 24, "column": 45}}, {"id": 98, "type": "type_descriptor", "text": "uint32_t", "parent": 97, "children": [99], "start_point": {"row": 24, "column": 33}, "end_point": {"row": 24, "column": 41}}, {"id": 99, "type": "primitive_type", "text": "uint32_t", "parent": 98, "children": [], "start_point": {"row": 24, "column": 33}, "end_point": {"row": 24, "column": 41}}, {"id": 100, "type": "parenthesized_expression", "text": "(g)", "parent": 97, "children": [101], "start_point": {"row": 24, "column": 42}, "end_point": {"row": 24, "column": 45}}, {"id": 101, "type": "identifier", "text": "g", "parent": 100, "children": [], "start_point": {"row": 24, "column": 43}, "end_point": {"row": 24, "column": 44}}, {"id": 102, "type": "<<", "text": "<<", "parent": 96, "children": [], "start_point": {"row": 24, "column": 46}, "end_point": {"row": 24, "column": 48}}, {"id": 103, "type": "number_literal", "text": "8", "parent": 96, "children": [], "start_point": {"row": 24, "column": 49}, "end_point": {"row": 24, "column": 50}}, {"id": 104, "type": "cast_expression", "text": "(uint32_t)(b)", "parent": 85, "children": [105, 107], "start_point": {"row": 24, "column": 54}, "end_point": {"row": 24, "column": 67}}, {"id": 105, "type": "type_descriptor", "text": "uint32_t", "parent": 104, "children": [106], "start_point": {"row": 24, "column": 55}, "end_point": {"row": 24, "column": 63}}, {"id": 106, "type": "primitive_type", "text": "uint32_t", "parent": 105, "children": [], "start_point": {"row": 24, "column": 55}, "end_point": {"row": 24, "column": 63}}, {"id": 107, "type": "parenthesized_expression", "text": "(b)", "parent": 104, "children": [108], "start_point": {"row": 24, "column": 64}, "end_point": {"row": 24, "column": 67}}, {"id": 108, "type": "identifier", "text": "b", "parent": 107, "children": [], "start_point": {"row": 24, "column": 65}, "end_point": {"row": 24, "column": 66}}, {"id": 109, "type": "function_definition", "text": "static void updateLedColor() {\n uint8_t rr = 0;\n uint8_t gg = led_states[0] ? brightness_g : 0;\n uint8_t bb = led_states[1] ? brightness_b : 0;\n uint32_t color = pixelRGB(rr, gg, bb);\n neoPixelCore_putPixel(pio_rgbled, sm_rgbled, color);\n}", "parent": null, "children": [110, 111], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 33, "column": 1}}, {"id": 110, "type": "primitive_type", "text": "void", "parent": 109, "children": [], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 11}}, {"id": 111, "type": "function_declarator", "text": "updateLedColor()", "parent": 109, "children": [112, 113], "start_point": {"row": 27, "column": 12}, "end_point": {"row": 27, "column": 28}}, {"id": 112, "type": "identifier", "text": "updateLedColor", "parent": 111, "children": [], "start_point": {"row": 27, "column": 12}, "end_point": {"row": 27, "column": 26}}, {"id": 113, "type": "parameter_list", "text": "()", "parent": 111, "children": [], "start_point": {"row": 27, "column": 26}, "end_point": {"row": 27, "column": 28}}, {"id": 114, "type": "declaration", "text": "uint8_t rr = 0;", "parent": 109, "children": [115, 116], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 17}}, {"id": 115, "type": "primitive_type", "text": "uint8_t", "parent": 114, "children": [], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 9}}, {"id": 116, "type": "init_declarator", "text": "rr = 0", "parent": 114, "children": [117, 118, 119], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 16}}, {"id": 117, "type": "identifier", "text": "rr", "parent": 116, "children": [], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 12}}, {"id": 118, "type": "=", "text": "=", "parent": 116, "children": [], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 14}}, {"id": 119, "type": "number_literal", "text": "0", "parent": 116, "children": [], "start_point": {"row": 28, "column": 15}, "end_point": {"row": 28, "column": 16}}, {"id": 120, "type": "declaration", "text": "uint8_t gg = led_states[0] ? brightness_g : 0;", "parent": 109, "children": [121, 122], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 48}}, {"id": 121, "type": "primitive_type", "text": "uint8_t", "parent": 120, "children": [], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 9}}, {"id": 122, "type": "init_declarator", "text": "gg = led_states[0] ? brightness_g : 0", "parent": 120, "children": [123, 124, 125], "start_point": {"row": 29, "column": 10}, "end_point": {"row": 29, "column": 47}}, {"id": 123, "type": "identifier", "text": "gg", "parent": 122, "children": [], "start_point": {"row": 29, "column": 10}, "end_point": {"row": 29, "column": 12}}, {"id": 124, "type": "=", "text": "=", "parent": 122, "children": [], "start_point": {"row": 29, "column": 13}, "end_point": {"row": 29, "column": 14}}, {"id": 125, "type": "conditional_expression", "text": "led_states[0] ? brightness_g : 0", "parent": 122, "children": [126, 129, 130, 131], "start_point": {"row": 29, "column": 15}, "end_point": {"row": 29, "column": 47}}, {"id": 126, "type": "subscript_expression", "text": "led_states[0]", "parent": 125, "children": [127, 128], "start_point": {"row": 29, "column": 15}, "end_point": {"row": 29, "column": 28}}, {"id": 127, "type": "identifier", "text": "led_states", "parent": 126, "children": [], "start_point": {"row": 29, "column": 15}, "end_point": {"row": 29, "column": 25}}, {"id": 128, "type": "number_literal", "text": "0", "parent": 126, "children": [], "start_point": {"row": 29, "column": 26}, "end_point": {"row": 29, "column": 27}}, {"id": 129, "type": "?", "text": "?", "parent": 125, "children": [], "start_point": {"row": 29, "column": 29}, "end_point": {"row": 29, "column": 30}}, {"id": 130, "type": "identifier", "text": "brightness_g", "parent": 125, "children": [], "start_point": {"row": 29, "column": 31}, "end_point": {"row": 29, "column": 43}}, {"id": 131, "type": "number_literal", "text": "0", "parent": 125, "children": [], "start_point": {"row": 29, "column": 46}, "end_point": {"row": 29, "column": 47}}, {"id": 132, "type": "declaration", "text": "uint8_t bb = led_states[1] ? brightness_b : 0;", "parent": 109, "children": [133, 134], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 48}}, {"id": 133, "type": "primitive_type", "text": "uint8_t", "parent": 132, "children": [], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 9}}, {"id": 134, "type": "init_declarator", "text": "bb = led_states[1] ? brightness_b : 0", "parent": 132, "children": [135, 136, 137], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 47}}, {"id": 135, "type": "identifier", "text": "bb", "parent": 134, "children": [], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 12}}, {"id": 136, "type": "=", "text": "=", "parent": 134, "children": [], "start_point": {"row": 30, "column": 13}, "end_point": {"row": 30, "column": 14}}, {"id": 137, "type": "conditional_expression", "text": "led_states[1] ? brightness_b : 0", "parent": 134, "children": [138, 141, 142, 143], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 30, "column": 47}}, {"id": 138, "type": "subscript_expression", "text": "led_states[1]", "parent": 137, "children": [139, 140], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 30, "column": 28}}, {"id": 139, "type": "identifier", "text": "led_states", "parent": 138, "children": [], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 30, "column": 25}}, {"id": 140, "type": "number_literal", "text": "1", "parent": 138, "children": [], "start_point": {"row": 30, "column": 26}, "end_point": {"row": 30, "column": 27}}, {"id": 141, "type": "?", "text": "?", "parent": 137, "children": [], "start_point": {"row": 30, "column": 29}, "end_point": {"row": 30, "column": 30}}, {"id": 142, "type": "identifier", "text": "brightness_b", "parent": 137, "children": [], "start_point": {"row": 30, "column": 31}, "end_point": {"row": 30, "column": 43}}, {"id": 143, "type": "number_literal", "text": "0", "parent": 137, "children": [], "start_point": {"row": 30, "column": 46}, "end_point": {"row": 30, "column": 47}}, {"id": 144, "type": "declaration", "text": "uint32_t color = pixelRGB(rr, gg, bb);", "parent": 109, "children": [145, 146], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 40}}, {"id": 145, "type": "primitive_type", "text": "uint32_t", "parent": 144, "children": [], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 10}}, {"id": 146, "type": "init_declarator", "text": "color = pixelRGB(rr, gg, bb)", "parent": 144, "children": [147, 148, 149], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 39}}, {"id": 147, "type": "identifier", "text": "color", "parent": 146, "children": [], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 16}}, {"id": 148, "type": "=", "text": "=", "parent": 146, "children": [], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 18}}, {"id": 149, "type": "call_expression", "text": "pixelRGB(rr, gg, bb)", "parent": 146, "children": [150, 151], "start_point": {"row": 31, "column": 19}, "end_point": {"row": 31, "column": 39}}, {"id": 150, "type": "identifier", "text": "pixelRGB", "parent": 149, "children": [], "start_point": {"row": 31, "column": 19}, "end_point": {"row": 31, "column": 27}}, {"id": 151, "type": "argument_list", "text": "(rr, gg, bb)", "parent": 149, "children": [152, 153, 154], "start_point": {"row": 31, "column": 27}, "end_point": {"row": 31, "column": 39}}, {"id": 152, "type": "identifier", "text": "rr", "parent": 151, "children": [], "start_point": {"row": 31, "column": 28}, "end_point": {"row": 31, "column": 30}}, {"id": 153, "type": "identifier", "text": "gg", "parent": 151, "children": [], "start_point": {"row": 31, "column": 32}, "end_point": {"row": 31, "column": 34}}, {"id": 154, "type": "identifier", "text": "bb", "parent": 151, "children": [], "start_point": {"row": 31, "column": 36}, "end_point": {"row": 31, "column": 38}}, {"id": 155, "type": "call_expression", "text": "neoPixelCore_putPixel(pio_rgbled, sm_rgbled, color)", "parent": 109, "children": [156, 157], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 53}}, {"id": 156, "type": "identifier", "text": "neoPixelCore_putPixel", "parent": 155, "children": [], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 23}}, {"id": 157, "type": "argument_list", "text": "(pio_rgbled, sm_rgbled, color)", "parent": 155, "children": [158, 159, 160], "start_point": {"row": 32, "column": 23}, "end_point": {"row": 32, "column": 53}}, {"id": 158, "type": "identifier", "text": "pio_rgbled", "parent": 157, "children": [], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 34}}, {"id": 159, "type": "identifier", "text": "sm_rgbled", "parent": 157, "children": [], "start_point": {"row": 32, "column": 36}, "end_point": {"row": 32, "column": 45}}, {"id": 160, "type": "identifier", "text": "color", "parent": 157, "children": [], "start_point": {"row": 32, "column": 47}, "end_point": {"row": 32, "column": 52}}, {"id": 161, "type": "function_definition", "text": "static void handleBoardLedOperation(int index, int op) {\n if (op != LedOp_Toggle) {\n bool value = op == LedOp_TurnOn;\n led_states[index] = value;\n } else {\n led_states[index] = !led_states[index];\n }\n updateLedColor();\n}", "parent": null, "children": [162, 163], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 43, "column": 1}}, {"id": 162, "type": "primitive_type", "text": "void", "parent": 161, "children": [], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 11}}, {"id": 163, "type": "function_declarator", "text": "handleBoardLedOperation(int index, int op)", "parent": 161, "children": [164, 165], "start_point": {"row": 35, "column": 12}, "end_point": {"row": 35, "column": 54}}, {"id": 164, "type": "identifier", "text": "handleBoardLedOperation", "parent": 163, "children": [], "start_point": {"row": 35, "column": 12}, "end_point": {"row": 35, "column": 35}}, {"id": 165, "type": "parameter_list", "text": "(int index, int op)", "parent": 163, "children": [166, 169], "start_point": {"row": 35, "column": 35}, "end_point": {"row": 35, "column": 54}}, {"id": 166, "type": "parameter_declaration", "text": "int index", "parent": 165, "children": [167, 168], "start_point": {"row": 35, "column": 36}, "end_point": {"row": 35, "column": 45}}, {"id": 167, "type": "primitive_type", "text": "int", "parent": 166, "children": [], "start_point": {"row": 35, "column": 36}, "end_point": {"row": 35, "column": 39}}, {"id": 168, "type": "identifier", "text": "index", "parent": 166, "children": [], "start_point": {"row": 35, "column": 40}, "end_point": {"row": 35, "column": 45}}, {"id": 169, "type": "parameter_declaration", "text": "int op", "parent": 165, "children": [170, 171], "start_point": {"row": 35, "column": 47}, "end_point": {"row": 35, "column": 53}}, {"id": 170, "type": "primitive_type", "text": "int", "parent": 169, "children": [], "start_point": {"row": 35, "column": 47}, "end_point": {"row": 35, "column": 50}}, {"id": 171, "type": "identifier", "text": "op", "parent": 169, "children": [], "start_point": {"row": 35, "column": 51}, "end_point": {"row": 35, "column": 53}}, {"id": 172, "type": "if_statement", "text": "if (op != LedOp_Toggle) {\n bool value = op == LedOp_TurnOn;\n led_states[index] = value;\n } else {\n led_states[index] = !led_states[index];\n }", "parent": 161, "children": [173, 193], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 41, "column": 3}}, {"id": 173, "type": "parenthesized_expression", "text": "(op != LedOp_Toggle)", "parent": 172, "children": [174], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 25}}, {"id": 174, "type": "binary_expression", "text": "op != LedOp_Toggle", "parent": 173, "children": [175, 176, 177], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 24}}, {"id": 175, "type": "identifier", "text": "op", "parent": 174, "children": [], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 8}}, {"id": 176, "type": "!=", "text": "!=", "parent": 174, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 11}}, {"id": 177, "type": "identifier", "text": "LedOp_Toggle", "parent": 174, "children": [], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 24}}, {"id": 178, "type": "declaration", "text": "bool value = op == LedOp_TurnOn;", "parent": 172, "children": [179, 180], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 36}}, {"id": 179, "type": "primitive_type", "text": "bool", "parent": 178, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 8}}, {"id": 180, "type": "init_declarator", "text": "value = op == LedOp_TurnOn", "parent": 178, "children": [181, 182, 183], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 35}}, {"id": 181, "type": "identifier", "text": "value", "parent": 180, "children": [], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 14}}, {"id": 182, "type": "=", "text": "=", "parent": 180, "children": [], "start_point": {"row": 37, "column": 15}, "end_point": {"row": 37, "column": 16}}, {"id": 183, "type": "binary_expression", "text": "op == LedOp_TurnOn", "parent": 180, "children": [184, 185, 186], "start_point": {"row": 37, "column": 17}, "end_point": {"row": 37, "column": 35}}, {"id": 184, "type": "identifier", "text": "op", "parent": 183, "children": [], "start_point": {"row": 37, "column": 17}, "end_point": {"row": 37, "column": 19}}, {"id": 185, "type": "==", "text": "==", "parent": 183, "children": [], "start_point": {"row": 37, "column": 20}, "end_point": {"row": 37, "column": 22}}, {"id": 186, "type": "identifier", "text": "LedOp_TurnOn", "parent": 183, "children": [], "start_point": {"row": 37, "column": 23}, "end_point": {"row": 37, "column": 35}}, {"id": 187, "type": "assignment_expression", "text": "led_states[index] = value", "parent": 172, "children": [188, 191, 192], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 29}}, {"id": 188, "type": "subscript_expression", "text": "led_states[index]", "parent": 187, "children": [189, 190], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 21}}, {"id": 189, "type": "identifier", "text": "led_states", "parent": 188, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 14}}, {"id": 190, "type": "identifier", "text": "index", "parent": 188, "children": [], "start_point": {"row": 38, "column": 15}, "end_point": {"row": 38, "column": 20}}, {"id": 191, "type": "=", "text": "=", "parent": 187, "children": [], "start_point": {"row": 38, "column": 22}, "end_point": {"row": 38, "column": 23}}, {"id": 192, "type": "identifier", "text": "value", "parent": 187, "children": [], "start_point": {"row": 38, "column": 24}, "end_point": {"row": 38, "column": 29}}, {"id": 193, "type": "else_clause", "text": "else {\n led_states[index] = !led_states[index];\n }", "parent": 172, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 41, "column": 3}}, {"id": 194, "type": "assignment_expression", "text": "led_states[index] = !led_states[index]", "parent": 193, "children": [195, 198, 199], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 42}}, {"id": 195, "type": "subscript_expression", "text": "led_states[index]", "parent": 194, "children": [196, 197], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 21}}, {"id": 196, "type": "identifier", "text": "led_states", "parent": 195, "children": [], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 14}}, {"id": 197, "type": "identifier", "text": "index", "parent": 195, "children": [], "start_point": {"row": 40, "column": 15}, "end_point": {"row": 40, "column": 20}}, {"id": 198, "type": "=", "text": "=", "parent": 194, "children": [], "start_point": {"row": 40, "column": 22}, "end_point": {"row": 40, "column": 23}}, {"id": 199, "type": "unary_expression", "text": "!led_states[index]", "parent": 194, "children": [200, 201], "start_point": {"row": 40, "column": 24}, "end_point": {"row": 40, "column": 42}}, {"id": 200, "type": "!", "text": "!", "parent": 199, "children": [], "start_point": {"row": 40, "column": 24}, "end_point": {"row": 40, "column": 25}}, {"id": 201, "type": "subscript_expression", "text": "led_states[index]", "parent": 199, "children": [202, 203], "start_point": {"row": 40, "column": 25}, "end_point": {"row": 40, "column": 42}}, {"id": 202, "type": "identifier", "text": "led_states", "parent": 201, "children": [], "start_point": {"row": 40, "column": 25}, "end_point": {"row": 40, "column": 35}}, {"id": 203, "type": "identifier", "text": "index", "parent": 201, "children": [], "start_point": {"row": 40, "column": 36}, "end_point": {"row": 40, "column": 41}}, {"id": 204, "type": "call_expression", "text": "updateLedColor()", "parent": 161, "children": [205, 206], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 18}}, {"id": 205, "type": "identifier", "text": "updateLedColor", "parent": 204, "children": [], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 16}}, {"id": 206, "type": "argument_list", "text": "()", "parent": 204, "children": [], "start_point": {"row": 42, "column": 16}, "end_point": {"row": 42, "column": 18}}, {"id": 207, "type": "function_definition", "text": "void boardIoImpl_setupLedsRgb(int8_t pin_led, int8_t pin_led_power) {\n neoPixelCore_initialize(pio_rgbled, sm_rgbled, pin_led);\n if (pin_led_power != -1) {\n gpio_init(pin_led_power);\n gpio_set_dir(pin_led_power, GPIO_OUT);\n gpio_put(pin_led_power, 1);\n }\n boardIo_internal_setLedFunction(handleBoardLedOperation);\n configManager_setParameterExposeFlag(SystemParameter_HeartbeatLed);\n configManager_setParameterExposeFlag(SystemParameter_KeyHoldIndicatorLed);\n}", "parent": null, "children": [208, 209], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 55, "column": 1}}, {"id": 208, "type": "primitive_type", "text": "void", "parent": 207, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 4}}, {"id": 209, "type": "function_declarator", "text": "boardIoImpl_setupLedsRgb(int8_t pin_led, int8_t pin_led_power)", "parent": 207, "children": [210, 211], "start_point": {"row": 45, "column": 5}, "end_point": {"row": 45, "column": 67}}, {"id": 210, "type": "identifier", "text": "boardIoImpl_setupLedsRgb", "parent": 209, "children": [], "start_point": {"row": 45, "column": 5}, "end_point": {"row": 45, "column": 29}}, {"id": 211, "type": "parameter_list", "text": "(int8_t pin_led, int8_t pin_led_power)", "parent": 209, "children": [212, 215], "start_point": {"row": 45, "column": 29}, "end_point": {"row": 45, "column": 67}}, {"id": 212, "type": "parameter_declaration", "text": "int8_t pin_led", "parent": 211, "children": [213, 214], "start_point": {"row": 45, "column": 30}, "end_point": {"row": 45, "column": 44}}, {"id": 213, "type": "primitive_type", "text": "int8_t", "parent": 212, "children": [], "start_point": {"row": 45, "column": 30}, "end_point": {"row": 45, "column": 36}}, {"id": 214, "type": "identifier", "text": "pin_led", "parent": 212, "children": [], "start_point": {"row": 45, "column": 37}, "end_point": {"row": 45, "column": 44}}, {"id": 215, "type": "parameter_declaration", "text": "int8_t pin_led_power", "parent": 211, "children": [216, 217], "start_point": {"row": 45, "column": 46}, "end_point": {"row": 45, "column": 66}}, {"id": 216, "type": "primitive_type", "text": "int8_t", "parent": 215, "children": [], "start_point": {"row": 45, "column": 46}, "end_point": {"row": 45, "column": 52}}, {"id": 217, "type": "identifier", "text": "pin_led_power", "parent": 215, "children": [], "start_point": {"row": 45, "column": 53}, "end_point": {"row": 45, "column": 66}}, {"id": 218, "type": "call_expression", "text": "neoPixelCore_initialize(pio_rgbled, sm_rgbled, pin_led)", "parent": 207, "children": [219, 220], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 57}}, {"id": 219, "type": "identifier", "text": "neoPixelCore_initialize", "parent": 218, "children": [], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 25}}, {"id": 220, "type": "argument_list", "text": "(pio_rgbled, sm_rgbled, pin_led)", "parent": 218, "children": [221, 222, 223], "start_point": {"row": 46, "column": 25}, "end_point": {"row": 46, "column": 57}}, {"id": 221, "type": "identifier", "text": "pio_rgbled", "parent": 220, "children": [], "start_point": {"row": 46, "column": 26}, "end_point": {"row": 46, "column": 36}}, {"id": 222, "type": "identifier", "text": "sm_rgbled", "parent": 220, "children": [], "start_point": {"row": 46, "column": 38}, "end_point": {"row": 46, "column": 47}}, {"id": 223, "type": "identifier", "text": "pin_led", "parent": 220, "children": [], "start_point": {"row": 46, "column": 49}, "end_point": {"row": 46, "column": 56}}, {"id": 224, "type": "if_statement", "text": "if (pin_led_power != -1) {\n gpio_init(pin_led_power);\n gpio_set_dir(pin_led_power, GPIO_OUT);\n gpio_put(pin_led_power, 1);\n }", "parent": 207, "children": [225], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 51, "column": 3}}, {"id": 225, "type": "parenthesized_expression", "text": "(pin_led_power != -1)", "parent": 224, "children": [226], "start_point": {"row": 47, "column": 5}, "end_point": {"row": 47, "column": 26}}, {"id": 226, "type": "binary_expression", "text": "pin_led_power != -1", "parent": 225, "children": [227, 228, 229], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 25}}, {"id": 227, "type": "identifier", "text": "pin_led_power", "parent": 226, "children": [], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 19}}, {"id": 228, "type": "!=", "text": "!=", "parent": 226, "children": [], "start_point": {"row": 47, "column": 20}, "end_point": {"row": 47, "column": 22}}, {"id": 229, "type": "number_literal", "text": "-1", "parent": 226, "children": [], "start_point": {"row": 47, "column": 23}, "end_point": {"row": 47, "column": 25}}, {"id": 230, "type": "call_expression", "text": "gpio_init(pin_led_power)", "parent": 224, "children": [231, 232], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 28}}, {"id": 231, "type": "identifier", "text": "gpio_init", "parent": 230, "children": [], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 13}}, {"id": 232, "type": "argument_list", "text": "(pin_led_power)", "parent": 230, "children": [233], "start_point": {"row": 48, "column": 13}, "end_point": {"row": 48, "column": 28}}, {"id": 233, "type": "identifier", "text": "pin_led_power", "parent": 232, "children": [], "start_point": {"row": 48, "column": 14}, "end_point": {"row": 48, "column": 27}}, {"id": 234, "type": "call_expression", "text": "gpio_set_dir(pin_led_power, GPIO_OUT)", "parent": 224, "children": [235, 236], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 41}}, {"id": 235, "type": "identifier", "text": "gpio_set_dir", "parent": 234, "children": [], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 16}}, {"id": 236, "type": "argument_list", "text": "(pin_led_power, GPIO_OUT)", "parent": 234, "children": [237, 238], "start_point": {"row": 49, "column": 16}, "end_point": {"row": 49, "column": 41}}, {"id": 237, "type": "identifier", "text": "pin_led_power", "parent": 236, "children": [], "start_point": {"row": 49, "column": 17}, "end_point": {"row": 49, "column": 30}}, {"id": 238, "type": "identifier", "text": "GPIO_OUT", "parent": 236, "children": [], "start_point": {"row": 49, "column": 32}, "end_point": {"row": 49, "column": 40}}, {"id": 239, "type": "call_expression", "text": "gpio_put(pin_led_power, 1)", "parent": 224, "children": [240, 241], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 30}}, {"id": 240, "type": "identifier", "text": "gpio_put", "parent": 239, "children": [], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 12}}, {"id": 241, "type": "argument_list", "text": "(pin_led_power, 1)", "parent": 239, "children": [242, 243], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 30}}, {"id": 242, "type": "identifier", "text": "pin_led_power", "parent": 241, "children": [], "start_point": {"row": 50, "column": 13}, "end_point": {"row": 50, "column": 26}}, {"id": 243, "type": "number_literal", "text": "1", "parent": 241, "children": [], "start_point": {"row": 50, "column": 28}, "end_point": {"row": 50, "column": 29}}, {"id": 244, "type": "call_expression", "text": "boardIo_internal_setLedFunction(handleBoardLedOperation)", "parent": 207, "children": [245, 246], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 58}}, {"id": 245, "type": "identifier", "text": "boardIo_internal_setLedFunction", "parent": 244, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 33}}, {"id": 246, "type": "argument_list", "text": "(handleBoardLedOperation)", "parent": 244, "children": [247], "start_point": {"row": 52, "column": 33}, "end_point": {"row": 52, "column": 58}}, {"id": 247, "type": "identifier", "text": "handleBoardLedOperation", "parent": 246, "children": [], "start_point": {"row": 52, "column": 34}, "end_point": {"row": 52, "column": 57}}, {"id": 248, "type": "call_expression", "text": "configManager_setParameterExposeFlag(SystemParameter_HeartbeatLed)", "parent": 207, "children": [249, 250], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 68}}, {"id": 249, "type": "identifier", "text": "configManager_setParameterExposeFlag", "parent": 248, "children": [], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 38}}, {"id": 250, "type": "argument_list", "text": "(SystemParameter_HeartbeatLed)", "parent": 248, "children": [251], "start_point": {"row": 53, "column": 38}, "end_point": {"row": 53, "column": 68}}, {"id": 251, "type": "identifier", "text": "SystemParameter_HeartbeatLed", "parent": 250, "children": [], "start_point": {"row": 53, "column": 39}, "end_point": {"row": 53, "column": 67}}, {"id": 252, "type": "call_expression", "text": "configManager_setParameterExposeFlag(SystemParameter_KeyHoldIndicatorLed)", "parent": 207, "children": [253, 254], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 75}}, {"id": 253, "type": "identifier", "text": "configManager_setParameterExposeFlag", "parent": 252, "children": [], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 38}}, {"id": 254, "type": "argument_list", "text": "(SystemParameter_KeyHoldIndicatorLed)", "parent": 252, "children": [255], "start_point": {"row": 54, "column": 38}, "end_point": {"row": 54, "column": 75}}, {"id": 255, "type": "identifier", "text": "SystemParameter_KeyHoldIndicatorLed", "parent": 254, "children": [], "start_point": {"row": 54, "column": 39}, "end_point": {"row": 54, "column": 74}}, {"id": 256, "type": "function_definition", "text": "void boardIoImpl_setupLeds_proMicroRp() {\n boardIoImpl_setupLedsRgb(25, -1);\n}", "parent": null, "children": [257, 258], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 59, "column": 1}}, {"id": 257, "type": "primitive_type", "text": "void", "parent": 256, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 4}}, {"id": 258, "type": "function_declarator", "text": "boardIoImpl_setupLeds_proMicroRp()", "parent": 256, "children": [259, 260], "start_point": {"row": 57, "column": 5}, "end_point": {"row": 57, "column": 39}}, {"id": 259, "type": "identifier", "text": "boardIoImpl_setupLeds_proMicroRp", "parent": 258, "children": [], "start_point": {"row": 57, "column": 5}, "end_point": {"row": 57, "column": 37}}, {"id": 260, "type": "parameter_list", "text": "()", "parent": 258, "children": [], "start_point": {"row": 57, "column": 37}, "end_point": {"row": 57, "column": 39}}, {"id": 261, "type": "call_expression", "text": "boardIoImpl_setupLedsRgb(25, -1)", "parent": 256, "children": [262, 263], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 34}}, {"id": 262, "type": "identifier", "text": "boardIoImpl_setupLedsRgb", "parent": 261, "children": [], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 26}}, {"id": 263, "type": "argument_list", "text": "(25, -1)", "parent": 261, "children": [264, 265], "start_point": {"row": 58, "column": 26}, "end_point": {"row": 58, "column": 34}}, {"id": 264, "type": "number_literal", "text": "25", "parent": 263, "children": [], "start_point": {"row": 58, "column": 27}, "end_point": {"row": 58, "column": 29}}, {"id": 265, "type": "number_literal", "text": "-1", "parent": 263, "children": [], "start_point": {"row": 58, "column": 31}, "end_point": {"row": 58, "column": 33}}, {"id": 266, "type": "function_definition", "text": "void boardIoImpl_setupLeds_qtPyRp() {\n boardIoImpl_setupLedsRgb(12, 11);\n}", "parent": null, "children": [267, 268], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 63, "column": 1}}, {"id": 267, "type": "primitive_type", "text": "void", "parent": 266, "children": [], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 4}}, {"id": 268, "type": "function_declarator", "text": "boardIoImpl_setupLeds_qtPyRp()", "parent": 266, "children": [269, 270], "start_point": {"row": 61, "column": 5}, "end_point": {"row": 61, "column": 35}}, {"id": 269, "type": "identifier", "text": "boardIoImpl_setupLeds_qtPyRp", "parent": 268, "children": [], "start_point": {"row": 61, "column": 5}, "end_point": {"row": 61, "column": 33}}, {"id": 270, "type": "parameter_list", "text": "()", "parent": 268, "children": [], "start_point": {"row": 61, "column": 33}, "end_point": {"row": 61, "column": 35}}, {"id": 271, "type": "call_expression", "text": "boardIoImpl_setupLedsRgb(12, 11)", "parent": 266, "children": [272, 273], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 34}}, {"id": 272, "type": "identifier", "text": "boardIoImpl_setupLedsRgb", "parent": 271, "children": [], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 26}}, {"id": 273, "type": "argument_list", "text": "(12, 11)", "parent": 271, "children": [274, 275], "start_point": {"row": 62, "column": 26}, "end_point": {"row": 62, "column": 34}}, {"id": 274, "type": "number_literal", "text": "12", "parent": 273, "children": [], "start_point": {"row": 62, "column": 27}, "end_point": {"row": 62, "column": 29}}, {"id": 275, "type": "number_literal", "text": "11", "parent": 273, "children": [], "start_point": {"row": 62, "column": 31}, "end_point": {"row": 62, "column": 33}}]}, "node_categories": {"declarations": {"functions": [68, 72, 109, 111, 161, 163, 207, 209, 256, 258, 266, 268], "variables": [34, 40, 46, 52, 58, 75, 78, 81, 114, 120, 132, 144, 166, 169, 178, 212, 215], "classes": [69], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16], "modules": [], "enums": []}, "statements": {"expressions": [85, 86, 87, 88, 91, 95, 96, 97, 100, 104, 107, 126, 138, 149, 155, 173, 174, 183, 188, 195, 199, 201, 204, 218, 225, 226, 230, 234, 239, 244, 248, 252, 261, 271], "assignments": [187, 194], "loops": [], "conditionals": [18, 19, 20, 23, 25, 26, 27, 28, 31, 33, 37, 43, 47, 49, 51, 55, 57, 62, 73, 77, 80, 83, 92, 101, 108, 112, 117, 123, 125, 127, 130, 135, 137, 139, 142, 147, 150, 152, 153, 154, 156, 158, 159, 160, 164, 168, 171, 172, 175, 177, 181, 184, 186, 189, 190, 192, 196, 197, 202, 203, 205, 210, 214, 217, 219, 221, 222, 223, 224, 227, 231, 233, 235, 237, 238, 240, 242, 245, 247, 249, 251, 253, 255, 259, 262, 269, 272], "returns": [84], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 39, 45, 63, 94, 103, 119, 128, 131, 140, 143, 229, 243, 264, 265, 274, 275], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 68, "universal_type": "function", "name": "unknown", "text_snippet": "static inline uint32_t pixelRGB(uint8_t r, uint8_t g, uint8_t b) {\n return (uint32_t)(r) << 16 | (("}, {"node_id": 72, "universal_type": "function", "name": "unknown", "text_snippet": "pixelRGB(uint8_t r, uint8_t g, uint8_t b)"}, {"node_id": 109, "universal_type": "function", "name": "updateLedColor", "text_snippet": "static void updateLedColor() {\n uint8_t rr = 0;\n uint8_t gg = led_states[0] ? brightness_g : 0;\n "}, {"node_id": 111, "universal_type": "function", "name": "unknown", "text_snippet": "updateLedColor()"}, {"node_id": 161, "universal_type": "function", "name": "handleBoardLedOperation", "text_snippet": "static void handleBoardLedOperation(int index, int op) {\n if (op != LedOp_Toggle) {\n bool value "}, {"node_id": 163, "universal_type": "function", "name": "op)", "text_snippet": "handleBoardLedOperation(int index, int op)"}, {"node_id": 207, "universal_type": "function", "name": "boardIoImpl_setupLedsRgb", "text_snippet": "void boardIoImpl_setupLedsRgb(int8_t pin_led, int8_t pin_led_power) {\n neoPixelCore_initialize(pio_"}, {"node_id": 209, "universal_type": "function", "name": "unknown", "text_snippet": "boardIoImpl_setupLedsRgb(int8_t pin_led, int8_t pin_led_power)"}, {"node_id": 256, "universal_type": "function", "name": "boardIoImpl_setupLeds_proMicroRp", "text_snippet": "void boardIoImpl_setupLeds_proMicroRp() {\n boardIoImpl_setupLedsRgb(25, -1);\n}"}, {"node_id": 258, "universal_type": "function", "name": "unknown", "text_snippet": "boardIoImpl_setupLeds_proMicroRp()"}, {"node_id": 266, "universal_type": "function", "name": "boardIoImpl_setupLeds_qtPyRp", "text_snippet": "void boardIoImpl_setupLeds_qtPyRp() {\n boardIoImpl_setupLedsRgb(12, 11);\n}"}, {"node_id": 268, "universal_type": "function", "name": "unknown", "text_snippet": "boardIoImpl_setupLeds_qtPyRp()"}], "class_declarations": [{"node_id": 69, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}], "import_statements": [{"node_id": 0, "text": "#include \"km0/device/boardIo.h\"\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"km0/device/boardIoImpl.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"km0/kernel/commandDefinitions.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"km0/kernel/configManager.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"neoPixelCore.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"pico_sdk/src/common/include/pico/stdlib.h\"\n"}, {"node_id": 16, "text": "#include"}]}, "original_source_code": "#include \"km0/device/boardIo.h\"\n#include \"km0/device/boardIoImpl.h\"\n#include \"km0/kernel/commandDefinitions.h\"\n#include \"km0/kernel/configManager.h\"\n#include \"neoPixelCore.h\"\n#include \"pico_sdk/src/common/include/pico/stdlib.h\"\n\n#ifndef KM0_RP_BOARD_IO_RGBLED__PIO_INSTANCE\n#define KM0_RP_BOARD_IO_RGBLED__PIO_INSTANCE pio0\n#endif\n\n#ifndef KM0_RP_BOARD_IO_RGBLED__PIO_SM\n#define KM0_RP_BOARD_IO_RGBLED__PIO_SM 0\n#endif\n\nstatic const uint8_t brightness_b = 60;\nstatic const uint8_t brightness_g = 15;\n\nstatic const PIO pio_rgbled = KM0_RP_BOARD_IO_RGBLED__PIO_INSTANCE;\nstatic const int sm_rgbled = KM0_RP_BOARD_IO_RGBLED__PIO_SM;\n\nstatic bool led_states[2] = { false, false };\n\nstatic inline uint32_t pixelRGB(uint8_t r, uint8_t g, uint8_t b) {\n return (uint32_t)(r) << 16 | ((uint32_t)(g) << 8) | (uint32_t)(b);\n}\n\nstatic void updateLedColor() {\n uint8_t rr = 0;\n uint8_t gg = led_states[0] ? brightness_g : 0;\n uint8_t bb = led_states[1] ? brightness_b : 0;\n uint32_t color = pixelRGB(rr, gg, bb);\n neoPixelCore_putPixel(pio_rgbled, sm_rgbled, color);\n}\n\nstatic void handleBoardLedOperation(int index, int op) {\n if (op != LedOp_Toggle) {\n bool value = op == LedOp_TurnOn;\n led_states[index] = value;\n } else {\n led_states[index] = !led_states[index];\n }\n updateLedColor();\n}\n\nvoid boardIoImpl_setupLedsRgb(int8_t pin_led, int8_t pin_led_power) {\n neoPixelCore_initialize(pio_rgbled, sm_rgbled, pin_led);\n if (pin_led_power != -1) {\n gpio_init(pin_led_power);\n gpio_set_dir(pin_led_power, GPIO_OUT);\n gpio_put(pin_led_power, 1);\n }\n boardIo_internal_setLedFunction(handleBoardLedOperation);\n configManager_setParameterExposeFlag(SystemParameter_HeartbeatLed);\n configManager_setParameterExposeFlag(SystemParameter_KeyHoldIndicatorLed);\n}\n\nvoid boardIoImpl_setupLeds_proMicroRp() {\n boardIoImpl_setupLedsRgb(25, -1);\n}\n\nvoid boardIoImpl_setupLeds_qtPyRp() {\n boardIoImpl_setupLedsRgb(12, 11);\n}\n"}
| 81,201
|
c
|
#ifndef INPUTS_H
#define INPUTS_H
#include "globals.h"
#include "player.h"
void checkInputs()
{
if (arduboy.justPressed(UP_BUTTON | RIGHT_BUTTON | DOWN_BUTTON)) gameState = STATE_GAME_PAUSE;
if (arduboy.justPressed(LEFT_BUTTON)) gameState = STATE_MENU_MAIN;
if (arduboy.justPressed(A_BUTTON))
{
if (!(helena.characteristics & 0B10000000)) setAttack();
if (helena.helmet == HELMET_THIEF && !(helena.characteristics & 0B00100000)) helena.characteristics |= 0B00100000;
}
if (arduboy.justPressed(B_BUTTON))
{
helena.characteristics |= 0B01000000; // jump
helena.characteristics &= 0B01111111; // no longer stab
}
}
#endif
| 30.05
| 21
|
(translation_unit) "#ifndef INPUTS_H\n#define INPUTS_H\n\n#include "globals.h"\n#include "player.h"\n\nvoid checkInputs()\n{\n if (arduboy.justPressed(UP_BUTTON | RIGHT_BUTTON | DOWN_BUTTON)) gameState = STATE_GAME_PAUSE;\n if (arduboy.justPressed(LEFT_BUTTON)) gameState = STATE_MENU_MAIN;\n\n if (arduboy.justPressed(A_BUTTON))\n {\n if (!(helena.characteristics & 0B10000000)) setAttack();\n if (helena.helmet == HELMET_THIEF && !(helena.characteristics & 0B00100000)) helena.characteristics |= 0B00100000;\n }\n if (arduboy.justPressed(B_BUTTON))\n {\n helena.characteristics |= 0B01000000; // jump\n helena.characteristics &= 0B01111111; // no longer stab\n }\n}\n\n\n#endif\n"
(preproc_ifdef) "#ifndef INPUTS_H\n#define INPUTS_H\n\n#include "globals.h"\n#include "player.h"\n\nvoid checkInputs()\n{\n if (arduboy.justPressed(UP_BUTTON | RIGHT_BUTTON | DOWN_BUTTON)) gameState = STATE_GAME_PAUSE;\n if (arduboy.justPressed(LEFT_BUTTON)) gameState = STATE_MENU_MAIN;\n\n if (arduboy.justPressed(A_BUTTON))\n {\n if (!(helena.characteristics & 0B10000000)) setAttack();\n if (helena.helmet == HELMET_THIEF && !(helena.characteristics & 0B00100000)) helena.characteristics |= 0B00100000;\n }\n if (arduboy.justPressed(B_BUTTON))\n {\n helena.characteristics |= 0B01000000; // jump\n helena.characteristics &= 0B01111111; // no longer stab\n }\n}\n\n\n#endif"
(#ifndef) "#ifndef"
(identifier) "INPUTS_H"
(preproc_def) "#define INPUTS_H\n"
(#define) "#define"
(identifier) "INPUTS_H"
(preproc_include) "#include "globals.h"\n"
(#include) "#include"
(string_literal) ""globals.h""
(") """
(string_content) "globals.h"
(") """
(preproc_include) "#include "player.h"\n"
(#include) "#include"
(string_literal) ""player.h""
(") """
(string_content) "player.h"
(") """
(function_definition) "void checkInputs()\n{\n if (arduboy.justPressed(UP_BUTTON | RIGHT_BUTTON | DOWN_BUTTON)) gameState = STATE_GAME_PAUSE;\n if (arduboy.justPressed(LEFT_BUTTON)) gameState = STATE_MENU_MAIN;\n\n if (arduboy.justPressed(A_BUTTON))\n {\n if (!(helena.characteristics & 0B10000000)) setAttack();\n if (helena.helmet == HELMET_THIEF && !(helena.characteristics & 0B00100000)) helena.characteristics |= 0B00100000;\n }\n if (arduboy.justPressed(B_BUTTON))\n {\n helena.characteristics |= 0B01000000; // jump\n helena.characteristics &= 0B01111111; // no longer stab\n }\n}"
(primitive_type) "void"
(function_declarator) "checkInputs()"
(identifier) "checkInputs"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{\n if (arduboy.justPressed(UP_BUTTON | RIGHT_BUTTON | DOWN_BUTTON)) gameState = STATE_GAME_PAUSE;\n if (arduboy.justPressed(LEFT_BUTTON)) gameState = STATE_MENU_MAIN;\n\n if (arduboy.justPressed(A_BUTTON))\n {\n if (!(helena.characteristics & 0B10000000)) setAttack();\n if (helena.helmet == HELMET_THIEF && !(helena.characteristics & 0B00100000)) helena.characteristics |= 0B00100000;\n }\n if (arduboy.justPressed(B_BUTTON))\n {\n helena.characteristics |= 0B01000000; // jump\n helena.characteristics &= 0B01111111; // no longer stab\n }\n}"
({) "{"
(if_statement) "if (arduboy.justPressed(UP_BUTTON | RIGHT_BUTTON | DOWN_BUTTON)) gameState = STATE_GAME_PAUSE;"
(if) "if"
(parenthesized_expression) "(arduboy.justPressed(UP_BUTTON | RIGHT_BUTTON | DOWN_BUTTON))"
(() "("
(call_expression) "arduboy.justPressed(UP_BUTTON | RIGHT_BUTTON | DOWN_BUTTON)"
(field_expression) "arduboy.justPressed"
(identifier) "arduboy"
(.) "."
(field_identifier) "justPressed"
(argument_list) "(UP_BUTTON | RIGHT_BUTTON | DOWN_BUTTON)"
(() "("
(binary_expression) "UP_BUTTON | RIGHT_BUTTON | DOWN_BUTTON"
(binary_expression) "UP_BUTTON | RIGHT_BUTTON"
(identifier) "UP_BUTTON"
(|) "|"
(identifier) "RIGHT_BUTTON"
(|) "|"
(identifier) "DOWN_BUTTON"
()) ")"
()) ")"
(expression_statement) "gameState = STATE_GAME_PAUSE;"
(assignment_expression) "gameState = STATE_GAME_PAUSE"
(identifier) "gameState"
(=) "="
(identifier) "STATE_GAME_PAUSE"
(;) ";"
(if_statement) "if (arduboy.justPressed(LEFT_BUTTON)) gameState = STATE_MENU_MAIN;"
(if) "if"
(parenthesized_expression) "(arduboy.justPressed(LEFT_BUTTON))"
(() "("
(call_expression) "arduboy.justPressed(LEFT_BUTTON)"
(field_expression) "arduboy.justPressed"
(identifier) "arduboy"
(.) "."
(field_identifier) "justPressed"
(argument_list) "(LEFT_BUTTON)"
(() "("
(identifier) "LEFT_BUTTON"
()) ")"
()) ")"
(expression_statement) "gameState = STATE_MENU_MAIN;"
(assignment_expression) "gameState = STATE_MENU_MAIN"
(identifier) "gameState"
(=) "="
(identifier) "STATE_MENU_MAIN"
(;) ";"
(if_statement) "if (arduboy.justPressed(A_BUTTON))\n {\n if (!(helena.characteristics & 0B10000000)) setAttack();\n if (helena.helmet == HELMET_THIEF && !(helena.characteristics & 0B00100000)) helena.characteristics |= 0B00100000;\n }"
(if) "if"
(parenthesized_expression) "(arduboy.justPressed(A_BUTTON))"
(() "("
(call_expression) "arduboy.justPressed(A_BUTTON)"
(field_expression) "arduboy.justPressed"
(identifier) "arduboy"
(.) "."
(field_identifier) "justPressed"
(argument_list) "(A_BUTTON)"
(() "("
(identifier) "A_BUTTON"
()) ")"
()) ")"
(compound_statement) "{\n if (!(helena.characteristics & 0B10000000)) setAttack();\n if (helena.helmet == HELMET_THIEF && !(helena.characteristics & 0B00100000)) helena.characteristics |= 0B00100000;\n }"
({) "{"
(if_statement) "if (!(helena.characteristics & 0B10000000)) setAttack();"
(if) "if"
(parenthesized_expression) "(!(helena.characteristics & 0B10000000))"
(() "("
(unary_expression) "!(helena.characteristics & 0B10000000)"
(!) "!"
(parenthesized_expression) "(helena.characteristics & 0B10000000)"
(() "("
(binary_expression) "helena.characteristics & 0B10000000"
(field_expression) "helena.characteristics"
(identifier) "helena"
(.) "."
(field_identifier) "characteristics"
(&) "&"
(number_literal) "0B10000000"
()) ")"
()) ")"
(expression_statement) "setAttack();"
(call_expression) "setAttack()"
(identifier) "setAttack"
(argument_list) "()"
(() "("
()) ")"
(;) ";"
(if_statement) "if (helena.helmet == HELMET_THIEF && !(helena.characteristics & 0B00100000)) helena.characteristics |= 0B00100000;"
(if) "if"
(parenthesized_expression) "(helena.helmet == HELMET_THIEF && !(helena.characteristics & 0B00100000))"
(() "("
(binary_expression) "helena.helmet == HELMET_THIEF && !(helena.characteristics & 0B00100000)"
(binary_expression) "helena.helmet == HELMET_THIEF"
(field_expression) "helena.helmet"
(identifier) "helena"
(.) "."
(field_identifier) "helmet"
(==) "=="
(identifier) "HELMET_THIEF"
(&&) "&&"
(unary_expression) "!(helena.characteristics & 0B00100000)"
(!) "!"
(parenthesized_expression) "(helena.characteristics & 0B00100000)"
(() "("
(binary_expression) "helena.characteristics & 0B00100000"
(field_expression) "helena.characteristics"
(identifier) "helena"
(.) "."
(field_identifier) "characteristics"
(&) "&"
(number_literal) "0B00100000"
()) ")"
()) ")"
(expression_statement) "helena.characteristics |= 0B00100000;"
(assignment_expression) "helena.characteristics |= 0B00100000"
(field_expression) "helena.characteristics"
(identifier) "helena"
(.) "."
(field_identifier) "characteristics"
(|=) "|="
(number_literal) "0B00100000"
(;) ";"
(}) "}"
(if_statement) "if (arduboy.justPressed(B_BUTTON))\n {\n helena.characteristics |= 0B01000000; // jump\n helena.characteristics &= 0B01111111; // no longer stab\n }"
(if) "if"
(parenthesized_expression) "(arduboy.justPressed(B_BUTTON))"
(() "("
(call_expression) "arduboy.justPressed(B_BUTTON)"
(field_expression) "arduboy.justPressed"
(identifier) "arduboy"
(.) "."
(field_identifier) "justPressed"
(argument_list) "(B_BUTTON)"
(() "("
(identifier) "B_BUTTON"
()) ")"
()) ")"
(compound_statement) "{\n helena.characteristics |= 0B01000000; // jump\n helena.characteristics &= 0B01111111; // no longer stab\n }"
({) "{"
(expression_statement) "helena.characteristics |= 0B01000000;"
(assignment_expression) "helena.characteristics |= 0B01000000"
(field_expression) "helena.characteristics"
(identifier) "helena"
(.) "."
(field_identifier) "characteristics"
(|=) "|="
(number_literal) "0B01000000"
(;) ";"
(comment) "// jump"
(expression_statement) "helena.characteristics &= 0B01111111;"
(assignment_expression) "helena.characteristics &= 0B01111111"
(field_expression) "helena.characteristics"
(identifier) "helena"
(.) "."
(field_identifier) "characteristics"
(&=) "&="
(number_literal) "0B01111111"
(;) ";"
(comment) "// no longer stab"
(}) "}"
(}) "}"
(#endif) "#endif"
| 189
| 0
|
{"language": "c", "success": true, "metadata": {"lines": 21, "avg_line_length": 30.05, "nodes": 111, "errors": 0, "source_hash": "134165b2fa1396977d1f8febeaaa9852ea3571a03edd9a3cb3b85450a11bb89e", "categorized_nodes": 93}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef INPUTS_H\n#define INPUTS_H\n\n#include \"globals.h\"\n#include \"player.h\"\n\nvoid checkInputs()\n{\n if (arduboy.justPressed(UP_BUTTON | RIGHT_BUTTON | DOWN_BUTTON)) gameState = STATE_GAME_PAUSE;\n if (arduboy.justPressed(LEFT_BUTTON)) gameState = STATE_MENU_MAIN;\n\n if (arduboy.justPressed(A_BUTTON))\n {\n if (!(helena.characteristics & 0B10000000)) setAttack();\n if (helena.helmet == HELMET_THIEF && !(helena.characteristics & 0B00100000)) helena.characteristics |= 0B00100000;\n }\n if (arduboy.justPressed(B_BUTTON))\n {\n helena.characteristics |= 0B01000000; // jump\n helena.characteristics &= 0B01111111; // no longer stab\n }\n}\n\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 110], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 24, "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": "INPUTS_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 16}}, {"id": 3, "type": "preproc_def", "text": "#define INPUTS_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": "INPUTS_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 16}}, {"id": 6, "type": "preproc_include", "text": "#include \"globals.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": "\"globals.h\"", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 20}}, {"id": 9, "type": "preproc_include", "text": "#include \"player.h\"\n", "parent": 0, "children": [10, 11], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"player.h\"", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 19}}, {"id": 12, "type": "function_definition", "text": "void checkInputs()\n{\n if (arduboy.justPressed(UP_BUTTON | RIGHT_BUTTON | DOWN_BUTTON)) gameState = STATE_GAME_PAUSE;\n if (arduboy.justPressed(LEFT_BUTTON)) gameState = STATE_MENU_MAIN;\n\n if (arduboy.justPressed(A_BUTTON))\n {\n if (!(helena.characteristics & 0B10000000)) setAttack();\n if (helena.helmet == HELMET_THIEF && !(helena.characteristics & 0B00100000)) helena.characteristics |= 0B00100000;\n }\n if (arduboy.justPressed(B_BUTTON))\n {\n helena.characteristics |= 0B01000000; // jump\n helena.characteristics &= 0B01111111; // no longer stab\n }\n}", "parent": 0, "children": [13, 14], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 13, "type": "primitive_type", "text": "void", "parent": 12, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 4}}, {"id": 14, "type": "function_declarator", "text": "checkInputs()", "parent": 12, "children": [15, 16], "start_point": {"row": 6, "column": 5}, "end_point": {"row": 6, "column": 18}}, {"id": 15, "type": "identifier", "text": "checkInputs", "parent": 14, "children": [], "start_point": {"row": 6, "column": 5}, "end_point": {"row": 6, "column": 16}}, {"id": 16, "type": "parameter_list", "text": "()", "parent": 14, "children": [], "start_point": {"row": 6, "column": 16}, "end_point": {"row": 6, "column": 18}}, {"id": 17, "type": "if_statement", "text": "if (arduboy.justPressed(UP_BUTTON | RIGHT_BUTTON | DOWN_BUTTON)) gameState = STATE_GAME_PAUSE;", "parent": 12, "children": [18], "start_point": {"row": 8, "column": 2}, "end_point": {"row": 8, "column": 96}}, {"id": 18, "type": "parenthesized_expression", "text": "(arduboy.justPressed(UP_BUTTON | RIGHT_BUTTON | DOWN_BUTTON))", "parent": 17, "children": [19], "start_point": {"row": 8, "column": 5}, "end_point": {"row": 8, "column": 66}}, {"id": 19, "type": "call_expression", "text": "arduboy.justPressed(UP_BUTTON | RIGHT_BUTTON | DOWN_BUTTON)", "parent": 18, "children": [20, 23], "start_point": {"row": 8, "column": 6}, "end_point": {"row": 8, "column": 65}}, {"id": 20, "type": "field_expression", "text": "arduboy.justPressed", "parent": 19, "children": [21, 22], "start_point": {"row": 8, "column": 6}, "end_point": {"row": 8, "column": 25}}, {"id": 21, "type": "identifier", "text": "arduboy", "parent": 20, "children": [], "start_point": {"row": 8, "column": 6}, "end_point": {"row": 8, "column": 13}}, {"id": 22, "type": "field_identifier", "text": "justPressed", "parent": 20, "children": [], "start_point": {"row": 8, "column": 14}, "end_point": {"row": 8, "column": 25}}, {"id": 23, "type": "argument_list", "text": "(UP_BUTTON | RIGHT_BUTTON | DOWN_BUTTON)", "parent": 19, "children": [24], "start_point": {"row": 8, "column": 25}, "end_point": {"row": 8, "column": 65}}, {"id": 24, "type": "binary_expression", "text": "UP_BUTTON | RIGHT_BUTTON | DOWN_BUTTON", "parent": 23, "children": [25, 28], "start_point": {"row": 8, "column": 26}, "end_point": {"row": 8, "column": 64}}, {"id": 25, "type": "binary_expression", "text": "UP_BUTTON | RIGHT_BUTTON", "parent": 24, "children": [26, 27], "start_point": {"row": 8, "column": 26}, "end_point": {"row": 8, "column": 50}}, {"id": 26, "type": "identifier", "text": "UP_BUTTON", "parent": 25, "children": [], "start_point": {"row": 8, "column": 26}, "end_point": {"row": 8, "column": 35}}, {"id": 27, "type": "identifier", "text": "RIGHT_BUTTON", "parent": 25, "children": [], "start_point": {"row": 8, "column": 38}, "end_point": {"row": 8, "column": 50}}, {"id": 28, "type": "identifier", "text": "DOWN_BUTTON", "parent": 24, "children": [], "start_point": {"row": 8, "column": 53}, "end_point": {"row": 8, "column": 64}}, {"id": 29, "type": "assignment_expression", "text": "gameState = STATE_GAME_PAUSE", "parent": 17, "children": [30, 31, 32], "start_point": {"row": 8, "column": 67}, "end_point": {"row": 8, "column": 95}}, {"id": 30, "type": "identifier", "text": "gameState", "parent": 29, "children": [], "start_point": {"row": 8, "column": 67}, "end_point": {"row": 8, "column": 76}}, {"id": 31, "type": "=", "text": "=", "parent": 29, "children": [], "start_point": {"row": 8, "column": 77}, "end_point": {"row": 8, "column": 78}}, {"id": 32, "type": "identifier", "text": "STATE_GAME_PAUSE", "parent": 29, "children": [], "start_point": {"row": 8, "column": 79}, "end_point": {"row": 8, "column": 95}}, {"id": 33, "type": "if_statement", "text": "if (arduboy.justPressed(LEFT_BUTTON)) gameState = STATE_MENU_MAIN;", "parent": 12, "children": [34], "start_point": {"row": 9, "column": 2}, "end_point": {"row": 9, "column": 68}}, {"id": 34, "type": "parenthesized_expression", "text": "(arduboy.justPressed(LEFT_BUTTON))", "parent": 33, "children": [35], "start_point": {"row": 9, "column": 5}, "end_point": {"row": 9, "column": 39}}, {"id": 35, "type": "call_expression", "text": "arduboy.justPressed(LEFT_BUTTON)", "parent": 34, "children": [36, 39], "start_point": {"row": 9, "column": 6}, "end_point": {"row": 9, "column": 38}}, {"id": 36, "type": "field_expression", "text": "arduboy.justPressed", "parent": 35, "children": [37, 38], "start_point": {"row": 9, "column": 6}, "end_point": {"row": 9, "column": 25}}, {"id": 37, "type": "identifier", "text": "arduboy", "parent": 36, "children": [], "start_point": {"row": 9, "column": 6}, "end_point": {"row": 9, "column": 13}}, {"id": 38, "type": "field_identifier", "text": "justPressed", "parent": 36, "children": [], "start_point": {"row": 9, "column": 14}, "end_point": {"row": 9, "column": 25}}, {"id": 39, "type": "argument_list", "text": "(LEFT_BUTTON)", "parent": 35, "children": [40], "start_point": {"row": 9, "column": 25}, "end_point": {"row": 9, "column": 38}}, {"id": 40, "type": "identifier", "text": "LEFT_BUTTON", "parent": 39, "children": [], "start_point": {"row": 9, "column": 26}, "end_point": {"row": 9, "column": 37}}, {"id": 41, "type": "assignment_expression", "text": "gameState = STATE_MENU_MAIN", "parent": 33, "children": [42, 43, 44], "start_point": {"row": 9, "column": 40}, "end_point": {"row": 9, "column": 67}}, {"id": 42, "type": "identifier", "text": "gameState", "parent": 41, "children": [], "start_point": {"row": 9, "column": 40}, "end_point": {"row": 9, "column": 49}}, {"id": 43, "type": "=", "text": "=", "parent": 41, "children": [], "start_point": {"row": 9, "column": 50}, "end_point": {"row": 9, "column": 51}}, {"id": 44, "type": "identifier", "text": "STATE_MENU_MAIN", "parent": 41, "children": [], "start_point": {"row": 9, "column": 52}, "end_point": {"row": 9, "column": 67}}, {"id": 45, "type": "if_statement", "text": "if (arduboy.justPressed(A_BUTTON))\n {\n if (!(helena.characteristics & 0B10000000)) setAttack();\n if (helena.helmet == HELMET_THIEF && !(helena.characteristics & 0B00100000)) helena.characteristics |= 0B00100000;\n }", "parent": 12, "children": [46], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 15, "column": 3}}, {"id": 46, "type": "parenthesized_expression", "text": "(arduboy.justPressed(A_BUTTON))", "parent": 45, "children": [47], "start_point": {"row": 11, "column": 5}, "end_point": {"row": 11, "column": 36}}, {"id": 47, "type": "call_expression", "text": "arduboy.justPressed(A_BUTTON)", "parent": 46, "children": [48, 51], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 35}}, {"id": 48, "type": "field_expression", "text": "arduboy.justPressed", "parent": 47, "children": [49, 50], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 25}}, {"id": 49, "type": "identifier", "text": "arduboy", "parent": 48, "children": [], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 13}}, {"id": 50, "type": "field_identifier", "text": "justPressed", "parent": 48, "children": [], "start_point": {"row": 11, "column": 14}, "end_point": {"row": 11, "column": 25}}, {"id": 51, "type": "argument_list", "text": "(A_BUTTON)", "parent": 47, "children": [52], "start_point": {"row": 11, "column": 25}, "end_point": {"row": 11, "column": 35}}, {"id": 52, "type": "identifier", "text": "A_BUTTON", "parent": 51, "children": [], "start_point": {"row": 11, "column": 26}, "end_point": {"row": 11, "column": 34}}, {"id": 53, "type": "if_statement", "text": "if (!(helena.characteristics & 0B10000000)) setAttack();", "parent": 45, "children": [54], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 60}}, {"id": 54, "type": "parenthesized_expression", "text": "(!(helena.characteristics & 0B10000000))", "parent": 53, "children": [55], "start_point": {"row": 13, "column": 7}, "end_point": {"row": 13, "column": 47}}, {"id": 55, "type": "unary_expression", "text": "!(helena.characteristics & 0B10000000)", "parent": 54, "children": [56, 57], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 46}}, {"id": 56, "type": "!", "text": "!", "parent": 55, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 9}}, {"id": 57, "type": "parenthesized_expression", "text": "(helena.characteristics & 0B10000000)", "parent": 55, "children": [58], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 46}}, {"id": 58, "type": "binary_expression", "text": "helena.characteristics & 0B10000000", "parent": 57, "children": [59, 62], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 45}}, {"id": 59, "type": "field_expression", "text": "helena.characteristics", "parent": 58, "children": [60, 61], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 32}}, {"id": 60, "type": "identifier", "text": "helena", "parent": 59, "children": [], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 16}}, {"id": 61, "type": "field_identifier", "text": "characteristics", "parent": 59, "children": [], "start_point": {"row": 13, "column": 17}, "end_point": {"row": 13, "column": 32}}, {"id": 62, "type": "number_literal", "text": "0B10000000", "parent": 58, "children": [], "start_point": {"row": 13, "column": 35}, "end_point": {"row": 13, "column": 45}}, {"id": 63, "type": "call_expression", "text": "setAttack()", "parent": 53, "children": [64, 65], "start_point": {"row": 13, "column": 48}, "end_point": {"row": 13, "column": 59}}, {"id": 64, "type": "identifier", "text": "setAttack", "parent": 63, "children": [], "start_point": {"row": 13, "column": 48}, "end_point": {"row": 13, "column": 57}}, {"id": 65, "type": "argument_list", "text": "()", "parent": 63, "children": [], "start_point": {"row": 13, "column": 57}, "end_point": {"row": 13, "column": 59}}, {"id": 66, "type": "if_statement", "text": "if (helena.helmet == HELMET_THIEF && !(helena.characteristics & 0B00100000)) helena.characteristics |= 0B00100000;", "parent": 45, "children": [67], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 118}}, {"id": 67, "type": "parenthesized_expression", "text": "(helena.helmet == HELMET_THIEF && !(helena.characteristics & 0B00100000))", "parent": 66, "children": [68], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 80}}, {"id": 68, "type": "binary_expression", "text": "helena.helmet == HELMET_THIEF && !(helena.characteristics & 0B00100000)", "parent": 67, "children": [69, 75, 76], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 79}}, {"id": 69, "type": "binary_expression", "text": "helena.helmet == HELMET_THIEF", "parent": 68, "children": [70, 73, 74], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 37}}, {"id": 70, "type": "field_expression", "text": "helena.helmet", "parent": 69, "children": [71, 72], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 21}}, {"id": 71, "type": "identifier", "text": "helena", "parent": 70, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 14}}, {"id": 72, "type": "field_identifier", "text": "helmet", "parent": 70, "children": [], "start_point": {"row": 14, "column": 15}, "end_point": {"row": 14, "column": 21}}, {"id": 73, "type": "==", "text": "==", "parent": 69, "children": [], "start_point": {"row": 14, "column": 22}, "end_point": {"row": 14, "column": 24}}, {"id": 74, "type": "identifier", "text": "HELMET_THIEF", "parent": 69, "children": [], "start_point": {"row": 14, "column": 25}, "end_point": {"row": 14, "column": 37}}, {"id": 75, "type": "&&", "text": "&&", "parent": 68, "children": [], "start_point": {"row": 14, "column": 38}, "end_point": {"row": 14, "column": 40}}, {"id": 76, "type": "unary_expression", "text": "!(helena.characteristics & 0B00100000)", "parent": 68, "children": [77, 78], "start_point": {"row": 14, "column": 41}, "end_point": {"row": 14, "column": 79}}, {"id": 77, "type": "!", "text": "!", "parent": 76, "children": [], "start_point": {"row": 14, "column": 41}, "end_point": {"row": 14, "column": 42}}, {"id": 78, "type": "parenthesized_expression", "text": "(helena.characteristics & 0B00100000)", "parent": 76, "children": [79], "start_point": {"row": 14, "column": 42}, "end_point": {"row": 14, "column": 79}}, {"id": 79, "type": "binary_expression", "text": "helena.characteristics & 0B00100000", "parent": 78, "children": [80, 83], "start_point": {"row": 14, "column": 43}, "end_point": {"row": 14, "column": 78}}, {"id": 80, "type": "field_expression", "text": "helena.characteristics", "parent": 79, "children": [81, 82], "start_point": {"row": 14, "column": 43}, "end_point": {"row": 14, "column": 65}}, {"id": 81, "type": "identifier", "text": "helena", "parent": 80, "children": [], "start_point": {"row": 14, "column": 43}, "end_point": {"row": 14, "column": 49}}, {"id": 82, "type": "field_identifier", "text": "characteristics", "parent": 80, "children": [], "start_point": {"row": 14, "column": 50}, "end_point": {"row": 14, "column": 65}}, {"id": 83, "type": "number_literal", "text": "0B00100000", "parent": 79, "children": [], "start_point": {"row": 14, "column": 68}, "end_point": {"row": 14, "column": 78}}, {"id": 84, "type": "assignment_expression", "text": "helena.characteristics |= 0B00100000", "parent": 66, "children": [85, 88, 89], "start_point": {"row": 14, "column": 81}, "end_point": {"row": 14, "column": 117}}, {"id": 85, "type": "field_expression", "text": "helena.characteristics", "parent": 84, "children": [86, 87], "start_point": {"row": 14, "column": 81}, "end_point": {"row": 14, "column": 103}}, {"id": 86, "type": "identifier", "text": "helena", "parent": 85, "children": [], "start_point": {"row": 14, "column": 81}, "end_point": {"row": 14, "column": 87}}, {"id": 87, "type": "field_identifier", "text": "characteristics", "parent": 85, "children": [], "start_point": {"row": 14, "column": 88}, "end_point": {"row": 14, "column": 103}}, {"id": 88, "type": "|=", "text": "|=", "parent": 84, "children": [], "start_point": {"row": 14, "column": 104}, "end_point": {"row": 14, "column": 106}}, {"id": 89, "type": "number_literal", "text": "0B00100000", "parent": 84, "children": [], "start_point": {"row": 14, "column": 107}, "end_point": {"row": 14, "column": 117}}, {"id": 90, "type": "if_statement", "text": "if (arduboy.justPressed(B_BUTTON))\n {\n helena.characteristics |= 0B01000000; // jump\n helena.characteristics &= 0B01111111; // no longer stab\n }", "parent": 12, "children": [91], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 20, "column": 3}}, {"id": 91, "type": "parenthesized_expression", "text": "(arduboy.justPressed(B_BUTTON))", "parent": 90, "children": [92], "start_point": {"row": 16, "column": 5}, "end_point": {"row": 16, "column": 36}}, {"id": 92, "type": "call_expression", "text": "arduboy.justPressed(B_BUTTON)", "parent": 91, "children": [93, 96], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 35}}, {"id": 93, "type": "field_expression", "text": "arduboy.justPressed", "parent": 92, "children": [94, 95], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 25}}, {"id": 94, "type": "identifier", "text": "arduboy", "parent": 93, "children": [], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 13}}, {"id": 95, "type": "field_identifier", "text": "justPressed", "parent": 93, "children": [], "start_point": {"row": 16, "column": 14}, "end_point": {"row": 16, "column": 25}}, {"id": 96, "type": "argument_list", "text": "(B_BUTTON)", "parent": 92, "children": [97], "start_point": {"row": 16, "column": 25}, "end_point": {"row": 16, "column": 35}}, {"id": 97, "type": "identifier", "text": "B_BUTTON", "parent": 96, "children": [], "start_point": {"row": 16, "column": 26}, "end_point": {"row": 16, "column": 34}}, {"id": 98, "type": "assignment_expression", "text": "helena.characteristics |= 0B01000000", "parent": 90, "children": [99, 102, 103], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 40}}, {"id": 99, "type": "field_expression", "text": "helena.characteristics", "parent": 98, "children": [100, 101], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 26}}, {"id": 100, "type": "identifier", "text": "helena", "parent": 99, "children": [], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 10}}, {"id": 101, "type": "field_identifier", "text": "characteristics", "parent": 99, "children": [], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 26}}, {"id": 102, "type": "|=", "text": "|=", "parent": 98, "children": [], "start_point": {"row": 18, "column": 27}, "end_point": {"row": 18, "column": 29}}, {"id": 103, "type": "number_literal", "text": "0B01000000", "parent": 98, "children": [], "start_point": {"row": 18, "column": 30}, "end_point": {"row": 18, "column": 40}}, {"id": 104, "type": "assignment_expression", "text": "helena.characteristics &= 0B01111111", "parent": 90, "children": [105, 108, 109], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 40}}, {"id": 105, "type": "field_expression", "text": "helena.characteristics", "parent": 104, "children": [106, 107], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 26}}, {"id": 106, "type": "identifier", "text": "helena", "parent": 105, "children": [], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 10}}, {"id": 107, "type": "field_identifier", "text": "characteristics", "parent": 105, "children": [], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 26}}, {"id": 108, "type": "&=", "text": "&=", "parent": 104, "children": [], "start_point": {"row": 19, "column": 27}, "end_point": {"row": 19, "column": 29}}, {"id": 109, "type": "number_literal", "text": "0B01111111", "parent": 104, "children": [], "start_point": {"row": 19, "column": 30}, "end_point": {"row": 19, "column": 40}}, {"id": 110, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 6}}]}, "node_categories": {"declarations": {"functions": [12, 14], "variables": [], "classes": [], "imports": [6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [18, 19, 20, 24, 25, 34, 35, 36, 46, 47, 48, 54, 55, 57, 58, 59, 63, 67, 68, 69, 70, 76, 78, 79, 80, 85, 91, 92, 93, 99, 105], "assignments": [29, 41, 84, 98, 104], "loops": [], "conditionals": [0, 1, 2, 5, 15, 17, 21, 22, 26, 27, 28, 30, 32, 33, 37, 38, 40, 42, 44, 45, 49, 50, 52, 53, 60, 61, 64, 66, 71, 72, 74, 81, 82, 86, 87, 90, 94, 95, 97, 100, 101, 106, 107, 110], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 62, 83, 89, 103, 109], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 12, "universal_type": "function", "name": "checkInputs", "text_snippet": "void checkInputs()\n{\n if (arduboy.justPressed(UP_BUTTON | RIGHT_BUTTON | DOWN_BUTTON)) gameState = "}, {"node_id": 14, "universal_type": "function", "name": "unknown", "text_snippet": "checkInputs()"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"globals.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"player.h\"\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "#ifndef INPUTS_H\n#define INPUTS_H\n\n#include \"globals.h\"\n#include \"player.h\"\n\nvoid checkInputs()\n{\n if (arduboy.justPressed(UP_BUTTON | RIGHT_BUTTON | DOWN_BUTTON)) gameState = STATE_GAME_PAUSE;\n if (arduboy.justPressed(LEFT_BUTTON)) gameState = STATE_MENU_MAIN;\n\n if (arduboy.justPressed(A_BUTTON))\n {\n if (!(helena.characteristics & 0B10000000)) setAttack();\n if (helena.helmet == HELMET_THIEF && !(helena.characteristics & 0B00100000)) helena.characteristics |= 0B00100000;\n }\n if (arduboy.justPressed(B_BUTTON))\n {\n helena.characteristics |= 0B01000000; // jump\n helena.characteristics &= 0B01111111; // no longer stab\n }\n}\n\n\n#endif\n"}
| 81,202
|
c
|
#pragma once
#include "core/common/elf_loader.h"
namespace rv32 {
// see: http://wiki.osdev.org/ELF_Tutorial for ELF definitions
typedef uint16_t Elf32_Half; // Unsigned half int
typedef uint32_t Elf32_Off; // Unsigned offset
typedef uint32_t Elf32_Addr; // Unsigned address
typedef uint32_t Elf32_Word; // Unsigned int
typedef int32_t Elf32_Sword; // Signed int
constexpr unsigned ELF_NIDENT = 16;
typedef struct {
uint8_t e_ident[ELF_NIDENT];
Elf32_Half e_type;
Elf32_Half e_machine;
Elf32_Word e_version;
Elf32_Addr e_entry;
Elf32_Off e_phoff;
Elf32_Off e_shoff;
Elf32_Word e_flags;
Elf32_Half e_ehsize;
Elf32_Half e_phentsize;
Elf32_Half e_phnum;
Elf32_Half e_shentsize;
Elf32_Half e_shnum;
Elf32_Half e_shstrndx;
} Elf32_Ehdr;
typedef struct {
Elf32_Word p_type;
Elf32_Off p_offset;
Elf32_Addr p_vaddr;
Elf32_Addr p_paddr;
Elf32_Word p_filesz;
Elf32_Word p_memsz;
Elf32_Word p_flags;
Elf32_Word p_align;
} Elf32_Phdr;
typedef struct {
Elf32_Word sh_name;
Elf32_Word sh_type;
Elf32_Word sh_flags;
Elf32_Addr sh_addr;
Elf32_Off sh_offset;
Elf32_Word sh_size;
Elf32_Word sh_link;
Elf32_Word sh_info;
Elf32_Word sh_addralign;
Elf32_Word sh_entsize;
} Elf32_Shdr;
typedef struct {
Elf32_Word st_name;
Elf32_Addr st_value;
Elf32_Word st_size;
unsigned char st_info;
unsigned char st_other;
Elf32_Half st_shndx;
} Elf32_Sym;
enum Elf32_PhdrType { PT_NULL = 0, PT_LOAD = 1, PT_DYNAMIC = 2, PT_INTERP = 3, PT_NOTE = 4, PT_SHLIB = 5, PT_PHDR = 6 };
struct Elf32Types {
typedef uint32_t addr_t;
typedef Elf32_Ehdr Elf_Ehdr;
typedef Elf32_Phdr Elf_Phdr;
typedef Elf32_Shdr Elf_Shdr;
typedef Elf32_Sym Elf_Sym;
static constexpr unsigned PT_LOAD = Elf32_PhdrType::PT_LOAD;
};
typedef GenericElfLoader<Elf32Types> ELFLoader;
} // namespace rv32
| 25.66
| 67
|
(translation_unit) "#pragma once\n\n#include "core/common/elf_loader.h"\n\nnamespace rv32 {\n\n// see: http://wiki.osdev.org/ELF_Tutorial for ELF definitions\n\ntypedef uint16_t Elf32_Half; // Unsigned half int\ntypedef uint32_t Elf32_Off; // Unsigned offset\ntypedef uint32_t Elf32_Addr; // Unsigned address\ntypedef uint32_t Elf32_Word; // Unsigned int\ntypedef int32_t Elf32_Sword; // Signed int\n\nconstexpr unsigned ELF_NIDENT = 16;\n\ntypedef struct {\n uint8_t e_ident[ELF_NIDENT];\n Elf32_Half e_type;\n Elf32_Half e_machine;\n Elf32_Word e_version;\n Elf32_Addr e_entry;\n Elf32_Off e_phoff;\n Elf32_Off e_shoff;\n Elf32_Word e_flags;\n Elf32_Half e_ehsize;\n Elf32_Half e_phentsize;\n Elf32_Half e_phnum;\n Elf32_Half e_shentsize;\n Elf32_Half e_shnum;\n Elf32_Half e_shstrndx;\n} Elf32_Ehdr;\n\ntypedef struct {\n Elf32_Word p_type;\n Elf32_Off p_offset;\n Elf32_Addr p_vaddr;\n Elf32_Addr p_paddr;\n Elf32_Word p_filesz;\n Elf32_Word p_memsz;\n Elf32_Word p_flags;\n Elf32_Word p_align;\n} Elf32_Phdr;\n\ntypedef struct {\n Elf32_Word sh_name;\n Elf32_Word sh_type;\n Elf32_Word sh_flags;\n Elf32_Addr sh_addr;\n Elf32_Off sh_offset;\n Elf32_Word sh_size;\n Elf32_Word sh_link;\n Elf32_Word sh_info;\n Elf32_Word sh_addralign;\n Elf32_Word sh_entsize;\n} Elf32_Shdr;\n\ntypedef struct {\n Elf32_Word st_name;\n Elf32_Addr st_value;\n Elf32_Word st_size;\n unsigned char st_info;\n unsigned char st_other;\n Elf32_Half st_shndx;\n} Elf32_Sym;\n\nenum Elf32_PhdrType { PT_NULL = 0, PT_LOAD = 1, PT_DYNAMIC = 2, PT_INTERP = 3, PT_NOTE = 4, PT_SHLIB = 5, PT_PHDR = 6 };\n\nstruct Elf32Types {\n typedef uint32_t addr_t;\n typedef Elf32_Ehdr Elf_Ehdr;\n typedef Elf32_Phdr Elf_Phdr;\n typedef Elf32_Shdr Elf_Shdr;\n typedef Elf32_Sym Elf_Sym;\n static constexpr unsigned PT_LOAD = Elf32_PhdrType::PT_LOAD;\n};\n\ntypedef GenericElfLoader<Elf32Types> ELFLoader;\n\n} // namespace rv32\n"
(preproc_call) "#pragma once\n"
(preproc_directive) "#pragma"
(preproc_arg) "once"
(preproc_include) "#include "core/common/elf_loader.h"\n"
(#include) "#include"
(string_literal) ""core/common/elf_loader.h""
(") """
(string_content) "core/common/elf_loader.h"
(") """
(declaration) "namespace rv32 {\n\n// see: http://wiki.osdev.org/ELF_Tutorial for ELF definitions\n\ntypedef uint16_t Elf32_Half; // Unsigned half int\ntypedef uint32_t Elf32_Off; // Unsigned offset\ntypedef uint32_t Elf32_Addr; // Unsigned address\ntypedef uint32_t Elf32_Word; // Unsigned int\ntypedef int32_t Elf32_Sword; // Signed int\n\nconstexpr unsigned ELF_NIDENT = 16;\n\ntypedef struct {\n uint8_t e_ident[ELF_NIDENT];\n Elf32_Half e_type;\n Elf32_Half e_machine;\n Elf32_Word e_version;\n Elf32_Addr e_entry;\n Elf32_Off e_phoff;\n Elf32_Off e_shoff;\n Elf32_Word e_flags;\n Elf32_Half e_ehsize;\n Elf32_Half e_phentsize;\n Elf32_Half e_phnum;\n Elf32_Half e_shentsize;\n Elf32_Half e_shnum;\n Elf32_Half e_shstrndx;\n} Elf32_Ehdr;\n\ntypedef struct {\n Elf32_Word p_type;\n Elf32_Off p_offset;\n Elf32_Addr p_vaddr;\n Elf32_Addr p_paddr;\n Elf32_Word p_filesz;\n Elf32_Word p_memsz;\n Elf32_Word p_flags;\n Elf32_Word p_align;\n} Elf32_Phdr;\n\ntypedef struct {\n Elf32_Word sh_name;\n Elf32_Word sh_type;\n Elf32_Word sh_flags;\n Elf32_Addr sh_addr;\n Elf32_Off sh_offset;\n Elf32_Word sh_size;\n Elf32_Word sh_link;\n Elf32_Word sh_info;\n Elf32_Word sh_addralign;\n Elf32_Word sh_entsize;\n} Elf32_Shdr;\n\ntypedef struct {\n Elf32_Word st_name;\n Elf32_Addr st_value;\n Elf32_Word st_size;\n unsigned char st_info;\n unsigned char st_other;\n Elf32_Half st_shndx;\n} Elf32_Sym;\n\nenum Elf32_PhdrType { PT_NULL = 0, PT_LOAD = 1, PT_DYNAMIC = 2, PT_INTERP = 3, PT_NOTE = 4, PT_SHLIB = 5, PT_PHDR = 6 };\n\nstruct Elf32Types {\n typedef uint32_t addr_t;\n typedef Elf32_Ehdr Elf_Ehdr;\n typedef Elf32_Phdr Elf_Phdr;\n typedef Elf32_Shdr Elf_Shdr;\n typedef Elf32_Sym Elf_Sym;\n static constexpr unsigned PT_LOAD = Elf32_PhdrType::PT_LOAD;"
(type_identifier) "namespace"
(init_declarator) "rv32 {\n\n// see: http://wiki.osdev.org/ELF_Tutorial for ELF definitions\n\ntypedef uint16_t Elf32_Half; // Unsigned half int\ntypedef uint32_t Elf32_Off; // Unsigned offset\ntypedef uint32_t Elf32_Addr; // Unsigned address\ntypedef uint32_t Elf32_Word; // Unsigned int\ntypedef int32_t Elf32_Sword; // Signed int\n\nconstexpr unsigned ELF_NIDENT = 16;\n\ntypedef struct {\n uint8_t e_ident[ELF_NIDENT];\n Elf32_Half e_type;\n Elf32_Half e_machine;\n Elf32_Word e_version;\n Elf32_Addr e_entry;\n Elf32_Off e_phoff;\n Elf32_Off e_shoff;\n Elf32_Word e_flags;\n Elf32_Half e_ehsize;\n Elf32_Half e_phentsize;\n Elf32_Half e_phnum;\n Elf32_Half e_shentsize;\n Elf32_Half e_shnum;\n Elf32_Half e_shstrndx;\n} Elf32_Ehdr;\n\ntypedef struct {\n Elf32_Word p_type;\n Elf32_Off p_offset;\n Elf32_Addr p_vaddr;\n Elf32_Addr p_paddr;\n Elf32_Word p_filesz;\n Elf32_Word p_memsz;\n Elf32_Word p_flags;\n Elf32_Word p_align;\n} Elf32_Phdr;\n\ntypedef struct {\n Elf32_Word sh_name;\n Elf32_Word sh_type;\n Elf32_Word sh_flags;\n Elf32_Addr sh_addr;\n Elf32_Off sh_offset;\n Elf32_Word sh_size;\n Elf32_Word sh_link;\n Elf32_Word sh_info;\n Elf32_Word sh_addralign;\n Elf32_Word sh_entsize;\n} Elf32_Shdr;\n\ntypedef struct {\n Elf32_Word st_name;\n Elf32_Addr st_value;\n Elf32_Word st_size;\n unsigned char st_info;\n unsigned char st_other;\n Elf32_Half st_shndx;\n} Elf32_Sym;\n\nenum Elf32_PhdrType { PT_NULL = 0, PT_LOAD = 1, PT_DYNAMIC = 2, PT_INTERP = 3, PT_NOTE = 4, PT_SHLIB = 5, PT_PHDR = 6 };\n\nstruct Elf32Types {\n typedef uint32_t addr_t;\n typedef Elf32_Ehdr Elf_Ehdr;\n typedef Elf32_Phdr Elf_Phdr;\n typedef Elf32_Shdr Elf_Shdr;\n typedef Elf32_Sym Elf_Sym;\n static constexpr unsigned PT_LOAD = Elf32_PhdrType"
(identifier) "rv32"
(ERROR) "{\n\n// see: http://wiki.osdev.org/ELF_Tutorial for ELF definitions\n\ntypedef uint16_t Elf32_Half; // Unsigned half int\ntypedef uint32_t Elf32_Off; // Unsigned offset\ntypedef uint32_t Elf32_Addr; // Unsigned address\ntypedef uint32_t Elf32_Word; // Unsigned int\ntypedef int32_t Elf32_Sword; // Signed int\n\nconstexpr unsigned ELF_NIDENT = 16;\n\ntypedef struct {\n uint8_t e_ident[ELF_NIDENT];\n Elf32_Half e_type;\n Elf32_Half e_machine;\n Elf32_Word e_version;\n Elf32_Addr e_entry;\n Elf32_Off e_phoff;\n Elf32_Off e_shoff;\n Elf32_Word e_flags;\n Elf32_Half e_ehsize;\n Elf32_Half e_phentsize;\n Elf32_Half e_phnum;\n Elf32_Half e_shentsize;\n Elf32_Half e_shnum;\n Elf32_Half e_shstrndx;\n} Elf32_Ehdr;\n\ntypedef struct {\n Elf32_Word p_type;\n Elf32_Off p_offset;\n Elf32_Addr p_vaddr;\n Elf32_Addr p_paddr;\n Elf32_Word p_filesz;\n Elf32_Word p_memsz;\n Elf32_Word p_flags;\n Elf32_Word p_align;\n} Elf32_Phdr;\n\ntypedef struct {\n Elf32_Word sh_name;\n Elf32_Word sh_type;\n Elf32_Word sh_flags;\n Elf32_Addr sh_addr;\n Elf32_Off sh_offset;\n Elf32_Word sh_size;\n Elf32_Word sh_link;\n Elf32_Word sh_info;\n Elf32_Word sh_addralign;\n Elf32_Word sh_entsize;\n} Elf32_Shdr;\n\ntypedef struct {\n Elf32_Word st_name;\n Elf32_Addr st_value;\n Elf32_Word st_size;\n unsigned char st_info;\n unsigned char st_other;\n Elf32_Half st_shndx;\n} Elf32_Sym;\n\nenum Elf32_PhdrType { PT_NULL = 0, PT_LOAD = 1, PT_DYNAMIC = 2, PT_INTERP = 3, PT_NOTE = 4, PT_SHLIB = 5, PT_PHDR = 6 };\n\nstruct Elf32Types {\n typedef uint32_t addr_t;\n typedef Elf32_Ehdr Elf_Ehdr;\n typedef Elf32_Phdr Elf_Phdr;\n typedef Elf32_Shdr Elf_Shdr;\n typedef Elf32_Sym Elf_Sym;\n static constexpr unsigned PT_LOAD"
({) "{"
(comment) "// see: http://wiki.osdev.org/ELF_Tutorial for ELF definitions"
(type_definition) "typedef uint16_t Elf32_Half;"
(typedef) "typedef"
(primitive_type) "uint16_t"
(type_identifier) "Elf32_Half"
(;) ";"
(comment) "// Unsigned half int"
(type_definition) "typedef uint32_t Elf32_Off;"
(typedef) "typedef"
(primitive_type) "uint32_t"
(type_identifier) "Elf32_Off"
(;) ";"
(comment) "// Unsigned offset"
(type_definition) "typedef uint32_t Elf32_Addr;"
(typedef) "typedef"
(primitive_type) "uint32_t"
(type_identifier) "Elf32_Addr"
(;) ";"
(comment) "// Unsigned address"
(type_definition) "typedef uint32_t Elf32_Word;"
(typedef) "typedef"
(primitive_type) "uint32_t"
(type_identifier) "Elf32_Word"
(;) ";"
(comment) "// Unsigned int"
(type_definition) "typedef int32_t Elf32_Sword;"
(typedef) "typedef"
(primitive_type) "int32_t"
(type_identifier) "Elf32_Sword"
(;) ";"
(comment) "// Signed int"
(declaration) "constexpr unsigned ELF_NIDENT = 16;"
(type_qualifier) "constexpr"
(constexpr) "constexpr"
(sized_type_specifier) "unsigned"
(unsigned) "unsigned"
(init_declarator) "ELF_NIDENT = 16"
(identifier) "ELF_NIDENT"
(=) "="
(number_literal) "16"
(;) ";"
(type_definition) "typedef struct {\n uint8_t e_ident[ELF_NIDENT];\n Elf32_Half e_type;\n Elf32_Half e_machine;\n Elf32_Word e_version;\n Elf32_Addr e_entry;\n Elf32_Off e_phoff;\n Elf32_Off e_shoff;\n Elf32_Word e_flags;\n Elf32_Half e_ehsize;\n Elf32_Half e_phentsize;\n Elf32_Half e_phnum;\n Elf32_Half e_shentsize;\n Elf32_Half e_shnum;\n Elf32_Half e_shstrndx;\n} Elf32_Ehdr;"
(typedef) "typedef"
(struct_specifier) "struct {\n uint8_t e_ident[ELF_NIDENT];\n Elf32_Half e_type;\n Elf32_Half e_machine;\n Elf32_Word e_version;\n Elf32_Addr e_entry;\n Elf32_Off e_phoff;\n Elf32_Off e_shoff;\n Elf32_Word e_flags;\n Elf32_Half e_ehsize;\n Elf32_Half e_phentsize;\n Elf32_Half e_phnum;\n Elf32_Half e_shentsize;\n Elf32_Half e_shnum;\n Elf32_Half e_shstrndx;\n}"
(struct) "struct"
(field_declaration_list) "{\n uint8_t e_ident[ELF_NIDENT];\n Elf32_Half e_type;\n Elf32_Half e_machine;\n Elf32_Word e_version;\n Elf32_Addr e_entry;\n Elf32_Off e_phoff;\n Elf32_Off e_shoff;\n Elf32_Word e_flags;\n Elf32_Half e_ehsize;\n Elf32_Half e_phentsize;\n Elf32_Half e_phnum;\n Elf32_Half e_shentsize;\n Elf32_Half e_shnum;\n Elf32_Half e_shstrndx;\n}"
({) "{"
(field_declaration) "uint8_t e_ident[ELF_NIDENT];"
(primitive_type) "uint8_t"
(array_declarator) "e_ident[ELF_NIDENT]"
(field_identifier) "e_ident"
([) "["
(identifier) "ELF_NIDENT"
(]) "]"
(;) ";"
(field_declaration) "Elf32_Half e_type;"
(type_identifier) "Elf32_Half"
(field_identifier) "e_type"
(;) ";"
(field_declaration) "Elf32_Half e_machine;"
(type_identifier) "Elf32_Half"
(field_identifier) "e_machine"
(;) ";"
(field_declaration) "Elf32_Word e_version;"
(type_identifier) "Elf32_Word"
(field_identifier) "e_version"
(;) ";"
(field_declaration) "Elf32_Addr e_entry;"
(type_identifier) "Elf32_Addr"
(field_identifier) "e_entry"
(;) ";"
(field_declaration) "Elf32_Off e_phoff;"
(type_identifier) "Elf32_Off"
(field_identifier) "e_phoff"
(;) ";"
(field_declaration) "Elf32_Off e_shoff;"
(type_identifier) "Elf32_Off"
(field_identifier) "e_shoff"
(;) ";"
(field_declaration) "Elf32_Word e_flags;"
(type_identifier) "Elf32_Word"
(field_identifier) "e_flags"
(;) ";"
(field_declaration) "Elf32_Half e_ehsize;"
(type_identifier) "Elf32_Half"
(field_identifier) "e_ehsize"
(;) ";"
(field_declaration) "Elf32_Half e_phentsize;"
(type_identifier) "Elf32_Half"
(field_identifier) "e_phentsize"
(;) ";"
(field_declaration) "Elf32_Half e_phnum;"
(type_identifier) "Elf32_Half"
(field_identifier) "e_phnum"
(;) ";"
(field_declaration) "Elf32_Half e_shentsize;"
(type_identifier) "Elf32_Half"
(field_identifier) "e_shentsize"
(;) ";"
(field_declaration) "Elf32_Half e_shnum;"
(type_identifier) "Elf32_Half"
(field_identifier) "e_shnum"
(;) ";"
(field_declaration) "Elf32_Half e_shstrndx;"
(type_identifier) "Elf32_Half"
(field_identifier) "e_shstrndx"
(;) ";"
(}) "}"
(type_identifier) "Elf32_Ehdr"
(;) ";"
(type_definition) "typedef struct {\n Elf32_Word p_type;\n Elf32_Off p_offset;\n Elf32_Addr p_vaddr;\n Elf32_Addr p_paddr;\n Elf32_Word p_filesz;\n Elf32_Word p_memsz;\n Elf32_Word p_flags;\n Elf32_Word p_align;\n} Elf32_Phdr;"
(typedef) "typedef"
(struct_specifier) "struct {\n Elf32_Word p_type;\n Elf32_Off p_offset;\n Elf32_Addr p_vaddr;\n Elf32_Addr p_paddr;\n Elf32_Word p_filesz;\n Elf32_Word p_memsz;\n Elf32_Word p_flags;\n Elf32_Word p_align;\n}"
(struct) "struct"
(field_declaration_list) "{\n Elf32_Word p_type;\n Elf32_Off p_offset;\n Elf32_Addr p_vaddr;\n Elf32_Addr p_paddr;\n Elf32_Word p_filesz;\n Elf32_Word p_memsz;\n Elf32_Word p_flags;\n Elf32_Word p_align;\n}"
({) "{"
(field_declaration) "Elf32_Word p_type;"
(type_identifier) "Elf32_Word"
(field_identifier) "p_type"
(;) ";"
(field_declaration) "Elf32_Off p_offset;"
(type_identifier) "Elf32_Off"
(field_identifier) "p_offset"
(;) ";"
(field_declaration) "Elf32_Addr p_vaddr;"
(type_identifier) "Elf32_Addr"
(field_identifier) "p_vaddr"
(;) ";"
(field_declaration) "Elf32_Addr p_paddr;"
(type_identifier) "Elf32_Addr"
(field_identifier) "p_paddr"
(;) ";"
(field_declaration) "Elf32_Word p_filesz;"
(type_identifier) "Elf32_Word"
(field_identifier) "p_filesz"
(;) ";"
(field_declaration) "Elf32_Word p_memsz;"
(type_identifier) "Elf32_Word"
(field_identifier) "p_memsz"
(;) ";"
(field_declaration) "Elf32_Word p_flags;"
(type_identifier) "Elf32_Word"
(field_identifier) "p_flags"
(;) ";"
(field_declaration) "Elf32_Word p_align;"
(type_identifier) "Elf32_Word"
(field_identifier) "p_align"
(;) ";"
(}) "}"
(type_identifier) "Elf32_Phdr"
(;) ";"
(type_definition) "typedef struct {\n Elf32_Word sh_name;\n Elf32_Word sh_type;\n Elf32_Word sh_flags;\n Elf32_Addr sh_addr;\n Elf32_Off sh_offset;\n Elf32_Word sh_size;\n Elf32_Word sh_link;\n Elf32_Word sh_info;\n Elf32_Word sh_addralign;\n Elf32_Word sh_entsize;\n} Elf32_Shdr;"
(typedef) "typedef"
(struct_specifier) "struct {\n Elf32_Word sh_name;\n Elf32_Word sh_type;\n Elf32_Word sh_flags;\n Elf32_Addr sh_addr;\n Elf32_Off sh_offset;\n Elf32_Word sh_size;\n Elf32_Word sh_link;\n Elf32_Word sh_info;\n Elf32_Word sh_addralign;\n Elf32_Word sh_entsize;\n}"
(struct) "struct"
(field_declaration_list) "{\n Elf32_Word sh_name;\n Elf32_Word sh_type;\n Elf32_Word sh_flags;\n Elf32_Addr sh_addr;\n Elf32_Off sh_offset;\n Elf32_Word sh_size;\n Elf32_Word sh_link;\n Elf32_Word sh_info;\n Elf32_Word sh_addralign;\n Elf32_Word sh_entsize;\n}"
({) "{"
(field_declaration) "Elf32_Word sh_name;"
(type_identifier) "Elf32_Word"
(field_identifier) "sh_name"
(;) ";"
(field_declaration) "Elf32_Word sh_type;"
(type_identifier) "Elf32_Word"
(field_identifier) "sh_type"
(;) ";"
(field_declaration) "Elf32_Word sh_flags;"
(type_identifier) "Elf32_Word"
(field_identifier) "sh_flags"
(;) ";"
(field_declaration) "Elf32_Addr sh_addr;"
(type_identifier) "Elf32_Addr"
(field_identifier) "sh_addr"
(;) ";"
(field_declaration) "Elf32_Off sh_offset;"
(type_identifier) "Elf32_Off"
(field_identifier) "sh_offset"
(;) ";"
(field_declaration) "Elf32_Word sh_size;"
(type_identifier) "Elf32_Word"
(field_identifier) "sh_size"
(;) ";"
(field_declaration) "Elf32_Word sh_link;"
(type_identifier) "Elf32_Word"
(field_identifier) "sh_link"
(;) ";"
(field_declaration) "Elf32_Word sh_info;"
(type_identifier) "Elf32_Word"
(field_identifier) "sh_info"
(;) ";"
(field_declaration) "Elf32_Word sh_addralign;"
(type_identifier) "Elf32_Word"
(field_identifier) "sh_addralign"
(;) ";"
(field_declaration) "Elf32_Word sh_entsize;"
(type_identifier) "Elf32_Word"
(field_identifier) "sh_entsize"
(;) ";"
(}) "}"
(type_identifier) "Elf32_Shdr"
(;) ";"
(type_definition) "typedef struct {\n Elf32_Word st_name;\n Elf32_Addr st_value;\n Elf32_Word st_size;\n unsigned char st_info;\n unsigned char st_other;\n Elf32_Half st_shndx;\n} Elf32_Sym;"
(typedef) "typedef"
(struct_specifier) "struct {\n Elf32_Word st_name;\n Elf32_Addr st_value;\n Elf32_Word st_size;\n unsigned char st_info;\n unsigned char st_other;\n Elf32_Half st_shndx;\n}"
(struct) "struct"
(field_declaration_list) "{\n Elf32_Word st_name;\n Elf32_Addr st_value;\n Elf32_Word st_size;\n unsigned char st_info;\n unsigned char st_other;\n Elf32_Half st_shndx;\n}"
({) "{"
(field_declaration) "Elf32_Word st_name;"
(type_identifier) "Elf32_Word"
(field_identifier) "st_name"
(;) ";"
(field_declaration) "Elf32_Addr st_value;"
(type_identifier) "Elf32_Addr"
(field_identifier) "st_value"
(;) ";"
(field_declaration) "Elf32_Word st_size;"
(type_identifier) "Elf32_Word"
(field_identifier) "st_size"
(;) ";"
(field_declaration) "unsigned char st_info;"
(sized_type_specifier) "unsigned char"
(unsigned) "unsigned"
(primitive_type) "char"
(field_identifier) "st_info"
(;) ";"
(field_declaration) "unsigned char st_other;"
(sized_type_specifier) "unsigned char"
(unsigned) "unsigned"
(primitive_type) "char"
(field_identifier) "st_other"
(;) ";"
(field_declaration) "Elf32_Half st_shndx;"
(type_identifier) "Elf32_Half"
(field_identifier) "st_shndx"
(;) ";"
(}) "}"
(type_identifier) "Elf32_Sym"
(;) ";"
(enum_specifier) "enum Elf32_PhdrType { PT_NULL = 0, PT_LOAD = 1, PT_DYNAMIC = 2, PT_INTERP = 3, PT_NOTE = 4, PT_SHLIB = 5, PT_PHDR = 6 }"
(enum) "enum"
(type_identifier) "Elf32_PhdrType"
(enumerator_list) "{ PT_NULL = 0, PT_LOAD = 1, PT_DYNAMIC = 2, PT_INTERP = 3, PT_NOTE = 4, PT_SHLIB = 5, PT_PHDR = 6 }"
({) "{"
(enumerator) "PT_NULL = 0"
(identifier) "PT_NULL"
(=) "="
(number_literal) "0"
(,) ","
(enumerator) "PT_LOAD = 1"
(identifier) "PT_LOAD"
(=) "="
(number_literal) "1"
(,) ","
(enumerator) "PT_DYNAMIC = 2"
(identifier) "PT_DYNAMIC"
(=) "="
(number_literal) "2"
(,) ","
(enumerator) "PT_INTERP = 3"
(identifier) "PT_INTERP"
(=) "="
(number_literal) "3"
(,) ","
(enumerator) "PT_NOTE = 4"
(identifier) "PT_NOTE"
(=) "="
(number_literal) "4"
(,) ","
(enumerator) "PT_SHLIB = 5"
(identifier) "PT_SHLIB"
(=) "="
(number_literal) "5"
(,) ","
(enumerator) "PT_PHDR = 6"
(identifier) "PT_PHDR"
(=) "="
(number_literal) "6"
(}) "}"
(;) ";"
(struct) "struct"
(identifier) "Elf32Types"
({) "{"
(field_declaration) "typedef uint32_t addr_t;"
(type_identifier) "typedef"
(field_identifier) "uint32_t"
(ERROR) "addr_t"
(identifier) "addr_t"
(;) ";"
(field_declaration) "typedef Elf32_Ehdr Elf_Ehdr;"
(type_identifier) "typedef"
(field_identifier) "Elf32_Ehdr"
(ERROR) "Elf_Ehdr"
(identifier) "Elf_Ehdr"
(;) ";"
(field_declaration) "typedef Elf32_Phdr Elf_Phdr;"
(type_identifier) "typedef"
(field_identifier) "Elf32_Phdr"
(ERROR) "Elf_Phdr"
(identifier) "Elf_Phdr"
(;) ";"
(field_declaration) "typedef Elf32_Shdr Elf_Shdr;"
(type_identifier) "typedef"
(field_identifier) "Elf32_Shdr"
(ERROR) "Elf_Shdr"
(identifier) "Elf_Shdr"
(;) ";"
(field_declaration) "typedef Elf32_Sym Elf_Sym;"
(type_identifier) "typedef"
(field_identifier) "Elf32_Sym"
(ERROR) "Elf_Sym"
(identifier) "Elf_Sym"
(;) ";"
(storage_class_specifier) "static"
(static) "static"
(type_qualifier) "constexpr"
(constexpr) "constexpr"
(sized_type_specifier) "unsigned PT_LOAD"
(unsigned) "unsigned"
(type_identifier) "PT_LOAD"
(=) "="
(identifier) "Elf32_PhdrType"
(ERROR) "::PT_LOAD"
(:) ":"
(:) ":"
(identifier) "PT_LOAD"
(;) ";"
(ERROR) "}"
(}) "}"
(expression_statement) ";"
(;) ";"
(type_definition) "typedef GenericElfLoader<Elf32Types> ELFLoader;"
(typedef) "typedef"
(type_identifier) "GenericElfLoader"
(ERROR) "<Elf32Types>"
(<) "<"
(type_identifier) "Elf32Types"
(>) ">"
(type_identifier) "ELFLoader"
(;) ";"
(ERROR) "}"
(}) "}"
(comment) "// namespace rv32"
| 357
| 10
|
{"language": "c", "success": true, "metadata": {"lines": 67, "avg_line_length": 25.66, "nodes": 256, "errors": 0, "source_hash": "8d48efbe52275d0f8d2469c0fe6e362b8b1429f2732b0cf7aba33a8ea1156e92", "categorized_nodes": 208}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include \"core/common/elf_loader.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": "\"core/common/elf_loader.h\"", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 35}}, {"id": 6, "type": "declaration", "text": "namespace rv32 {\n\n// see: http://wiki.osdev.org/ELF_Tutorial for ELF definitions\n\ntypedef uint16_t Elf32_Half; // Unsigned half int\ntypedef uint32_t Elf32_Off; // Unsigned offset\ntypedef uint32_t Elf32_Addr; // Unsigned address\ntypedef uint32_t Elf32_Word; // Unsigned int\ntypedef int32_t Elf32_Sword; // Signed int\n\nconstexpr unsigned ELF_NIDENT = 16;\n\ntypedef struct {\n\tuint8_t e_ident[ELF_NIDENT];\n\tElf32_Half e_type;\n\tElf32_Half e_machine;\n\tElf32_Word e_version;\n\tElf32_Addr e_entry;\n\tElf32_Off e_phoff;\n\tElf32_Off e_shoff;\n\tElf32_Word e_flags;\n\tElf32_Half e_ehsize;\n\tElf32_Half e_phentsize;\n\tElf32_Half e_phnum;\n\tElf32_Half e_shentsize;\n\tElf32_Half e_shnum;\n\tElf32_Half e_shstrndx;\n} Elf32_Ehdr;\n\ntypedef struct {\n\tElf32_Word p_type;\n\tElf32_Off p_offset;\n\tElf32_Addr p_vaddr;\n\tElf32_Addr p_paddr;\n\tElf32_Word p_filesz;\n\tElf32_Word p_memsz;\n\tElf32_Word p_flags;\n\tElf32_Word p_align;\n} Elf32_Phdr;\n\ntypedef struct {\n\tElf32_Word sh_name;\n\tElf32_Word sh_type;\n\tElf32_Word sh_flags;\n\tElf32_Addr sh_addr;\n\tElf32_Off sh_offset;\n\tElf32_Word sh_size;\n\tElf32_Word sh_link;\n\tElf32_Word sh_info;\n\tElf32_Word sh_addralign;\n\tElf32_Word sh_entsize;\n} Elf32_Shdr;\n\ntypedef struct {\n\tElf32_Word st_name;\n\tElf32_Addr st_value;\n\tElf32_Word st_size;\n\tunsigned char st_info;\n\tunsigned char st_other;\n\tElf32_Half st_shndx;\n} Elf32_Sym;\n\nenum Elf32_PhdrType { PT_NULL = 0, PT_LOAD = 1, PT_DYNAMIC = 2, PT_INTERP = 3, PT_NOTE = 4, PT_SHLIB = 5, PT_PHDR = 6 };\n\nstruct Elf32Types {\n\ttypedef uint32_t addr_t;\n\ttypedef Elf32_Ehdr Elf_Ehdr;\n\ttypedef Elf32_Phdr Elf_Phdr;\n\ttypedef Elf32_Shdr Elf_Shdr;\n\ttypedef Elf32_Sym Elf_Sym;\n\tstatic constexpr unsigned PT_LOAD = Elf32_PhdrType::PT_LOAD;", "parent": null, "children": [7, 8, 246], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 74, "column": 61}}, {"id": 7, "type": "type_identifier", "text": "namespace", "parent": 6, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 9}}, {"id": 8, "type": "init_declarator", "text": "rv32 {\n\n// see: http://wiki.osdev.org/ELF_Tutorial for ELF definitions\n\ntypedef uint16_t Elf32_Half; // Unsigned half int\ntypedef uint32_t Elf32_Off; // Unsigned offset\ntypedef uint32_t Elf32_Addr; // Unsigned address\ntypedef uint32_t Elf32_Word; // Unsigned int\ntypedef int32_t Elf32_Sword; // Signed int\n\nconstexpr unsigned ELF_NIDENT = 16;\n\ntypedef struct {\n\tuint8_t e_ident[ELF_NIDENT];\n\tElf32_Half e_type;\n\tElf32_Half e_machine;\n\tElf32_Word e_version;\n\tElf32_Addr e_entry;\n\tElf32_Off e_phoff;\n\tElf32_Off e_shoff;\n\tElf32_Word e_flags;\n\tElf32_Half e_ehsize;\n\tElf32_Half e_phentsize;\n\tElf32_Half e_phnum;\n\tElf32_Half e_shentsize;\n\tElf32_Half e_shnum;\n\tElf32_Half e_shstrndx;\n} Elf32_Ehdr;\n\ntypedef struct {\n\tElf32_Word p_type;\n\tElf32_Off p_offset;\n\tElf32_Addr p_vaddr;\n\tElf32_Addr p_paddr;\n\tElf32_Word p_filesz;\n\tElf32_Word p_memsz;\n\tElf32_Word p_flags;\n\tElf32_Word p_align;\n} Elf32_Phdr;\n\ntypedef struct {\n\tElf32_Word sh_name;\n\tElf32_Word sh_type;\n\tElf32_Word sh_flags;\n\tElf32_Addr sh_addr;\n\tElf32_Off sh_offset;\n\tElf32_Word sh_size;\n\tElf32_Word sh_link;\n\tElf32_Word sh_info;\n\tElf32_Word sh_addralign;\n\tElf32_Word sh_entsize;\n} Elf32_Shdr;\n\ntypedef struct {\n\tElf32_Word st_name;\n\tElf32_Addr st_value;\n\tElf32_Word st_size;\n\tunsigned char st_info;\n\tunsigned char st_other;\n\tElf32_Half st_shndx;\n} Elf32_Sym;\n\nenum Elf32_PhdrType { PT_NULL = 0, PT_LOAD = 1, PT_DYNAMIC = 2, PT_INTERP = 3, PT_NOTE = 4, PT_SHLIB = 5, PT_PHDR = 6 };\n\nstruct Elf32Types {\n\ttypedef uint32_t addr_t;\n\ttypedef Elf32_Ehdr Elf_Ehdr;\n\ttypedef Elf32_Phdr Elf_Phdr;\n\ttypedef Elf32_Shdr Elf_Shdr;\n\ttypedef Elf32_Sym Elf_Sym;\n\tstatic constexpr unsigned PT_LOAD = Elf32_PhdrType", "parent": 6, "children": [9, 10, 244, 245], "start_point": {"row": 4, "column": 10}, "end_point": {"row": 74, "column": 51}}, {"id": 9, "type": "identifier", "text": "rv32", "parent": 8, "children": [], "start_point": {"row": 4, "column": 10}, "end_point": {"row": 4, "column": 14}}, {"id": 10, "type": "ERROR", "text": "{\n\n// see: http://wiki.osdev.org/ELF_Tutorial for ELF definitions\n\ntypedef uint16_t Elf32_Half; // Unsigned half int\ntypedef uint32_t Elf32_Off; // Unsigned offset\ntypedef uint32_t Elf32_Addr; // Unsigned address\ntypedef uint32_t Elf32_Word; // Unsigned int\ntypedef int32_t Elf32_Sword; // Signed int\n\nconstexpr unsigned ELF_NIDENT = 16;\n\ntypedef struct {\n\tuint8_t e_ident[ELF_NIDENT];\n\tElf32_Half e_type;\n\tElf32_Half e_machine;\n\tElf32_Word e_version;\n\tElf32_Addr e_entry;\n\tElf32_Off e_phoff;\n\tElf32_Off e_shoff;\n\tElf32_Word e_flags;\n\tElf32_Half e_ehsize;\n\tElf32_Half e_phentsize;\n\tElf32_Half e_phnum;\n\tElf32_Half e_shentsize;\n\tElf32_Half e_shnum;\n\tElf32_Half e_shstrndx;\n} Elf32_Ehdr;\n\ntypedef struct {\n\tElf32_Word p_type;\n\tElf32_Off p_offset;\n\tElf32_Addr p_vaddr;\n\tElf32_Addr p_paddr;\n\tElf32_Word p_filesz;\n\tElf32_Word p_memsz;\n\tElf32_Word p_flags;\n\tElf32_Word p_align;\n} Elf32_Phdr;\n\ntypedef struct {\n\tElf32_Word sh_name;\n\tElf32_Word sh_type;\n\tElf32_Word sh_flags;\n\tElf32_Addr sh_addr;\n\tElf32_Off sh_offset;\n\tElf32_Word sh_size;\n\tElf32_Word sh_link;\n\tElf32_Word sh_info;\n\tElf32_Word sh_addralign;\n\tElf32_Word sh_entsize;\n} Elf32_Shdr;\n\ntypedef struct {\n\tElf32_Word st_name;\n\tElf32_Addr st_value;\n\tElf32_Word st_size;\n\tunsigned char st_info;\n\tunsigned char st_other;\n\tElf32_Half st_shndx;\n} Elf32_Sym;\n\nenum Elf32_PhdrType { PT_NULL = 0, PT_LOAD = 1, PT_DYNAMIC = 2, PT_INTERP = 3, PT_NOTE = 4, PT_SHLIB = 5, PT_PHDR = 6 };\n\nstruct Elf32Types {\n\ttypedef uint32_t addr_t;\n\ttypedef Elf32_Ehdr Elf_Ehdr;\n\ttypedef Elf32_Phdr Elf_Phdr;\n\ttypedef Elf32_Shdr Elf_Shdr;\n\ttypedef Elf32_Sym Elf_Sym;\n\tstatic constexpr unsigned PT_LOAD", "parent": 8, "children": [11, 15, 19, 23, 27, 31, 40, 89, 118, 153, 180, 212, 213, 214, 219, 224, 229, 234, 239, 241], "start_point": {"row": 4, "column": 15}, "end_point": {"row": 74, "column": 34}}, {"id": 11, "type": "type_definition", "text": "typedef uint16_t Elf32_Half;", "parent": 10, "children": [12, 13, 14], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 28}}, {"id": 12, "type": "typedef", "text": "typedef", "parent": 11, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 13, "type": "primitive_type", "text": "uint16_t", "parent": 11, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 16}}, {"id": 14, "type": "type_identifier", "text": "Elf32_Half", "parent": 11, "children": [], "start_point": {"row": 8, "column": 17}, "end_point": {"row": 8, "column": 27}}, {"id": 15, "type": "type_definition", "text": "typedef uint32_t Elf32_Off;", "parent": 10, "children": [16, 17, 18], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 27}}, {"id": 16, "type": "typedef", "text": "typedef", "parent": 15, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 17, "type": "primitive_type", "text": "uint32_t", "parent": 15, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 16}}, {"id": 18, "type": "type_identifier", "text": "Elf32_Off", "parent": 15, "children": [], "start_point": {"row": 9, "column": 17}, "end_point": {"row": 9, "column": 26}}, {"id": 19, "type": "type_definition", "text": "typedef uint32_t Elf32_Addr;", "parent": 10, "children": [20, 21, 22], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 28}}, {"id": 20, "type": "typedef", "text": "typedef", "parent": 19, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 21, "type": "primitive_type", "text": "uint32_t", "parent": 19, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 16}}, {"id": 22, "type": "type_identifier", "text": "Elf32_Addr", "parent": 19, "children": [], "start_point": {"row": 10, "column": 17}, "end_point": {"row": 10, "column": 27}}, {"id": 23, "type": "type_definition", "text": "typedef uint32_t Elf32_Word;", "parent": 10, "children": [24, 25, 26], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 28}}, {"id": 24, "type": "typedef", "text": "typedef", "parent": 23, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 25, "type": "primitive_type", "text": "uint32_t", "parent": 23, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 16}}, {"id": 26, "type": "type_identifier", "text": "Elf32_Word", "parent": 23, "children": [], "start_point": {"row": 11, "column": 17}, "end_point": {"row": 11, "column": 27}}, {"id": 27, "type": "type_definition", "text": "typedef int32_t Elf32_Sword;", "parent": 10, "children": [28, 29, 30], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 28}}, {"id": 28, "type": "typedef", "text": "typedef", "parent": 27, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 29, "type": "primitive_type", "text": "int32_t", "parent": 27, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 15}}, {"id": 30, "type": "type_identifier", "text": "Elf32_Sword", "parent": 27, "children": [], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 27}}, {"id": 31, "type": "declaration", "text": "constexpr unsigned ELF_NIDENT = 16;", "parent": 10, "children": [32, 34, 36], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 35}}, {"id": 32, "type": "type_qualifier", "text": "constexpr", "parent": 31, "children": [33], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 9}}, {"id": 33, "type": "constexpr", "text": "constexpr", "parent": 32, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 9}}, {"id": 34, "type": "sized_type_specifier", "text": "unsigned", "parent": 31, "children": [35], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 18}}, {"id": 35, "type": "unsigned", "text": "unsigned", "parent": 34, "children": [], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 18}}, {"id": 36, "type": "init_declarator", "text": "ELF_NIDENT = 16", "parent": 31, "children": [37, 38, 39], "start_point": {"row": 14, "column": 19}, "end_point": {"row": 14, "column": 34}}, {"id": 37, "type": "identifier", "text": "ELF_NIDENT", "parent": 36, "children": [], "start_point": {"row": 14, "column": 19}, "end_point": {"row": 14, "column": 29}}, {"id": 38, "type": "=", "text": "=", "parent": 36, "children": [], "start_point": {"row": 14, "column": 30}, "end_point": {"row": 14, "column": 31}}, {"id": 39, "type": "number_literal", "text": "16", "parent": 36, "children": [], "start_point": {"row": 14, "column": 32}, "end_point": {"row": 14, "column": 34}}, {"id": 40, "type": "type_definition", "text": "typedef struct {\n\tuint8_t e_ident[ELF_NIDENT];\n\tElf32_Half e_type;\n\tElf32_Half e_machine;\n\tElf32_Word e_version;\n\tElf32_Addr e_entry;\n\tElf32_Off e_phoff;\n\tElf32_Off e_shoff;\n\tElf32_Word e_flags;\n\tElf32_Half e_ehsize;\n\tElf32_Half e_phentsize;\n\tElf32_Half e_phnum;\n\tElf32_Half e_shentsize;\n\tElf32_Half e_shnum;\n\tElf32_Half e_shstrndx;\n} Elf32_Ehdr;", "parent": 10, "children": [41, 42, 88], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 31, "column": 13}}, {"id": 41, "type": "typedef", "text": "typedef", "parent": 40, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 7}}, {"id": 42, "type": "struct_specifier", "text": "struct {\n\tuint8_t e_ident[ELF_NIDENT];\n\tElf32_Half e_type;\n\tElf32_Half e_machine;\n\tElf32_Word e_version;\n\tElf32_Addr e_entry;\n\tElf32_Off e_phoff;\n\tElf32_Off e_shoff;\n\tElf32_Word e_flags;\n\tElf32_Half e_ehsize;\n\tElf32_Half e_phentsize;\n\tElf32_Half e_phnum;\n\tElf32_Half e_shentsize;\n\tElf32_Half e_shnum;\n\tElf32_Half e_shstrndx;\n}", "parent": 40, "children": [43], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 31, "column": 1}}, {"id": 43, "type": "struct", "text": "struct", "parent": 42, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 14}}, {"id": 44, "type": "field_declaration", "text": "uint8_t e_ident[ELF_NIDENT];", "parent": 42, "children": [45, 46], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 29}}, {"id": 45, "type": "primitive_type", "text": "uint8_t", "parent": 44, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 8}}, {"id": 46, "type": "array_declarator", "text": "e_ident[ELF_NIDENT]", "parent": 44, "children": [47, 48], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 28}}, {"id": 47, "type": "field_identifier", "text": "e_ident", "parent": 46, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 16}}, {"id": 48, "type": "identifier", "text": "ELF_NIDENT", "parent": 46, "children": [], "start_point": {"row": 17, "column": 17}, "end_point": {"row": 17, "column": 27}}, {"id": 49, "type": "field_declaration", "text": "Elf32_Half e_type;", "parent": 42, "children": [50, 51], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 19}}, {"id": 50, "type": "type_identifier", "text": "Elf32_Half", "parent": 49, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 11}}, {"id": 51, "type": "field_identifier", "text": "e_type", "parent": 49, "children": [], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 18}}, {"id": 52, "type": "field_declaration", "text": "Elf32_Half e_machine;", "parent": 42, "children": [53, 54], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 22}}, {"id": 53, "type": "type_identifier", "text": "Elf32_Half", "parent": 52, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 11}}, {"id": 54, "type": "field_identifier", "text": "e_machine", "parent": 52, "children": [], "start_point": {"row": 19, "column": 12}, "end_point": {"row": 19, "column": 21}}, {"id": 55, "type": "field_declaration", "text": "Elf32_Word e_version;", "parent": 42, "children": [56, 57], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 22}}, {"id": 56, "type": "type_identifier", "text": "Elf32_Word", "parent": 55, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 11}}, {"id": 57, "type": "field_identifier", "text": "e_version", "parent": 55, "children": [], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 21}}, {"id": 58, "type": "field_declaration", "text": "Elf32_Addr e_entry;", "parent": 42, "children": [59, 60], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 20}}, {"id": 59, "type": "type_identifier", "text": "Elf32_Addr", "parent": 58, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 11}}, {"id": 60, "type": "field_identifier", "text": "e_entry", "parent": 58, "children": [], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 21, "column": 19}}, {"id": 61, "type": "field_declaration", "text": "Elf32_Off e_phoff;", "parent": 42, "children": [62, 63], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 19}}, {"id": 62, "type": "type_identifier", "text": "Elf32_Off", "parent": 61, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 10}}, {"id": 63, "type": "field_identifier", "text": "e_phoff", "parent": 61, "children": [], "start_point": {"row": 22, "column": 11}, "end_point": {"row": 22, "column": 18}}, {"id": 64, "type": "field_declaration", "text": "Elf32_Off e_shoff;", "parent": 42, "children": [65, 66], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 19}}, {"id": 65, "type": "type_identifier", "text": "Elf32_Off", "parent": 64, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 10}}, {"id": 66, "type": "field_identifier", "text": "e_shoff", "parent": 64, "children": [], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 18}}, {"id": 67, "type": "field_declaration", "text": "Elf32_Word e_flags;", "parent": 42, "children": [68, 69], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 20}}, {"id": 68, "type": "type_identifier", "text": "Elf32_Word", "parent": 67, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 11}}, {"id": 69, "type": "field_identifier", "text": "e_flags", "parent": 67, "children": [], "start_point": {"row": 24, "column": 12}, "end_point": {"row": 24, "column": 19}}, {"id": 70, "type": "field_declaration", "text": "Elf32_Half e_ehsize;", "parent": 42, "children": [71, 72], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 21}}, {"id": 71, "type": "type_identifier", "text": "Elf32_Half", "parent": 70, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 11}}, {"id": 72, "type": "field_identifier", "text": "e_ehsize", "parent": 70, "children": [], "start_point": {"row": 25, "column": 12}, "end_point": {"row": 25, "column": 20}}, {"id": 73, "type": "field_declaration", "text": "Elf32_Half e_phentsize;", "parent": 42, "children": [74, 75], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 24}}, {"id": 74, "type": "type_identifier", "text": "Elf32_Half", "parent": 73, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 11}}, {"id": 75, "type": "field_identifier", "text": "e_phentsize", "parent": 73, "children": [], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 23}}, {"id": 76, "type": "field_declaration", "text": "Elf32_Half e_phnum;", "parent": 42, "children": [77, 78], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 20}}, {"id": 77, "type": "type_identifier", "text": "Elf32_Half", "parent": 76, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 11}}, {"id": 78, "type": "field_identifier", "text": "e_phnum", "parent": 76, "children": [], "start_point": {"row": 27, "column": 12}, "end_point": {"row": 27, "column": 19}}, {"id": 79, "type": "field_declaration", "text": "Elf32_Half e_shentsize;", "parent": 42, "children": [80, 81], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 24}}, {"id": 80, "type": "type_identifier", "text": "Elf32_Half", "parent": 79, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 11}}, {"id": 81, "type": "field_identifier", "text": "e_shentsize", "parent": 79, "children": [], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 23}}, {"id": 82, "type": "field_declaration", "text": "Elf32_Half e_shnum;", "parent": 42, "children": [83, 84], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 20}}, {"id": 83, "type": "type_identifier", "text": "Elf32_Half", "parent": 82, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 11}}, {"id": 84, "type": "field_identifier", "text": "e_shnum", "parent": 82, "children": [], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 19}}, {"id": 85, "type": "field_declaration", "text": "Elf32_Half e_shstrndx;", "parent": 42, "children": [86, 87], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 23}}, {"id": 86, "type": "type_identifier", "text": "Elf32_Half", "parent": 85, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 11}}, {"id": 87, "type": "field_identifier", "text": "e_shstrndx", "parent": 85, "children": [], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 22}}, {"id": 88, "type": "type_identifier", "text": "Elf32_Ehdr", "parent": 40, "children": [], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 12}}, {"id": 89, "type": "type_definition", "text": "typedef struct {\n\tElf32_Word p_type;\n\tElf32_Off p_offset;\n\tElf32_Addr p_vaddr;\n\tElf32_Addr p_paddr;\n\tElf32_Word p_filesz;\n\tElf32_Word p_memsz;\n\tElf32_Word p_flags;\n\tElf32_Word p_align;\n} Elf32_Phdr;", "parent": 10, "children": [90, 91, 117], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 42, "column": 13}}, {"id": 90, "type": "typedef", "text": "typedef", "parent": 89, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 7}}, {"id": 91, "type": "struct_specifier", "text": "struct {\n\tElf32_Word p_type;\n\tElf32_Off p_offset;\n\tElf32_Addr p_vaddr;\n\tElf32_Addr p_paddr;\n\tElf32_Word p_filesz;\n\tElf32_Word p_memsz;\n\tElf32_Word p_flags;\n\tElf32_Word p_align;\n}", "parent": 89, "children": [92], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 42, "column": 1}}, {"id": 92, "type": "struct", "text": "struct", "parent": 91, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 14}}, {"id": 93, "type": "field_declaration", "text": "Elf32_Word p_type;", "parent": 91, "children": [94, 95], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 19}}, {"id": 94, "type": "type_identifier", "text": "Elf32_Word", "parent": 93, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 11}}, {"id": 95, "type": "field_identifier", "text": "p_type", "parent": 93, "children": [], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 18}}, {"id": 96, "type": "field_declaration", "text": "Elf32_Off p_offset;", "parent": 91, "children": [97, 98], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 20}}, {"id": 97, "type": "type_identifier", "text": "Elf32_Off", "parent": 96, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 10}}, {"id": 98, "type": "field_identifier", "text": "p_offset", "parent": 96, "children": [], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 19}}, {"id": 99, "type": "field_declaration", "text": "Elf32_Addr p_vaddr;", "parent": 91, "children": [100, 101], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 20}}, {"id": 100, "type": "type_identifier", "text": "Elf32_Addr", "parent": 99, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 11}}, {"id": 101, "type": "field_identifier", "text": "p_vaddr", "parent": 99, "children": [], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 19}}, {"id": 102, "type": "field_declaration", "text": "Elf32_Addr p_paddr;", "parent": 91, "children": [103, 104], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 20}}, {"id": 103, "type": "type_identifier", "text": "Elf32_Addr", "parent": 102, "children": [], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 11}}, {"id": 104, "type": "field_identifier", "text": "p_paddr", "parent": 102, "children": [], "start_point": {"row": 37, "column": 12}, "end_point": {"row": 37, "column": 19}}, {"id": 105, "type": "field_declaration", "text": "Elf32_Word p_filesz;", "parent": 91, "children": [106, 107], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 21}}, {"id": 106, "type": "type_identifier", "text": "Elf32_Word", "parent": 105, "children": [], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 11}}, {"id": 107, "type": "field_identifier", "text": "p_filesz", "parent": 105, "children": [], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 20}}, {"id": 108, "type": "field_declaration", "text": "Elf32_Word p_memsz;", "parent": 91, "children": [109, 110], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 20}}, {"id": 109, "type": "type_identifier", "text": "Elf32_Word", "parent": 108, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 11}}, {"id": 110, "type": "field_identifier", "text": "p_memsz", "parent": 108, "children": [], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 19}}, {"id": 111, "type": "field_declaration", "text": "Elf32_Word p_flags;", "parent": 91, "children": [112, 113], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 20}}, {"id": 112, "type": "type_identifier", "text": "Elf32_Word", "parent": 111, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 11}}, {"id": 113, "type": "field_identifier", "text": "p_flags", "parent": 111, "children": [], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 19}}, {"id": 114, "type": "field_declaration", "text": "Elf32_Word p_align;", "parent": 91, "children": [115, 116], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 20}}, {"id": 115, "type": "type_identifier", "text": "Elf32_Word", "parent": 114, "children": [], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 11}}, {"id": 116, "type": "field_identifier", "text": "p_align", "parent": 114, "children": [], "start_point": {"row": 41, "column": 12}, "end_point": {"row": 41, "column": 19}}, {"id": 117, "type": "type_identifier", "text": "Elf32_Phdr", "parent": 89, "children": [], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 12}}, {"id": 118, "type": "type_definition", "text": "typedef struct {\n\tElf32_Word sh_name;\n\tElf32_Word sh_type;\n\tElf32_Word sh_flags;\n\tElf32_Addr sh_addr;\n\tElf32_Off sh_offset;\n\tElf32_Word sh_size;\n\tElf32_Word sh_link;\n\tElf32_Word sh_info;\n\tElf32_Word sh_addralign;\n\tElf32_Word sh_entsize;\n} Elf32_Shdr;", "parent": 10, "children": [119, 120, 152], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 55, "column": 13}}, {"id": 119, "type": "typedef", "text": "typedef", "parent": 118, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 7}}, {"id": 120, "type": "struct_specifier", "text": "struct {\n\tElf32_Word sh_name;\n\tElf32_Word sh_type;\n\tElf32_Word sh_flags;\n\tElf32_Addr sh_addr;\n\tElf32_Off sh_offset;\n\tElf32_Word sh_size;\n\tElf32_Word sh_link;\n\tElf32_Word sh_info;\n\tElf32_Word sh_addralign;\n\tElf32_Word sh_entsize;\n}", "parent": 118, "children": [121], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 55, "column": 1}}, {"id": 121, "type": "struct", "text": "struct", "parent": 120, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 14}}, {"id": 122, "type": "field_declaration", "text": "Elf32_Word sh_name;", "parent": 120, "children": [123, 124], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 20}}, {"id": 123, "type": "type_identifier", "text": "Elf32_Word", "parent": 122, "children": [], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 11}}, {"id": 124, "type": "field_identifier", "text": "sh_name", "parent": 122, "children": [], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 19}}, {"id": 125, "type": "field_declaration", "text": "Elf32_Word sh_type;", "parent": 120, "children": [126, 127], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 20}}, {"id": 126, "type": "type_identifier", "text": "Elf32_Word", "parent": 125, "children": [], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 11}}, {"id": 127, "type": "field_identifier", "text": "sh_type", "parent": 125, "children": [], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 19}}, {"id": 128, "type": "field_declaration", "text": "Elf32_Word sh_flags;", "parent": 120, "children": [129, 130], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 21}}, {"id": 129, "type": "type_identifier", "text": "Elf32_Word", "parent": 128, "children": [], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 11}}, {"id": 130, "type": "field_identifier", "text": "sh_flags", "parent": 128, "children": [], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 20}}, {"id": 131, "type": "field_declaration", "text": "Elf32_Addr sh_addr;", "parent": 120, "children": [132, 133], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 20}}, {"id": 132, "type": "type_identifier", "text": "Elf32_Addr", "parent": 131, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 11}}, {"id": 133, "type": "field_identifier", "text": "sh_addr", "parent": 131, "children": [], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 48, "column": 19}}, {"id": 134, "type": "field_declaration", "text": "Elf32_Off sh_offset;", "parent": 120, "children": [135, 136], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 21}}, {"id": 135, "type": "type_identifier", "text": "Elf32_Off", "parent": 134, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 10}}, {"id": 136, "type": "field_identifier", "text": "sh_offset", "parent": 134, "children": [], "start_point": {"row": 49, "column": 11}, "end_point": {"row": 49, "column": 20}}, {"id": 137, "type": "field_declaration", "text": "Elf32_Word sh_size;", "parent": 120, "children": [138, 139], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 20}}, {"id": 138, "type": "type_identifier", "text": "Elf32_Word", "parent": 137, "children": [], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 11}}, {"id": 139, "type": "field_identifier", "text": "sh_size", "parent": 137, "children": [], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 19}}, {"id": 140, "type": "field_declaration", "text": "Elf32_Word sh_link;", "parent": 120, "children": [141, 142], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 20}}, {"id": 141, "type": "type_identifier", "text": "Elf32_Word", "parent": 140, "children": [], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 11}}, {"id": 142, "type": "field_identifier", "text": "sh_link", "parent": 140, "children": [], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 19}}, {"id": 143, "type": "field_declaration", "text": "Elf32_Word sh_info;", "parent": 120, "children": [144, 145], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 20}}, {"id": 144, "type": "type_identifier", "text": "Elf32_Word", "parent": 143, "children": [], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 11}}, {"id": 145, "type": "field_identifier", "text": "sh_info", "parent": 143, "children": [], "start_point": {"row": 52, "column": 12}, "end_point": {"row": 52, "column": 19}}, {"id": 146, "type": "field_declaration", "text": "Elf32_Word sh_addralign;", "parent": 120, "children": [147, 148], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 25}}, {"id": 147, "type": "type_identifier", "text": "Elf32_Word", "parent": 146, "children": [], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 11}}, {"id": 148, "type": "field_identifier", "text": "sh_addralign", "parent": 146, "children": [], "start_point": {"row": 53, "column": 12}, "end_point": {"row": 53, "column": 24}}, {"id": 149, "type": "field_declaration", "text": "Elf32_Word sh_entsize;", "parent": 120, "children": [150, 151], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 23}}, {"id": 150, "type": "type_identifier", "text": "Elf32_Word", "parent": 149, "children": [], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 11}}, {"id": 151, "type": "field_identifier", "text": "sh_entsize", "parent": 149, "children": [], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 22}}, {"id": 152, "type": "type_identifier", "text": "Elf32_Shdr", "parent": 118, "children": [], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 12}}, {"id": 153, "type": "type_definition", "text": "typedef struct {\n\tElf32_Word st_name;\n\tElf32_Addr st_value;\n\tElf32_Word st_size;\n\tunsigned char st_info;\n\tunsigned char st_other;\n\tElf32_Half st_shndx;\n} Elf32_Sym;", "parent": 10, "children": [154, 155, 179], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 64, "column": 12}}, {"id": 154, "type": "typedef", "text": "typedef", "parent": 153, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 7}}, {"id": 155, "type": "struct_specifier", "text": "struct {\n\tElf32_Word st_name;\n\tElf32_Addr st_value;\n\tElf32_Word st_size;\n\tunsigned char st_info;\n\tunsigned char st_other;\n\tElf32_Half st_shndx;\n}", "parent": 153, "children": [156], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 64, "column": 1}}, {"id": 156, "type": "struct", "text": "struct", "parent": 155, "children": [], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 14}}, {"id": 157, "type": "field_declaration", "text": "Elf32_Word st_name;", "parent": 155, "children": [158, 159], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 20}}, {"id": 158, "type": "type_identifier", "text": "Elf32_Word", "parent": 157, "children": [], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 11}}, {"id": 159, "type": "field_identifier", "text": "st_name", "parent": 157, "children": [], "start_point": {"row": 58, "column": 12}, "end_point": {"row": 58, "column": 19}}, {"id": 160, "type": "field_declaration", "text": "Elf32_Addr st_value;", "parent": 155, "children": [161, 162], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 21}}, {"id": 161, "type": "type_identifier", "text": "Elf32_Addr", "parent": 160, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 11}}, {"id": 162, "type": "field_identifier", "text": "st_value", "parent": 160, "children": [], "start_point": {"row": 59, "column": 12}, "end_point": {"row": 59, "column": 20}}, {"id": 163, "type": "field_declaration", "text": "Elf32_Word st_size;", "parent": 155, "children": [164, 165], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 20}}, {"id": 164, "type": "type_identifier", "text": "Elf32_Word", "parent": 163, "children": [], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 11}}, {"id": 165, "type": "field_identifier", "text": "st_size", "parent": 163, "children": [], "start_point": {"row": 60, "column": 12}, "end_point": {"row": 60, "column": 19}}, {"id": 166, "type": "field_declaration", "text": "unsigned char st_info;", "parent": 155, "children": [167, 170], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 23}}, {"id": 167, "type": "sized_type_specifier", "text": "unsigned char", "parent": 166, "children": [168, 169], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 14}}, {"id": 168, "type": "unsigned", "text": "unsigned", "parent": 167, "children": [], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 9}}, {"id": 169, "type": "primitive_type", "text": "char", "parent": 167, "children": [], "start_point": {"row": 61, "column": 10}, "end_point": {"row": 61, "column": 14}}, {"id": 170, "type": "field_identifier", "text": "st_info", "parent": 166, "children": [], "start_point": {"row": 61, "column": 15}, "end_point": {"row": 61, "column": 22}}, {"id": 171, "type": "field_declaration", "text": "unsigned char st_other;", "parent": 155, "children": [172, 175], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 24}}, {"id": 172, "type": "sized_type_specifier", "text": "unsigned char", "parent": 171, "children": [173, 174], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 14}}, {"id": 173, "type": "unsigned", "text": "unsigned", "parent": 172, "children": [], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 9}}, {"id": 174, "type": "primitive_type", "text": "char", "parent": 172, "children": [], "start_point": {"row": 62, "column": 10}, "end_point": {"row": 62, "column": 14}}, {"id": 175, "type": "field_identifier", "text": "st_other", "parent": 171, "children": [], "start_point": {"row": 62, "column": 15}, "end_point": {"row": 62, "column": 23}}, {"id": 176, "type": "field_declaration", "text": "Elf32_Half st_shndx;", "parent": 155, "children": [177, 178], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 21}}, {"id": 177, "type": "type_identifier", "text": "Elf32_Half", "parent": 176, "children": [], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 11}}, {"id": 178, "type": "field_identifier", "text": "st_shndx", "parent": 176, "children": [], "start_point": {"row": 63, "column": 12}, "end_point": {"row": 63, "column": 20}}, {"id": 179, "type": "type_identifier", "text": "Elf32_Sym", "parent": 153, "children": [], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 11}}, {"id": 180, "type": "enum_specifier", "text": "enum Elf32_PhdrType { PT_NULL = 0, PT_LOAD = 1, PT_DYNAMIC = 2, PT_INTERP = 3, PT_NOTE = 4, PT_SHLIB = 5, PT_PHDR = 6 }", "parent": 10, "children": [181, 182, 183], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 119}}, {"id": 181, "type": "enum", "text": "enum", "parent": 180, "children": [], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 4}}, {"id": 182, "type": "type_identifier", "text": "Elf32_PhdrType", "parent": 180, "children": [], "start_point": {"row": 66, "column": 5}, "end_point": {"row": 66, "column": 19}}, {"id": 183, "type": "enumerator_list", "text": "{ PT_NULL = 0, PT_LOAD = 1, PT_DYNAMIC = 2, PT_INTERP = 3, PT_NOTE = 4, PT_SHLIB = 5, PT_PHDR = 6 }", "parent": 180, "children": [184, 188, 192, 196, 200, 204, 208], "start_point": {"row": 66, "column": 20}, "end_point": {"row": 66, "column": 119}}, {"id": 184, "type": "enumerator", "text": "PT_NULL = 0", "parent": 183, "children": [185, 186, 187], "start_point": {"row": 66, "column": 22}, "end_point": {"row": 66, "column": 33}}, {"id": 185, "type": "identifier", "text": "PT_NULL", "parent": 184, "children": [], "start_point": {"row": 66, "column": 22}, "end_point": {"row": 66, "column": 29}}, {"id": 186, "type": "=", "text": "=", "parent": 184, "children": [], "start_point": {"row": 66, "column": 30}, "end_point": {"row": 66, "column": 31}}, {"id": 187, "type": "number_literal", "text": "0", "parent": 184, "children": [], "start_point": {"row": 66, "column": 32}, "end_point": {"row": 66, "column": 33}}, {"id": 188, "type": "enumerator", "text": "PT_LOAD = 1", "parent": 183, "children": [189, 190, 191], "start_point": {"row": 66, "column": 35}, "end_point": {"row": 66, "column": 46}}, {"id": 189, "type": "identifier", "text": "PT_LOAD", "parent": 188, "children": [], "start_point": {"row": 66, "column": 35}, "end_point": {"row": 66, "column": 42}}, {"id": 190, "type": "=", "text": "=", "parent": 188, "children": [], "start_point": {"row": 66, "column": 43}, "end_point": {"row": 66, "column": 44}}, {"id": 191, "type": "number_literal", "text": "1", "parent": 188, "children": [], "start_point": {"row": 66, "column": 45}, "end_point": {"row": 66, "column": 46}}, {"id": 192, "type": "enumerator", "text": "PT_DYNAMIC = 2", "parent": 183, "children": [193, 194, 195], "start_point": {"row": 66, "column": 48}, "end_point": {"row": 66, "column": 62}}, {"id": 193, "type": "identifier", "text": "PT_DYNAMIC", "parent": 192, "children": [], "start_point": {"row": 66, "column": 48}, "end_point": {"row": 66, "column": 58}}, {"id": 194, "type": "=", "text": "=", "parent": 192, "children": [], "start_point": {"row": 66, "column": 59}, "end_point": {"row": 66, "column": 60}}, {"id": 195, "type": "number_literal", "text": "2", "parent": 192, "children": [], "start_point": {"row": 66, "column": 61}, "end_point": {"row": 66, "column": 62}}, {"id": 196, "type": "enumerator", "text": "PT_INTERP = 3", "parent": 183, "children": [197, 198, 199], "start_point": {"row": 66, "column": 64}, "end_point": {"row": 66, "column": 77}}, {"id": 197, "type": "identifier", "text": "PT_INTERP", "parent": 196, "children": [], "start_point": {"row": 66, "column": 64}, "end_point": {"row": 66, "column": 73}}, {"id": 198, "type": "=", "text": "=", "parent": 196, "children": [], "start_point": {"row": 66, "column": 74}, "end_point": {"row": 66, "column": 75}}, {"id": 199, "type": "number_literal", "text": "3", "parent": 196, "children": [], "start_point": {"row": 66, "column": 76}, "end_point": {"row": 66, "column": 77}}, {"id": 200, "type": "enumerator", "text": "PT_NOTE = 4", "parent": 183, "children": [201, 202, 203], "start_point": {"row": 66, "column": 79}, "end_point": {"row": 66, "column": 90}}, {"id": 201, "type": "identifier", "text": "PT_NOTE", "parent": 200, "children": [], "start_point": {"row": 66, "column": 79}, "end_point": {"row": 66, "column": 86}}, {"id": 202, "type": "=", "text": "=", "parent": 200, "children": [], "start_point": {"row": 66, "column": 87}, "end_point": {"row": 66, "column": 88}}, {"id": 203, "type": "number_literal", "text": "4", "parent": 200, "children": [], "start_point": {"row": 66, "column": 89}, "end_point": {"row": 66, "column": 90}}, {"id": 204, "type": "enumerator", "text": "PT_SHLIB = 5", "parent": 183, "children": [205, 206, 207], "start_point": {"row": 66, "column": 92}, "end_point": {"row": 66, "column": 104}}, {"id": 205, "type": "identifier", "text": "PT_SHLIB", "parent": 204, "children": [], "start_point": {"row": 66, "column": 92}, "end_point": {"row": 66, "column": 100}}, {"id": 206, "type": "=", "text": "=", "parent": 204, "children": [], "start_point": {"row": 66, "column": 101}, "end_point": {"row": 66, "column": 102}}, {"id": 207, "type": "number_literal", "text": "5", "parent": 204, "children": [], "start_point": {"row": 66, "column": 103}, "end_point": {"row": 66, "column": 104}}, {"id": 208, "type": "enumerator", "text": "PT_PHDR = 6", "parent": 183, "children": [209, 210, 211], "start_point": {"row": 66, "column": 106}, "end_point": {"row": 66, "column": 117}}, {"id": 209, "type": "identifier", "text": "PT_PHDR", "parent": 208, "children": [], "start_point": {"row": 66, "column": 106}, "end_point": {"row": 66, "column": 113}}, {"id": 210, "type": "=", "text": "=", "parent": 208, "children": [], "start_point": {"row": 66, "column": 114}, "end_point": {"row": 66, "column": 115}}, {"id": 211, "type": "number_literal", "text": "6", "parent": 208, "children": [], "start_point": {"row": 66, "column": 116}, "end_point": {"row": 66, "column": 117}}, {"id": 212, "type": "struct", "text": "struct", "parent": 10, "children": [], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 68, "column": 6}}, {"id": 213, "type": "identifier", "text": "Elf32Types", "parent": 10, "children": [], "start_point": {"row": 68, "column": 7}, "end_point": {"row": 68, "column": 17}}, {"id": 214, "type": "field_declaration", "text": "typedef uint32_t addr_t;", "parent": 10, "children": [215, 216, 217], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 25}}, {"id": 215, "type": "type_identifier", "text": "typedef", "parent": 214, "children": [], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 8}}, {"id": 216, "type": "field_identifier", "text": "uint32_t", "parent": 214, "children": [], "start_point": {"row": 69, "column": 9}, "end_point": {"row": 69, "column": 17}}, {"id": 217, "type": "ERROR", "text": "addr_t", "parent": 214, "children": [218], "start_point": {"row": 69, "column": 18}, "end_point": {"row": 69, "column": 24}}, {"id": 218, "type": "identifier", "text": "addr_t", "parent": 217, "children": [], "start_point": {"row": 69, "column": 18}, "end_point": {"row": 69, "column": 24}}, {"id": 219, "type": "field_declaration", "text": "typedef Elf32_Ehdr Elf_Ehdr;", "parent": 10, "children": [220, 221, 222], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 29}}, {"id": 220, "type": "type_identifier", "text": "typedef", "parent": 219, "children": [], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 8}}, {"id": 221, "type": "field_identifier", "text": "Elf32_Ehdr", "parent": 219, "children": [], "start_point": {"row": 70, "column": 9}, "end_point": {"row": 70, "column": 19}}, {"id": 222, "type": "ERROR", "text": "Elf_Ehdr", "parent": 219, "children": [223], "start_point": {"row": 70, "column": 20}, "end_point": {"row": 70, "column": 28}}, {"id": 223, "type": "identifier", "text": "Elf_Ehdr", "parent": 222, "children": [], "start_point": {"row": 70, "column": 20}, "end_point": {"row": 70, "column": 28}}, {"id": 224, "type": "field_declaration", "text": "typedef Elf32_Phdr Elf_Phdr;", "parent": 10, "children": [225, 226, 227], "start_point": {"row": 71, "column": 1}, "end_point": {"row": 71, "column": 29}}, {"id": 225, "type": "type_identifier", "text": "typedef", "parent": 224, "children": [], "start_point": {"row": 71, "column": 1}, "end_point": {"row": 71, "column": 8}}, {"id": 226, "type": "field_identifier", "text": "Elf32_Phdr", "parent": 224, "children": [], "start_point": {"row": 71, "column": 9}, "end_point": {"row": 71, "column": 19}}, {"id": 227, "type": "ERROR", "text": "Elf_Phdr", "parent": 224, "children": [228], "start_point": {"row": 71, "column": 20}, "end_point": {"row": 71, "column": 28}}, {"id": 228, "type": "identifier", "text": "Elf_Phdr", "parent": 227, "children": [], "start_point": {"row": 71, "column": 20}, "end_point": {"row": 71, "column": 28}}, {"id": 229, "type": "field_declaration", "text": "typedef Elf32_Shdr Elf_Shdr;", "parent": 10, "children": [230, 231, 232], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 29}}, {"id": 230, "type": "type_identifier", "text": "typedef", "parent": 229, "children": [], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 8}}, {"id": 231, "type": "field_identifier", "text": "Elf32_Shdr", "parent": 229, "children": [], "start_point": {"row": 72, "column": 9}, "end_point": {"row": 72, "column": 19}}, {"id": 232, "type": "ERROR", "text": "Elf_Shdr", "parent": 229, "children": [233], "start_point": {"row": 72, "column": 20}, "end_point": {"row": 72, "column": 28}}, {"id": 233, "type": "identifier", "text": "Elf_Shdr", "parent": 232, "children": [], "start_point": {"row": 72, "column": 20}, "end_point": {"row": 72, "column": 28}}, {"id": 234, "type": "field_declaration", "text": "typedef Elf32_Sym Elf_Sym;", "parent": 10, "children": [235, 236, 237], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 27}}, {"id": 235, "type": "type_identifier", "text": "typedef", "parent": 234, "children": [], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 8}}, {"id": 236, "type": "field_identifier", "text": "Elf32_Sym", "parent": 234, "children": [], "start_point": {"row": 73, "column": 9}, "end_point": {"row": 73, "column": 18}}, {"id": 237, "type": "ERROR", "text": "Elf_Sym", "parent": 234, "children": [238], "start_point": {"row": 73, "column": 19}, "end_point": {"row": 73, "column": 26}}, {"id": 238, "type": "identifier", "text": "Elf_Sym", "parent": 237, "children": [], "start_point": {"row": 73, "column": 19}, "end_point": {"row": 73, "column": 26}}, {"id": 239, "type": "type_qualifier", "text": "constexpr", "parent": 10, "children": [240], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 17}}, {"id": 240, "type": "constexpr", "text": "constexpr", "parent": 239, "children": [], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 17}}, {"id": 241, "type": "sized_type_specifier", "text": "unsigned PT_LOAD", "parent": 10, "children": [242, 243], "start_point": {"row": 74, "column": 18}, "end_point": {"row": 74, "column": 34}}, {"id": 242, "type": "unsigned", "text": "unsigned", "parent": 241, "children": [], "start_point": {"row": 74, "column": 18}, "end_point": {"row": 74, "column": 26}}, {"id": 243, "type": "type_identifier", "text": "PT_LOAD", "parent": 241, "children": [], "start_point": {"row": 74, "column": 27}, "end_point": {"row": 74, "column": 34}}, {"id": 244, "type": "=", "text": "=", "parent": 8, "children": [], "start_point": {"row": 74, "column": 35}, "end_point": {"row": 74, "column": 36}}, {"id": 245, "type": "identifier", "text": "Elf32_PhdrType", "parent": 8, "children": [], "start_point": {"row": 74, "column": 37}, "end_point": {"row": 74, "column": 51}}, {"id": 246, "type": "ERROR", "text": "::PT_LOAD", "parent": 6, "children": [247], "start_point": {"row": 74, "column": 51}, "end_point": {"row": 74, "column": 60}}, {"id": 247, "type": "identifier", "text": "PT_LOAD", "parent": 246, "children": [], "start_point": {"row": 74, "column": 53}, "end_point": {"row": 74, "column": 60}}, {"id": 248, "type": "type_definition", "text": "typedef GenericElfLoader<Elf32Types> ELFLoader;", "parent": null, "children": [249, 250, 251, 255], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 77, "column": 47}}, {"id": 249, "type": "typedef", "text": "typedef", "parent": 248, "children": [], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 77, "column": 7}}, {"id": 250, "type": "type_identifier", "text": "GenericElfLoader", "parent": 248, "children": [], "start_point": {"row": 77, "column": 8}, "end_point": {"row": 77, "column": 24}}, {"id": 251, "type": "ERROR", "text": "<Elf32Types>", "parent": 248, "children": [252, 253, 254], "start_point": {"row": 77, "column": 24}, "end_point": {"row": 77, "column": 36}}, {"id": 252, "type": "<", "text": "<", "parent": 251, "children": [], "start_point": {"row": 77, "column": 24}, "end_point": {"row": 77, "column": 25}}, {"id": 253, "type": "type_identifier", "text": "Elf32Types", "parent": 251, "children": [], "start_point": {"row": 77, "column": 25}, "end_point": {"row": 77, "column": 35}}, {"id": 254, "type": ">", "text": ">", "parent": 251, "children": [], "start_point": {"row": 77, "column": 35}, "end_point": {"row": 77, "column": 36}}, {"id": 255, "type": "type_identifier", "text": "ELFLoader", "parent": 248, "children": [], "start_point": {"row": 77, "column": 37}, "end_point": {"row": 77, "column": 46}}]}, "node_categories": {"declarations": {"functions": [], "variables": [6, 11, 15, 19, 23, 27, 31, 40, 44, 49, 52, 55, 58, 61, 64, 67, 70, 73, 76, 79, 82, 85, 89, 93, 96, 99, 102, 105, 108, 111, 114, 118, 122, 125, 128, 131, 134, 137, 140, 143, 146, 149, 153, 157, 160, 163, 166, 171, 176, 214, 219, 224, 229, 234, 248], "classes": [42, 43, 91, 92, 120, 121, 155, 156, 212], "imports": [3, 4], "modules": [], "enums": [180, 181, 183, 184, 188, 192, 196, 200, 204, 208]}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [7, 9, 14, 18, 22, 26, 30, 32, 34, 37, 47, 48, 50, 51, 53, 54, 56, 57, 59, 60, 62, 63, 65, 66, 68, 69, 71, 72, 74, 75, 77, 78, 80, 81, 83, 84, 86, 87, 88, 94, 95, 97, 98, 100, 101, 103, 104, 106, 107, 109, 110, 112, 113, 115, 116, 117, 123, 124, 126, 127, 129, 130, 132, 133, 135, 136, 138, 139, 141, 142, 144, 145, 147, 148, 150, 151, 152, 158, 159, 161, 162, 164, 165, 167, 170, 172, 175, 177, 178, 179, 182, 185, 189, 193, 197, 201, 205, 209, 213, 215, 216, 218, 220, 221, 223, 225, 226, 228, 230, 231, 233, 235, 236, 238, 239, 241, 243, 245, 247, 250, 253, 255], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 39, 187, 191, 195, 199, 203, 207, 211], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [{"node_id": 42, "universal_type": "class", "name": "{", "text_snippet": "struct {\n\tuint8_t e_ident[ELF_NIDENT];\n\tElf32_Half e_type;\n\tElf32_Half e_machine;\n\tElf32_Word e_vers"}, {"node_id": 43, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 91, "universal_type": "class", "name": "{", "text_snippet": "struct {\n\tElf32_Word p_type;\n\tElf32_Off p_offset;\n\tElf32_Addr p_vaddr;\n\tElf32_Addr p_paddr;\n\tElf32_W"}, {"node_id": 92, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 120, "universal_type": "class", "name": "{", "text_snippet": "struct {\n\tElf32_Word sh_name;\n\tElf32_Word sh_type;\n\tElf32_Word sh_flags;\n\tElf32_Addr sh_addr;\n\tElf32"}, {"node_id": 121, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 155, "universal_type": "class", "name": "{", "text_snippet": "struct {\n\tElf32_Word st_name;\n\tElf32_Addr st_value;\n\tElf32_Word st_size;\n\tunsigned char st_info;\n\tun"}, {"node_id": 156, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 212, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 3, "text": "#include \"core/common/elf_loader.h\"\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include \"core/common/elf_loader.h\"\n\nnamespace rv32 {\n\n// see: http://wiki.osdev.org/ELF_Tutorial for ELF definitions\n\ntypedef uint16_t Elf32_Half; // Unsigned half int\ntypedef uint32_t Elf32_Off; // Unsigned offset\ntypedef uint32_t Elf32_Addr; // Unsigned address\ntypedef uint32_t Elf32_Word; // Unsigned int\ntypedef int32_t Elf32_Sword; // Signed int\n\nconstexpr unsigned ELF_NIDENT = 16;\n\ntypedef struct {\n\tuint8_t e_ident[ELF_NIDENT];\n\tElf32_Half e_type;\n\tElf32_Half e_machine;\n\tElf32_Word e_version;\n\tElf32_Addr e_entry;\n\tElf32_Off e_phoff;\n\tElf32_Off e_shoff;\n\tElf32_Word e_flags;\n\tElf32_Half e_ehsize;\n\tElf32_Half e_phentsize;\n\tElf32_Half e_phnum;\n\tElf32_Half e_shentsize;\n\tElf32_Half e_shnum;\n\tElf32_Half e_shstrndx;\n} Elf32_Ehdr;\n\ntypedef struct {\n\tElf32_Word p_type;\n\tElf32_Off p_offset;\n\tElf32_Addr p_vaddr;\n\tElf32_Addr p_paddr;\n\tElf32_Word p_filesz;\n\tElf32_Word p_memsz;\n\tElf32_Word p_flags;\n\tElf32_Word p_align;\n} Elf32_Phdr;\n\ntypedef struct {\n\tElf32_Word sh_name;\n\tElf32_Word sh_type;\n\tElf32_Word sh_flags;\n\tElf32_Addr sh_addr;\n\tElf32_Off sh_offset;\n\tElf32_Word sh_size;\n\tElf32_Word sh_link;\n\tElf32_Word sh_info;\n\tElf32_Word sh_addralign;\n\tElf32_Word sh_entsize;\n} Elf32_Shdr;\n\ntypedef struct {\n\tElf32_Word st_name;\n\tElf32_Addr st_value;\n\tElf32_Word st_size;\n\tunsigned char st_info;\n\tunsigned char st_other;\n\tElf32_Half st_shndx;\n} Elf32_Sym;\n\nenum Elf32_PhdrType { PT_NULL = 0, PT_LOAD = 1, PT_DYNAMIC = 2, PT_INTERP = 3, PT_NOTE = 4, PT_SHLIB = 5, PT_PHDR = 6 };\n\nstruct Elf32Types {\n\ttypedef uint32_t addr_t;\n\ttypedef Elf32_Ehdr Elf_Ehdr;\n\ttypedef Elf32_Phdr Elf_Phdr;\n\ttypedef Elf32_Shdr Elf_Shdr;\n\ttypedef Elf32_Sym Elf_Sym;\n\tstatic constexpr unsigned PT_LOAD = Elf32_PhdrType::PT_LOAD;\n};\n\ntypedef GenericElfLoader<Elf32Types> ELFLoader;\n\n} // namespace rv32\n"}
| 81,203
|
c
|
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright 2020 <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/** @file
* The identification for targets within the library.
*/
#ifndef __STUMPLESS_GENERATOR_H
# define __STUMPLESS_GENERATOR_H
/**
* Returns a definition of a symbol with the given name and value fit for use in
* an enum definition. Compatible with STUMPLESS_FOREACH macro functions such as
* STUMPLESS_FOREACH_FACILITY.
*
* @since release v2.0.0.
*/
# define STUMPLESS_GENERATE_ENUM( NAME, VALUE ) NAME = ( VALUE ),
#endif /* __STUMPLESS_GENERATOR_H */
| 35.67
| 30
|
(translation_unit) "/* SPDX-License-Identifier: Apache-2.0 */\n\n/*\n * Copyright 2020 <NAME>\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/** @file\n * The identification for targets within the library.\n */\n\n#ifndef __STUMPLESS_GENERATOR_H\n# define __STUMPLESS_GENERATOR_H\n\n/**\n * Returns a definition of a symbol with the given name and value fit for use in\n * an enum definition. Compatible with STUMPLESS_FOREACH macro functions such as\n * STUMPLESS_FOREACH_FACILITY.\n *\n * @since release v2.0.0.\n */\n# define STUMPLESS_GENERATE_ENUM( NAME, VALUE ) NAME = ( VALUE ),\n\n#endif /* __STUMPLESS_GENERATOR_H */\n"
(comment) "/* SPDX-License-Identifier: Apache-2.0 */"
(comment) "/*\n * Copyright 2020 <NAME>\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */"
(comment) "/** @file\n * The identification for targets within the library.\n */"
(preproc_ifdef) "#ifndef __STUMPLESS_GENERATOR_H\n# define __STUMPLESS_GENERATOR_H\n\n/**\n * Returns a definition of a symbol with the given name and value fit for use in\n * an enum definition. Compatible with STUMPLESS_FOREACH macro functions such as\n * STUMPLESS_FOREACH_FACILITY.\n *\n * @since release v2.0.0.\n */\n# define STUMPLESS_GENERATE_ENUM( NAME, VALUE ) NAME = ( VALUE ),\n\n#endif"
(#ifndef) "#ifndef"
(identifier) "__STUMPLESS_GENERATOR_H"
(preproc_def) "# define __STUMPLESS_GENERATOR_H\n"
(#define) "# define"
(identifier) "__STUMPLESS_GENERATOR_H"
(comment) "/**\n * Returns a definition of a symbol with the given name and value fit for use in\n * an enum definition. Compatible with STUMPLESS_FOREACH macro functions such as\n * STUMPLESS_FOREACH_FACILITY.\n *\n * @since release v2.0.0.\n */"
(preproc_function_def) "# define STUMPLESS_GENERATE_ENUM( NAME, VALUE ) NAME = ( VALUE ),\n"
(#define) "# define"
(identifier) "STUMPLESS_GENERATE_ENUM"
(preproc_params) "( NAME, VALUE )"
(() "("
(identifier) "NAME"
(,) ","
(identifier) "VALUE"
()) ")"
(preproc_arg) "NAME = ( VALUE ),"
(#endif) "#endif"
(comment) "/* __STUMPLESS_GENERATOR_H */"
| 23
| 0
|
{"language": "c", "success": true, "metadata": {"lines": 30, "avg_line_length": 35.67, "nodes": 14, "errors": 0, "source_hash": "613f7377dc745c560bcaf7eeba75ecaf9593d6ed1586ad73ab5cd3e158e263d8", "categorized_nodes": 9}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __STUMPLESS_GENERATOR_H\n# define __STUMPLESS_GENERATOR_H\n\n/**\n * Returns a definition of a symbol with the given name and value fit for use in\n * an enum definition. Compatible with STUMPLESS_FOREACH macro functions such as\n * STUMPLESS_FOREACH_FACILITY.\n *\n * @since release v2.0.0.\n */\n# define STUMPLESS_GENERATE_ENUM( NAME, VALUE ) NAME = ( VALUE ),\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 13], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 34, "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": "__STUMPLESS_GENERATOR_H", "parent": 0, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 31}}, {"id": 3, "type": "preproc_def", "text": "# define __STUMPLESS_GENERATOR_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": 9}}, {"id": 5, "type": "identifier", "text": "__STUMPLESS_GENERATOR_H", "parent": 3, "children": [], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 33}}, {"id": 6, "type": "preproc_function_def", "text": "# define STUMPLESS_GENERATE_ENUM( NAME, VALUE ) NAME = ( VALUE ),\n", "parent": 0, "children": [7, 8, 9, 12], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 7, "type": "#define", "text": "# define", "parent": 6, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 9}}, {"id": 8, "type": "identifier", "text": "STUMPLESS_GENERATE_ENUM", "parent": 6, "children": [], "start_point": {"row": 32, "column": 10}, "end_point": {"row": 32, "column": 33}}, {"id": 9, "type": "preproc_params", "text": "( NAME, VALUE )", "parent": 6, "children": [10, 11], "start_point": {"row": 32, "column": 33}, "end_point": {"row": 32, "column": 48}}, {"id": 10, "type": "identifier", "text": "NAME", "parent": 9, "children": [], "start_point": {"row": 32, "column": 35}, "end_point": {"row": 32, "column": 39}}, {"id": 11, "type": "identifier", "text": "VALUE", "parent": 9, "children": [], "start_point": {"row": 32, "column": 41}, "end_point": {"row": 32, "column": 46}}, {"id": 12, "type": "preproc_arg", "text": "NAME = ( VALUE ),", "parent": 6, "children": [], "start_point": {"row": 32, "column": 49}, "end_point": {"row": 32, "column": 66}}, {"id": 13, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 6}}]}, "node_categories": {"declarations": {"functions": [6], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 8, 10, 11, 13], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "unknown", "text_snippet": "# define STUMPLESS_GENERATE_ENUM( NAME, VALUE ) NAME = ( VALUE ),\n"}], "class_declarations": [], "import_statements": []}, "original_source_code": "/* SPDX-License-Identifier: Apache-2.0 */\n\n/*\n * Copyright 2020 <NAME>\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/** @file\n * The identification for targets within the library.\n */\n\n#ifndef __STUMPLESS_GENERATOR_H\n# define __STUMPLESS_GENERATOR_H\n\n/**\n * Returns a definition of a symbol with the given name and value fit for use in\n * an enum definition. Compatible with STUMPLESS_FOREACH macro functions such as\n * STUMPLESS_FOREACH_FACILITY.\n *\n * @since release v2.0.0.\n */\n# define STUMPLESS_GENERATE_ENUM( NAME, VALUE ) NAME = ( VALUE ),\n\n#endif /* __STUMPLESS_GENERATOR_H */\n"}
| 81,204
|
c
|
/*
* Generated by asn1c-0.9.24 (http://lionet.info/asn1c)
* From ASN.1 module "S1AP-IEs"
* found in "/home/oainuc2/openairinterface5g/openair3/S1AP/MESSAGES/ASN1/R10.5/S1AP-IEs.asn"
* `asn1c -gen-PER`
*/
#include "S1ap-E-RABList.h"
static asn_per_constraints_t asn_PER_type_S1ap_E_RABList_constr_1 GCC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */,
0, 0 /* No PER value map */
};
static asn_TYPE_member_t asn_MBR_S1ap_E_RABList_1[] = {
{ ATF_POINTER, 0, 0,
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_S1ap_IE,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
""
},
};
static ber_tlv_tag_t asn_DEF_S1ap_E_RABList_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_S1ap_E_RABList_specs_1 = {
sizeof(struct S1ap_E_RABList),
offsetof(struct S1ap_E_RABList, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
asn_TYPE_descriptor_t asn_DEF_S1ap_E_RABList = {
"S1ap-E-RABList",
"S1ap-E-RABList",
SEQUENCE_OF_free,
SEQUENCE_OF_print,
SEQUENCE_OF_constraint,
SEQUENCE_OF_decode_ber,
SEQUENCE_OF_encode_der,
SEQUENCE_OF_decode_xer,
SEQUENCE_OF_encode_xer,
SEQUENCE_OF_decode_uper,
SEQUENCE_OF_encode_uper,
SEQUENCE_OF_decode_aper,
SEQUENCE_OF_encode_aper,
SEQUENCE_OF_compare,
0, /* Use generic outmost tag fetcher */
asn_DEF_S1ap_E_RABList_tags_1,
sizeof(asn_DEF_S1ap_E_RABList_tags_1)
/sizeof(asn_DEF_S1ap_E_RABList_tags_1[0]), /* 1 */
asn_DEF_S1ap_E_RABList_tags_1, /* Same as above */
sizeof(asn_DEF_S1ap_E_RABList_tags_1)
/sizeof(asn_DEF_S1ap_E_RABList_tags_1[0]), /* 1 */
&asn_PER_type_S1ap_E_RABList_constr_1,
asn_MBR_S1ap_E_RABList_1,
1, /* Single element */
&asn_SPC_S1ap_E_RABList_specs_1 /* Additional specs */
};
| 30.71
| 58
|
(translation_unit) "/*\n * Generated by asn1c-0.9.24 (http://lionet.info/asn1c)\n * From ASN.1 module "S1AP-IEs"\n * found in "/home/oainuc2/openairinterface5g/openair3/S1AP/MESSAGES/ASN1/R10.5/S1AP-IEs.asn"\n * `asn1c -gen-PER`\n */\n\n#include "S1ap-E-RABList.h"\n\nstatic asn_per_constraints_t asn_PER_type_S1ap_E_RABList_constr_1 GCC_NOTUSED = {\n { APC_UNCONSTRAINED, -1, -1, 0, 0 },\n { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */,\n 0, 0 /* No PER value map */\n};\nstatic asn_TYPE_member_t asn_MBR_S1ap_E_RABList_1[] = {\n { ATF_POINTER, 0, 0,\n (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),\n 0,\n &asn_DEF_S1ap_IE,\n 0, /* Defer constraints checking to the member type */\n 0, /* No PER visible constraints */\n 0,\n ""\n },\n};\nstatic ber_tlv_tag_t asn_DEF_S1ap_E_RABList_tags_1[] = {\n (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))\n};\nstatic asn_SET_OF_specifics_t asn_SPC_S1ap_E_RABList_specs_1 = {\n sizeof(struct S1ap_E_RABList),\n offsetof(struct S1ap_E_RABList, _asn_ctx),\n 0, /* XER encoding is XMLDelimitedItemList */\n};\nasn_TYPE_descriptor_t asn_DEF_S1ap_E_RABList = {\n "S1ap-E-RABList",\n "S1ap-E-RABList",\n SEQUENCE_OF_free,\n SEQUENCE_OF_print,\n SEQUENCE_OF_constraint,\n SEQUENCE_OF_decode_ber,\n SEQUENCE_OF_encode_der,\n SEQUENCE_OF_decode_xer,\n SEQUENCE_OF_encode_xer,\n SEQUENCE_OF_decode_uper,\n SEQUENCE_OF_encode_uper,\n SEQUENCE_OF_decode_aper,\n SEQUENCE_OF_encode_aper,\n SEQUENCE_OF_compare,\n 0, /* Use generic outmost tag fetcher */\n asn_DEF_S1ap_E_RABList_tags_1,\n sizeof(asn_DEF_S1ap_E_RABList_tags_1)\n /sizeof(asn_DEF_S1ap_E_RABList_tags_1[0]), /* 1 */\n asn_DEF_S1ap_E_RABList_tags_1, /* Same as above */\n sizeof(asn_DEF_S1ap_E_RABList_tags_1)\n /sizeof(asn_DEF_S1ap_E_RABList_tags_1[0]), /* 1 */\n &asn_PER_type_S1ap_E_RABList_constr_1,\n asn_MBR_S1ap_E_RABList_1,\n 1, /* Single element */\n &asn_SPC_S1ap_E_RABList_specs_1 /* Additional specs */\n};\n\n"
(comment) "/*\n * Generated by asn1c-0.9.24 (http://lionet.info/asn1c)\n * From ASN.1 module "S1AP-IEs"\n * found in "/home/oainuc2/openairinterface5g/openair3/S1AP/MESSAGES/ASN1/R10.5/S1AP-IEs.asn"\n * `asn1c -gen-PER`\n */"
(preproc_include) "#include "S1ap-E-RABList.h"\n"
(#include) "#include"
(string_literal) ""S1ap-E-RABList.h""
(") """
(string_content) "S1ap-E-RABList.h"
(") """
(declaration) "static asn_per_constraints_t asn_PER_type_S1ap_E_RABList_constr_1 GCC_NOTUSED = {\n { APC_UNCONSTRAINED, -1, -1, 0, 0 },\n { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */,\n 0, 0 /* No PER value map */\n};"
(storage_class_specifier) "static"
(static) "static"
(type_identifier) "asn_per_constraints_t"
(init_declarator) "asn_PER_type_S1ap_E_RABList_constr_1 GCC_NOTUSED = {\n { APC_UNCONSTRAINED, -1, -1, 0, 0 },\n { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */,\n 0, 0 /* No PER value map */\n}"
(identifier) "asn_PER_type_S1ap_E_RABList_constr_1"
(ERROR) "GCC_NOTUSED"
(identifier) "GCC_NOTUSED"
(=) "="
(initializer_list) "{\n { APC_UNCONSTRAINED, -1, -1, 0, 0 },\n { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */,\n 0, 0 /* No PER value map */\n}"
({) "{"
(initializer_list) "{ APC_UNCONSTRAINED, -1, -1, 0, 0 }"
({) "{"
(identifier) "APC_UNCONSTRAINED"
(,) ","
(number_literal) "-1"
(,) ","
(number_literal) "-1"
(,) ","
(number_literal) "0"
(,) ","
(number_literal) "0"
(}) "}"
(,) ","
(initializer_list) "{ APC_CONSTRAINED, 8, 8, 1, 256 }"
({) "{"
(identifier) "APC_CONSTRAINED"
(,) ","
(number_literal) "8"
(,) ","
(number_literal) "8"
(,) ","
(number_literal) "1"
(,) ","
(number_literal) "256"
(}) "}"
(comment) "/* (SIZE(1..256)) */"
(,) ","
(number_literal) "0"
(,) ","
(number_literal) "0"
(comment) "/* No PER value map */"
(}) "}"
(;) ";"
(declaration) "static asn_TYPE_member_t asn_MBR_S1ap_E_RABList_1[] = {\n { ATF_POINTER, 0, 0,\n (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),\n 0,\n &asn_DEF_S1ap_IE,\n 0, /* Defer constraints checking to the member type */\n 0, /* No PER visible constraints */\n 0,\n ""\n },\n};"
(storage_class_specifier) "static"
(static) "static"
(type_identifier) "asn_TYPE_member_t"
(init_declarator) "asn_MBR_S1ap_E_RABList_1[] = {\n { ATF_POINTER, 0, 0,\n (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),\n 0,\n &asn_DEF_S1ap_IE,\n 0, /* Defer constraints checking to the member type */\n 0, /* No PER visible constraints */\n 0,\n ""\n },\n}"
(array_declarator) "asn_MBR_S1ap_E_RABList_1[]"
(identifier) "asn_MBR_S1ap_E_RABList_1"
([) "["
(]) "]"
(=) "="
(initializer_list) "{\n { ATF_POINTER, 0, 0,\n (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),\n 0,\n &asn_DEF_S1ap_IE,\n 0, /* Defer constraints checking to the member type */\n 0, /* No PER visible constraints */\n 0,\n ""\n },\n}"
({) "{"
(initializer_list) "{ ATF_POINTER, 0, 0,\n (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),\n 0,\n &asn_DEF_S1ap_IE,\n 0, /* Defer constraints checking to the member type */\n 0, /* No PER visible constraints */\n 0,\n ""\n }"
({) "{"
(identifier) "ATF_POINTER"
(,) ","
(number_literal) "0"
(,) ","
(number_literal) "0"
(,) ","
(parenthesized_expression) "(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))"
(() "("
(binary_expression) "ASN_TAG_CLASS_UNIVERSAL | (16 << 2)"
(identifier) "ASN_TAG_CLASS_UNIVERSAL"
(|) "|"
(parenthesized_expression) "(16 << 2)"
(() "("
(binary_expression) "16 << 2"
(number_literal) "16"
(<<) "<<"
(number_literal) "2"
()) ")"
()) ")"
(,) ","
(number_literal) "0"
(,) ","
(pointer_expression) "&asn_DEF_S1ap_IE"
(&) "&"
(identifier) "asn_DEF_S1ap_IE"
(,) ","
(number_literal) "0"
(,) ","
(comment) "/* Defer constraints checking to the member type */"
(number_literal) "0"
(,) ","
(comment) "/* No PER visible constraints */"
(number_literal) "0"
(,) ","
(string_literal) """"
(") """
(") """
(}) "}"
(,) ","
(}) "}"
(;) ";"
(declaration) "static ber_tlv_tag_t asn_DEF_S1ap_E_RABList_tags_1[] = {\n (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))\n};"
(storage_class_specifier) "static"
(static) "static"
(type_identifier) "ber_tlv_tag_t"
(init_declarator) "asn_DEF_S1ap_E_RABList_tags_1[] = {\n (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))\n}"
(array_declarator) "asn_DEF_S1ap_E_RABList_tags_1[]"
(identifier) "asn_DEF_S1ap_E_RABList_tags_1"
([) "["
(]) "]"
(=) "="
(initializer_list) "{\n (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))\n}"
({) "{"
(parenthesized_expression) "(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))"
(() "("
(binary_expression) "ASN_TAG_CLASS_UNIVERSAL | (16 << 2)"
(identifier) "ASN_TAG_CLASS_UNIVERSAL"
(|) "|"
(parenthesized_expression) "(16 << 2)"
(() "("
(binary_expression) "16 << 2"
(number_literal) "16"
(<<) "<<"
(number_literal) "2"
()) ")"
()) ")"
(}) "}"
(;) ";"
(declaration) "static asn_SET_OF_specifics_t asn_SPC_S1ap_E_RABList_specs_1 = {\n sizeof(struct S1ap_E_RABList),\n offsetof(struct S1ap_E_RABList, _asn_ctx),\n 0, /* XER encoding is XMLDelimitedItemList */\n};"
(storage_class_specifier) "static"
(static) "static"
(type_identifier) "asn_SET_OF_specifics_t"
(init_declarator) "asn_SPC_S1ap_E_RABList_specs_1 = {\n sizeof(struct S1ap_E_RABList),\n offsetof(struct S1ap_E_RABList, _asn_ctx),\n 0, /* XER encoding is XMLDelimitedItemList */\n}"
(identifier) "asn_SPC_S1ap_E_RABList_specs_1"
(=) "="
(initializer_list) "{\n sizeof(struct S1ap_E_RABList),\n offsetof(struct S1ap_E_RABList, _asn_ctx),\n 0, /* XER encoding is XMLDelimitedItemList */\n}"
({) "{"
(sizeof_expression) "sizeof(struct S1ap_E_RABList)"
(sizeof) "sizeof"
(() "("
(type_descriptor) "struct S1ap_E_RABList"
(struct_specifier) "struct S1ap_E_RABList"
(struct) "struct"
(type_identifier) "S1ap_E_RABList"
()) ")"
(,) ","
(offsetof_expression) "offsetof(struct S1ap_E_RABList, _asn_ctx)"
(offsetof) "offsetof"
(() "("
(type_descriptor) "struct S1ap_E_RABList"
(struct_specifier) "struct S1ap_E_RABList"
(struct) "struct"
(type_identifier) "S1ap_E_RABList"
(,) ","
(field_identifier) "_asn_ctx"
()) ")"
(,) ","
(number_literal) "0"
(,) ","
(comment) "/* XER encoding is XMLDelimitedItemList */"
(}) "}"
(;) ";"
(declaration) "asn_TYPE_descriptor_t asn_DEF_S1ap_E_RABList = {\n "S1ap-E-RABList",\n "S1ap-E-RABList",\n SEQUENCE_OF_free,\n SEQUENCE_OF_print,\n SEQUENCE_OF_constraint,\n SEQUENCE_OF_decode_ber,\n SEQUENCE_OF_encode_der,\n SEQUENCE_OF_decode_xer,\n SEQUENCE_OF_encode_xer,\n SEQUENCE_OF_decode_uper,\n SEQUENCE_OF_encode_uper,\n SEQUENCE_OF_decode_aper,\n SEQUENCE_OF_encode_aper,\n SEQUENCE_OF_compare,\n 0, /* Use generic outmost tag fetcher */\n asn_DEF_S1ap_E_RABList_tags_1,\n sizeof(asn_DEF_S1ap_E_RABList_tags_1)\n /sizeof(asn_DEF_S1ap_E_RABList_tags_1[0]), /* 1 */\n asn_DEF_S1ap_E_RABList_tags_1, /* Same as above */\n sizeof(asn_DEF_S1ap_E_RABList_tags_1)\n /sizeof(asn_DEF_S1ap_E_RABList_tags_1[0]), /* 1 */\n &asn_PER_type_S1ap_E_RABList_constr_1,\n asn_MBR_S1ap_E_RABList_1,\n 1, /* Single element */\n &asn_SPC_S1ap_E_RABList_specs_1 /* Additional specs */\n};"
(type_identifier) "asn_TYPE_descriptor_t"
(init_declarator) "asn_DEF_S1ap_E_RABList = {\n "S1ap-E-RABList",\n "S1ap-E-RABList",\n SEQUENCE_OF_free,\n SEQUENCE_OF_print,\n SEQUENCE_OF_constraint,\n SEQUENCE_OF_decode_ber,\n SEQUENCE_OF_encode_der,\n SEQUENCE_OF_decode_xer,\n SEQUENCE_OF_encode_xer,\n SEQUENCE_OF_decode_uper,\n SEQUENCE_OF_encode_uper,\n SEQUENCE_OF_decode_aper,\n SEQUENCE_OF_encode_aper,\n SEQUENCE_OF_compare,\n 0, /* Use generic outmost tag fetcher */\n asn_DEF_S1ap_E_RABList_tags_1,\n sizeof(asn_DEF_S1ap_E_RABList_tags_1)\n /sizeof(asn_DEF_S1ap_E_RABList_tags_1[0]), /* 1 */\n asn_DEF_S1ap_E_RABList_tags_1, /* Same as above */\n sizeof(asn_DEF_S1ap_E_RABList_tags_1)\n /sizeof(asn_DEF_S1ap_E_RABList_tags_1[0]), /* 1 */\n &asn_PER_type_S1ap_E_RABList_constr_1,\n asn_MBR_S1ap_E_RABList_1,\n 1, /* Single element */\n &asn_SPC_S1ap_E_RABList_specs_1 /* Additional specs */\n}"
(identifier) "asn_DEF_S1ap_E_RABList"
(=) "="
(initializer_list) "{\n "S1ap-E-RABList",\n "S1ap-E-RABList",\n SEQUENCE_OF_free,\n SEQUENCE_OF_print,\n SEQUENCE_OF_constraint,\n SEQUENCE_OF_decode_ber,\n SEQUENCE_OF_encode_der,\n SEQUENCE_OF_decode_xer,\n SEQUENCE_OF_encode_xer,\n SEQUENCE_OF_decode_uper,\n SEQUENCE_OF_encode_uper,\n SEQUENCE_OF_decode_aper,\n SEQUENCE_OF_encode_aper,\n SEQUENCE_OF_compare,\n 0, /* Use generic outmost tag fetcher */\n asn_DEF_S1ap_E_RABList_tags_1,\n sizeof(asn_DEF_S1ap_E_RABList_tags_1)\n /sizeof(asn_DEF_S1ap_E_RABList_tags_1[0]), /* 1 */\n asn_DEF_S1ap_E_RABList_tags_1, /* Same as above */\n sizeof(asn_DEF_S1ap_E_RABList_tags_1)\n /sizeof(asn_DEF_S1ap_E_RABList_tags_1[0]), /* 1 */\n &asn_PER_type_S1ap_E_RABList_constr_1,\n asn_MBR_S1ap_E_RABList_1,\n 1, /* Single element */\n &asn_SPC_S1ap_E_RABList_specs_1 /* Additional specs */\n}"
({) "{"
(string_literal) ""S1ap-E-RABList""
(") """
(string_content) "S1ap-E-RABList"
(") """
(,) ","
(string_literal) ""S1ap-E-RABList""
(") """
(string_content) "S1ap-E-RABList"
(") """
(,) ","
(identifier) "SEQUENCE_OF_free"
(,) ","
(identifier) "SEQUENCE_OF_print"
(,) ","
(identifier) "SEQUENCE_OF_constraint"
(,) ","
(identifier) "SEQUENCE_OF_decode_ber"
(,) ","
(identifier) "SEQUENCE_OF_encode_der"
(,) ","
(identifier) "SEQUENCE_OF_decode_xer"
(,) ","
(identifier) "SEQUENCE_OF_encode_xer"
(,) ","
(identifier) "SEQUENCE_OF_decode_uper"
(,) ","
(identifier) "SEQUENCE_OF_encode_uper"
(,) ","
(identifier) "SEQUENCE_OF_decode_aper"
(,) ","
(identifier) "SEQUENCE_OF_encode_aper"
(,) ","
(identifier) "SEQUENCE_OF_compare"
(,) ","
(number_literal) "0"
(,) ","
(comment) "/* Use generic outmost tag fetcher */"
(identifier) "asn_DEF_S1ap_E_RABList_tags_1"
(,) ","
(binary_expression) "sizeof(asn_DEF_S1ap_E_RABList_tags_1)\n /sizeof(asn_DEF_S1ap_E_RABList_tags_1[0])"
(sizeof_expression) "sizeof(asn_DEF_S1ap_E_RABList_tags_1)"
(sizeof) "sizeof"
(parenthesized_expression) "(asn_DEF_S1ap_E_RABList_tags_1)"
(() "("
(identifier) "asn_DEF_S1ap_E_RABList_tags_1"
()) ")"
(/) "/"
(sizeof_expression) "sizeof(asn_DEF_S1ap_E_RABList_tags_1[0])"
(sizeof) "sizeof"
(parenthesized_expression) "(asn_DEF_S1ap_E_RABList_tags_1[0])"
(() "("
(subscript_expression) "asn_DEF_S1ap_E_RABList_tags_1[0]"
(identifier) "asn_DEF_S1ap_E_RABList_tags_1"
([) "["
(number_literal) "0"
(]) "]"
()) ")"
(,) ","
(comment) "/* 1 */"
(identifier) "asn_DEF_S1ap_E_RABList_tags_1"
(,) ","
(comment) "/* Same as above */"
(binary_expression) "sizeof(asn_DEF_S1ap_E_RABList_tags_1)\n /sizeof(asn_DEF_S1ap_E_RABList_tags_1[0])"
(sizeof_expression) "sizeof(asn_DEF_S1ap_E_RABList_tags_1)"
(sizeof) "sizeof"
(parenthesized_expression) "(asn_DEF_S1ap_E_RABList_tags_1)"
(() "("
(identifier) "asn_DEF_S1ap_E_RABList_tags_1"
()) ")"
(/) "/"
(sizeof_expression) "sizeof(asn_DEF_S1ap_E_RABList_tags_1[0])"
(sizeof) "sizeof"
(parenthesized_expression) "(asn_DEF_S1ap_E_RABList_tags_1[0])"
(() "("
(subscript_expression) "asn_DEF_S1ap_E_RABList_tags_1[0]"
(identifier) "asn_DEF_S1ap_E_RABList_tags_1"
([) "["
(number_literal) "0"
(]) "]"
()) ")"
(,) ","
(comment) "/* 1 */"
(pointer_expression) "&asn_PER_type_S1ap_E_RABList_constr_1"
(&) "&"
(identifier) "asn_PER_type_S1ap_E_RABList_constr_1"
(,) ","
(identifier) "asn_MBR_S1ap_E_RABList_1"
(,) ","
(number_literal) "1"
(,) ","
(comment) "/* Single element */"
(pointer_expression) "&asn_SPC_S1ap_E_RABList_specs_1"
(&) "&"
(identifier) "asn_SPC_S1ap_E_RABList_specs_1"
(comment) "/* Additional specs */"
(}) "}"
(;) ";"
| 272
| 1
|
{"language": "c", "success": true, "metadata": {"lines": 58, "avg_line_length": 30.71, "nodes": 134, "errors": 0, "source_hash": "f89231966907be58ba84077dc9f74f2c71a10c3ab4513fb270ecdf1aee3ab6d2", "categorized_nodes": 106}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"S1ap-E-RABList.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 2, "type": "string_literal", "text": "\"S1ap-E-RABList.h\"", "parent": 0, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 27}}, {"id": 3, "type": "declaration", "text": "static asn_per_constraints_t asn_PER_type_S1ap_E_RABList_constr_1 GCC_NOTUSED = {\n\t{ APC_UNCONSTRAINED,\t-1, -1, 0, 0 },\n\t{ APC_CONSTRAINED,\t 8, 8, 1, 256 }\t/* (SIZE(1..256)) */,\n\t0, 0\t/* No PER value map */\n};", "parent": null, "children": [4, 5], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 13, "column": 2}}, {"id": 4, "type": "type_identifier", "text": "asn_per_constraints_t", "parent": 3, "children": [], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 9, "column": 28}}, {"id": 5, "type": "init_declarator", "text": "asn_PER_type_S1ap_E_RABList_constr_1 GCC_NOTUSED = {\n\t{ APC_UNCONSTRAINED,\t-1, -1, 0, 0 },\n\t{ APC_CONSTRAINED,\t 8, 8, 1, 256 }\t/* (SIZE(1..256)) */,\n\t0, 0\t/* No PER value map */\n}", "parent": 3, "children": [6, 7, 9, 10], "start_point": {"row": 9, "column": 29}, "end_point": {"row": 13, "column": 1}}, {"id": 6, "type": "identifier", "text": "asn_PER_type_S1ap_E_RABList_constr_1", "parent": 5, "children": [], "start_point": {"row": 9, "column": 29}, "end_point": {"row": 9, "column": 65}}, {"id": 7, "type": "ERROR", "text": "GCC_NOTUSED", "parent": 5, "children": [8], "start_point": {"row": 9, "column": 66}, "end_point": {"row": 9, "column": 77}}, {"id": 8, "type": "identifier", "text": "GCC_NOTUSED", "parent": 7, "children": [], "start_point": {"row": 9, "column": 66}, "end_point": {"row": 9, "column": 77}}, {"id": 9, "type": "=", "text": "=", "parent": 5, "children": [], "start_point": {"row": 9, "column": 78}, "end_point": {"row": 9, "column": 79}}, {"id": 10, "type": "initializer_list", "text": "{\n\t{ APC_UNCONSTRAINED,\t-1, -1, 0, 0 },\n\t{ APC_CONSTRAINED,\t 8, 8, 1, 256 }\t/* (SIZE(1..256)) */,\n\t0, 0\t/* No PER value map */\n}", "parent": 5, "children": [11, 17, 23, 24], "start_point": {"row": 9, "column": 80}, "end_point": {"row": 13, "column": 1}}, {"id": 11, "type": "initializer_list", "text": "{ APC_UNCONSTRAINED,\t-1, -1, 0, 0 }", "parent": 10, "children": [12, 13, 14, 15, 16], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 38}}, {"id": 12, "type": "identifier", "text": "APC_UNCONSTRAINED", "parent": 11, "children": [], "start_point": {"row": 10, "column": 3}, "end_point": {"row": 10, "column": 20}}, {"id": 13, "type": "number_literal", "text": "-1", "parent": 11, "children": [], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 24}}, {"id": 14, "type": "number_literal", "text": "-1", "parent": 11, "children": [], "start_point": {"row": 10, "column": 26}, "end_point": {"row": 10, "column": 28}}, {"id": 15, "type": "number_literal", "text": "0", "parent": 11, "children": [], "start_point": {"row": 10, "column": 31}, "end_point": {"row": 10, "column": 32}}, {"id": 16, "type": "number_literal", "text": "0", "parent": 11, "children": [], "start_point": {"row": 10, "column": 35}, "end_point": {"row": 10, "column": 36}}, {"id": 17, "type": "initializer_list", "text": "{ APC_CONSTRAINED,\t 8, 8, 1, 256 }", "parent": 10, "children": [18, 19, 20, 21, 22], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 38}}, {"id": 18, "type": "identifier", "text": "APC_CONSTRAINED", "parent": 17, "children": [], "start_point": {"row": 11, "column": 3}, "end_point": {"row": 11, "column": 18}}, {"id": 19, "type": "number_literal", "text": "8", "parent": 17, "children": [], "start_point": {"row": 11, "column": 21}, "end_point": {"row": 11, "column": 22}}, {"id": 20, "type": "number_literal", "text": "8", "parent": 17, "children": [], "start_point": {"row": 11, "column": 25}, "end_point": {"row": 11, "column": 26}}, {"id": 21, "type": "number_literal", "text": "1", "parent": 17, "children": [], "start_point": {"row": 11, "column": 29}, "end_point": {"row": 11, "column": 30}}, {"id": 22, "type": "number_literal", "text": "256", "parent": 17, "children": [], "start_point": {"row": 11, "column": 33}, "end_point": {"row": 11, "column": 36}}, {"id": 23, "type": "number_literal", "text": "0", "parent": 10, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 2}}, {"id": 24, "type": "number_literal", "text": "0", "parent": 10, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 5}}, {"id": 25, "type": "declaration", "text": "static asn_TYPE_member_t asn_MBR_S1ap_E_RABList_1[] = {\n\t{ ATF_POINTER, 0, 0,\n\t\t(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),\n\t\t0,\n\t\t&asn_DEF_S1ap_IE,\n\t\t0,\t/* Defer constraints checking to the member type */\n\t\t0,\t/* No PER visible constraints */\n\t\t0,\n\t\t\"\"\n\t\t},\n};", "parent": null, "children": [26, 27], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 24, "column": 2}}, {"id": 26, "type": "type_identifier", "text": "asn_TYPE_member_t", "parent": 25, "children": [], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 24}}, {"id": 27, "type": "init_declarator", "text": "asn_MBR_S1ap_E_RABList_1[] = {\n\t{ ATF_POINTER, 0, 0,\n\t\t(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),\n\t\t0,\n\t\t&asn_DEF_S1ap_IE,\n\t\t0,\t/* Defer constraints checking to the member type */\n\t\t0,\t/* No PER visible constraints */\n\t\t0,\n\t\t\"\"\n\t\t},\n}", "parent": 25, "children": [28, 30, 31], "start_point": {"row": 14, "column": 25}, "end_point": {"row": 24, "column": 1}}, {"id": 28, "type": "array_declarator", "text": "asn_MBR_S1ap_E_RABList_1[]", "parent": 27, "children": [29], "start_point": {"row": 14, "column": 25}, "end_point": {"row": 14, "column": 51}}, {"id": 29, "type": "identifier", "text": "asn_MBR_S1ap_E_RABList_1", "parent": 28, "children": [], "start_point": {"row": 14, "column": 25}, "end_point": {"row": 14, "column": 49}}, {"id": 30, "type": "=", "text": "=", "parent": 27, "children": [], "start_point": {"row": 14, "column": 52}, "end_point": {"row": 14, "column": 53}}, {"id": 31, "type": "initializer_list", "text": "{\n\t{ ATF_POINTER, 0, 0,\n\t\t(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),\n\t\t0,\n\t\t&asn_DEF_S1ap_IE,\n\t\t0,\t/* Defer constraints checking to the member type */\n\t\t0,\t/* No PER visible constraints */\n\t\t0,\n\t\t\"\"\n\t\t},\n}", "parent": 27, "children": [32], "start_point": {"row": 14, "column": 54}, "end_point": {"row": 24, "column": 1}}, {"id": 32, "type": "initializer_list", "text": "{ ATF_POINTER, 0, 0,\n\t\t(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),\n\t\t0,\n\t\t&asn_DEF_S1ap_IE,\n\t\t0,\t/* Defer constraints checking to the member type */\n\t\t0,\t/* No PER visible constraints */\n\t\t0,\n\t\t\"\"\n\t\t}", "parent": 31, "children": [33, 34, 35, 36, 44, 45, 47, 48, 49, 50], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 23, "column": 3}}, {"id": 33, "type": "identifier", "text": "ATF_POINTER", "parent": 32, "children": [], "start_point": {"row": 15, "column": 3}, "end_point": {"row": 15, "column": 14}}, {"id": 34, "type": "number_literal", "text": "0", "parent": 32, "children": [], "start_point": {"row": 15, "column": 16}, "end_point": {"row": 15, "column": 17}}, {"id": 35, "type": "number_literal", "text": "0", "parent": 32, "children": [], "start_point": {"row": 15, "column": 19}, "end_point": {"row": 15, "column": 20}}, {"id": 36, "type": "parenthesized_expression", "text": "(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))", "parent": 32, "children": [37], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 39}}, {"id": 37, "type": "binary_expression", "text": "ASN_TAG_CLASS_UNIVERSAL | (16 << 2)", "parent": 36, "children": [38, 39], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 38}}, {"id": 38, "type": "identifier", "text": "ASN_TAG_CLASS_UNIVERSAL", "parent": 37, "children": [], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 26}}, {"id": 39, "type": "parenthesized_expression", "text": "(16 << 2)", "parent": 37, "children": [40], "start_point": {"row": 16, "column": 29}, "end_point": {"row": 16, "column": 38}}, {"id": 40, "type": "binary_expression", "text": "16 << 2", "parent": 39, "children": [41, 42, 43], "start_point": {"row": 16, "column": 30}, "end_point": {"row": 16, "column": 37}}, {"id": 41, "type": "number_literal", "text": "16", "parent": 40, "children": [], "start_point": {"row": 16, "column": 30}, "end_point": {"row": 16, "column": 32}}, {"id": 42, "type": "<<", "text": "<<", "parent": 40, "children": [], "start_point": {"row": 16, "column": 33}, "end_point": {"row": 16, "column": 35}}, {"id": 43, "type": "number_literal", "text": "2", "parent": 40, "children": [], "start_point": {"row": 16, "column": 36}, "end_point": {"row": 16, "column": 37}}, {"id": 44, "type": "number_literal", "text": "0", "parent": 32, "children": [], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 3}}, {"id": 45, "type": "pointer_expression", "text": "&asn_DEF_S1ap_IE", "parent": 32, "children": [46], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 18}}, {"id": 46, "type": "identifier", "text": "asn_DEF_S1ap_IE", "parent": 45, "children": [], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 18}}, {"id": 47, "type": "number_literal", "text": "0", "parent": 32, "children": [], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 3}}, {"id": 48, "type": "number_literal", "text": "0", "parent": 32, "children": [], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 3}}, {"id": 49, "type": "number_literal", "text": "0", "parent": 32, "children": [], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 3}}, {"id": 50, "type": "string_literal", "text": "\"\"", "parent": 32, "children": [], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 4}}, {"id": 51, "type": "declaration", "text": "static ber_tlv_tag_t asn_DEF_S1ap_E_RABList_tags_1[] = {\n\t(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))\n};", "parent": null, "children": [52, 53], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 27, "column": 2}}, {"id": 52, "type": "type_identifier", "text": "ber_tlv_tag_t", "parent": 51, "children": [], "start_point": {"row": 25, "column": 7}, "end_point": {"row": 25, "column": 20}}, {"id": 53, "type": "init_declarator", "text": "asn_DEF_S1ap_E_RABList_tags_1[] = {\n\t(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))\n}", "parent": 51, "children": [54, 56, 57], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 27, "column": 1}}, {"id": 54, "type": "array_declarator", "text": "asn_DEF_S1ap_E_RABList_tags_1[]", "parent": 53, "children": [55], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 52}}, {"id": 55, "type": "identifier", "text": "asn_DEF_S1ap_E_RABList_tags_1", "parent": 54, "children": [], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 50}}, {"id": 56, "type": "=", "text": "=", "parent": 53, "children": [], "start_point": {"row": 25, "column": 53}, "end_point": {"row": 25, "column": 54}}, {"id": 57, "type": "initializer_list", "text": "{\n\t(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))\n}", "parent": 53, "children": [58], "start_point": {"row": 25, "column": 55}, "end_point": {"row": 27, "column": 1}}, {"id": 58, "type": "parenthesized_expression", "text": "(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))", "parent": 57, "children": [59], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 38}}, {"id": 59, "type": "binary_expression", "text": "ASN_TAG_CLASS_UNIVERSAL | (16 << 2)", "parent": 58, "children": [60, 61], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 37}}, {"id": 60, "type": "identifier", "text": "ASN_TAG_CLASS_UNIVERSAL", "parent": 59, "children": [], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 25}}, {"id": 61, "type": "parenthesized_expression", "text": "(16 << 2)", "parent": 59, "children": [62], "start_point": {"row": 26, "column": 28}, "end_point": {"row": 26, "column": 37}}, {"id": 62, "type": "binary_expression", "text": "16 << 2", "parent": 61, "children": [63, 64, 65], "start_point": {"row": 26, "column": 29}, "end_point": {"row": 26, "column": 36}}, {"id": 63, "type": "number_literal", "text": "16", "parent": 62, "children": [], "start_point": {"row": 26, "column": 29}, "end_point": {"row": 26, "column": 31}}, {"id": 64, "type": "<<", "text": "<<", "parent": 62, "children": [], "start_point": {"row": 26, "column": 32}, "end_point": {"row": 26, "column": 34}}, {"id": 65, "type": "number_literal", "text": "2", "parent": 62, "children": [], "start_point": {"row": 26, "column": 35}, "end_point": {"row": 26, "column": 36}}, {"id": 66, "type": "declaration", "text": "static asn_SET_OF_specifics_t asn_SPC_S1ap_E_RABList_specs_1 = {\n\tsizeof(struct S1ap_E_RABList),\n\toffsetof(struct S1ap_E_RABList, _asn_ctx),\n\t0,\t/* XER encoding is XMLDelimitedItemList */\n};", "parent": null, "children": [67, 68], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 32, "column": 2}}, {"id": 67, "type": "type_identifier", "text": "asn_SET_OF_specifics_t", "parent": 66, "children": [], "start_point": {"row": 28, "column": 7}, "end_point": {"row": 28, "column": 29}}, {"id": 68, "type": "init_declarator", "text": "asn_SPC_S1ap_E_RABList_specs_1 = {\n\tsizeof(struct S1ap_E_RABList),\n\toffsetof(struct S1ap_E_RABList, _asn_ctx),\n\t0,\t/* XER encoding is XMLDelimitedItemList */\n}", "parent": 66, "children": [69, 70, 71], "start_point": {"row": 28, "column": 30}, "end_point": {"row": 32, "column": 1}}, {"id": 69, "type": "identifier", "text": "asn_SPC_S1ap_E_RABList_specs_1", "parent": 68, "children": [], "start_point": {"row": 28, "column": 30}, "end_point": {"row": 28, "column": 60}}, {"id": 70, "type": "=", "text": "=", "parent": 68, "children": [], "start_point": {"row": 28, "column": 61}, "end_point": {"row": 28, "column": 62}}, {"id": 71, "type": "initializer_list", "text": "{\n\tsizeof(struct S1ap_E_RABList),\n\toffsetof(struct S1ap_E_RABList, _asn_ctx),\n\t0,\t/* XER encoding is XMLDelimitedItemList */\n}", "parent": 68, "children": [72, 77, 84], "start_point": {"row": 28, "column": 63}, "end_point": {"row": 32, "column": 1}}, {"id": 72, "type": "sizeof_expression", "text": "sizeof(struct S1ap_E_RABList)", "parent": 71, "children": [73], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 30}}, {"id": 73, "type": "type_descriptor", "text": "struct S1ap_E_RABList", "parent": 72, "children": [74], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 29}}, {"id": 74, "type": "struct_specifier", "text": "struct S1ap_E_RABList", "parent": 73, "children": [75, 76], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 29}}, {"id": 75, "type": "struct", "text": "struct", "parent": 74, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 14}}, {"id": 76, "type": "type_identifier", "text": "S1ap_E_RABList", "parent": 74, "children": [], "start_point": {"row": 29, "column": 15}, "end_point": {"row": 29, "column": 29}}, {"id": 77, "type": "offsetof_expression", "text": "offsetof(struct S1ap_E_RABList, _asn_ctx)", "parent": 71, "children": [78, 79, 83], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 42}}, {"id": 78, "type": "offsetof", "text": "offsetof", "parent": 77, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 9}}, {"id": 79, "type": "type_descriptor", "text": "struct S1ap_E_RABList", "parent": 77, "children": [80], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 31}}, {"id": 80, "type": "struct_specifier", "text": "struct S1ap_E_RABList", "parent": 79, "children": [81, 82], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 31}}, {"id": 81, "type": "struct", "text": "struct", "parent": 80, "children": [], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 16}}, {"id": 82, "type": "type_identifier", "text": "S1ap_E_RABList", "parent": 80, "children": [], "start_point": {"row": 30, "column": 17}, "end_point": {"row": 30, "column": 31}}, {"id": 83, "type": "field_identifier", "text": "_asn_ctx", "parent": 77, "children": [], "start_point": {"row": 30, "column": 33}, "end_point": {"row": 30, "column": 41}}, {"id": 84, "type": "number_literal", "text": "0", "parent": 71, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 2}}, {"id": 85, "type": "declaration", "text": "asn_TYPE_descriptor_t asn_DEF_S1ap_E_RABList = {\n\t\"S1ap-E-RABList\",\n\t\"S1ap-E-RABList\",\n\tSEQUENCE_OF_free,\n\tSEQUENCE_OF_print,\n\tSEQUENCE_OF_constraint,\n\tSEQUENCE_OF_decode_ber,\n\tSEQUENCE_OF_encode_der,\n\tSEQUENCE_OF_decode_xer,\n\tSEQUENCE_OF_encode_xer,\n\tSEQUENCE_OF_decode_uper,\n\tSEQUENCE_OF_encode_uper,\n\tSEQUENCE_OF_decode_aper,\n\tSEQUENCE_OF_encode_aper,\n\tSEQUENCE_OF_compare,\n\t0,\t/* Use generic outmost tag fetcher */\n\tasn_DEF_S1ap_E_RABList_tags_1,\n\tsizeof(asn_DEF_S1ap_E_RABList_tags_1)\n\t\t/sizeof(asn_DEF_S1ap_E_RABList_tags_1[0]), /* 1 */\n\tasn_DEF_S1ap_E_RABList_tags_1,\t/* Same as above */\n\tsizeof(asn_DEF_S1ap_E_RABList_tags_1)\n\t\t/sizeof(asn_DEF_S1ap_E_RABList_tags_1[0]), /* 1 */\n\t&asn_PER_type_S1ap_E_RABList_constr_1,\n\tasn_MBR_S1ap_E_RABList_1,\n\t1,\t/* Single element */\n\t&asn_SPC_S1ap_E_RABList_specs_1\t/* Additional specs */\n};", "parent": null, "children": [86, 87], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 59, "column": 2}}, {"id": 86, "type": "type_identifier", "text": "asn_TYPE_descriptor_t", "parent": 85, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 21}}, {"id": 87, "type": "init_declarator", "text": "asn_DEF_S1ap_E_RABList = {\n\t\"S1ap-E-RABList\",\n\t\"S1ap-E-RABList\",\n\tSEQUENCE_OF_free,\n\tSEQUENCE_OF_print,\n\tSEQUENCE_OF_constraint,\n\tSEQUENCE_OF_decode_ber,\n\tSEQUENCE_OF_encode_der,\n\tSEQUENCE_OF_decode_xer,\n\tSEQUENCE_OF_encode_xer,\n\tSEQUENCE_OF_decode_uper,\n\tSEQUENCE_OF_encode_uper,\n\tSEQUENCE_OF_decode_aper,\n\tSEQUENCE_OF_encode_aper,\n\tSEQUENCE_OF_compare,\n\t0,\t/* Use generic outmost tag fetcher */\n\tasn_DEF_S1ap_E_RABList_tags_1,\n\tsizeof(asn_DEF_S1ap_E_RABList_tags_1)\n\t\t/sizeof(asn_DEF_S1ap_E_RABList_tags_1[0]), /* 1 */\n\tasn_DEF_S1ap_E_RABList_tags_1,\t/* Same as above */\n\tsizeof(asn_DEF_S1ap_E_RABList_tags_1)\n\t\t/sizeof(asn_DEF_S1ap_E_RABList_tags_1[0]), /* 1 */\n\t&asn_PER_type_S1ap_E_RABList_constr_1,\n\tasn_MBR_S1ap_E_RABList_1,\n\t1,\t/* Single element */\n\t&asn_SPC_S1ap_E_RABList_specs_1\t/* Additional specs */\n}", "parent": 85, "children": [88, 89, 90], "start_point": {"row": 33, "column": 22}, "end_point": {"row": 59, "column": 1}}, {"id": 88, "type": "identifier", "text": "asn_DEF_S1ap_E_RABList", "parent": 87, "children": [], "start_point": {"row": 33, "column": 22}, "end_point": {"row": 33, "column": 44}}, {"id": 89, "type": "=", "text": "=", "parent": 87, "children": [], "start_point": {"row": 33, "column": 45}, "end_point": {"row": 33, "column": 46}}, {"id": 90, "type": "initializer_list", "text": "{\n\t\"S1ap-E-RABList\",\n\t\"S1ap-E-RABList\",\n\tSEQUENCE_OF_free,\n\tSEQUENCE_OF_print,\n\tSEQUENCE_OF_constraint,\n\tSEQUENCE_OF_decode_ber,\n\tSEQUENCE_OF_encode_der,\n\tSEQUENCE_OF_decode_xer,\n\tSEQUENCE_OF_encode_xer,\n\tSEQUENCE_OF_decode_uper,\n\tSEQUENCE_OF_encode_uper,\n\tSEQUENCE_OF_decode_aper,\n\tSEQUENCE_OF_encode_aper,\n\tSEQUENCE_OF_compare,\n\t0,\t/* Use generic outmost tag fetcher */\n\tasn_DEF_S1ap_E_RABList_tags_1,\n\tsizeof(asn_DEF_S1ap_E_RABList_tags_1)\n\t\t/sizeof(asn_DEF_S1ap_E_RABList_tags_1[0]), /* 1 */\n\tasn_DEF_S1ap_E_RABList_tags_1,\t/* Same as above */\n\tsizeof(asn_DEF_S1ap_E_RABList_tags_1)\n\t\t/sizeof(asn_DEF_S1ap_E_RABList_tags_1[0]), /* 1 */\n\t&asn_PER_type_S1ap_E_RABList_constr_1,\n\tasn_MBR_S1ap_E_RABList_1,\n\t1,\t/* Single element */\n\t&asn_SPC_S1ap_E_RABList_specs_1\t/* Additional specs */\n}", "parent": 87, "children": [91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 117, 118, 128, 130, 131, 132], "start_point": {"row": 33, "column": 47}, "end_point": {"row": 59, "column": 1}}, {"id": 91, "type": "string_literal", "text": "\"S1ap-E-RABList\"", "parent": 90, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 17}}, {"id": 92, "type": "string_literal", "text": "\"S1ap-E-RABList\"", "parent": 90, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 17}}, {"id": 93, "type": "identifier", "text": "SEQUENCE_OF_free", "parent": 90, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 17}}, {"id": 94, "type": "identifier", "text": "SEQUENCE_OF_print", "parent": 90, "children": [], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 18}}, {"id": 95, "type": "identifier", "text": "SEQUENCE_OF_constraint", "parent": 90, "children": [], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 23}}, {"id": 96, "type": "identifier", "text": "SEQUENCE_OF_decode_ber", "parent": 90, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 23}}, {"id": 97, "type": "identifier", "text": "SEQUENCE_OF_encode_der", "parent": 90, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 23}}, {"id": 98, "type": "identifier", "text": "SEQUENCE_OF_decode_xer", "parent": 90, "children": [], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 23}}, {"id": 99, "type": "identifier", "text": "SEQUENCE_OF_encode_xer", "parent": 90, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 23}}, {"id": 100, "type": "identifier", "text": "SEQUENCE_OF_decode_uper", "parent": 90, "children": [], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 24}}, {"id": 101, "type": "identifier", "text": "SEQUENCE_OF_encode_uper", "parent": 90, "children": [], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 24}}, {"id": 102, "type": "identifier", "text": "SEQUENCE_OF_decode_aper", "parent": 90, "children": [], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 24}}, {"id": 103, "type": "identifier", "text": "SEQUENCE_OF_encode_aper", "parent": 90, "children": [], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 24}}, {"id": 104, "type": "identifier", "text": "SEQUENCE_OF_compare", "parent": 90, "children": [], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 20}}, {"id": 105, "type": "number_literal", "text": "0", "parent": 90, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 2}}, {"id": 106, "type": "identifier", "text": "asn_DEF_S1ap_E_RABList_tags_1", "parent": 90, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 30}}, {"id": 107, "type": "binary_expression", "text": "sizeof(asn_DEF_S1ap_E_RABList_tags_1)\n\t\t/sizeof(asn_DEF_S1ap_E_RABList_tags_1[0])", "parent": 90, "children": [108, 111, 112], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 51, "column": 43}}, {"id": 108, "type": "sizeof_expression", "text": "sizeof(asn_DEF_S1ap_E_RABList_tags_1)", "parent": 107, "children": [109], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 38}}, {"id": 109, "type": "parenthesized_expression", "text": "(asn_DEF_S1ap_E_RABList_tags_1)", "parent": 108, "children": [110], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 38}}, {"id": 110, "type": "identifier", "text": "asn_DEF_S1ap_E_RABList_tags_1", "parent": 109, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 37}}, {"id": 111, "type": "/", "text": "/", "parent": 107, "children": [], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 3}}, {"id": 112, "type": "sizeof_expression", "text": "sizeof(asn_DEF_S1ap_E_RABList_tags_1[0])", "parent": 107, "children": [113], "start_point": {"row": 51, "column": 3}, "end_point": {"row": 51, "column": 43}}, {"id": 113, "type": "parenthesized_expression", "text": "(asn_DEF_S1ap_E_RABList_tags_1[0])", "parent": 112, "children": [114], "start_point": {"row": 51, "column": 9}, "end_point": {"row": 51, "column": 43}}, {"id": 114, "type": "subscript_expression", "text": "asn_DEF_S1ap_E_RABList_tags_1[0]", "parent": 113, "children": [115, 116], "start_point": {"row": 51, "column": 10}, "end_point": {"row": 51, "column": 42}}, {"id": 115, "type": "identifier", "text": "asn_DEF_S1ap_E_RABList_tags_1", "parent": 114, "children": [], "start_point": {"row": 51, "column": 10}, "end_point": {"row": 51, "column": 39}}, {"id": 116, "type": "number_literal", "text": "0", "parent": 114, "children": [], "start_point": {"row": 51, "column": 40}, "end_point": {"row": 51, "column": 41}}, {"id": 117, "type": "identifier", "text": "asn_DEF_S1ap_E_RABList_tags_1", "parent": 90, "children": [], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 30}}, {"id": 118, "type": "binary_expression", "text": "sizeof(asn_DEF_S1ap_E_RABList_tags_1)\n\t\t/sizeof(asn_DEF_S1ap_E_RABList_tags_1[0])", "parent": 90, "children": [119, 122, 123], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 54, "column": 43}}, {"id": 119, "type": "sizeof_expression", "text": "sizeof(asn_DEF_S1ap_E_RABList_tags_1)", "parent": 118, "children": [120], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 38}}, {"id": 120, "type": "parenthesized_expression", "text": "(asn_DEF_S1ap_E_RABList_tags_1)", "parent": 119, "children": [121], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 38}}, {"id": 121, "type": "identifier", "text": "asn_DEF_S1ap_E_RABList_tags_1", "parent": 120, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 37}}, {"id": 122, "type": "/", "text": "/", "parent": 118, "children": [], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 3}}, {"id": 123, "type": "sizeof_expression", "text": "sizeof(asn_DEF_S1ap_E_RABList_tags_1[0])", "parent": 118, "children": [124], "start_point": {"row": 54, "column": 3}, "end_point": {"row": 54, "column": 43}}, {"id": 124, "type": "parenthesized_expression", "text": "(asn_DEF_S1ap_E_RABList_tags_1[0])", "parent": 123, "children": [125], "start_point": {"row": 54, "column": 9}, "end_point": {"row": 54, "column": 43}}, {"id": 125, "type": "subscript_expression", "text": "asn_DEF_S1ap_E_RABList_tags_1[0]", "parent": 124, "children": [126, 127], "start_point": {"row": 54, "column": 10}, "end_point": {"row": 54, "column": 42}}, {"id": 126, "type": "identifier", "text": "asn_DEF_S1ap_E_RABList_tags_1", "parent": 125, "children": [], "start_point": {"row": 54, "column": 10}, "end_point": {"row": 54, "column": 39}}, {"id": 127, "type": "number_literal", "text": "0", "parent": 125, "children": [], "start_point": {"row": 54, "column": 40}, "end_point": {"row": 54, "column": 41}}, {"id": 128, "type": "pointer_expression", "text": "&asn_PER_type_S1ap_E_RABList_constr_1", "parent": 90, "children": [129], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 38}}, {"id": 129, "type": "identifier", "text": "asn_PER_type_S1ap_E_RABList_constr_1", "parent": 128, "children": [], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 38}}, {"id": 130, "type": "identifier", "text": "asn_MBR_S1ap_E_RABList_1", "parent": 90, "children": [], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 25}}, {"id": 131, "type": "number_literal", "text": "1", "parent": 90, "children": [], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 2}}, {"id": 132, "type": "pointer_expression", "text": "&asn_SPC_S1ap_E_RABList_specs_1", "parent": 90, "children": [133], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 32}}, {"id": 133, "type": "identifier", "text": "asn_SPC_S1ap_E_RABList_specs_1", "parent": 132, "children": [], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 32}}]}, "node_categories": {"declarations": {"functions": [], "variables": [3, 25, 51, 66, 85], "classes": [74, 75, 80, 81], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [36, 37, 39, 40, 45, 58, 59, 61, 62, 72, 77, 107, 108, 109, 112, 113, 114, 118, 119, 120, 123, 124, 125, 128, 132], "assignments": [], "loops": [], "conditionals": [4, 6, 8, 12, 18, 26, 29, 33, 38, 46, 52, 55, 60, 67, 69, 76, 82, 83, 86, 88, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 106, 110, 115, 117, 121, 126, 129, 130, 133], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 13, 14, 15, 16, 19, 20, 21, 22, 23, 24, 34, 35, 41, 43, 44, 47, 48, 49, 50, 63, 65, 84, 91, 92, 105, 116, 127, 131], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [{"node_id": 74, "universal_type": "class", "name": "S1ap_E_RABList", "text_snippet": "struct S1ap_E_RABList"}, {"node_id": 75, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 80, "universal_type": "class", "name": "S1ap_E_RABList", "text_snippet": "struct S1ap_E_RABList"}, {"node_id": 81, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include \"S1ap-E-RABList.h\"\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "/*\n * Generated by asn1c-0.9.24 (http://lionet.info/asn1c)\n * From ASN.1 module \"S1AP-IEs\"\n * \tfound in \"/home/oainuc2/openairinterface5g/openair3/S1AP/MESSAGES/ASN1/R10.5/S1AP-IEs.asn\"\n * \t`asn1c -gen-PER`\n */\n\n#include \"S1ap-E-RABList.h\"\n\nstatic asn_per_constraints_t asn_PER_type_S1ap_E_RABList_constr_1 GCC_NOTUSED = {\n\t{ APC_UNCONSTRAINED,\t-1, -1, 0, 0 },\n\t{ APC_CONSTRAINED,\t 8, 8, 1, 256 }\t/* (SIZE(1..256)) */,\n\t0, 0\t/* No PER value map */\n};\nstatic asn_TYPE_member_t asn_MBR_S1ap_E_RABList_1[] = {\n\t{ ATF_POINTER, 0, 0,\n\t\t(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),\n\t\t0,\n\t\t&asn_DEF_S1ap_IE,\n\t\t0,\t/* Defer constraints checking to the member type */\n\t\t0,\t/* No PER visible constraints */\n\t\t0,\n\t\t\"\"\n\t\t},\n};\nstatic ber_tlv_tag_t asn_DEF_S1ap_E_RABList_tags_1[] = {\n\t(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))\n};\nstatic asn_SET_OF_specifics_t asn_SPC_S1ap_E_RABList_specs_1 = {\n\tsizeof(struct S1ap_E_RABList),\n\toffsetof(struct S1ap_E_RABList, _asn_ctx),\n\t0,\t/* XER encoding is XMLDelimitedItemList */\n};\nasn_TYPE_descriptor_t asn_DEF_S1ap_E_RABList = {\n\t\"S1ap-E-RABList\",\n\t\"S1ap-E-RABList\",\n\tSEQUENCE_OF_free,\n\tSEQUENCE_OF_print,\n\tSEQUENCE_OF_constraint,\n\tSEQUENCE_OF_decode_ber,\n\tSEQUENCE_OF_encode_der,\n\tSEQUENCE_OF_decode_xer,\n\tSEQUENCE_OF_encode_xer,\n\tSEQUENCE_OF_decode_uper,\n\tSEQUENCE_OF_encode_uper,\n\tSEQUENCE_OF_decode_aper,\n\tSEQUENCE_OF_encode_aper,\n\tSEQUENCE_OF_compare,\n\t0,\t/* Use generic outmost tag fetcher */\n\tasn_DEF_S1ap_E_RABList_tags_1,\n\tsizeof(asn_DEF_S1ap_E_RABList_tags_1)\n\t\t/sizeof(asn_DEF_S1ap_E_RABList_tags_1[0]), /* 1 */\n\tasn_DEF_S1ap_E_RABList_tags_1,\t/* Same as above */\n\tsizeof(asn_DEF_S1ap_E_RABList_tags_1)\n\t\t/sizeof(asn_DEF_S1ap_E_RABList_tags_1[0]), /* 1 */\n\t&asn_PER_type_S1ap_E_RABList_constr_1,\n\tasn_MBR_S1ap_E_RABList_1,\n\t1,\t/* Single element */\n\t&asn_SPC_S1ap_E_RABList_specs_1\t/* Additional specs */\n};\n\n"}
| 81,205
|
c
|
#include <string.h>
#include "quickjs.h"
const char* eval(const char* str) {
JSRuntime* runtime = JS_NewRuntime();
JSContext* ctx = JS_NewContext(runtime);
JSValue result =
JS_Eval(ctx, str, strlen(str), "<evalScript>", JS_EVAL_TYPE_GLOBAL);
if (JS_IsException(result)) {
JSValue realException = JS_GetException(ctx);
return JS_ToCString(ctx, realException);
}
JSValue json = JS_JSONStringify(ctx, result, JS_UNDEFINED, JS_UNDEFINED);
JS_FreeValue(ctx, result);
return JS_ToCString(ctx, json);
}
| 33.2
| 15
|
(translation_unit) "#include <string.h>\n#include "quickjs.h"\n\nconst char* eval(const char* str) {\n JSRuntime* runtime = JS_NewRuntime();\n JSContext* ctx = JS_NewContext(runtime);\n JSValue result =\n JS_Eval(ctx, str, strlen(str), "<evalScript>", JS_EVAL_TYPE_GLOBAL);\n if (JS_IsException(result)) {\n JSValue realException = JS_GetException(ctx);\n return JS_ToCString(ctx, realException);\n }\n JSValue json = JS_JSONStringify(ctx, result, JS_UNDEFINED, JS_UNDEFINED);\n JS_FreeValue(ctx, result);\n return JS_ToCString(ctx, json);\n}"
(preproc_include) "#include <string.h>\n"
(#include) "#include"
(system_lib_string) "<string.h>"
(preproc_include) "#include "quickjs.h"\n"
(#include) "#include"
(string_literal) ""quickjs.h""
(") """
(string_content) "quickjs.h"
(") """
(function_definition) "const char* eval(const char* str) {\n JSRuntime* runtime = JS_NewRuntime();\n JSContext* ctx = JS_NewContext(runtime);\n JSValue result =\n JS_Eval(ctx, str, strlen(str), "<evalScript>", JS_EVAL_TYPE_GLOBAL);\n if (JS_IsException(result)) {\n JSValue realException = JS_GetException(ctx);\n return JS_ToCString(ctx, realException);\n }\n JSValue json = JS_JSONStringify(ctx, result, JS_UNDEFINED, JS_UNDEFINED);\n JS_FreeValue(ctx, result);\n return JS_ToCString(ctx, json);\n}"
(type_qualifier) "const"
(const) "const"
(primitive_type) "char"
(pointer_declarator) "* eval(const char* str)"
(*) "*"
(function_declarator) "eval(const char* str)"
(identifier) "eval"
(parameter_list) "(const char* str)"
(() "("
(parameter_declaration) "const char* str"
(type_qualifier) "const"
(const) "const"
(primitive_type) "char"
(pointer_declarator) "* str"
(*) "*"
(identifier) "str"
()) ")"
(compound_statement) "{\n JSRuntime* runtime = JS_NewRuntime();\n JSContext* ctx = JS_NewContext(runtime);\n JSValue result =\n JS_Eval(ctx, str, strlen(str), "<evalScript>", JS_EVAL_TYPE_GLOBAL);\n if (JS_IsException(result)) {\n JSValue realException = JS_GetException(ctx);\n return JS_ToCString(ctx, realException);\n }\n JSValue json = JS_JSONStringify(ctx, result, JS_UNDEFINED, JS_UNDEFINED);\n JS_FreeValue(ctx, result);\n return JS_ToCString(ctx, json);\n}"
({) "{"
(declaration) "JSRuntime* runtime = JS_NewRuntime();"
(type_identifier) "JSRuntime"
(init_declarator) "* runtime = JS_NewRuntime()"
(pointer_declarator) "* runtime"
(*) "*"
(identifier) "runtime"
(=) "="
(call_expression) "JS_NewRuntime()"
(identifier) "JS_NewRuntime"
(argument_list) "()"
(() "("
()) ")"
(;) ";"
(declaration) "JSContext* ctx = JS_NewContext(runtime);"
(type_identifier) "JSContext"
(init_declarator) "* ctx = JS_NewContext(runtime)"
(pointer_declarator) "* ctx"
(*) "*"
(identifier) "ctx"
(=) "="
(call_expression) "JS_NewContext(runtime)"
(identifier) "JS_NewContext"
(argument_list) "(runtime)"
(() "("
(identifier) "runtime"
()) ")"
(;) ";"
(declaration) "JSValue result =\n JS_Eval(ctx, str, strlen(str), "<evalScript>", JS_EVAL_TYPE_GLOBAL);"
(type_identifier) "JSValue"
(init_declarator) "result =\n JS_Eval(ctx, str, strlen(str), "<evalScript>", JS_EVAL_TYPE_GLOBAL)"
(identifier) "result"
(=) "="
(call_expression) "JS_Eval(ctx, str, strlen(str), "<evalScript>", JS_EVAL_TYPE_GLOBAL)"
(identifier) "JS_Eval"
(argument_list) "(ctx, str, strlen(str), "<evalScript>", JS_EVAL_TYPE_GLOBAL)"
(() "("
(identifier) "ctx"
(,) ","
(identifier) "str"
(,) ","
(call_expression) "strlen(str)"
(identifier) "strlen"
(argument_list) "(str)"
(() "("
(identifier) "str"
()) ")"
(,) ","
(string_literal) ""<evalScript>""
(") """
(string_content) "<evalScript>"
(") """
(,) ","
(identifier) "JS_EVAL_TYPE_GLOBAL"
()) ")"
(;) ";"
(if_statement) "if (JS_IsException(result)) {\n JSValue realException = JS_GetException(ctx);\n return JS_ToCString(ctx, realException);\n }"
(if) "if"
(parenthesized_expression) "(JS_IsException(result))"
(() "("
(call_expression) "JS_IsException(result)"
(identifier) "JS_IsException"
(argument_list) "(result)"
(() "("
(identifier) "result"
()) ")"
()) ")"
(compound_statement) "{\n JSValue realException = JS_GetException(ctx);\n return JS_ToCString(ctx, realException);\n }"
({) "{"
(declaration) "JSValue realException = JS_GetException(ctx);"
(type_identifier) "JSValue"
(init_declarator) "realException = JS_GetException(ctx)"
(identifier) "realException"
(=) "="
(call_expression) "JS_GetException(ctx)"
(identifier) "JS_GetException"
(argument_list) "(ctx)"
(() "("
(identifier) "ctx"
()) ")"
(;) ";"
(return_statement) "return JS_ToCString(ctx, realException);"
(return) "return"
(call_expression) "JS_ToCString(ctx, realException)"
(identifier) "JS_ToCString"
(argument_list) "(ctx, realException)"
(() "("
(identifier) "ctx"
(,) ","
(identifier) "realException"
()) ")"
(;) ";"
(}) "}"
(declaration) "JSValue json = JS_JSONStringify(ctx, result, JS_UNDEFINED, JS_UNDEFINED);"
(type_identifier) "JSValue"
(init_declarator) "json = JS_JSONStringify(ctx, result, JS_UNDEFINED, JS_UNDEFINED)"
(identifier) "json"
(=) "="
(call_expression) "JS_JSONStringify(ctx, result, JS_UNDEFINED, JS_UNDEFINED)"
(identifier) "JS_JSONStringify"
(argument_list) "(ctx, result, JS_UNDEFINED, JS_UNDEFINED)"
(() "("
(identifier) "ctx"
(,) ","
(identifier) "result"
(,) ","
(identifier) "JS_UNDEFINED"
(,) ","
(identifier) "JS_UNDEFINED"
()) ")"
(;) ";"
(expression_statement) "JS_FreeValue(ctx, result);"
(call_expression) "JS_FreeValue(ctx, result)"
(identifier) "JS_FreeValue"
(argument_list) "(ctx, result)"
(() "("
(identifier) "ctx"
(,) ","
(identifier) "result"
()) ")"
(;) ";"
(return_statement) "return JS_ToCString(ctx, json);"
(return) "return"
(call_expression) "JS_ToCString(ctx, json)"
(identifier) "JS_ToCString"
(argument_list) "(ctx, json)"
(() "("
(identifier) "ctx"
(,) ","
(identifier) "json"
()) ")"
(;) ";"
(}) "}"
| 162
| 0
|
{"language": "c", "success": true, "metadata": {"lines": 15, "avg_line_length": 33.2, "nodes": 99, "errors": 0, "source_hash": "aa1431528db93d11c2a50c86499265d3d89533baf00c9abc2f436d1419636784", "categorized_nodes": 68}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <string.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<string.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 19}}, {"id": 3, "type": "preproc_include", "text": "#include \"quickjs.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": "\"quickjs.h\"", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 20}}, {"id": 6, "type": "function_definition", "text": "const char* eval(const char* str) {\n\tJSRuntime* runtime = JS_NewRuntime();\n\tJSContext* ctx = JS_NewContext(runtime);\n\tJSValue result =\n\t JS_Eval(ctx, str, strlen(str), \"<evalScript>\", JS_EVAL_TYPE_GLOBAL);\n\tif (JS_IsException(result)) {\n\t\tJSValue realException = JS_GetException(ctx);\n\t\treturn JS_ToCString(ctx, realException);\n\t}\n\tJSValue json = JS_JSONStringify(ctx, result, JS_UNDEFINED, JS_UNDEFINED);\n\tJS_FreeValue(ctx, result);\n\treturn JS_ToCString(ctx, json);\n}", "parent": null, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 7, "type": "primitive_type", "text": "char", "parent": 6, "children": [], "start_point": {"row": 3, "column": 6}, "end_point": {"row": 3, "column": 10}}, {"id": 8, "type": "pointer_declarator", "text": "* eval(const char* str)", "parent": 6, "children": [9, 10], "start_point": {"row": 3, "column": 10}, "end_point": {"row": 3, "column": 33}}, {"id": 9, "type": "*", "text": "*", "parent": 8, "children": [], "start_point": {"row": 3, "column": 10}, "end_point": {"row": 3, "column": 11}}, {"id": 10, "type": "function_declarator", "text": "eval(const char* str)", "parent": 8, "children": [11, 12], "start_point": {"row": 3, "column": 12}, "end_point": {"row": 3, "column": 33}}, {"id": 11, "type": "identifier", "text": "eval", "parent": 10, "children": [], "start_point": {"row": 3, "column": 12}, "end_point": {"row": 3, "column": 16}}, {"id": 12, "type": "parameter_list", "text": "(const char* str)", "parent": 10, "children": [13], "start_point": {"row": 3, "column": 16}, "end_point": {"row": 3, "column": 33}}, {"id": 13, "type": "parameter_declaration", "text": "const char* str", "parent": 12, "children": [14, 15], "start_point": {"row": 3, "column": 17}, "end_point": {"row": 3, "column": 32}}, {"id": 14, "type": "primitive_type", "text": "char", "parent": 13, "children": [], "start_point": {"row": 3, "column": 23}, "end_point": {"row": 3, "column": 27}}, {"id": 15, "type": "pointer_declarator", "text": "* str", "parent": 13, "children": [16, 17], "start_point": {"row": 3, "column": 27}, "end_point": {"row": 3, "column": 32}}, {"id": 16, "type": "*", "text": "*", "parent": 15, "children": [], "start_point": {"row": 3, "column": 27}, "end_point": {"row": 3, "column": 28}}, {"id": 17, "type": "identifier", "text": "str", "parent": 15, "children": [], "start_point": {"row": 3, "column": 29}, "end_point": {"row": 3, "column": 32}}, {"id": 18, "type": "declaration", "text": "JSRuntime* runtime = JS_NewRuntime();", "parent": 6, "children": [19, 20], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 4, "column": 38}}, {"id": 19, "type": "type_identifier", "text": "JSRuntime", "parent": 18, "children": [], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 4, "column": 10}}, {"id": 20, "type": "init_declarator", "text": "* runtime = JS_NewRuntime()", "parent": 18, "children": [21, 24, 25], "start_point": {"row": 4, "column": 10}, "end_point": {"row": 4, "column": 37}}, {"id": 21, "type": "pointer_declarator", "text": "* runtime", "parent": 20, "children": [22, 23], "start_point": {"row": 4, "column": 10}, "end_point": {"row": 4, "column": 19}}, {"id": 22, "type": "*", "text": "*", "parent": 21, "children": [], "start_point": {"row": 4, "column": 10}, "end_point": {"row": 4, "column": 11}}, {"id": 23, "type": "identifier", "text": "runtime", "parent": 21, "children": [], "start_point": {"row": 4, "column": 12}, "end_point": {"row": 4, "column": 19}}, {"id": 24, "type": "=", "text": "=", "parent": 20, "children": [], "start_point": {"row": 4, "column": 20}, "end_point": {"row": 4, "column": 21}}, {"id": 25, "type": "call_expression", "text": "JS_NewRuntime()", "parent": 20, "children": [26, 27], "start_point": {"row": 4, "column": 22}, "end_point": {"row": 4, "column": 37}}, {"id": 26, "type": "identifier", "text": "JS_NewRuntime", "parent": 25, "children": [], "start_point": {"row": 4, "column": 22}, "end_point": {"row": 4, "column": 35}}, {"id": 27, "type": "argument_list", "text": "()", "parent": 25, "children": [], "start_point": {"row": 4, "column": 35}, "end_point": {"row": 4, "column": 37}}, {"id": 28, "type": "declaration", "text": "JSContext* ctx = JS_NewContext(runtime);", "parent": 6, "children": [29, 30], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 41}}, {"id": 29, "type": "type_identifier", "text": "JSContext", "parent": 28, "children": [], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 10}}, {"id": 30, "type": "init_declarator", "text": "* ctx = JS_NewContext(runtime)", "parent": 28, "children": [31, 34, 35], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 40}}, {"id": 31, "type": "pointer_declarator", "text": "* ctx", "parent": 30, "children": [32, 33], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 15}}, {"id": 32, "type": "*", "text": "*", "parent": 31, "children": [], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 11}}, {"id": 33, "type": "identifier", "text": "ctx", "parent": 31, "children": [], "start_point": {"row": 5, "column": 12}, "end_point": {"row": 5, "column": 15}}, {"id": 34, "type": "=", "text": "=", "parent": 30, "children": [], "start_point": {"row": 5, "column": 16}, "end_point": {"row": 5, "column": 17}}, {"id": 35, "type": "call_expression", "text": "JS_NewContext(runtime)", "parent": 30, "children": [36, 37], "start_point": {"row": 5, "column": 18}, "end_point": {"row": 5, "column": 40}}, {"id": 36, "type": "identifier", "text": "JS_NewContext", "parent": 35, "children": [], "start_point": {"row": 5, "column": 18}, "end_point": {"row": 5, "column": 31}}, {"id": 37, "type": "argument_list", "text": "(runtime)", "parent": 35, "children": [38], "start_point": {"row": 5, "column": 31}, "end_point": {"row": 5, "column": 40}}, {"id": 38, "type": "identifier", "text": "runtime", "parent": 37, "children": [], "start_point": {"row": 5, "column": 32}, "end_point": {"row": 5, "column": 39}}, {"id": 39, "type": "declaration", "text": "JSValue result =\n\t JS_Eval(ctx, str, strlen(str), \"<evalScript>\", JS_EVAL_TYPE_GLOBAL);", "parent": 6, "children": [40, 41], "start_point": {"row": 6, "column": 1}, "end_point": {"row": 7, "column": 73}}, {"id": 40, "type": "type_identifier", "text": "JSValue", "parent": 39, "children": [], "start_point": {"row": 6, "column": 1}, "end_point": {"row": 6, "column": 8}}, {"id": 41, "type": "init_declarator", "text": "result =\n\t JS_Eval(ctx, str, strlen(str), \"<evalScript>\", JS_EVAL_TYPE_GLOBAL)", "parent": 39, "children": [42, 43, 44], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 7, "column": 72}}, {"id": 42, "type": "identifier", "text": "result", "parent": 41, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 15}}, {"id": 43, "type": "=", "text": "=", "parent": 41, "children": [], "start_point": {"row": 6, "column": 16}, "end_point": {"row": 6, "column": 17}}, {"id": 44, "type": "call_expression", "text": "JS_Eval(ctx, str, strlen(str), \"<evalScript>\", JS_EVAL_TYPE_GLOBAL)", "parent": 41, "children": [45, 46], "start_point": {"row": 7, "column": 5}, "end_point": {"row": 7, "column": 72}}, {"id": 45, "type": "identifier", "text": "JS_Eval", "parent": 44, "children": [], "start_point": {"row": 7, "column": 5}, "end_point": {"row": 7, "column": 12}}, {"id": 46, "type": "argument_list", "text": "(ctx, str, strlen(str), \"<evalScript>\", JS_EVAL_TYPE_GLOBAL)", "parent": 44, "children": [47, 48, 49, 53, 54], "start_point": {"row": 7, "column": 12}, "end_point": {"row": 7, "column": 72}}, {"id": 47, "type": "identifier", "text": "ctx", "parent": 46, "children": [], "start_point": {"row": 7, "column": 13}, "end_point": {"row": 7, "column": 16}}, {"id": 48, "type": "identifier", "text": "str", "parent": 46, "children": [], "start_point": {"row": 7, "column": 18}, "end_point": {"row": 7, "column": 21}}, {"id": 49, "type": "call_expression", "text": "strlen(str)", "parent": 46, "children": [50, 51], "start_point": {"row": 7, "column": 23}, "end_point": {"row": 7, "column": 34}}, {"id": 50, "type": "identifier", "text": "strlen", "parent": 49, "children": [], "start_point": {"row": 7, "column": 23}, "end_point": {"row": 7, "column": 29}}, {"id": 51, "type": "argument_list", "text": "(str)", "parent": 49, "children": [52], "start_point": {"row": 7, "column": 29}, "end_point": {"row": 7, "column": 34}}, {"id": 52, "type": "identifier", "text": "str", "parent": 51, "children": [], "start_point": {"row": 7, "column": 30}, "end_point": {"row": 7, "column": 33}}, {"id": 53, "type": "string_literal", "text": "\"<evalScript>\"", "parent": 46, "children": [], "start_point": {"row": 7, "column": 36}, "end_point": {"row": 7, "column": 50}}, {"id": 54, "type": "identifier", "text": "JS_EVAL_TYPE_GLOBAL", "parent": 46, "children": [], "start_point": {"row": 7, "column": 52}, "end_point": {"row": 7, "column": 71}}, {"id": 55, "type": "if_statement", "text": "if (JS_IsException(result)) {\n\t\tJSValue realException = JS_GetException(ctx);\n\t\treturn JS_ToCString(ctx, realException);\n\t}", "parent": 6, "children": [56], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 11, "column": 2}}, {"id": 56, "type": "parenthesized_expression", "text": "(JS_IsException(result))", "parent": 55, "children": [57], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 28}}, {"id": 57, "type": "call_expression", "text": "JS_IsException(result)", "parent": 56, "children": [58, 59], "start_point": {"row": 8, "column": 5}, "end_point": {"row": 8, "column": 27}}, {"id": 58, "type": "identifier", "text": "JS_IsException", "parent": 57, "children": [], "start_point": {"row": 8, "column": 5}, "end_point": {"row": 8, "column": 19}}, {"id": 59, "type": "argument_list", "text": "(result)", "parent": 57, "children": [60], "start_point": {"row": 8, "column": 19}, "end_point": {"row": 8, "column": 27}}, {"id": 60, "type": "identifier", "text": "result", "parent": 59, "children": [], "start_point": {"row": 8, "column": 20}, "end_point": {"row": 8, "column": 26}}, {"id": 61, "type": "declaration", "text": "JSValue realException = JS_GetException(ctx);", "parent": 55, "children": [62, 63], "start_point": {"row": 9, "column": 2}, "end_point": {"row": 9, "column": 47}}, {"id": 62, "type": "type_identifier", "text": "JSValue", "parent": 61, "children": [], "start_point": {"row": 9, "column": 2}, "end_point": {"row": 9, "column": 9}}, {"id": 63, "type": "init_declarator", "text": "realException = JS_GetException(ctx)", "parent": 61, "children": [64, 65, 66], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 9, "column": 46}}, {"id": 64, "type": "identifier", "text": "realException", "parent": 63, "children": [], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 9, "column": 23}}, {"id": 65, "type": "=", "text": "=", "parent": 63, "children": [], "start_point": {"row": 9, "column": 24}, "end_point": {"row": 9, "column": 25}}, {"id": 66, "type": "call_expression", "text": "JS_GetException(ctx)", "parent": 63, "children": [67, 68], "start_point": {"row": 9, "column": 26}, "end_point": {"row": 9, "column": 46}}, {"id": 67, "type": "identifier", "text": "JS_GetException", "parent": 66, "children": [], "start_point": {"row": 9, "column": 26}, "end_point": {"row": 9, "column": 41}}, {"id": 68, "type": "argument_list", "text": "(ctx)", "parent": 66, "children": [69], "start_point": {"row": 9, "column": 41}, "end_point": {"row": 9, "column": 46}}, {"id": 69, "type": "identifier", "text": "ctx", "parent": 68, "children": [], "start_point": {"row": 9, "column": 42}, "end_point": {"row": 9, "column": 45}}, {"id": 70, "type": "return_statement", "text": "return JS_ToCString(ctx, realException);", "parent": 55, "children": [71], "start_point": {"row": 10, "column": 2}, "end_point": {"row": 10, "column": 42}}, {"id": 71, "type": "call_expression", "text": "JS_ToCString(ctx, realException)", "parent": 70, "children": [72, 73], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 41}}, {"id": 72, "type": "identifier", "text": "JS_ToCString", "parent": 71, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 21}}, {"id": 73, "type": "argument_list", "text": "(ctx, realException)", "parent": 71, "children": [74, 75], "start_point": {"row": 10, "column": 21}, "end_point": {"row": 10, "column": 41}}, {"id": 74, "type": "identifier", "text": "ctx", "parent": 73, "children": [], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 25}}, {"id": 75, "type": "identifier", "text": "realException", "parent": 73, "children": [], "start_point": {"row": 10, "column": 27}, "end_point": {"row": 10, "column": 40}}, {"id": 76, "type": "declaration", "text": "JSValue json = JS_JSONStringify(ctx, result, JS_UNDEFINED, JS_UNDEFINED);", "parent": 6, "children": [77, 78], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 74}}, {"id": 77, "type": "type_identifier", "text": "JSValue", "parent": 76, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 8}}, {"id": 78, "type": "init_declarator", "text": "json = JS_JSONStringify(ctx, result, JS_UNDEFINED, JS_UNDEFINED)", "parent": 76, "children": [79, 80, 81], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 73}}, {"id": 79, "type": "identifier", "text": "json", "parent": 78, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 13}}, {"id": 80, "type": "=", "text": "=", "parent": 78, "children": [], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 15}}, {"id": 81, "type": "call_expression", "text": "JS_JSONStringify(ctx, result, JS_UNDEFINED, JS_UNDEFINED)", "parent": 78, "children": [82, 83], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 73}}, {"id": 82, "type": "identifier", "text": "JS_JSONStringify", "parent": 81, "children": [], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 32}}, {"id": 83, "type": "argument_list", "text": "(ctx, result, JS_UNDEFINED, JS_UNDEFINED)", "parent": 81, "children": [84, 85, 86, 87], "start_point": {"row": 12, "column": 32}, "end_point": {"row": 12, "column": 73}}, {"id": 84, "type": "identifier", "text": "ctx", "parent": 83, "children": [], "start_point": {"row": 12, "column": 33}, "end_point": {"row": 12, "column": 36}}, {"id": 85, "type": "identifier", "text": "result", "parent": 83, "children": [], "start_point": {"row": 12, "column": 38}, "end_point": {"row": 12, "column": 44}}, {"id": 86, "type": "identifier", "text": "JS_UNDEFINED", "parent": 83, "children": [], "start_point": {"row": 12, "column": 46}, "end_point": {"row": 12, "column": 58}}, {"id": 87, "type": "identifier", "text": "JS_UNDEFINED", "parent": 83, "children": [], "start_point": {"row": 12, "column": 60}, "end_point": {"row": 12, "column": 72}}, {"id": 88, "type": "call_expression", "text": "JS_FreeValue(ctx, result)", "parent": 6, "children": [89, 90], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 26}}, {"id": 89, "type": "identifier", "text": "JS_FreeValue", "parent": 88, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 13}}, {"id": 90, "type": "argument_list", "text": "(ctx, result)", "parent": 88, "children": [91, 92], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 26}}, {"id": 91, "type": "identifier", "text": "ctx", "parent": 90, "children": [], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 17}}, {"id": 92, "type": "identifier", "text": "result", "parent": 90, "children": [], "start_point": {"row": 13, "column": 19}, "end_point": {"row": 13, "column": 25}}, {"id": 93, "type": "return_statement", "text": "return JS_ToCString(ctx, json);", "parent": 6, "children": [94], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 32}}, {"id": 94, "type": "call_expression", "text": "JS_ToCString(ctx, json)", "parent": 93, "children": [95, 96], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 31}}, {"id": 95, "type": "identifier", "text": "JS_ToCString", "parent": 94, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 20}}, {"id": 96, "type": "argument_list", "text": "(ctx, json)", "parent": 94, "children": [97, 98], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 31}}, {"id": 97, "type": "identifier", "text": "ctx", "parent": 96, "children": [], "start_point": {"row": 14, "column": 21}, "end_point": {"row": 14, "column": 24}}, {"id": 98, "type": "identifier", "text": "json", "parent": 96, "children": [], "start_point": {"row": 14, "column": 26}, "end_point": {"row": 14, "column": 30}}]}, "node_categories": {"declarations": {"functions": [6, 10], "variables": [13, 18, 28, 39, 61, 76], "classes": [], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [25, 35, 44, 49, 56, 57, 66, 71, 81, 88, 94], "assignments": [], "loops": [], "conditionals": [11, 17, 19, 23, 26, 29, 33, 36, 38, 40, 42, 45, 47, 48, 50, 52, 54, 55, 58, 60, 62, 64, 67, 69, 72, 74, 75, 77, 79, 82, 84, 85, 86, 87, 89, 91, 92, 95, 97, 98], "returns": [70, 93], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 53], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "unknown", "text_snippet": "const char* eval(const char* str) {\n\tJSRuntime* runtime = JS_NewRuntime();\n\tJSContext* ctx = JS_NewC"}, {"node_id": 10, "universal_type": "function", "name": "unknown", "text_snippet": "eval(const char* str)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <string.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"quickjs.h\"\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#include <string.h>\n#include \"quickjs.h\"\n\nconst char* eval(const char* str) {\n\tJSRuntime* runtime = JS_NewRuntime();\n\tJSContext* ctx = JS_NewContext(runtime);\n\tJSValue result =\n\t JS_Eval(ctx, str, strlen(str), \"<evalScript>\", JS_EVAL_TYPE_GLOBAL);\n\tif (JS_IsException(result)) {\n\t\tJSValue realException = JS_GetException(ctx);\n\t\treturn JS_ToCString(ctx, realException);\n\t}\n\tJSValue json = JS_JSONStringify(ctx, result, JS_UNDEFINED, JS_UNDEFINED);\n\tJS_FreeValue(ctx, result);\n\treturn JS_ToCString(ctx, json);\n}"}
| 81,206
|
c
|
//
// BasicA.h
// TechmasterApp
//
// Created by techmaster on 9/7/14.
// Copyright (c) 2014 Techmaster. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "ConsoleScreen.h"
@interface BasicA : ConsoleScreen
@end
| 19.18
| 11
|
(translation_unit) "//\n// BasicA.h\n// TechmasterApp\n//\n// Created by techmaster on 9/7/14.\n// Copyright (c) 2014 Techmaster. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n#import "ConsoleScreen.h"\n@interface BasicA : ConsoleScreen\n\n@end\n"
(comment) "//"
(comment) "// BasicA.h"
(comment) "// TechmasterApp"
(comment) "//"
(comment) "// Created by techmaster on 9/7/14."
(comment) "// Copyright (c) 2014 Techmaster. All rights reserved."
(comment) "//"
(preproc_call) "#import <UIKit/UIKit.h>\n"
(preproc_directive) "#import"
(preproc_arg) "<UIKit/UIKit.h>"
(preproc_call) "#import "ConsoleScreen.h"\n"
(preproc_directive) "#import"
(preproc_arg) ""ConsoleScreen.h""
(ERROR) "@"
(ERROR) "@"
(declaration) "interface BasicA : ConsoleScreen\n\n@end"
(type_identifier) "interface"
(ERROR) "BasicA : ConsoleScreen\n\n@"
(identifier) "BasicA"
(:) ":"
(identifier) "ConsoleScreen"
(ERROR) "@"
(identifier) "end"
(;) ""
| 25
| 4
|
{"language": "c", "success": true, "metadata": {"lines": 11, "avg_line_length": 19.18, "nodes": 14, "errors": 0, "source_hash": "f722a8b5d50f4af08714f0d1aaa41a1e329a05d1370b7a765ef228e07314de07", "categorized_nodes": 6}, "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 \"ConsoleScreen.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": "\"ConsoleScreen.h\"", "parent": 3, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 25}}, {"id": 6, "type": "ERROR", "text": "@", "parent": null, "children": [7], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 7, "type": "ERROR", "text": "@", "parent": 6, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 8, "type": "declaration", "text": "interface BasicA : ConsoleScreen\n\n@end", "parent": null, "children": [9, 10], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 12, "column": 4}}, {"id": 9, "type": "type_identifier", "text": "interface", "parent": 8, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 10}}, {"id": 10, "type": "ERROR", "text": "BasicA : ConsoleScreen\n\n@", "parent": 8, "children": [11, 12, 13], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 12, "column": 1}}, {"id": 11, "type": "identifier", "text": "BasicA", "parent": 10, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 17}}, {"id": 12, "type": "identifier", "text": "ConsoleScreen", "parent": 10, "children": [], "start_point": {"row": 10, "column": 20}, "end_point": {"row": 10, "column": 33}}, {"id": 13, "type": "ERROR", "text": "@", "parent": 10, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}]}, "node_categories": {"declarations": {"functions": [], "variables": [8], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [9, 11, 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// BasicA.h\n// TechmasterApp\n//\n// Created by techmaster on 9/7/14.\n// Copyright (c) 2014 Techmaster. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n#import \"ConsoleScreen.h\"\n@interface BasicA : ConsoleScreen\n\n@end\n"}
| 81,207
|
c
|
/* -*- C++ -*- */
// Notify_Lookup_Command.h,v 1.2 2000/08/30 01:29:00 pradeep Exp
//
// ============================================================================
//
// = LIBRARY
// ORBSVCS Notification
//
// = FILENAME
// Notify_Lookup_Command.h
//
// = DESCRIPTION
// Command object for looking up subscriptions for a given event.
//
// = AUTHOR
// <NAME> <<EMAIL>>
//
// ============================================================================
#ifndef TAO_NOTIFY_LOOKUP_COMMAND_H
#define TAO_NOTIFY_LOOKUP_COMMAND_H
#include "ace/pre.h"
#include "orbsvcs/ESF/ESF_Worker.h"
#include "Notify_Command.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
class TAO_Notify_Event;
class TAO_Notify_EventListener;
class TAO_Notify_Event_Map;
class TAO_Notify_Export TAO_Notify_Lookup_Command : public TAO_Notify_Command, public TAO_ESF_Worker<TAO_Notify_EventListener>
{
// = TITLE
// TAO_Notify_Lookup_Command
//
// = DESCRIPTION
// Command object for event subscription lookup in the event map.
//
public:
// = Initialization and termination code
TAO_Notify_Lookup_Command (TAO_Notify_Event_Processor* event_processor, TAO_Notify_Event* event, TAO_Notify_Event_Map* event_map);
~TAO_Notify_Lookup_Command ();
virtual int execute (CORBA::Environment&);
// Command callback
// = TAO_ESF_Worker method
void work (TAO_Notify_EventListener* listener, CORBA::Environment &ACE_TRY_ENV);
protected:
// = Data member
TAO_Notify_Event_Map* event_map_;
// The event map to lookup in.
};
#include "ace/post.h"
#endif /* TAO_NOTIFY_LOOKUP_COMMAND_H */
| 26.79
| 61
|
(translation_unit) "/* -*- C++ -*- */
\n// Notify_Lookup_Command.h,v 1.2 2000/08/30 01:29:00 pradeep Exp
\n//
\n// ============================================================================
\n//
\n// = LIBRARY
\n// ORBSVCS Notification
\n//
\n// = FILENAME
\n// Notify_Lookup_Command.h
\n//
\n// = DESCRIPTION
\n// Command object for looking up subscriptions for a given event.
\n//
\n// = AUTHOR
\n// <NAME> <<EMAIL>>
\n//
\n// ============================================================================
\n
\n#ifndef TAO_NOTIFY_LOOKUP_COMMAND_H
\n#define TAO_NOTIFY_LOOKUP_COMMAND_H
\n
\n#include "ace/pre.h"
\n#include "orbsvcs/ESF/ESF_Worker.h"
\n#include "Notify_Command.h"
\n
\n#if !defined (ACE_LACKS_PRAGMA_ONCE)
\n# pragma once
\n#endif /* ACE_LACKS_PRAGMA_ONCE */
\n
\nclass TAO_Notify_Event;
\nclass TAO_Notify_EventListener;
\nclass TAO_Notify_Event_Map;
\n
\nclass TAO_Notify_Export TAO_Notify_Lookup_Command : public TAO_Notify_Command, public TAO_ESF_Worker<TAO_Notify_EventListener>
\n{
\n // = TITLE
\n // TAO_Notify_Lookup_Command
\n //
\n // = DESCRIPTION
\n // Command object for event subscription lookup in the event map.
\n //
\n public:
\n // = Initialization and termination code
\n TAO_Notify_Lookup_Command (TAO_Notify_Event_Processor* event_processor, TAO_Notify_Event* event, TAO_Notify_Event_Map* event_map);
\n
\n ~TAO_Notify_Lookup_Command ();
\n
\n virtual int execute (CORBA::Environment&);
\n // Command callback
\n
\n // = TAO_ESF_Worker method
\n void work (TAO_Notify_EventListener* listener, CORBA::Environment &ACE_TRY_ENV);
\n protected:
\n // = Data member
\n TAO_Notify_Event_Map* event_map_;
\n // The event map to lookup in.
\n};
\n
\n#include "ace/post.h"
\n#endif /* TAO_NOTIFY_LOOKUP_COMMAND_H */
\n"
(comment) "/* -*- C++ -*- */"
(comment) "// Notify_Lookup_Command.h,v 1.2 2000/08/30 01:29:00 pradeep Exp
"
(comment) "//
"
(comment) "// ============================================================================
"
(comment) "//
"
(comment) "// = LIBRARY
"
(comment) "// ORBSVCS Notification
"
(comment) "//
"
(comment) "// = FILENAME
"
(comment) "// Notify_Lookup_Command.h
"
(comment) "//
"
(comment) "// = DESCRIPTION
"
(comment) "// Command object for looking up subscriptions for a given event.
"
(comment) "//
"
(comment) "// = AUTHOR
"
(comment) "// <NAME> <<EMAIL>>
"
(comment) "//
"
(comment) "// ============================================================================
"
(preproc_ifdef) "#ifndef TAO_NOTIFY_LOOKUP_COMMAND_H
\n#define TAO_NOTIFY_LOOKUP_COMMAND_H
\n
\n#include "ace/pre.h"
\n#include "orbsvcs/ESF/ESF_Worker.h"
\n#include "Notify_Command.h"
\n
\n#if !defined (ACE_LACKS_PRAGMA_ONCE)
\n# pragma once
\n#endif /* ACE_LACKS_PRAGMA_ONCE */
\n
\nclass TAO_Notify_Event;
\nclass TAO_Notify_EventListener;
\nclass TAO_Notify_Event_Map;
\n
\nclass TAO_Notify_Export TAO_Notify_Lookup_Command : public TAO_Notify_Command, public TAO_ESF_Worker<TAO_Notify_EventListener>
\n{
\n // = TITLE
\n // TAO_Notify_Lookup_Command
\n //
\n // = DESCRIPTION
\n // Command object for event subscription lookup in the event map.
\n //
\n public:
\n // = Initialization and termination code
\n TAO_Notify_Lookup_Command (TAO_Notify_Event_Processor* event_processor, TAO_Notify_Event* event, TAO_Notify_Event_Map* event_map);
\n
\n ~TAO_Notify_Lookup_Command ();
\n
\n virtual int execute (CORBA::Environment&);
\n // Command callback
\n
\n // = TAO_ESF_Worker method
\n void work (TAO_Notify_EventListener* listener, CORBA::Environment &ACE_TRY_ENV);
\n protected:
\n // = Data member
\n TAO_Notify_Event_Map* event_map_;
\n // The event map to lookup in.
\n};
\n
\n#include "ace/post.h"
\n#endif"
(#ifndef) "#ifndef"
(identifier) "TAO_NOTIFY_LOOKUP_COMMAND_H"
(preproc_def) "#define TAO_NOTIFY_LOOKUP_COMMAND_H
\n"
(#define) "#define"
(identifier) "TAO_NOTIFY_LOOKUP_COMMAND_H"
(preproc_include) "#include "ace/pre.h"
\n"
(#include) "#include"
(string_literal) ""ace/pre.h""
(") """
(string_content) "ace/pre.h"
(") """
(preproc_include) "#include "orbsvcs/ESF/ESF_Worker.h"
\n"
(#include) "#include"
(string_literal) ""orbsvcs/ESF/ESF_Worker.h""
(") """
(string_content) "orbsvcs/ESF/ESF_Worker.h"
(") """
(preproc_include) "#include "Notify_Command.h"
\n"
(#include) "#include"
(string_literal) ""Notify_Command.h""
(") """
(string_content) "Notify_Command.h"
(") """
(preproc_if) "#if !defined (ACE_LACKS_PRAGMA_ONCE)
\n# pragma once
\n#endif"
(#if) "#if"
(unary_expression) "!defined (ACE_LACKS_PRAGMA_ONCE)"
(!) "!"
(preproc_defined) "defined (ACE_LACKS_PRAGMA_ONCE)"
(defined) "defined"
(() "("
(identifier) "ACE_LACKS_PRAGMA_ONCE"
()) ")"
(
) "\n"
(preproc_call) "# pragma once
\n"
(preproc_directive) "# pragma"
(preproc_arg) "once
"
(#endif) "#endif"
(comment) "/* ACE_LACKS_PRAGMA_ONCE */"
(declaration) "class TAO_Notify_Event;"
(type_identifier) "class"
(identifier) "TAO_Notify_Event"
(;) ";"
(declaration) "class TAO_Notify_EventListener;"
(type_identifier) "class"
(identifier) "TAO_Notify_EventListener"
(;) ";"
(declaration) "class TAO_Notify_Event_Map;"
(type_identifier) "class"
(identifier) "TAO_Notify_Event_Map"
(;) ";"
(declaration) "class TAO_Notify_Export"
(type_identifier) "class"
(identifier) "TAO_Notify_Export"
(;) ""
(labeled_statement) "TAO_Notify_Lookup_Command : public TAO_Notify_Command, public TAO_ESF_Worker<TAO_Notify_EventListener>
\n{
\n // = TITLE
\n // TAO_Notify_Lookup_Command
\n //
\n // = DESCRIPTION
\n // Command object for event subscription lookup in the event map.
\n //
\n public:
\n // = Initialization and termination code
\n TAO_Notify_Lookup_Command (TAO_Notify_Event_Processor* event_processor, TAO_Notify_Event* event, TAO_Notify_Event_Map* event_map);
\n
\n ~TAO_Notify_Lookup_Command ();
\n
\n virtual int execute (CORBA::Environment&);
\n // Command callback
\n
\n // = TAO_ESF_Worker method
\n void work (TAO_Notify_EventListener* listener, CORBA::Environment &ACE_TRY_ENV);
\n protected:
\n // = Data member
\n TAO_Notify_Event_Map* event_map_;
\n // The event map to lookup in.
\n}"
(statement_identifier) "TAO_Notify_Lookup_Command"
(:) ":"
(ERROR) "public TAO_Notify_Command, public TAO_ESF_Worker<TAO_Notify_EventListener>"
(type_identifier) "public"
(identifier) "TAO_Notify_Command"
(,) ","
(ERROR) "public TAO_ESF_Worker<"
(identifier) "public"
(identifier) "TAO_ESF_Worker"
(<) "<"
(identifier) "TAO_Notify_EventListener"
(>) ">"
(compound_statement) "{
\n // = TITLE
\n // TAO_Notify_Lookup_Command
\n //
\n // = DESCRIPTION
\n // Command object for event subscription lookup in the event map.
\n //
\n public:
\n // = Initialization and termination code
\n TAO_Notify_Lookup_Command (TAO_Notify_Event_Processor* event_processor, TAO_Notify_Event* event, TAO_Notify_Event_Map* event_map);
\n
\n ~TAO_Notify_Lookup_Command ();
\n
\n virtual int execute (CORBA::Environment&);
\n // Command callback
\n
\n // = TAO_ESF_Worker method
\n void work (TAO_Notify_EventListener* listener, CORBA::Environment &ACE_TRY_ENV);
\n protected:
\n // = Data member
\n TAO_Notify_Event_Map* event_map_;
\n // The event map to lookup in.
\n}"
({) "{"
(comment) "// = TITLE
"
(comment) "// TAO_Notify_Lookup_Command
"
(comment) "//
"
(comment) "// = DESCRIPTION
"
(comment) "// Command object for event subscription lookup in the event map.
"
(comment) "//
"
(labeled_statement) "public:
\n // = Initialization and termination code
\n TAO_Notify_Lookup_Command (TAO_Notify_Event_Processor* event_processor, TAO_Notify_Event* event, TAO_Notify_Event_Map* event_map);"
(statement_identifier) "public"
(:) ":"
(comment) "// = Initialization and termination code
"
(expression_statement) "TAO_Notify_Lookup_Command (TAO_Notify_Event_Processor* event_processor, TAO_Notify_Event* event, TAO_Notify_Event_Map* event_map);"
(call_expression) "TAO_Notify_Lookup_Command (TAO_Notify_Event_Processor* event_processor, TAO_Notify_Event* event, TAO_Notify_Event_Map* event_map)"
(identifier) "TAO_Notify_Lookup_Command"
(argument_list) "(TAO_Notify_Event_Processor* event_processor, TAO_Notify_Event* event, TAO_Notify_Event_Map* event_map)"
(() "("
(binary_expression) "TAO_Notify_Event_Processor* event_processor"
(identifier) "TAO_Notify_Event_Processor"
(*) "*"
(identifier) "event_processor"
(,) ","
(binary_expression) "TAO_Notify_Event* event"
(identifier) "TAO_Notify_Event"
(*) "*"
(identifier) "event"
(,) ","
(binary_expression) "TAO_Notify_Event_Map* event_map"
(identifier) "TAO_Notify_Event_Map"
(*) "*"
(identifier) "event_map"
()) ")"
(;) ";"
(expression_statement) "~TAO_Notify_Lookup_Command ();"
(unary_expression) "~TAO_Notify_Lookup_Command ()"
(~) "~"
(call_expression) "TAO_Notify_Lookup_Command ()"
(identifier) "TAO_Notify_Lookup_Command"
(argument_list) "()"
(() "("
()) ")"
(;) ";"
(declaration) "virtual int execute (CORBA::Environment&);"
(type_identifier) "virtual"
(ERROR) "int"
(identifier) "int"
(function_declarator) "execute (CORBA::Environment&)"
(identifier) "execute"
(parameter_list) "(CORBA::Environment&)"
(() "("
(parameter_declaration) "CORBA::Environment"
(type_identifier) "CORBA"
(ERROR) "::"
(:) ":"
(:) ":"
(identifier) "Environment"
(ERROR) "&"
(&) "&"
()) ")"
(;) ";"
(comment) "// Command callback
"
(comment) "// = TAO_ESF_Worker method
"
(declaration) "void work (TAO_Notify_EventListener* listener, CORBA::Environment &ACE_TRY_ENV);"
(primitive_type) "void"
(function_declarator) "work (TAO_Notify_EventListener* listener, CORBA::Environment &ACE_TRY_ENV)"
(identifier) "work"
(parameter_list) "(TAO_Notify_EventListener* listener, CORBA::Environment &ACE_TRY_ENV)"
(() "("
(parameter_declaration) "TAO_Notify_EventListener* listener"
(type_identifier) "TAO_Notify_EventListener"
(pointer_declarator) "* listener"
(*) "*"
(identifier) "listener"
(,) ","
(parameter_declaration) "CORBA::Environment &ACE_TRY_ENV"
(type_identifier) "CORBA"
(ERROR) "::Environment &"
(:) ":"
(:) ":"
(identifier) "Environment"
(&) "&"
(identifier) "ACE_TRY_ENV"
()) ")"
(;) ";"
(labeled_statement) "protected:
\n // = Data member
\n TAO_Notify_Event_Map* event_map_;"
(statement_identifier) "protected"
(:) ":"
(comment) "// = Data member
"
(declaration) "TAO_Notify_Event_Map* event_map_;"
(type_identifier) "TAO_Notify_Event_Map"
(pointer_declarator) "* event_map_"
(*) "*"
(identifier) "event_map_"
(;) ";"
(comment) "// The event map to lookup in.
"
(}) "}"
(expression_statement) ";"
(;) ";"
(preproc_include) "#include "ace/post.h"
\n"
(#include) "#include"
(string_literal) ""ace/post.h""
(") """
(string_content) "ace/post.h"
(") """
(#endif) "#endif"
(comment) "/* TAO_NOTIFY_LOOKUP_COMMAND_H */"
| 193
| 6
|
{"language": "c", "success": true, "metadata": {"lines": 61, "avg_line_length": 26.79, "nodes": 100, "errors": 0, "source_hash": "3faf61f343f0ed407068966acfe38717f19bc484a6ed898217c7383ff87db5ed", "categorized_nodes": 70}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef TAO_NOTIFY_LOOKUP_COMMAND_H\r\n#define TAO_NOTIFY_LOOKUP_COMMAND_H\r\n\r\n#include \"ace/pre.h\"\r\n#include \"orbsvcs/ESF/ESF_Worker.h\"\r\n#include \"Notify_Command.h\"\r\n\r\n#if !defined (ACE_LACKS_PRAGMA_ONCE)\r\n# pragma once\r\n#endif /* ACE_LACKS_PRAGMA_ONCE */\r\n\r\nclass TAO_Notify_Event;\r\nclass TAO_Notify_EventListener;\r\nclass TAO_Notify_Event_Map;\r\n\r\nclass TAO_Notify_Export TAO_Notify_Lookup_Command : public TAO_Notify_Command, public TAO_ESF_Worker<TAO_Notify_EventListener>\r\n{\r\n // = TITLE\r\n // TAO_Notify_Lookup_Command\r\n //\r\n // = DESCRIPTION\r\n // Command object for event subscription lookup in the event map.\r\n //\r\n public:\r\n // = Initialization and termination code\r\n TAO_Notify_Lookup_Command (TAO_Notify_Event_Processor* event_processor, TAO_Notify_Event* event, TAO_Notify_Event_Map* event_map);\r\n\r\n ~TAO_Notify_Lookup_Command ();\r\n\r\n virtual int execute (CORBA::Environment&);\r\n // Command callback\r\n\r\n // = TAO_ESF_Worker method\r\n void work (TAO_Notify_EventListener* listener, CORBA::Environment &ACE_TRY_ENV);\r\n protected:\r\n // = Data member\r\n TAO_Notify_Event_Map* event_map_;\r\n // The event map to lookup in.\r\n};\r\n\r\n#include \"ace/post.h\"\r\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 27, 29, 31, 33, 35, 96, 99], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 60, "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": "TAO_NOTIFY_LOOKUP_COMMAND_H", "parent": 0, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 35}}, {"id": 3, "type": "preproc_def", "text": "#define TAO_NOTIFY_LOOKUP_COMMAND_H\r\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": "TAO_NOTIFY_LOOKUP_COMMAND_H", "parent": 3, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 35}}, {"id": 6, "type": "preproc_include", "text": "#include \"ace/pre.h\"\r\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": "string_literal", "text": "\"ace/pre.h\"", "parent": 6, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 20}}, {"id": 9, "type": "preproc_include", "text": "#include \"orbsvcs/ESF/ESF_Worker.h\"\r\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": "string_literal", "text": "\"orbsvcs/ESF/ESF_Worker.h\"", "parent": 9, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 35}}, {"id": 12, "type": "preproc_include", "text": "#include \"Notify_Command.h\"\r\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": "string_literal", "text": "\"Notify_Command.h\"", "parent": 12, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 27}}, {"id": 15, "type": "preproc_if", "text": "#if !defined (ACE_LACKS_PRAGMA_ONCE)\r\n# pragma once\r\n#endif", "parent": 0, "children": [16, 17, 22, 23, 26], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 28, "column": 6}}, {"id": 16, "type": "#if", "text": "#if", "parent": 15, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 3}}, {"id": 17, "type": "unary_expression", "text": "!defined (ACE_LACKS_PRAGMA_ONCE)", "parent": 15, "children": [18, 19], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 36}}, {"id": 18, "type": "!", "text": "!", "parent": 17, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 5}}, {"id": 19, "type": "preproc_defined", "text": "defined (ACE_LACKS_PRAGMA_ONCE)", "parent": 17, "children": [20, 21], "start_point": {"row": 26, "column": 5}, "end_point": {"row": 26, "column": 36}}, {"id": 20, "type": "defined", "text": "defined", "parent": 19, "children": [], "start_point": {"row": 26, "column": 5}, "end_point": {"row": 26, "column": 12}}, {"id": 21, "type": "identifier", "text": "ACE_LACKS_PRAGMA_ONCE", "parent": 19, "children": [], "start_point": {"row": 26, "column": 14}, "end_point": {"row": 26, "column": 35}}, {"id": 22, "type": "\n", "text": "\n", "parent": 15, "children": [], "start_point": {"row": 26, "column": 37}, "end_point": {"row": 27, "column": 0}}, {"id": 23, "type": "preproc_call", "text": "# pragma once\r\n", "parent": 15, "children": [24, 25], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 24, "type": "preproc_directive", "text": "# pragma", "parent": 23, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 8}}, {"id": 25, "type": "preproc_arg", "text": "once\r", "parent": 23, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 14}}, {"id": 26, "type": "#endif", "text": "#endif", "parent": 15, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 6}}, {"id": 27, "type": "declaration", "text": "class TAO_Notify_Event;", "parent": 0, "children": [28], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 23}}, {"id": 28, "type": "identifier", "text": "TAO_Notify_Event", "parent": 27, "children": [], "start_point": {"row": 30, "column": 6}, "end_point": {"row": 30, "column": 22}}, {"id": 29, "type": "declaration", "text": "class TAO_Notify_EventListener;", "parent": 0, "children": [30], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 31}}, {"id": 30, "type": "identifier", "text": "TAO_Notify_EventListener", "parent": 29, "children": [], "start_point": {"row": 31, "column": 6}, "end_point": {"row": 31, "column": 30}}, {"id": 31, "type": "declaration", "text": "class TAO_Notify_Event_Map;", "parent": 0, "children": [32], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 27}}, {"id": 32, "type": "identifier", "text": "TAO_Notify_Event_Map", "parent": 31, "children": [], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 26}}, {"id": 33, "type": "declaration", "text": "class TAO_Notify_Export", "parent": 0, "children": [34], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 23}}, {"id": 34, "type": "identifier", "text": "TAO_Notify_Export", "parent": 33, "children": [], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 23}}, {"id": 35, "type": "labeled_statement", "text": "TAO_Notify_Lookup_Command : public TAO_Notify_Command, public TAO_ESF_Worker<TAO_Notify_EventListener>\r\n{\r\n // = TITLE\r\n // TAO_Notify_Lookup_Command\r\n //\r\n // = DESCRIPTION\r\n // Command object for event subscription lookup in the event map.\r\n //\r\n public:\r\n // = Initialization and termination code\r\n TAO_Notify_Lookup_Command (TAO_Notify_Event_Processor* event_processor, TAO_Notify_Event* event, TAO_Notify_Event_Map* event_map);\r\n\r\n ~TAO_Notify_Lookup_Command ();\r\n\r\n virtual int execute (CORBA::Environment&);\r\n // Command callback\r\n\r\n // = TAO_ESF_Worker method\r\n void work (TAO_Notify_EventListener* listener, CORBA::Environment &ACE_TRY_ENV);\r\n protected:\r\n // = Data member\r\n TAO_Notify_Event_Map* event_map_;\r\n // The event map to lookup in.\r\n}", "parent": 0, "children": [36, 37], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 57, "column": 1}}, {"id": 36, "type": "statement_identifier", "text": "TAO_Notify_Lookup_Command", "parent": 35, "children": [], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 34, "column": 49}}, {"id": 37, "type": "ERROR", "text": "public TAO_Notify_Command, public TAO_ESF_Worker<TAO_Notify_EventListener>", "parent": 35, "children": [38, 39, 42, 43], "start_point": {"row": 34, "column": 52}, "end_point": {"row": 34, "column": 126}}, {"id": 38, "type": "identifier", "text": "TAO_Notify_Command", "parent": 37, "children": [], "start_point": {"row": 34, "column": 59}, "end_point": {"row": 34, "column": 77}}, {"id": 39, "type": "ERROR", "text": "public TAO_ESF_Worker<", "parent": 37, "children": [40, 41], "start_point": {"row": 34, "column": 79}, "end_point": {"row": 34, "column": 101}}, {"id": 40, "type": "identifier", "text": "TAO_ESF_Worker", "parent": 39, "children": [], "start_point": {"row": 34, "column": 86}, "end_point": {"row": 34, "column": 100}}, {"id": 41, "type": "<", "text": "<", "parent": 39, "children": [], "start_point": {"row": 34, "column": 100}, "end_point": {"row": 34, "column": 101}}, {"id": 42, "type": "identifier", "text": "TAO_Notify_EventListener", "parent": 37, "children": [], "start_point": {"row": 34, "column": 101}, "end_point": {"row": 34, "column": 125}}, {"id": 43, "type": ">", "text": ">", "parent": 37, "children": [], "start_point": {"row": 34, "column": 125}, "end_point": {"row": 34, "column": 126}}, {"id": 44, "type": "labeled_statement", "text": "public:\r\n // = Initialization and termination code\r\n TAO_Notify_Lookup_Command (TAO_Notify_Event_Processor* event_processor, TAO_Notify_Event* event, TAO_Notify_Event_Map* event_map);", "parent": 35, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 44, "column": 132}}, {"id": 45, "type": "call_expression", "text": "TAO_Notify_Lookup_Command (TAO_Notify_Event_Processor* event_processor, TAO_Notify_Event* event, TAO_Notify_Event_Map* event_map)", "parent": 44, "children": [46, 47], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 131}}, {"id": 46, "type": "identifier", "text": "TAO_Notify_Lookup_Command", "parent": 45, "children": [], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 27}}, {"id": 47, "type": "argument_list", "text": "(TAO_Notify_Event_Processor* event_processor, TAO_Notify_Event* event, TAO_Notify_Event_Map* event_map)", "parent": 45, "children": [48, 52, 56], "start_point": {"row": 44, "column": 28}, "end_point": {"row": 44, "column": 131}}, {"id": 48, "type": "binary_expression", "text": "TAO_Notify_Event_Processor* event_processor", "parent": 47, "children": [49, 50, 51], "start_point": {"row": 44, "column": 29}, "end_point": {"row": 44, "column": 72}}, {"id": 49, "type": "identifier", "text": "TAO_Notify_Event_Processor", "parent": 48, "children": [], "start_point": {"row": 44, "column": 29}, "end_point": {"row": 44, "column": 55}}, {"id": 50, "type": "*", "text": "*", "parent": 48, "children": [], "start_point": {"row": 44, "column": 55}, "end_point": {"row": 44, "column": 56}}, {"id": 51, "type": "identifier", "text": "event_processor", "parent": 48, "children": [], "start_point": {"row": 44, "column": 57}, "end_point": {"row": 44, "column": 72}}, {"id": 52, "type": "binary_expression", "text": "TAO_Notify_Event* event", "parent": 47, "children": [53, 54, 55], "start_point": {"row": 44, "column": 74}, "end_point": {"row": 44, "column": 97}}, {"id": 53, "type": "identifier", "text": "TAO_Notify_Event", "parent": 52, "children": [], "start_point": {"row": 44, "column": 74}, "end_point": {"row": 44, "column": 90}}, {"id": 54, "type": "*", "text": "*", "parent": 52, "children": [], "start_point": {"row": 44, "column": 90}, "end_point": {"row": 44, "column": 91}}, {"id": 55, "type": "identifier", "text": "event", "parent": 52, "children": [], "start_point": {"row": 44, "column": 92}, "end_point": {"row": 44, "column": 97}}, {"id": 56, "type": "binary_expression", "text": "TAO_Notify_Event_Map* event_map", "parent": 47, "children": [57, 58, 59], "start_point": {"row": 44, "column": 99}, "end_point": {"row": 44, "column": 130}}, {"id": 57, "type": "identifier", "text": "TAO_Notify_Event_Map", "parent": 56, "children": [], "start_point": {"row": 44, "column": 99}, "end_point": {"row": 44, "column": 119}}, {"id": 58, "type": "*", "text": "*", "parent": 56, "children": [], "start_point": {"row": 44, "column": 119}, "end_point": {"row": 44, "column": 120}}, {"id": 59, "type": "identifier", "text": "event_map", "parent": 56, "children": [], "start_point": {"row": 44, "column": 121}, "end_point": {"row": 44, "column": 130}}, {"id": 60, "type": "unary_expression", "text": "~TAO_Notify_Lookup_Command ()", "parent": 35, "children": [61, 62], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 31}}, {"id": 61, "type": "~", "text": "~", "parent": 60, "children": [], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 3}}, {"id": 62, "type": "call_expression", "text": "TAO_Notify_Lookup_Command ()", "parent": 60, "children": [63, 64], "start_point": {"row": 46, "column": 3}, "end_point": {"row": 46, "column": 31}}, {"id": 63, "type": "identifier", "text": "TAO_Notify_Lookup_Command", "parent": 62, "children": [], "start_point": {"row": 46, "column": 3}, "end_point": {"row": 46, "column": 28}}, {"id": 64, "type": "argument_list", "text": "()", "parent": 62, "children": [], "start_point": {"row": 46, "column": 29}, "end_point": {"row": 46, "column": 31}}, {"id": 65, "type": "declaration", "text": "virtual int execute (CORBA::Environment&);", "parent": 35, "children": [66, 67, 69], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 44}}, {"id": 66, "type": "type_identifier", "text": "virtual", "parent": 65, "children": [], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 9}}, {"id": 67, "type": "ERROR", "text": "int", "parent": 65, "children": [68], "start_point": {"row": 48, "column": 10}, "end_point": {"row": 48, "column": 13}}, {"id": 68, "type": "identifier", "text": "int", "parent": 67, "children": [], "start_point": {"row": 48, "column": 10}, "end_point": {"row": 48, "column": 13}}, {"id": 69, "type": "function_declarator", "text": "execute (CORBA::Environment&)", "parent": 65, "children": [70, 71], "start_point": {"row": 48, "column": 14}, "end_point": {"row": 48, "column": 43}}, {"id": 70, "type": "identifier", "text": "execute", "parent": 69, "children": [], "start_point": {"row": 48, "column": 14}, "end_point": {"row": 48, "column": 21}}, {"id": 71, "type": "parameter_list", "text": "(CORBA::Environment&)", "parent": 69, "children": [72], "start_point": {"row": 48, "column": 22}, "end_point": {"row": 48, "column": 43}}, {"id": 72, "type": "parameter_declaration", "text": "CORBA::Environment", "parent": 71, "children": [73, 74], "start_point": {"row": 48, "column": 23}, "end_point": {"row": 48, "column": 41}}, {"id": 73, "type": "type_identifier", "text": "CORBA", "parent": 72, "children": [], "start_point": {"row": 48, "column": 23}, "end_point": {"row": 48, "column": 28}}, {"id": 74, "type": "identifier", "text": "Environment", "parent": 72, "children": [], "start_point": {"row": 48, "column": 30}, "end_point": {"row": 48, "column": 41}}, {"id": 75, "type": "declaration", "text": "void work (TAO_Notify_EventListener* listener, CORBA::Environment &ACE_TRY_ENV);", "parent": 35, "children": [76, 77], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 82}}, {"id": 76, "type": "primitive_type", "text": "void", "parent": 75, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 6}}, {"id": 77, "type": "function_declarator", "text": "work (TAO_Notify_EventListener* listener, CORBA::Environment &ACE_TRY_ENV)", "parent": 75, "children": [78, 79], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 81}}, {"id": 78, "type": "identifier", "text": "work", "parent": 77, "children": [], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 11}}, {"id": 79, "type": "parameter_list", "text": "(TAO_Notify_EventListener* listener, CORBA::Environment &ACE_TRY_ENV)", "parent": 77, "children": [80, 85], "start_point": {"row": 52, "column": 12}, "end_point": {"row": 52, "column": 81}}, {"id": 80, "type": "parameter_declaration", "text": "TAO_Notify_EventListener* listener", "parent": 79, "children": [81, 82], "start_point": {"row": 52, "column": 13}, "end_point": {"row": 52, "column": 47}}, {"id": 81, "type": "type_identifier", "text": "TAO_Notify_EventListener", "parent": 80, "children": [], "start_point": {"row": 52, "column": 13}, "end_point": {"row": 52, "column": 37}}, {"id": 82, "type": "pointer_declarator", "text": "* listener", "parent": 80, "children": [83, 84], "start_point": {"row": 52, "column": 37}, "end_point": {"row": 52, "column": 47}}, {"id": 83, "type": "*", "text": "*", "parent": 82, "children": [], "start_point": {"row": 52, "column": 37}, "end_point": {"row": 52, "column": 38}}, {"id": 84, "type": "identifier", "text": "listener", "parent": 82, "children": [], "start_point": {"row": 52, "column": 39}, "end_point": {"row": 52, "column": 47}}, {"id": 85, "type": "parameter_declaration", "text": "CORBA::Environment &ACE_TRY_ENV", "parent": 79, "children": [86, 87, 89], "start_point": {"row": 52, "column": 49}, "end_point": {"row": 52, "column": 80}}, {"id": 86, "type": "type_identifier", "text": "CORBA", "parent": 85, "children": [], "start_point": {"row": 52, "column": 49}, "end_point": {"row": 52, "column": 54}}, {"id": 87, "type": "ERROR", "text": "::Environment &", "parent": 85, "children": [88], "start_point": {"row": 52, "column": 54}, "end_point": {"row": 52, "column": 69}}, {"id": 88, "type": "identifier", "text": "Environment", "parent": 87, "children": [], "start_point": {"row": 52, "column": 56}, "end_point": {"row": 52, "column": 67}}, {"id": 89, "type": "identifier", "text": "ACE_TRY_ENV", "parent": 85, "children": [], "start_point": {"row": 52, "column": 69}, "end_point": {"row": 52, "column": 80}}, {"id": 90, "type": "labeled_statement", "text": "protected:\r\n // = Data member\r\n TAO_Notify_Event_Map* event_map_;", "parent": 35, "children": [91], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 55, "column": 35}}, {"id": 91, "type": "declaration", "text": "TAO_Notify_Event_Map* event_map_;", "parent": 90, "children": [92, 93], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 35}}, {"id": 92, "type": "type_identifier", "text": "TAO_Notify_Event_Map", "parent": 91, "children": [], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 22}}, {"id": 93, "type": "pointer_declarator", "text": "* event_map_", "parent": 91, "children": [94, 95], "start_point": {"row": 55, "column": 22}, "end_point": {"row": 55, "column": 34}}, {"id": 94, "type": "*", "text": "*", "parent": 93, "children": [], "start_point": {"row": 55, "column": 22}, "end_point": {"row": 55, "column": 23}}, {"id": 95, "type": "identifier", "text": "event_map_", "parent": 93, "children": [], "start_point": {"row": 55, "column": 24}, "end_point": {"row": 55, "column": 34}}, {"id": 96, "type": "preproc_include", "text": "#include \"ace/post.h\"\r\n", "parent": 0, "children": [97, 98], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 60, "column": 0}}, {"id": 97, "type": "#include", "text": "#include", "parent": 96, "children": [], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 8}}, {"id": 98, "type": "string_literal", "text": "\"ace/post.h\"", "parent": 96, "children": [], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 21}}, {"id": 99, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 6}}]}, "node_categories": {"declarations": {"functions": [69, 77], "variables": [27, 29, 31, 33, 65, 72, 75, 80, 85, 91], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 96, 97], "modules": [], "enums": []}, "statements": {"expressions": [17, 45, 48, 52, 56, 60, 62], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 15, 16, 21, 26, 28, 30, 32, 34, 36, 38, 40, 42, 46, 49, 51, 53, 55, 57, 59, 63, 66, 68, 70, 73, 74, 78, 81, 84, 86, 88, 89, 92, 95, 99], "returns": [], "exceptions": []}, "expressions": {"calls": [23], "literals": [8, 11, 14, 98], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 69, "universal_type": "function", "name": "unknown", "text_snippet": "execute (CORBA::Environment&)"}, {"node_id": 77, "universal_type": "function", "name": "unknown", "text_snippet": "work (TAO_Notify_EventListener* listener, CORBA::Environment &ACE_TRY_ENV)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"ace/pre.h\"\r\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"orbsvcs/ESF/ESF_Worker.h\"\r\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"Notify_Command.h\"\r\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 96, "text": "#include \"ace/post.h\"\r\n"}, {"node_id": 97, "text": "#include"}]}, "original_source_code": "/* -*- C++ -*- */\r\n// Notify_Lookup_Command.h,v 1.2 2000/08/30 01:29:00 pradeep Exp\r\n//\r\n// ============================================================================\r\n//\r\n// = LIBRARY\r\n// ORBSVCS Notification\r\n//\r\n// = FILENAME\r\n// Notify_Lookup_Command.h\r\n//\r\n// = DESCRIPTION\r\n// Command object for looking up subscriptions for a given event.\r\n//\r\n// = AUTHOR\r\n// <NAME> <<EMAIL>>\r\n//\r\n// ============================================================================\r\n\r\n#ifndef TAO_NOTIFY_LOOKUP_COMMAND_H\r\n#define TAO_NOTIFY_LOOKUP_COMMAND_H\r\n\r\n#include \"ace/pre.h\"\r\n#include \"orbsvcs/ESF/ESF_Worker.h\"\r\n#include \"Notify_Command.h\"\r\n\r\n#if !defined (ACE_LACKS_PRAGMA_ONCE)\r\n# pragma once\r\n#endif /* ACE_LACKS_PRAGMA_ONCE */\r\n\r\nclass TAO_Notify_Event;\r\nclass TAO_Notify_EventListener;\r\nclass TAO_Notify_Event_Map;\r\n\r\nclass TAO_Notify_Export TAO_Notify_Lookup_Command : public TAO_Notify_Command, public TAO_ESF_Worker<TAO_Notify_EventListener>\r\n{\r\n // = TITLE\r\n // TAO_Notify_Lookup_Command\r\n //\r\n // = DESCRIPTION\r\n // Command object for event subscription lookup in the event map.\r\n //\r\n public:\r\n // = Initialization and termination code\r\n TAO_Notify_Lookup_Command (TAO_Notify_Event_Processor* event_processor, TAO_Notify_Event* event, TAO_Notify_Event_Map* event_map);\r\n\r\n ~TAO_Notify_Lookup_Command ();\r\n\r\n virtual int execute (CORBA::Environment&);\r\n // Command callback\r\n\r\n // = TAO_ESF_Worker method\r\n void work (TAO_Notify_EventListener* listener, CORBA::Environment &ACE_TRY_ENV);\r\n protected:\r\n // = Data member\r\n TAO_Notify_Event_Map* event_map_;\r\n // The event map to lookup in.\r\n};\r\n\r\n#include \"ace/post.h\"\r\n#endif /* TAO_NOTIFY_LOOKUP_COMMAND_H */\r\n"}
| 81,208
|
c
|
#ifndef __WISEGROUNDTRUTH_READER_H__
#define __WISEGROUNDTRUTH_READER_H__
#include <stdio.h>
#include <vector>
#include <map>
#define MAX_LINE 512
struct target_detection_t {
int target_id;
double bb_x_tl,bb_y_tl,bb_x_br,bb_y_br; //image plane coordinates (2D bounding box)
double Xw,Yw,Zw; //world coordinates (3D point)
public:
target_detection_t() : target_id(0), bb_x_tl(0), bb_y_tl(0), bb_x_br(0), bb_y_br(0), Xw(0), Yw(0), Zw(0) {} ;
target_detection_t(double tid, double bb_x_tl,double bb_y_tl,double bb_x_br,double bb_y_br,double Xw,double Yw,double Zw) : target_id(tid), bb_x_tl(bb_x_tl), bb_y_tl(bb_y_tl), bb_x_br(bb_x_br), bb_y_br(bb_y_br), Xw(Xw), Yw(Yw), Zw(Zw) {} ;
};
class WiseGTreader
{
char _filename[255];
FILE *_filePtr;
bool _gt_common_all_cameras;
char _lineFormat[255];
//ground-truth format <frame,detections>
std::map<int,std::vector<target_detection_t>> m;
public:
WiseGTreader();
~WiseGTreader();
int parsefile(const char *filename,const char * format);
std::map<int,std::vector<target_detection_t>>* getData(){return &m;};
/* int getProperty(const char *name, char *valor);
int getProperty(const char *name, int *valor);
int getProperty(const char *name, long *valor);
int getProperty(const char *name, double *valor);
int getProperty(const char *name, float *value);
void readLines();
int setProperty(const char *name, char *valor);
int setProperty(const char *name, int valor);
int setProperty(const char *name, long valor);
int setProperty(const char *name, double value);
*/
};
#endif // __WISEGROUNDTRUTH_READER_H__
| 37.51
| 43
|
(translation_unit) "#ifndef __WISEGROUNDTRUTH_READER_H__\n#define __WISEGROUNDTRUTH_READER_H__\n\n#include <stdio.h>\n#include <vector>\n#include <map>\n\n#define MAX_LINE 512\n\n\nstruct target_detection_t {\n int target_id;\n double bb_x_tl,bb_y_tl,bb_x_br,bb_y_br; //image plane coordinates (2D bounding box)\n double Xw,Yw,Zw; //world coordinates (3D point)\npublic:\n target_detection_t() : target_id(0), bb_x_tl(0), bb_y_tl(0), bb_x_br(0), bb_y_br(0), Xw(0), Yw(0), Zw(0) {} ;\n target_detection_t(double tid, double bb_x_tl,double bb_y_tl,double bb_x_br,double bb_y_br,double Xw,double Yw,double Zw) : target_id(tid), bb_x_tl(bb_x_tl), bb_y_tl(bb_y_tl), bb_x_br(bb_x_br), bb_y_br(bb_y_br), Xw(Xw), Yw(Yw), Zw(Zw) {} ;\n};\n\nclass WiseGTreader\n{\n char _filename[255];\n FILE *_filePtr;\n\n bool _gt_common_all_cameras;\n char _lineFormat[255];\n\n //ground-truth format <frame,detections>\n std::map<int,std::vector<target_detection_t>> m;\n\npublic:\n WiseGTreader();\n ~WiseGTreader();\n\n int parsefile(const char *filename,const char * format);\n std::map<int,std::vector<target_detection_t>>* getData(){return &m;};\n /* int getProperty(const char *name, char *valor);\n int getProperty(const char *name, int *valor);\n int getProperty(const char *name, long *valor);\n int getProperty(const char *name, double *valor);\n int getProperty(const char *name, float *value);\n\n\n void readLines();\n\n int setProperty(const char *name, char *valor);\n int setProperty(const char *name, int valor);\n int setProperty(const char *name, long valor);\n int setProperty(const char *name, double value);\n\n\n */\n};\n\n#endif // __WISEGROUNDTRUTH_READER_H__\n\n"
(preproc_ifdef) "#ifndef __WISEGROUNDTRUTH_READER_H__\n#define __WISEGROUNDTRUTH_READER_H__\n\n#include <stdio.h>\n#include <vector>\n#include <map>\n\n#define MAX_LINE 512\n\n\nstruct target_detection_t {\n int target_id;\n double bb_x_tl,bb_y_tl,bb_x_br,bb_y_br; //image plane coordinates (2D bounding box)\n double Xw,Yw,Zw; //world coordinates (3D point)\npublic:\n target_detection_t() : target_id(0), bb_x_tl(0), bb_y_tl(0), bb_x_br(0), bb_y_br(0), Xw(0), Yw(0), Zw(0) {} ;\n target_detection_t(double tid, double bb_x_tl,double bb_y_tl,double bb_x_br,double bb_y_br,double Xw,double Yw,double Zw) : target_id(tid), bb_x_tl(bb_x_tl), bb_y_tl(bb_y_tl), bb_x_br(bb_x_br), bb_y_br(bb_y_br), Xw(Xw), Yw(Yw), Zw(Zw) {} ;\n};\n\nclass WiseGTreader\n{\n char _filename[255];\n FILE *_filePtr;\n\n bool _gt_common_all_cameras;\n char _lineFormat[255];\n\n //ground-truth format <frame,detections>\n std::map<int,std::vector<target_detection_t>> m;\n\npublic:\n WiseGTreader();\n ~WiseGTreader();\n\n int parsefile(const char *filename,const char * format);\n std::map<int,std::vector<target_detection_t>>* getData(){return &m;};\n /* int getProperty(const char *name, char *valor);\n int getProperty(const char *name, int *valor);\n int getProperty(const char *name, long *valor);\n int getProperty(const char *name, double *valor);\n int getProperty(const char *name, float *value);\n\n\n void readLines();\n\n int setProperty(const char *name, char *valor);\n int setProperty(const char *name, int valor);\n int setProperty(const char *name, long valor);\n int setProperty(const char *name, double value);\n\n\n */\n};\n\n#endif"
(#ifndef) "#ifndef"
(identifier) "__WISEGROUNDTRUTH_READER_H__"
(preproc_def) "#define __WISEGROUNDTRUTH_READER_H__\n"
(#define) "#define"
(identifier) "__WISEGROUNDTRUTH_READER_H__"
(preproc_include) "#include <stdio.h>\n"
(#include) "#include"
(system_lib_string) "<stdio.h>"
(preproc_include) "#include <vector>\n"
(#include) "#include"
(system_lib_string) "<vector>"
(preproc_include) "#include <map>\n"
(#include) "#include"
(system_lib_string) "<map>"
(preproc_def) "#define MAX_LINE 512\n"
(#define) "#define"
(identifier) "MAX_LINE"
(preproc_arg) "512"
(struct_specifier) "struct target_detection_t {\n int target_id;\n double bb_x_tl,bb_y_tl,bb_x_br,bb_y_br; //image plane coordinates (2D bounding box)\n double Xw,Yw,Zw; //world coordinates (3D point)\npublic:\n target_detection_t() : target_id(0), bb_x_tl(0), bb_y_tl(0), bb_x_br(0), bb_y_br(0), Xw(0), Yw(0), Zw(0) {} ;\n target_detection_t(double tid, double bb_x_tl,double bb_y_tl,double bb_x_br,double bb_y_br,double Xw,double Yw,double Zw) : target_id(tid), bb_x_tl(bb_x_tl), bb_y_tl(bb_y_tl), bb_x_br(bb_x_br), bb_y_br(bb_y_br), Xw(Xw), Yw(Yw), Zw(Zw) {} ;\n}"
(struct) "struct"
(type_identifier) "target_detection_t"
(field_declaration_list) "{\n int target_id;\n double bb_x_tl,bb_y_tl,bb_x_br,bb_y_br; //image plane coordinates (2D bounding box)\n double Xw,Yw,Zw; //world coordinates (3D point)\npublic:\n target_detection_t() : target_id(0), bb_x_tl(0), bb_y_tl(0), bb_x_br(0), bb_y_br(0), Xw(0), Yw(0), Zw(0) {} ;\n target_detection_t(double tid, double bb_x_tl,double bb_y_tl,double bb_x_br,double bb_y_br,double Xw,double Yw,double Zw) : target_id(tid), bb_x_tl(bb_x_tl), bb_y_tl(bb_y_tl), bb_x_br(bb_x_br), bb_y_br(bb_y_br), Xw(Xw), Yw(Yw), Zw(Zw) {} ;\n}"
({) "{"
(field_declaration) "int target_id;"
(primitive_type) "int"
(field_identifier) "target_id"
(;) ";"
(field_declaration) "double bb_x_tl,bb_y_tl,bb_x_br,bb_y_br;"
(primitive_type) "double"
(field_identifier) "bb_x_tl"
(,) ","
(field_identifier) "bb_y_tl"
(,) ","
(field_identifier) "bb_x_br"
(,) ","
(field_identifier) "bb_y_br"
(;) ";"
(comment) "//image plane coordinates (2D bounding box)"
(field_declaration) "double Xw,Yw,Zw;"
(primitive_type) "double"
(field_identifier) "Xw"
(,) ","
(field_identifier) "Yw"
(,) ","
(field_identifier) "Zw"
(;) ";"
(comment) "//world coordinates (3D point)"
(field_declaration) "public:\n target_detection_t() : target_id(0), bb_x_tl(0), bb_y_tl(0), bb_x_br(0), bb_y_br(0), Xw(0), Yw(0), Zw(0) {} ;"
(type_identifier) "public"
(ERROR) ":"
(:) ":"
(function_declarator) "target_detection_t()"
(field_identifier) "target_detection_t"
(parameter_list) "()"
(() "("
()) ")"
(bitfield_clause) ": target_id(0)"
(:) ":"
(call_expression) "target_id(0)"
(identifier) "target_id"
(argument_list) "(0)"
(() "("
(number_literal) "0"
()) ")"
(,) ","
(function_declarator) "bb_x_tl(0)"
(field_identifier) "bb_x_tl"
(parameter_list) "(0)"
(() "("
(ERROR) "0"
(number_literal) "0"
()) ")"
(,) ","
(function_declarator) "bb_y_tl(0)"
(field_identifier) "bb_y_tl"
(parameter_list) "(0)"
(() "("
(ERROR) "0"
(number_literal) "0"
()) ")"
(,) ","
(function_declarator) "bb_x_br(0)"
(field_identifier) "bb_x_br"
(parameter_list) "(0)"
(() "("
(ERROR) "0"
(number_literal) "0"
()) ")"
(,) ","
(function_declarator) "bb_y_br(0)"
(field_identifier) "bb_y_br"
(parameter_list) "(0)"
(() "("
(ERROR) "0"
(number_literal) "0"
()) ")"
(,) ","
(function_declarator) "Xw(0)"
(field_identifier) "Xw"
(parameter_list) "(0)"
(() "("
(ERROR) "0"
(number_literal) "0"
()) ")"
(,) ","
(function_declarator) "Yw(0)"
(field_identifier) "Yw"
(parameter_list) "(0)"
(() "("
(ERROR) "0"
(number_literal) "0"
()) ")"
(,) ","
(function_declarator) "Zw(0)"
(field_identifier) "Zw"
(parameter_list) "(0)"
(() "("
(ERROR) "0"
(number_literal) "0"
()) ")"
(ERROR) "{}"
({) "{"
(}) "}"
(;) ";"
(field_declaration) "target_detection_t(double tid, double bb_x_tl,double bb_y_tl,double bb_x_br,double bb_y_br,double Xw,double Yw,double Zw) : target_id(tid), bb_x_tl(bb_x_tl), bb_y_tl(bb_y_tl), bb_x_br(bb_x_br), bb_y_br(bb_y_br), Xw(Xw), Yw(Yw), Zw(Zw) {} ;"
(macro_type_specifier) "target_detection_t(double"
(identifier) "target_detection_t"
(() "("
(type_descriptor) "double"
(primitive_type) "double"
()) ""
(field_identifier) "tid"
(,) ","
(ERROR) "double"
(field_identifier) "double"
(field_identifier) "bb_x_tl"
(,) ","
(ERROR) "double"
(field_identifier) "double"
(field_identifier) "bb_y_tl"
(,) ","
(ERROR) "double"
(field_identifier) "double"
(field_identifier) "bb_x_br"
(,) ","
(ERROR) "double"
(field_identifier) "double"
(field_identifier) "bb_y_br"
(,) ","
(field_identifier) "double"
(ERROR) "Xw"
(identifier) "Xw"
(,) ","
(field_identifier) "double"
(ERROR) "Yw"
(identifier) "Yw"
(,) ","
(field_identifier) "double"
(ERROR) "Zw)"
(identifier) "Zw"
()) ")"
(bitfield_clause) ": target_id(tid)"
(:) ":"
(call_expression) "target_id(tid)"
(identifier) "target_id"
(argument_list) "(tid)"
(() "("
(identifier) "tid"
()) ")"
(,) ","
(function_declarator) "bb_x_tl(bb_x_tl)"
(field_identifier) "bb_x_tl"
(parameter_list) "(bb_x_tl)"
(() "("
(parameter_declaration) "bb_x_tl"
(type_identifier) "bb_x_tl"
()) ")"
(,) ","
(function_declarator) "bb_y_tl(bb_y_tl)"
(field_identifier) "bb_y_tl"
(parameter_list) "(bb_y_tl)"
(() "("
(parameter_declaration) "bb_y_tl"
(type_identifier) "bb_y_tl"
()) ")"
(,) ","
(function_declarator) "bb_x_br(bb_x_br)"
(field_identifier) "bb_x_br"
(parameter_list) "(bb_x_br)"
(() "("
(parameter_declaration) "bb_x_br"
(type_identifier) "bb_x_br"
()) ")"
(,) ","
(function_declarator) "bb_y_br(bb_y_br)"
(field_identifier) "bb_y_br"
(parameter_list) "(bb_y_br)"
(() "("
(parameter_declaration) "bb_y_br"
(type_identifier) "bb_y_br"
()) ")"
(,) ","
(function_declarator) "Xw(Xw)"
(field_identifier) "Xw"
(parameter_list) "(Xw)"
(() "("
(parameter_declaration) "Xw"
(type_identifier) "Xw"
()) ")"
(,) ","
(function_declarator) "Yw(Yw)"
(field_identifier) "Yw"
(parameter_list) "(Yw)"
(() "("
(parameter_declaration) "Yw"
(type_identifier) "Yw"
()) ")"
(,) ","
(function_declarator) "Zw(Zw)"
(field_identifier) "Zw"
(parameter_list) "(Zw)"
(() "("
(parameter_declaration) "Zw"
(type_identifier) "Zw"
()) ")"
(ERROR) "{}"
({) "{"
(}) "}"
(;) ";"
(}) "}"
(;) ";"
(function_definition) "class WiseGTreader\n{\n char _filename[255];\n FILE *_filePtr;\n\n bool _gt_common_all_cameras;\n char _lineFormat[255];\n\n //ground-truth format <frame,detections>\n std::map<int,std::vector<target_detection_t>> m;\n\npublic:\n WiseGTreader();\n ~WiseGTreader();\n\n int parsefile(const char *filename,const char * format);\n std::map<int,std::vector<target_detection_t>>* getData(){return &m;};\n /* int getProperty(const char *name, char *valor);\n int getProperty(const char *name, int *valor);\n int getProperty(const char *name, long *valor);\n int getProperty(const char *name, double *valor);\n int getProperty(const char *name, float *value);\n\n\n void readLines();\n\n int setProperty(const char *name, char *valor);\n int setProperty(const char *name, int valor);\n int setProperty(const char *name, long valor);\n int setProperty(const char *name, double value);\n\n\n */\n}"
(type_identifier) "class"
(identifier) "WiseGTreader"
(compound_statement) "{\n char _filename[255];\n FILE *_filePtr;\n\n bool _gt_common_all_cameras;\n char _lineFormat[255];\n\n //ground-truth format <frame,detections>\n std::map<int,std::vector<target_detection_t>> m;\n\npublic:\n WiseGTreader();\n ~WiseGTreader();\n\n int parsefile(const char *filename,const char * format);\n std::map<int,std::vector<target_detection_t>>* getData(){return &m;};\n /* int getProperty(const char *name, char *valor);\n int getProperty(const char *name, int *valor);\n int getProperty(const char *name, long *valor);\n int getProperty(const char *name, double *valor);\n int getProperty(const char *name, float *value);\n\n\n void readLines();\n\n int setProperty(const char *name, char *valor);\n int setProperty(const char *name, int valor);\n int setProperty(const char *name, long valor);\n int setProperty(const char *name, double value);\n\n\n */\n}"
({) "{"
(declaration) "char _filename[255];"
(primitive_type) "char"
(array_declarator) "_filename[255]"
(identifier) "_filename"
([) "["
(number_literal) "255"
(]) "]"
(;) ";"
(declaration) "FILE *_filePtr;"
(type_identifier) "FILE"
(pointer_declarator) "*_filePtr"
(*) "*"
(identifier) "_filePtr"
(;) ";"
(declaration) "bool _gt_common_all_cameras;"
(primitive_type) "bool"
(identifier) "_gt_common_all_cameras"
(;) ";"
(declaration) "char _lineFormat[255];"
(primitive_type) "char"
(array_declarator) "_lineFormat[255]"
(identifier) "_lineFormat"
([) "["
(number_literal) "255"
(]) "]"
(;) ";"
(comment) "//ground-truth format <frame,detections>"
(labeled_statement) "std::map<int,std::vector<target_detection_t>> m;"
(statement_identifier) "std"
(ERROR) "::map<int,std:"
(:) ":"
(:) ":"
(comma_expression) "map<int,std"
(binary_expression) "map<int"
(identifier) "map"
(<) "<"
(identifier) "int"
(,) ","
(identifier) "std"
(:) ":"
(:) ":"
(expression_statement) "vector<target_detection_t>> m;"
(binary_expression) "vector<target_detection_t>> m"
(identifier) "vector"
(<) "<"
(binary_expression) "target_detection_t>> m"
(identifier) "target_detection_t"
(>>) ">>"
(identifier) "m"
(;) ";"
(labeled_statement) "public:\n WiseGTreader();"
(statement_identifier) "public"
(:) ":"
(expression_statement) "WiseGTreader();"
(call_expression) "WiseGTreader()"
(identifier) "WiseGTreader"
(argument_list) "()"
(() "("
()) ")"
(;) ";"
(expression_statement) "~WiseGTreader();"
(unary_expression) "~WiseGTreader()"
(~) "~"
(call_expression) "WiseGTreader()"
(identifier) "WiseGTreader"
(argument_list) "()"
(() "("
()) ")"
(;) ";"
(declaration) "int parsefile(const char *filename,const char * format);"
(primitive_type) "int"
(function_declarator) "parsefile(const char *filename,const char * format)"
(identifier) "parsefile"
(parameter_list) "(const char *filename,const char * format)"
(() "("
(parameter_declaration) "const char *filename"
(type_qualifier) "const"
(const) "const"
(primitive_type) "char"
(pointer_declarator) "*filename"
(*) "*"
(identifier) "filename"
(,) ","
(parameter_declaration) "const char * format"
(type_qualifier) "const"
(const) "const"
(primitive_type) "char"
(pointer_declarator) "* format"
(*) "*"
(identifier) "format"
()) ")"
(;) ";"
(labeled_statement) "std::map<int,std::vector<target_detection_t>>* getData(){return &m;}"
(statement_identifier) "std"
(ERROR) "::map<int,std:"
(:) ":"
(:) ":"
(comma_expression) "map<int,std"
(binary_expression) "map<int"
(identifier) "map"
(<) "<"
(identifier) "int"
(,) ","
(identifier) "std"
(:) ":"
(:) ":"
(ERROR) "vector<target_detection_t>>* getData()"
(binary_expression) "vector<target_detection_t>>* getData()"
(identifier) "vector"
(<) "<"
(binary_expression) "target_detection_t>>* getData()"
(identifier) "target_detection_t"
(>>) ">>"
(pointer_expression) "* getData()"
(*) "*"
(call_expression) "getData()"
(identifier) "getData"
(argument_list) "()"
(() "("
()) ")"
(compound_statement) "{return &m;}"
({) "{"
(return_statement) "return &m;"
(return) "return"
(pointer_expression) "&m"
(&) "&"
(identifier) "m"
(;) ";"
(}) "}"
(expression_statement) ";"
(;) ";"
(comment) "/* int getProperty(const char *name, char *valor);\n int getProperty(const char *name, int *valor);\n int getProperty(const char *name, long *valor);\n int getProperty(const char *name, double *valor);\n int getProperty(const char *name, float *value);\n\n\n void readLines();\n\n int setProperty(const char *name, char *valor);\n int setProperty(const char *name, int valor);\n int setProperty(const char *name, long valor);\n int setProperty(const char *name, double value);\n\n\n */"
(}) "}"
(expression_statement) ";"
(;) ";"
(#endif) "#endif"
(comment) "// __WISEGROUNDTRUTH_READER_H__"
| 375
| 20
|
{"language": "c", "success": true, "metadata": {"lines": 43, "avg_line_length": 37.51, "nodes": 234, "errors": 0, "source_hash": "56ee524de20ce52817d4d2cdba84c46fefa40c5e4866f445f33551c3947890b1", "categorized_nodes": 159}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __WISEGROUNDTRUTH_READER_H__\n#define __WISEGROUNDTRUTH_READER_H__\n\n#include <stdio.h>\n#include <vector>\n#include <map>\n\n#define MAX_LINE 512\n\n\nstruct target_detection_t {\n int target_id;\n double bb_x_tl,bb_y_tl,bb_x_br,bb_y_br; //image plane coordinates (2D bounding box)\n double Xw,Yw,Zw; //world coordinates (3D point)\npublic:\n target_detection_t() : target_id(0), bb_x_tl(0), bb_y_tl(0), bb_x_br(0), bb_y_br(0), Xw(0), Yw(0), Zw(0) {} ;\n target_detection_t(double tid, double bb_x_tl,double bb_y_tl,double bb_x_br,double bb_y_br,double Xw,double Yw,double Zw) : target_id(tid), bb_x_tl(bb_x_tl), bb_y_tl(bb_y_tl), bb_x_br(bb_x_br), bb_y_br(bb_y_br), Xw(Xw), Yw(Yw), Zw(Zw) {} ;\n};\n\nclass WiseGTreader\n{\n char _filename[255];\n FILE *_filePtr;\n\n bool _gt_common_all_cameras;\n char _lineFormat[255];\n\n //ground-truth format <frame,detections>\n std::map<int,std::vector<target_detection_t>> m;\n\npublic:\n WiseGTreader();\n ~WiseGTreader();\n\n int parsefile(const char *filename,const char * format);\n std::map<int,std::vector<target_detection_t>>* getData(){return &m;};\n /* int getProperty(const char *name, char *valor);\n int getProperty(const char *name, int *valor);\n int getProperty(const char *name, long *valor);\n int getProperty(const char *name, double *valor);\n int getProperty(const char *name, float *value);\n\n\n void readLines();\n\n int setProperty(const char *name, char *valor);\n int setProperty(const char *name, int valor);\n int setProperty(const char *name, long valor);\n int setProperty(const char *name, double value);\n\n\n */\n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 19, 149, 233], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 54, "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": "__WISEGROUNDTRUTH_READER_H__", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 36}}, {"id": 3, "type": "preproc_def", "text": "#define __WISEGROUNDTRUTH_READER_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": "__WISEGROUNDTRUTH_READER_H__", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 36}}, {"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 <vector>\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 <map>\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": "<map>", "parent": 12, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 14}}, {"id": 15, "type": "preproc_def", "text": "#define MAX_LINE 512\n", "parent": 0, "children": [16, 17, 18], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 16, "type": "#define", "text": "#define", "parent": 15, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 17, "type": "identifier", "text": "MAX_LINE", "parent": 15, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 16}}, {"id": 18, "type": "preproc_arg", "text": "512", "parent": 15, "children": [], "start_point": {"row": 7, "column": 17}, "end_point": {"row": 7, "column": 20}}, {"id": 19, "type": "struct_specifier", "text": "struct target_detection_t {\n int target_id;\n double bb_x_tl,bb_y_tl,bb_x_br,bb_y_br; //image plane coordinates (2D bounding box)\n double Xw,Yw,Zw; //world coordinates (3D point)\npublic:\n target_detection_t() : target_id(0), bb_x_tl(0), bb_y_tl(0), bb_x_br(0), bb_y_br(0), Xw(0), Yw(0), Zw(0) {} ;\n target_detection_t(double tid, double bb_x_tl,double bb_y_tl,double bb_x_br,double bb_y_br,double Xw,double Yw,double Zw) : target_id(tid), bb_x_tl(bb_x_tl), bb_y_tl(bb_y_tl), bb_x_br(bb_x_br), bb_y_br(bb_y_br), Xw(Xw), Yw(Yw), Zw(Zw) {} ;\n}", "parent": 0, "children": [20, 21], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 20, "type": "struct", "text": "struct", "parent": 19, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 6}}, {"id": 21, "type": "type_identifier", "text": "target_detection_t", "parent": 19, "children": [], "start_point": {"row": 10, "column": 7}, "end_point": {"row": 10, "column": 25}}, {"id": 22, "type": "field_declaration", "text": "int target_id;", "parent": 19, "children": [23, 24], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 18}}, {"id": 23, "type": "primitive_type", "text": "int", "parent": 22, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 7}}, {"id": 24, "type": "field_identifier", "text": "target_id", "parent": 22, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 17}}, {"id": 25, "type": "field_declaration", "text": "double bb_x_tl,bb_y_tl,bb_x_br,bb_y_br;", "parent": 19, "children": [26, 27, 28, 29, 30], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 43}}, {"id": 26, "type": "primitive_type", "text": "double", "parent": 25, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 10}}, {"id": 27, "type": "field_identifier", "text": "bb_x_tl", "parent": 25, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 18}}, {"id": 28, "type": "field_identifier", "text": "bb_y_tl", "parent": 25, "children": [], "start_point": {"row": 12, "column": 19}, "end_point": {"row": 12, "column": 26}}, {"id": 29, "type": "field_identifier", "text": "bb_x_br", "parent": 25, "children": [], "start_point": {"row": 12, "column": 27}, "end_point": {"row": 12, "column": 34}}, {"id": 30, "type": "field_identifier", "text": "bb_y_br", "parent": 25, "children": [], "start_point": {"row": 12, "column": 35}, "end_point": {"row": 12, "column": 42}}, {"id": 31, "type": "field_declaration", "text": "double Xw,Yw,Zw;", "parent": 19, "children": [32, 33, 34, 35], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 20}}, {"id": 32, "type": "primitive_type", "text": "double", "parent": 31, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 10}}, {"id": 33, "type": "field_identifier", "text": "Xw", "parent": 31, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 13}}, {"id": 34, "type": "field_identifier", "text": "Yw", "parent": 31, "children": [], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 16}}, {"id": 35, "type": "field_identifier", "text": "Zw", "parent": 31, "children": [], "start_point": {"row": 13, "column": 17}, "end_point": {"row": 13, "column": 19}}, {"id": 36, "type": "field_declaration", "text": "public:\n target_detection_t() : target_id(0), bb_x_tl(0), bb_y_tl(0), bb_x_br(0), bb_y_br(0), Xw(0), Yw(0), Zw(0) {} ;", "parent": 19, "children": [37, 40, 45, 50, 55, 60, 65, 70, 75, 80], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 113}}, {"id": 37, "type": "function_declarator", "text": "target_detection_t()", "parent": 36, "children": [38, 39], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 24}}, {"id": 38, "type": "field_identifier", "text": "target_detection_t", "parent": 37, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 22}}, {"id": 39, "type": "parameter_list", "text": "()", "parent": 37, "children": [], "start_point": {"row": 15, "column": 22}, "end_point": {"row": 15, "column": 24}}, {"id": 40, "type": "bitfield_clause", "text": ": target_id(0)", "parent": 36, "children": [41], "start_point": {"row": 15, "column": 25}, "end_point": {"row": 15, "column": 39}}, {"id": 41, "type": "call_expression", "text": "target_id(0)", "parent": 40, "children": [42, 43], "start_point": {"row": 15, "column": 27}, "end_point": {"row": 15, "column": 39}}, {"id": 42, "type": "identifier", "text": "target_id", "parent": 41, "children": [], "start_point": {"row": 15, "column": 27}, "end_point": {"row": 15, "column": 36}}, {"id": 43, "type": "argument_list", "text": "(0)", "parent": 41, "children": [44], "start_point": {"row": 15, "column": 36}, "end_point": {"row": 15, "column": 39}}, {"id": 44, "type": "number_literal", "text": "0", "parent": 43, "children": [], "start_point": {"row": 15, "column": 37}, "end_point": {"row": 15, "column": 38}}, {"id": 45, "type": "function_declarator", "text": "bb_x_tl(0)", "parent": 36, "children": [46, 47], "start_point": {"row": 15, "column": 41}, "end_point": {"row": 15, "column": 51}}, {"id": 46, "type": "field_identifier", "text": "bb_x_tl", "parent": 45, "children": [], "start_point": {"row": 15, "column": 41}, "end_point": {"row": 15, "column": 48}}, {"id": 47, "type": "parameter_list", "text": "(0)", "parent": 45, "children": [48], "start_point": {"row": 15, "column": 48}, "end_point": {"row": 15, "column": 51}}, {"id": 48, "type": "ERROR", "text": "0", "parent": 47, "children": [49], "start_point": {"row": 15, "column": 49}, "end_point": {"row": 15, "column": 50}}, {"id": 49, "type": "number_literal", "text": "0", "parent": 48, "children": [], "start_point": {"row": 15, "column": 49}, "end_point": {"row": 15, "column": 50}}, {"id": 50, "type": "function_declarator", "text": "bb_y_tl(0)", "parent": 36, "children": [51, 52], "start_point": {"row": 15, "column": 53}, "end_point": {"row": 15, "column": 63}}, {"id": 51, "type": "field_identifier", "text": "bb_y_tl", "parent": 50, "children": [], "start_point": {"row": 15, "column": 53}, "end_point": {"row": 15, "column": 60}}, {"id": 52, "type": "parameter_list", "text": "(0)", "parent": 50, "children": [53], "start_point": {"row": 15, "column": 60}, "end_point": {"row": 15, "column": 63}}, {"id": 53, "type": "ERROR", "text": "0", "parent": 52, "children": [54], "start_point": {"row": 15, "column": 61}, "end_point": {"row": 15, "column": 62}}, {"id": 54, "type": "number_literal", "text": "0", "parent": 53, "children": [], "start_point": {"row": 15, "column": 61}, "end_point": {"row": 15, "column": 62}}, {"id": 55, "type": "function_declarator", "text": "bb_x_br(0)", "parent": 36, "children": [56, 57], "start_point": {"row": 15, "column": 65}, "end_point": {"row": 15, "column": 75}}, {"id": 56, "type": "field_identifier", "text": "bb_x_br", "parent": 55, "children": [], "start_point": {"row": 15, "column": 65}, "end_point": {"row": 15, "column": 72}}, {"id": 57, "type": "parameter_list", "text": "(0)", "parent": 55, "children": [58], "start_point": {"row": 15, "column": 72}, "end_point": {"row": 15, "column": 75}}, {"id": 58, "type": "ERROR", "text": "0", "parent": 57, "children": [59], "start_point": {"row": 15, "column": 73}, "end_point": {"row": 15, "column": 74}}, {"id": 59, "type": "number_literal", "text": "0", "parent": 58, "children": [], "start_point": {"row": 15, "column": 73}, "end_point": {"row": 15, "column": 74}}, {"id": 60, "type": "function_declarator", "text": "bb_y_br(0)", "parent": 36, "children": [61, 62], "start_point": {"row": 15, "column": 77}, "end_point": {"row": 15, "column": 87}}, {"id": 61, "type": "field_identifier", "text": "bb_y_br", "parent": 60, "children": [], "start_point": {"row": 15, "column": 77}, "end_point": {"row": 15, "column": 84}}, {"id": 62, "type": "parameter_list", "text": "(0)", "parent": 60, "children": [63], "start_point": {"row": 15, "column": 84}, "end_point": {"row": 15, "column": 87}}, {"id": 63, "type": "ERROR", "text": "0", "parent": 62, "children": [64], "start_point": {"row": 15, "column": 85}, "end_point": {"row": 15, "column": 86}}, {"id": 64, "type": "number_literal", "text": "0", "parent": 63, "children": [], "start_point": {"row": 15, "column": 85}, "end_point": {"row": 15, "column": 86}}, {"id": 65, "type": "function_declarator", "text": "Xw(0)", "parent": 36, "children": [66, 67], "start_point": {"row": 15, "column": 89}, "end_point": {"row": 15, "column": 94}}, {"id": 66, "type": "field_identifier", "text": "Xw", "parent": 65, "children": [], "start_point": {"row": 15, "column": 89}, "end_point": {"row": 15, "column": 91}}, {"id": 67, "type": "parameter_list", "text": "(0)", "parent": 65, "children": [68], "start_point": {"row": 15, "column": 91}, "end_point": {"row": 15, "column": 94}}, {"id": 68, "type": "ERROR", "text": "0", "parent": 67, "children": [69], "start_point": {"row": 15, "column": 92}, "end_point": {"row": 15, "column": 93}}, {"id": 69, "type": "number_literal", "text": "0", "parent": 68, "children": [], "start_point": {"row": 15, "column": 92}, "end_point": {"row": 15, "column": 93}}, {"id": 70, "type": "function_declarator", "text": "Yw(0)", "parent": 36, "children": [71, 72], "start_point": {"row": 15, "column": 96}, "end_point": {"row": 15, "column": 101}}, {"id": 71, "type": "field_identifier", "text": "Yw", "parent": 70, "children": [], "start_point": {"row": 15, "column": 96}, "end_point": {"row": 15, "column": 98}}, {"id": 72, "type": "parameter_list", "text": "(0)", "parent": 70, "children": [73], "start_point": {"row": 15, "column": 98}, "end_point": {"row": 15, "column": 101}}, {"id": 73, "type": "ERROR", "text": "0", "parent": 72, "children": [74], "start_point": {"row": 15, "column": 99}, "end_point": {"row": 15, "column": 100}}, {"id": 74, "type": "number_literal", "text": "0", "parent": 73, "children": [], "start_point": {"row": 15, "column": 99}, "end_point": {"row": 15, "column": 100}}, {"id": 75, "type": "function_declarator", "text": "Zw(0)", "parent": 36, "children": [76, 77], "start_point": {"row": 15, "column": 103}, "end_point": {"row": 15, "column": 108}}, {"id": 76, "type": "field_identifier", "text": "Zw", "parent": 75, "children": [], "start_point": {"row": 15, "column": 103}, "end_point": {"row": 15, "column": 105}}, {"id": 77, "type": "parameter_list", "text": "(0)", "parent": 75, "children": [78], "start_point": {"row": 15, "column": 105}, "end_point": {"row": 15, "column": 108}}, {"id": 78, "type": "ERROR", "text": "0", "parent": 77, "children": [79], "start_point": {"row": 15, "column": 106}, "end_point": {"row": 15, "column": 107}}, {"id": 79, "type": "number_literal", "text": "0", "parent": 78, "children": [], "start_point": {"row": 15, "column": 106}, "end_point": {"row": 15, "column": 107}}, {"id": 80, "type": "ERROR", "text": "{}", "parent": 36, "children": [], "start_point": {"row": 15, "column": 109}, "end_point": {"row": 15, "column": 111}}, {"id": 81, "type": "field_declaration", "text": "target_detection_t(double tid, double bb_x_tl,double bb_y_tl,double bb_x_br,double bb_y_br,double Xw,double Yw,double Zw) : target_id(tid), bb_x_tl(bb_x_tl), bb_y_tl(bb_y_tl), bb_x_br(bb_x_br), bb_y_br(bb_y_br), Xw(Xw), Yw(Yw), Zw(Zw) {} ;", "parent": 19, "children": [82, 86, 87, 89, 90, 92, 93, 95, 96, 98, 99, 100, 102, 103, 105, 106, 108, 113, 118, 123, 128, 133, 138, 143, 148], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 244}}, {"id": 82, "type": "macro_type_specifier", "text": "target_detection_t(double", "parent": 81, "children": [83, 84], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 29}}, {"id": 83, "type": "identifier", "text": "target_detection_t", "parent": 82, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 22}}, {"id": 84, "type": "type_descriptor", "text": "double", "parent": 82, "children": [85], "start_point": {"row": 16, "column": 23}, "end_point": {"row": 16, "column": 29}}, {"id": 85, "type": "primitive_type", "text": "double", "parent": 84, "children": [], "start_point": {"row": 16, "column": 23}, "end_point": {"row": 16, "column": 29}}, {"id": 86, "type": "field_identifier", "text": "tid", "parent": 81, "children": [], "start_point": {"row": 16, "column": 30}, "end_point": {"row": 16, "column": 33}}, {"id": 87, "type": "ERROR", "text": "double", "parent": 81, "children": [88], "start_point": {"row": 16, "column": 35}, "end_point": {"row": 16, "column": 41}}, {"id": 88, "type": "field_identifier", "text": "double", "parent": 87, "children": [], "start_point": {"row": 16, "column": 35}, "end_point": {"row": 16, "column": 41}}, {"id": 89, "type": "field_identifier", "text": "bb_x_tl", "parent": 81, "children": [], "start_point": {"row": 16, "column": 42}, "end_point": {"row": 16, "column": 49}}, {"id": 90, "type": "ERROR", "text": "double", "parent": 81, "children": [91], "start_point": {"row": 16, "column": 50}, "end_point": {"row": 16, "column": 56}}, {"id": 91, "type": "field_identifier", "text": "double", "parent": 90, "children": [], "start_point": {"row": 16, "column": 50}, "end_point": {"row": 16, "column": 56}}, {"id": 92, "type": "field_identifier", "text": "bb_y_tl", "parent": 81, "children": [], "start_point": {"row": 16, "column": 57}, "end_point": {"row": 16, "column": 64}}, {"id": 93, "type": "ERROR", "text": "double", "parent": 81, "children": [94], "start_point": {"row": 16, "column": 65}, "end_point": {"row": 16, "column": 71}}, {"id": 94, "type": "field_identifier", "text": "double", "parent": 93, "children": [], "start_point": {"row": 16, "column": 65}, "end_point": {"row": 16, "column": 71}}, {"id": 95, "type": "field_identifier", "text": "bb_x_br", "parent": 81, "children": [], "start_point": {"row": 16, "column": 72}, "end_point": {"row": 16, "column": 79}}, {"id": 96, "type": "ERROR", "text": "double", "parent": 81, "children": [97], "start_point": {"row": 16, "column": 80}, "end_point": {"row": 16, "column": 86}}, {"id": 97, "type": "field_identifier", "text": "double", "parent": 96, "children": [], "start_point": {"row": 16, "column": 80}, "end_point": {"row": 16, "column": 86}}, {"id": 98, "type": "field_identifier", "text": "bb_y_br", "parent": 81, "children": [], "start_point": {"row": 16, "column": 87}, "end_point": {"row": 16, "column": 94}}, {"id": 99, "type": "field_identifier", "text": "double", "parent": 81, "children": [], "start_point": {"row": 16, "column": 95}, "end_point": {"row": 16, "column": 101}}, {"id": 100, "type": "ERROR", "text": "Xw", "parent": 81, "children": [101], "start_point": {"row": 16, "column": 102}, "end_point": {"row": 16, "column": 104}}, {"id": 101, "type": "identifier", "text": "Xw", "parent": 100, "children": [], "start_point": {"row": 16, "column": 102}, "end_point": {"row": 16, "column": 104}}, {"id": 102, "type": "field_identifier", "text": "double", "parent": 81, "children": [], "start_point": {"row": 16, "column": 105}, "end_point": {"row": 16, "column": 111}}, {"id": 103, "type": "ERROR", "text": "Yw", "parent": 81, "children": [104], "start_point": {"row": 16, "column": 112}, "end_point": {"row": 16, "column": 114}}, {"id": 104, "type": "identifier", "text": "Yw", "parent": 103, "children": [], "start_point": {"row": 16, "column": 112}, "end_point": {"row": 16, "column": 114}}, {"id": 105, "type": "field_identifier", "text": "double", "parent": 81, "children": [], "start_point": {"row": 16, "column": 115}, "end_point": {"row": 16, "column": 121}}, {"id": 106, "type": "ERROR", "text": "Zw)", "parent": 81, "children": [107], "start_point": {"row": 16, "column": 122}, "end_point": {"row": 16, "column": 125}}, {"id": 107, "type": "identifier", "text": "Zw", "parent": 106, "children": [], "start_point": {"row": 16, "column": 122}, "end_point": {"row": 16, "column": 124}}, {"id": 108, "type": "bitfield_clause", "text": ": target_id(tid)", "parent": 81, "children": [109], "start_point": {"row": 16, "column": 126}, "end_point": {"row": 16, "column": 142}}, {"id": 109, "type": "call_expression", "text": "target_id(tid)", "parent": 108, "children": [110, 111], "start_point": {"row": 16, "column": 128}, "end_point": {"row": 16, "column": 142}}, {"id": 110, "type": "identifier", "text": "target_id", "parent": 109, "children": [], "start_point": {"row": 16, "column": 128}, "end_point": {"row": 16, "column": 137}}, {"id": 111, "type": "argument_list", "text": "(tid)", "parent": 109, "children": [112], "start_point": {"row": 16, "column": 137}, "end_point": {"row": 16, "column": 142}}, {"id": 112, "type": "identifier", "text": "tid", "parent": 111, "children": [], "start_point": {"row": 16, "column": 138}, "end_point": {"row": 16, "column": 141}}, {"id": 113, "type": "function_declarator", "text": "bb_x_tl(bb_x_tl)", "parent": 81, "children": [114, 115], "start_point": {"row": 16, "column": 144}, "end_point": {"row": 16, "column": 160}}, {"id": 114, "type": "field_identifier", "text": "bb_x_tl", "parent": 113, "children": [], "start_point": {"row": 16, "column": 144}, "end_point": {"row": 16, "column": 151}}, {"id": 115, "type": "parameter_list", "text": "(bb_x_tl)", "parent": 113, "children": [116], "start_point": {"row": 16, "column": 151}, "end_point": {"row": 16, "column": 160}}, {"id": 116, "type": "parameter_declaration", "text": "bb_x_tl", "parent": 115, "children": [117], "start_point": {"row": 16, "column": 152}, "end_point": {"row": 16, "column": 159}}, {"id": 117, "type": "type_identifier", "text": "bb_x_tl", "parent": 116, "children": [], "start_point": {"row": 16, "column": 152}, "end_point": {"row": 16, "column": 159}}, {"id": 118, "type": "function_declarator", "text": "bb_y_tl(bb_y_tl)", "parent": 81, "children": [119, 120], "start_point": {"row": 16, "column": 162}, "end_point": {"row": 16, "column": 178}}, {"id": 119, "type": "field_identifier", "text": "bb_y_tl", "parent": 118, "children": [], "start_point": {"row": 16, "column": 162}, "end_point": {"row": 16, "column": 169}}, {"id": 120, "type": "parameter_list", "text": "(bb_y_tl)", "parent": 118, "children": [121], "start_point": {"row": 16, "column": 169}, "end_point": {"row": 16, "column": 178}}, {"id": 121, "type": "parameter_declaration", "text": "bb_y_tl", "parent": 120, "children": [122], "start_point": {"row": 16, "column": 170}, "end_point": {"row": 16, "column": 177}}, {"id": 122, "type": "type_identifier", "text": "bb_y_tl", "parent": 121, "children": [], "start_point": {"row": 16, "column": 170}, "end_point": {"row": 16, "column": 177}}, {"id": 123, "type": "function_declarator", "text": "bb_x_br(bb_x_br)", "parent": 81, "children": [124, 125], "start_point": {"row": 16, "column": 180}, "end_point": {"row": 16, "column": 196}}, {"id": 124, "type": "field_identifier", "text": "bb_x_br", "parent": 123, "children": [], "start_point": {"row": 16, "column": 180}, "end_point": {"row": 16, "column": 187}}, {"id": 125, "type": "parameter_list", "text": "(bb_x_br)", "parent": 123, "children": [126], "start_point": {"row": 16, "column": 187}, "end_point": {"row": 16, "column": 196}}, {"id": 126, "type": "parameter_declaration", "text": "bb_x_br", "parent": 125, "children": [127], "start_point": {"row": 16, "column": 188}, "end_point": {"row": 16, "column": 195}}, {"id": 127, "type": "type_identifier", "text": "bb_x_br", "parent": 126, "children": [], "start_point": {"row": 16, "column": 188}, "end_point": {"row": 16, "column": 195}}, {"id": 128, "type": "function_declarator", "text": "bb_y_br(bb_y_br)", "parent": 81, "children": [129, 130], "start_point": {"row": 16, "column": 198}, "end_point": {"row": 16, "column": 214}}, {"id": 129, "type": "field_identifier", "text": "bb_y_br", "parent": 128, "children": [], "start_point": {"row": 16, "column": 198}, "end_point": {"row": 16, "column": 205}}, {"id": 130, "type": "parameter_list", "text": "(bb_y_br)", "parent": 128, "children": [131], "start_point": {"row": 16, "column": 205}, "end_point": {"row": 16, "column": 214}}, {"id": 131, "type": "parameter_declaration", "text": "bb_y_br", "parent": 130, "children": [132], "start_point": {"row": 16, "column": 206}, "end_point": {"row": 16, "column": 213}}, {"id": 132, "type": "type_identifier", "text": "bb_y_br", "parent": 131, "children": [], "start_point": {"row": 16, "column": 206}, "end_point": {"row": 16, "column": 213}}, {"id": 133, "type": "function_declarator", "text": "Xw(Xw)", "parent": 81, "children": [134, 135], "start_point": {"row": 16, "column": 216}, "end_point": {"row": 16, "column": 222}}, {"id": 134, "type": "field_identifier", "text": "Xw", "parent": 133, "children": [], "start_point": {"row": 16, "column": 216}, "end_point": {"row": 16, "column": 218}}, {"id": 135, "type": "parameter_list", "text": "(Xw)", "parent": 133, "children": [136], "start_point": {"row": 16, "column": 218}, "end_point": {"row": 16, "column": 222}}, {"id": 136, "type": "parameter_declaration", "text": "Xw", "parent": 135, "children": [137], "start_point": {"row": 16, "column": 219}, "end_point": {"row": 16, "column": 221}}, {"id": 137, "type": "type_identifier", "text": "Xw", "parent": 136, "children": [], "start_point": {"row": 16, "column": 219}, "end_point": {"row": 16, "column": 221}}, {"id": 138, "type": "function_declarator", "text": "Yw(Yw)", "parent": 81, "children": [139, 140], "start_point": {"row": 16, "column": 224}, "end_point": {"row": 16, "column": 230}}, {"id": 139, "type": "field_identifier", "text": "Yw", "parent": 138, "children": [], "start_point": {"row": 16, "column": 224}, "end_point": {"row": 16, "column": 226}}, {"id": 140, "type": "parameter_list", "text": "(Yw)", "parent": 138, "children": [141], "start_point": {"row": 16, "column": 226}, "end_point": {"row": 16, "column": 230}}, {"id": 141, "type": "parameter_declaration", "text": "Yw", "parent": 140, "children": [142], "start_point": {"row": 16, "column": 227}, "end_point": {"row": 16, "column": 229}}, {"id": 142, "type": "type_identifier", "text": "Yw", "parent": 141, "children": [], "start_point": {"row": 16, "column": 227}, "end_point": {"row": 16, "column": 229}}, {"id": 143, "type": "function_declarator", "text": "Zw(Zw)", "parent": 81, "children": [144, 145], "start_point": {"row": 16, "column": 232}, "end_point": {"row": 16, "column": 238}}, {"id": 144, "type": "field_identifier", "text": "Zw", "parent": 143, "children": [], "start_point": {"row": 16, "column": 232}, "end_point": {"row": 16, "column": 234}}, {"id": 145, "type": "parameter_list", "text": "(Zw)", "parent": 143, "children": [146], "start_point": {"row": 16, "column": 234}, "end_point": {"row": 16, "column": 238}}, {"id": 146, "type": "parameter_declaration", "text": "Zw", "parent": 145, "children": [147], "start_point": {"row": 16, "column": 235}, "end_point": {"row": 16, "column": 237}}, {"id": 147, "type": "type_identifier", "text": "Zw", "parent": 146, "children": [], "start_point": {"row": 16, "column": 235}, "end_point": {"row": 16, "column": 237}}, {"id": 148, "type": "ERROR", "text": "{}", "parent": 81, "children": [], "start_point": {"row": 16, "column": 240}, "end_point": {"row": 16, "column": 242}}, {"id": 149, "type": "function_definition", "text": "class WiseGTreader\n{\n char _filename[255];\n FILE *_filePtr;\n\n bool _gt_common_all_cameras;\n char _lineFormat[255];\n\n //ground-truth format <frame,detections>\n std::map<int,std::vector<target_detection_t>> m;\n\npublic:\n WiseGTreader();\n ~WiseGTreader();\n\n int parsefile(const char *filename,const char * format);\n std::map<int,std::vector<target_detection_t>>* getData(){return &m;};\n /* int getProperty(const char *name, char *valor);\n int getProperty(const char *name, int *valor);\n int getProperty(const char *name, long *valor);\n int getProperty(const char *name, double *valor);\n int getProperty(const char *name, float *value);\n\n\n void readLines();\n\n int setProperty(const char *name, char *valor);\n int setProperty(const char *name, int valor);\n int setProperty(const char *name, long valor);\n int setProperty(const char *name, double value);\n\n\n */\n}", "parent": 0, "children": [150], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 52, "column": 1}}, {"id": 150, "type": "identifier", "text": "WiseGTreader", "parent": 149, "children": [], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 18}}, {"id": 151, "type": "declaration", "text": "char _filename[255];", "parent": 149, "children": [152, 153], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 24}}, {"id": 152, "type": "primitive_type", "text": "char", "parent": 151, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 8}}, {"id": 153, "type": "array_declarator", "text": "_filename[255]", "parent": 151, "children": [154, 155], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 23}}, {"id": 154, "type": "identifier", "text": "_filename", "parent": 153, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 18}}, {"id": 155, "type": "number_literal", "text": "255", "parent": 153, "children": [], "start_point": {"row": 21, "column": 19}, "end_point": {"row": 21, "column": 22}}, {"id": 156, "type": "declaration", "text": "FILE *_filePtr;", "parent": 149, "children": [157, 158], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 19}}, {"id": 157, "type": "type_identifier", "text": "FILE", "parent": 156, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 8}}, {"id": 158, "type": "pointer_declarator", "text": "*_filePtr", "parent": 156, "children": [159, 160], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 18}}, {"id": 159, "type": "*", "text": "*", "parent": 158, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 10}}, {"id": 160, "type": "identifier", "text": "_filePtr", "parent": 158, "children": [], "start_point": {"row": 22, "column": 10}, "end_point": {"row": 22, "column": 18}}, {"id": 161, "type": "declaration", "text": "bool _gt_common_all_cameras;", "parent": 149, "children": [162, 163], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 32}}, {"id": 162, "type": "primitive_type", "text": "bool", "parent": 161, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 8}}, {"id": 163, "type": "identifier", "text": "_gt_common_all_cameras", "parent": 161, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 31}}, {"id": 164, "type": "declaration", "text": "char _lineFormat[255];", "parent": 149, "children": [165, 166], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 26}}, {"id": 165, "type": "primitive_type", "text": "char", "parent": 164, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 8}}, {"id": 166, "type": "array_declarator", "text": "_lineFormat[255]", "parent": 164, "children": [167, 168], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 25}}, {"id": 167, "type": "identifier", "text": "_lineFormat", "parent": 166, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 20}}, {"id": 168, "type": "number_literal", "text": "255", "parent": 166, "children": [], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 24}}, {"id": 169, "type": "labeled_statement", "text": "std::map<int,std::vector<target_detection_t>> m;", "parent": 149, "children": [170, 171], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 52}}, {"id": 170, "type": "statement_identifier", "text": "std", "parent": 169, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 7}}, {"id": 171, "type": "ERROR", "text": "::map<int,std:", "parent": 169, "children": [172], "start_point": {"row": 28, "column": 7}, "end_point": {"row": 28, "column": 21}}, {"id": 172, "type": "comma_expression", "text": "map<int,std", "parent": 171, "children": [173, 177], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 20}}, {"id": 173, "type": "binary_expression", "text": "map<int", "parent": 172, "children": [174, 175, 176], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 16}}, {"id": 174, "type": "identifier", "text": "map", "parent": 173, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 12}}, {"id": 175, "type": "<", "text": "<", "parent": 173, "children": [], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 13}}, {"id": 176, "type": "identifier", "text": "int", "parent": 173, "children": [], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 16}}, {"id": 177, "type": "identifier", "text": "std", "parent": 172, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 20}}, {"id": 178, "type": "binary_expression", "text": "vector<target_detection_t>> m", "parent": 169, "children": [179, 180, 181], "start_point": {"row": 28, "column": 22}, "end_point": {"row": 28, "column": 51}}, {"id": 179, "type": "identifier", "text": "vector", "parent": 178, "children": [], "start_point": {"row": 28, "column": 22}, "end_point": {"row": 28, "column": 28}}, {"id": 180, "type": "<", "text": "<", "parent": 178, "children": [], "start_point": {"row": 28, "column": 28}, "end_point": {"row": 28, "column": 29}}, {"id": 181, "type": "binary_expression", "text": "target_detection_t>> m", "parent": 178, "children": [182, 183, 184], "start_point": {"row": 28, "column": 29}, "end_point": {"row": 28, "column": 51}}, {"id": 182, "type": "identifier", "text": "target_detection_t", "parent": 181, "children": [], "start_point": {"row": 28, "column": 29}, "end_point": {"row": 28, "column": 47}}, {"id": 183, "type": ">>", "text": ">>", "parent": 181, "children": [], "start_point": {"row": 28, "column": 47}, "end_point": {"row": 28, "column": 49}}, {"id": 184, "type": "identifier", "text": "m", "parent": 181, "children": [], "start_point": {"row": 28, "column": 50}, "end_point": {"row": 28, "column": 51}}, {"id": 185, "type": "labeled_statement", "text": "public:\n WiseGTreader();", "parent": 149, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 31, "column": 19}}, {"id": 186, "type": "call_expression", "text": "WiseGTreader()", "parent": 185, "children": [187, 188], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 18}}, {"id": 187, "type": "identifier", "text": "WiseGTreader", "parent": 186, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 16}}, {"id": 188, "type": "argument_list", "text": "()", "parent": 186, "children": [], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 31, "column": 18}}, {"id": 189, "type": "unary_expression", "text": "~WiseGTreader()", "parent": 149, "children": [190, 191], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 19}}, {"id": 190, "type": "~", "text": "~", "parent": 189, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 5}}, {"id": 191, "type": "call_expression", "text": "WiseGTreader()", "parent": 189, "children": [192, 193], "start_point": {"row": 32, "column": 5}, "end_point": {"row": 32, "column": 19}}, {"id": 192, "type": "identifier", "text": "WiseGTreader", "parent": 191, "children": [], "start_point": {"row": 32, "column": 5}, "end_point": {"row": 32, "column": 17}}, {"id": 193, "type": "argument_list", "text": "()", "parent": 191, "children": [], "start_point": {"row": 32, "column": 17}, "end_point": {"row": 32, "column": 19}}, {"id": 194, "type": "declaration", "text": "int parsefile(const char *filename,const char * format);", "parent": 149, "children": [195, 196], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 60}}, {"id": 195, "type": "primitive_type", "text": "int", "parent": 194, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 7}}, {"id": 196, "type": "function_declarator", "text": "parsefile(const char *filename,const char * format)", "parent": 194, "children": [197, 198], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 59}}, {"id": 197, "type": "identifier", "text": "parsefile", "parent": 196, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 17}}, {"id": 198, "type": "parameter_list", "text": "(const char *filename,const char * format)", "parent": 196, "children": [199, 204], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 59}}, {"id": 199, "type": "parameter_declaration", "text": "const char *filename", "parent": 198, "children": [200, 201], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 34, "column": 38}}, {"id": 200, "type": "primitive_type", "text": "char", "parent": 199, "children": [], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 34, "column": 28}}, {"id": 201, "type": "pointer_declarator", "text": "*filename", "parent": 199, "children": [202, 203], "start_point": {"row": 34, "column": 29}, "end_point": {"row": 34, "column": 38}}, {"id": 202, "type": "*", "text": "*", "parent": 201, "children": [], "start_point": {"row": 34, "column": 29}, "end_point": {"row": 34, "column": 30}}, {"id": 203, "type": "identifier", "text": "filename", "parent": 201, "children": [], "start_point": {"row": 34, "column": 30}, "end_point": {"row": 34, "column": 38}}, {"id": 204, "type": "parameter_declaration", "text": "const char * format", "parent": 198, "children": [205, 206], "start_point": {"row": 34, "column": 39}, "end_point": {"row": 34, "column": 58}}, {"id": 205, "type": "primitive_type", "text": "char", "parent": 204, "children": [], "start_point": {"row": 34, "column": 45}, "end_point": {"row": 34, "column": 49}}, {"id": 206, "type": "pointer_declarator", "text": "* format", "parent": 204, "children": [207, 208], "start_point": {"row": 34, "column": 50}, "end_point": {"row": 34, "column": 58}}, {"id": 207, "type": "*", "text": "*", "parent": 206, "children": [], "start_point": {"row": 34, "column": 50}, "end_point": {"row": 34, "column": 51}}, {"id": 208, "type": "identifier", "text": "format", "parent": 206, "children": [], "start_point": {"row": 34, "column": 52}, "end_point": {"row": 34, "column": 58}}, {"id": 209, "type": "labeled_statement", "text": "std::map<int,std::vector<target_detection_t>>* getData(){return &m;}", "parent": 149, "children": [210, 211, 218], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 72}}, {"id": 210, "type": "statement_identifier", "text": "std", "parent": 209, "children": [], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 7}}, {"id": 211, "type": "ERROR", "text": "::map<int,std:", "parent": 209, "children": [212], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 21}}, {"id": 212, "type": "comma_expression", "text": "map<int,std", "parent": 211, "children": [213, 217], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 20}}, {"id": 213, "type": "binary_expression", "text": "map<int", "parent": 212, "children": [214, 215, 216], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 16}}, {"id": 214, "type": "identifier", "text": "map", "parent": 213, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 12}}, {"id": 215, "type": "<", "text": "<", "parent": 213, "children": [], "start_point": {"row": 35, "column": 12}, "end_point": {"row": 35, "column": 13}}, {"id": 216, "type": "identifier", "text": "int", "parent": 213, "children": [], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 16}}, {"id": 217, "type": "identifier", "text": "std", "parent": 212, "children": [], "start_point": {"row": 35, "column": 17}, "end_point": {"row": 35, "column": 20}}, {"id": 218, "type": "ERROR", "text": "vector<target_detection_t>>* getData()", "parent": 209, "children": [219], "start_point": {"row": 35, "column": 22}, "end_point": {"row": 35, "column": 60}}, {"id": 219, "type": "binary_expression", "text": "vector<target_detection_t>>* getData()", "parent": 218, "children": [220, 221, 222], "start_point": {"row": 35, "column": 22}, "end_point": {"row": 35, "column": 60}}, {"id": 220, "type": "identifier", "text": "vector", "parent": 219, "children": [], "start_point": {"row": 35, "column": 22}, "end_point": {"row": 35, "column": 28}}, {"id": 221, "type": "<", "text": "<", "parent": 219, "children": [], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 35, "column": 29}}, {"id": 222, "type": "binary_expression", "text": "target_detection_t>>* getData()", "parent": 219, "children": [223, 224, 225], "start_point": {"row": 35, "column": 29}, "end_point": {"row": 35, "column": 60}}, {"id": 223, "type": "identifier", "text": "target_detection_t", "parent": 222, "children": [], "start_point": {"row": 35, "column": 29}, "end_point": {"row": 35, "column": 47}}, {"id": 224, "type": ">>", "text": ">>", "parent": 222, "children": [], "start_point": {"row": 35, "column": 47}, "end_point": {"row": 35, "column": 49}}, {"id": 225, "type": "pointer_expression", "text": "* getData()", "parent": 222, "children": [226, 227], "start_point": {"row": 35, "column": 49}, "end_point": {"row": 35, "column": 60}}, {"id": 226, "type": "*", "text": "*", "parent": 225, "children": [], "start_point": {"row": 35, "column": 49}, "end_point": {"row": 35, "column": 50}}, {"id": 227, "type": "call_expression", "text": "getData()", "parent": 225, "children": [228, 229], "start_point": {"row": 35, "column": 51}, "end_point": {"row": 35, "column": 60}}, {"id": 228, "type": "identifier", "text": "getData", "parent": 227, "children": [], "start_point": {"row": 35, "column": 51}, "end_point": {"row": 35, "column": 58}}, {"id": 229, "type": "argument_list", "text": "()", "parent": 227, "children": [], "start_point": {"row": 35, "column": 58}, "end_point": {"row": 35, "column": 60}}, {"id": 230, "type": "return_statement", "text": "return &m;", "parent": 209, "children": [231], "start_point": {"row": 35, "column": 61}, "end_point": {"row": 35, "column": 71}}, {"id": 231, "type": "pointer_expression", "text": "&m", "parent": 230, "children": [232], "start_point": {"row": 35, "column": 68}, "end_point": {"row": 35, "column": 70}}, {"id": 232, "type": "identifier", "text": "m", "parent": 231, "children": [], "start_point": {"row": 35, "column": 69}, "end_point": {"row": 35, "column": 70}}, {"id": 233, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 6}}]}, "node_categories": {"declarations": {"functions": [37, 45, 50, 55, 60, 65, 70, 75, 113, 118, 123, 128, 133, 138, 143, 149, 196], "variables": [22, 25, 31, 36, 81, 116, 121, 126, 131, 136, 141, 146, 151, 156, 161, 164, 194, 199, 204], "classes": [19, 20], "imports": [6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [41, 109, 172, 173, 178, 181, 186, 189, 191, 212, 213, 219, 222, 225, 227, 231], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 17, 21, 24, 27, 28, 29, 30, 33, 34, 35, 38, 42, 46, 51, 56, 61, 66, 71, 76, 82, 83, 86, 88, 89, 91, 92, 94, 95, 97, 98, 99, 101, 102, 104, 105, 107, 110, 112, 114, 117, 119, 122, 124, 127, 129, 132, 134, 137, 139, 142, 144, 147, 150, 154, 157, 160, 163, 167, 170, 174, 176, 177, 179, 182, 184, 187, 192, 197, 203, 208, 210, 214, 216, 217, 220, 223, 228, 232, 233], "returns": [230], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 44, 49, 54, 59, 64, 69, 74, 79, 155, 168], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": [40, 108]}}, "cross_language_map": {"function_declarations": [{"node_id": 37, "universal_type": "function", "name": "unknown", "text_snippet": "target_detection_t()"}, {"node_id": 45, "universal_type": "function", "name": "unknown", "text_snippet": "bb_x_tl(0)"}, {"node_id": 50, "universal_type": "function", "name": "unknown", "text_snippet": "bb_y_tl(0)"}, {"node_id": 55, "universal_type": "function", "name": "unknown", "text_snippet": "bb_x_br(0)"}, {"node_id": 60, "universal_type": "function", "name": "unknown", "text_snippet": "bb_y_br(0)"}, {"node_id": 65, "universal_type": "function", "name": "unknown", "text_snippet": "Xw(0)"}, {"node_id": 70, "universal_type": "function", "name": "unknown", "text_snippet": "Yw(0)"}, {"node_id": 75, "universal_type": "function", "name": "unknown", "text_snippet": "Zw(0)"}, {"node_id": 113, "universal_type": "function", "name": "unknown", "text_snippet": "bb_x_tl(bb_x_tl)"}, {"node_id": 118, "universal_type": "function", "name": "unknown", "text_snippet": "bb_y_tl(bb_y_tl)"}, {"node_id": 123, "universal_type": "function", "name": "unknown", "text_snippet": "bb_x_br(bb_x_br)"}, {"node_id": 128, "universal_type": "function", "name": "unknown", "text_snippet": "bb_y_br(bb_y_br)"}, {"node_id": 133, "universal_type": "function", "name": "unknown", "text_snippet": "Xw(Xw)"}, {"node_id": 138, "universal_type": "function", "name": "unknown", "text_snippet": "Yw(Yw)"}, {"node_id": 143, "universal_type": "function", "name": "unknown", "text_snippet": "Zw(Zw)"}, {"node_id": 149, "universal_type": "function", "name": "WiseGTreader", "text_snippet": "class WiseGTreader\n{\n char _filename[255];\n FILE *_filePtr;\n\n bool _gt_common_all_cameras;\n"}, {"node_id": 196, "universal_type": "function", "name": "unknown", "text_snippet": "parsefile(const char *filename,const char * format)"}], "class_declarations": [{"node_id": 19, "universal_type": "class", "name": "target_detection_t", "text_snippet": "struct target_detection_t {\n int target_id;\n double bb_x_tl,bb_y_tl,bb_x_br,bb_y_br; //image p"}, {"node_id": 20, "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 <vector>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <map>\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "#ifndef __WISEGROUNDTRUTH_READER_H__\n#define __WISEGROUNDTRUTH_READER_H__\n\n#include <stdio.h>\n#include <vector>\n#include <map>\n\n#define MAX_LINE 512\n\n\nstruct target_detection_t {\n int target_id;\n double bb_x_tl,bb_y_tl,bb_x_br,bb_y_br; //image plane coordinates (2D bounding box)\n double Xw,Yw,Zw; //world coordinates (3D point)\npublic:\n target_detection_t() : target_id(0), bb_x_tl(0), bb_y_tl(0), bb_x_br(0), bb_y_br(0), Xw(0), Yw(0), Zw(0) {} ;\n target_detection_t(double tid, double bb_x_tl,double bb_y_tl,double bb_x_br,double bb_y_br,double Xw,double Yw,double Zw) : target_id(tid), bb_x_tl(bb_x_tl), bb_y_tl(bb_y_tl), bb_x_br(bb_x_br), bb_y_br(bb_y_br), Xw(Xw), Yw(Yw), Zw(Zw) {} ;\n};\n\nclass WiseGTreader\n{\n char _filename[255];\n FILE *_filePtr;\n\n bool _gt_common_all_cameras;\n char _lineFormat[255];\n\n //ground-truth format <frame,detections>\n std::map<int,std::vector<target_detection_t>> m;\n\npublic:\n WiseGTreader();\n ~WiseGTreader();\n\n int parsefile(const char *filename,const char * format);\n std::map<int,std::vector<target_detection_t>>* getData(){return &m;};\n /* int getProperty(const char *name, char *valor);\n int getProperty(const char *name, int *valor);\n int getProperty(const char *name, long *valor);\n int getProperty(const char *name, double *valor);\n int getProperty(const char *name, float *value);\n\n\n void readLines();\n\n int setProperty(const char *name, char *valor);\n int setProperty(const char *name, int valor);\n int setProperty(const char *name, long valor);\n int setProperty(const char *name, double value);\n\n\n */\n};\n\n#endif // __WISEGROUNDTRUTH_READER_H__\n\n"}
| 81,209
|
c
|
/*
* GameContext.h
*
* Created on: Apr 9, 2012
* Author: rgreen
*/
#ifndef GAMECONTEXT_H_
#define GAMECONTEXT_H_
#include <batterytech/Context.h>
using namespace BatteryTech;
class Game;
class World;
class WorldRenderer;
class GameContext : public Context {
public:
GameContext(GraphicsConfiguration *gConfig);
virtual ~GameContext();
Game *game;
World *world;
WorldRenderer *worldRenderer;
};
#endif /* GAMECONTEXT_H_ */
| 15.82
| 28
|
(translation_unit) "/*
\n * GameContext.h
\n *
\n * Created on: Apr 9, 2012
\n * Author: rgreen
\n */
\n
\n#ifndef GAMECONTEXT_H_
\n#define GAMECONTEXT_H_
\n
\n#include <batterytech/Context.h>
\n
\nusing namespace BatteryTech;
\n
\nclass Game;
\nclass World;
\nclass WorldRenderer;
\n
\nclass GameContext : public Context {
\npublic:
\n GameContext(GraphicsConfiguration *gConfig);
\n virtual ~GameContext();
\n Game *game;
\n World *world;
\n WorldRenderer *worldRenderer;
\n};
\n
\n#endif /* GAMECONTEXT_H_ */
\n"
(comment) "/*
\n * GameContext.h
\n *
\n * Created on: Apr 9, 2012
\n * Author: rgreen
\n */"
(preproc_ifdef) "#ifndef GAMECONTEXT_H_
\n#define GAMECONTEXT_H_
\n
\n#include <batterytech/Context.h>
\n
\nusing namespace BatteryTech;
\n
\nclass Game;
\nclass World;
\nclass WorldRenderer;
\n
\nclass GameContext : public Context {
\npublic:
\n GameContext(GraphicsConfiguration *gConfig);
\n virtual ~GameContext();
\n Game *game;
\n World *world;
\n WorldRenderer *worldRenderer;
\n};
\n
\n#endif"
(#ifndef) "#ifndef"
(identifier) "GAMECONTEXT_H_"
(preproc_def) "#define GAMECONTEXT_H_
\n"
(#define) "#define"
(identifier) "GAMECONTEXT_H_"
(preproc_include) "#include <batterytech/Context.h>
\n"
(#include) "#include"
(system_lib_string) "<batterytech/Context.h>"
(declaration) "using namespace BatteryTech;"
(type_identifier) "using"
(ERROR) "namespace"
(identifier) "namespace"
(identifier) "BatteryTech"
(;) ";"
(declaration) "class Game;"
(type_identifier) "class"
(identifier) "Game"
(;) ";"
(declaration) "class World;"
(type_identifier) "class"
(identifier) "World"
(;) ";"
(declaration) "class WorldRenderer;"
(type_identifier) "class"
(identifier) "WorldRenderer"
(;) ";"
(function_definition) "class GameContext : public Context {
\npublic:
\n GameContext(GraphicsConfiguration *gConfig);
\n virtual ~GameContext();
\n Game *game;
\n World *world;
\n WorldRenderer *worldRenderer;
\n}"
(type_identifier) "class"
(identifier) "GameContext"
(ERROR) ": public Context"
(:) ":"
(identifier) "public"
(identifier) "Context"
(compound_statement) "{
\npublic:
\n GameContext(GraphicsConfiguration *gConfig);
\n virtual ~GameContext();
\n Game *game;
\n World *world;
\n WorldRenderer *worldRenderer;
\n}"
({) "{"
(labeled_statement) "public:
\n GameContext(GraphicsConfiguration *gConfig);"
(statement_identifier) "public"
(:) ":"
(expression_statement) "GameContext(GraphicsConfiguration *gConfig);"
(call_expression) "GameContext(GraphicsConfiguration *gConfig)"
(identifier) "GameContext"
(argument_list) "(GraphicsConfiguration *gConfig)"
(() "("
(binary_expression) "GraphicsConfiguration *gConfig"
(identifier) "GraphicsConfiguration"
(*) "*"
(identifier) "gConfig"
()) ")"
(;) ";"
(declaration) "virtual ~GameContext();"
(type_identifier) "virtual"
(ERROR) "~"
(~) "~"
(function_declarator) "GameContext()"
(identifier) "GameContext"
(parameter_list) "()"
(() "("
()) ")"
(;) ";"
(declaration) "Game *game;"
(type_identifier) "Game"
(pointer_declarator) "*game"
(*) "*"
(identifier) "game"
(;) ";"
(declaration) "World *world;"
(type_identifier) "World"
(pointer_declarator) "*world"
(*) "*"
(identifier) "world"
(;) ";"
(declaration) "WorldRenderer *worldRenderer;"
(type_identifier) "WorldRenderer"
(pointer_declarator) "*worldRenderer"
(*) "*"
(identifier) "worldRenderer"
(;) ";"
(}) "}"
(expression_statement) ";"
(;) ";"
(#endif) "#endif"
(comment) "/* GAMECONTEXT_H_ */"
| 85
| 3
|
{"language": "c", "success": true, "metadata": {"lines": 28, "avg_line_length": 15.82, "nodes": 55, "errors": 0, "source_hash": "03b68d8fa3c4515bfd5ef4437b9aa62842372a4b3c1802a2c328882043c3cf3a", "categorized_nodes": 39}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef GAMECONTEXT_H_\r\n#define GAMECONTEXT_H_\r\n\r\n#include <batterytech/Context.h>\r\n\r\nusing namespace BatteryTech;\r\n\r\nclass Game;\r\nclass World;\r\nclass WorldRenderer;\r\n\r\nclass GameContext : public Context {\r\npublic:\r\n\tGameContext(GraphicsConfiguration *gConfig);\r\n\tvirtual ~GameContext();\r\n\tGame *game;\r\n\tWorld *world;\r\n\tWorldRenderer *worldRenderer;\r\n};\r\n\r\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 14, 16, 18, 20, 54], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 27, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 2, "type": "identifier", "text": "GAMECONTEXT_H_", "parent": 0, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 22}}, {"id": 3, "type": "preproc_def", "text": "#define GAMECONTEXT_H_\r\n", "parent": 0, "children": [4, 5], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 5, "type": "identifier", "text": "GAMECONTEXT_H_", "parent": 3, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 22}}, {"id": 6, "type": "preproc_include", "text": "#include <batterytech/Context.h>\r\n", "parent": 0, "children": [7, 8], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<batterytech/Context.h>", "parent": 6, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 32}}, {"id": 9, "type": "declaration", "text": "using namespace BatteryTech;", "parent": 0, "children": [10, 11, 13], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 28}}, {"id": 10, "type": "type_identifier", "text": "using", "parent": 9, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 5}}, {"id": 11, "type": "ERROR", "text": "namespace", "parent": 9, "children": [12], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 15}}, {"id": 12, "type": "identifier", "text": "namespace", "parent": 11, "children": [], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 15}}, {"id": 13, "type": "identifier", "text": "BatteryTech", "parent": 9, "children": [], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 27}}, {"id": 14, "type": "declaration", "text": "class Game;", "parent": 0, "children": [15], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 11}}, {"id": 15, "type": "identifier", "text": "Game", "parent": 14, "children": [], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 10}}, {"id": 16, "type": "declaration", "text": "class World;", "parent": 0, "children": [17], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 12}}, {"id": 17, "type": "identifier", "text": "World", "parent": 16, "children": [], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 11}}, {"id": 18, "type": "declaration", "text": "class WorldRenderer;", "parent": 0, "children": [19], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 20}}, {"id": 19, "type": "identifier", "text": "WorldRenderer", "parent": 18, "children": [], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 19}}, {"id": 20, "type": "function_definition", "text": "class GameContext : public Context {\r\npublic:\r\n\tGameContext(GraphicsConfiguration *gConfig);\r\n\tvirtual ~GameContext();\r\n\tGame *game;\r\n\tWorld *world;\r\n\tWorldRenderer *worldRenderer;\r\n}", "parent": 0, "children": [21, 22], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 21, "type": "identifier", "text": "GameContext", "parent": 20, "children": [], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 17}}, {"id": 22, "type": "ERROR", "text": ": public Context", "parent": 20, "children": [23], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 34}}, {"id": 23, "type": "identifier", "text": "Context", "parent": 22, "children": [], "start_point": {"row": 18, "column": 27}, "end_point": {"row": 18, "column": 34}}, {"id": 24, "type": "labeled_statement", "text": "public:\r\n\tGameContext(GraphicsConfiguration *gConfig);", "parent": 20, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 45}}, {"id": 25, "type": "call_expression", "text": "GameContext(GraphicsConfiguration *gConfig)", "parent": 24, "children": [26, 27], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 44}}, {"id": 26, "type": "identifier", "text": "GameContext", "parent": 25, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 12}}, {"id": 27, "type": "argument_list", "text": "(GraphicsConfiguration *gConfig)", "parent": 25, "children": [28], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 44}}, {"id": 28, "type": "binary_expression", "text": "GraphicsConfiguration *gConfig", "parent": 27, "children": [29, 30, 31], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 43}}, {"id": 29, "type": "identifier", "text": "GraphicsConfiguration", "parent": 28, "children": [], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 34}}, {"id": 30, "type": "*", "text": "*", "parent": 28, "children": [], "start_point": {"row": 20, "column": 35}, "end_point": {"row": 20, "column": 36}}, {"id": 31, "type": "identifier", "text": "gConfig", "parent": 28, "children": [], "start_point": {"row": 20, "column": 36}, "end_point": {"row": 20, "column": 43}}, {"id": 32, "type": "declaration", "text": "virtual ~GameContext();", "parent": 20, "children": [33, 34, 36], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 24}}, {"id": 33, "type": "type_identifier", "text": "virtual", "parent": 32, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 8}}, {"id": 34, "type": "ERROR", "text": "~", "parent": 32, "children": [35], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 10}}, {"id": 35, "type": "~", "text": "~", "parent": 34, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 10}}, {"id": 36, "type": "function_declarator", "text": "GameContext()", "parent": 32, "children": [37, 38], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 23}}, {"id": 37, "type": "identifier", "text": "GameContext", "parent": 36, "children": [], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 21}}, {"id": 38, "type": "parameter_list", "text": "()", "parent": 36, "children": [], "start_point": {"row": 21, "column": 21}, "end_point": {"row": 21, "column": 23}}, {"id": 39, "type": "declaration", "text": "Game *game;", "parent": 20, "children": [40, 41], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 12}}, {"id": 40, "type": "type_identifier", "text": "Game", "parent": 39, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 5}}, {"id": 41, "type": "pointer_declarator", "text": "*game", "parent": 39, "children": [42, 43], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 11}}, {"id": 42, "type": "*", "text": "*", "parent": 41, "children": [], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 7}}, {"id": 43, "type": "identifier", "text": "game", "parent": 41, "children": [], "start_point": {"row": 22, "column": 7}, "end_point": {"row": 22, "column": 11}}, {"id": 44, "type": "declaration", "text": "World *world;", "parent": 20, "children": [45, 46], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 14}}, {"id": 45, "type": "type_identifier", "text": "World", "parent": 44, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 6}}, {"id": 46, "type": "pointer_declarator", "text": "*world", "parent": 44, "children": [47, 48], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 13}}, {"id": 47, "type": "*", "text": "*", "parent": 46, "children": [], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 8}}, {"id": 48, "type": "identifier", "text": "world", "parent": 46, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 13}}, {"id": 49, "type": "declaration", "text": "WorldRenderer *worldRenderer;", "parent": 20, "children": [50, 51], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 30}}, {"id": 50, "type": "type_identifier", "text": "WorldRenderer", "parent": 49, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 14}}, {"id": 51, "type": "pointer_declarator", "text": "*worldRenderer", "parent": 49, "children": [52, 53], "start_point": {"row": 24, "column": 15}, "end_point": {"row": 24, "column": 29}}, {"id": 52, "type": "*", "text": "*", "parent": 51, "children": [], "start_point": {"row": 24, "column": 15}, "end_point": {"row": 24, "column": 16}}, {"id": 53, "type": "identifier", "text": "worldRenderer", "parent": 51, "children": [], "start_point": {"row": 24, "column": 16}, "end_point": {"row": 24, "column": 29}}, {"id": 54, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 6}}]}, "node_categories": {"declarations": {"functions": [20, 36], "variables": [9, 14, 16, 18, 32, 39, 44, 49], "classes": [], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [25, 28], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 10, 12, 13, 15, 17, 19, 21, 23, 26, 29, 31, 33, 37, 40, 43, 45, 48, 50, 53, 54], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 20, "universal_type": "function", "name": "GameContext", "text_snippet": "class GameContext : public Context {\r\npublic:\r\n\tGameContext(GraphicsConfiguration *gConfig);\r\n\tvirtu"}, {"node_id": 36, "universal_type": "function", "name": "unknown", "text_snippet": "GameContext()"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <batterytech/Context.h>\r\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "/*\r\n * GameContext.h\r\n *\r\n * Created on: Apr 9, 2012\r\n * Author: rgreen\r\n */\r\n\r\n#ifndef GAMECONTEXT_H_\r\n#define GAMECONTEXT_H_\r\n\r\n#include <batterytech/Context.h>\r\n\r\nusing namespace BatteryTech;\r\n\r\nclass Game;\r\nclass World;\r\nclass WorldRenderer;\r\n\r\nclass GameContext : public Context {\r\npublic:\r\n\tGameContext(GraphicsConfiguration *gConfig);\r\n\tvirtual ~GameContext();\r\n\tGame *game;\r\n\tWorld *world;\r\n\tWorldRenderer *worldRenderer;\r\n};\r\n\r\n#endif /* GAMECONTEXT_H_ */\r\n"}
| 81,210
|
c
|
#pragma once
#include <QJsonObject>
#include <QJsonArray>
#include "AbstractResponse.h"
#include "ResponseCode.h"
#include "Entities/Account.h"
class GetAccountByIdResponse : public AbstractResponse
{
public:
GetAccountByIdResponse() = default;
~GetAccountByIdResponse() override;
Account* _Account;
void read(const QJsonObject& json) override;
void write(QJsonObject& json) const override;
};
| 25.6
| 15
|
(translation_unit) "#pragma once\n\n#include <QJsonObject>\n#include <QJsonArray>\n\n#include "AbstractResponse.h"\n#include "ResponseCode.h"\n#include "Entities/Account.h"\n\nclass GetAccountByIdResponse : public AbstractResponse\n{\npublic:\n GetAccountByIdResponse() = default;\n ~GetAccountByIdResponse() override;\n\n Account* _Account;\n\n void read(const QJsonObject& json) override;\n void write(QJsonObject& json) const override;\n};\n\n"
(preproc_call) "#pragma once\n"
(preproc_directive) "#pragma"
(preproc_arg) "once"
(preproc_include) "#include <QJsonObject>\n"
(#include) "#include"
(system_lib_string) "<QJsonObject>"
(preproc_include) "#include <QJsonArray>\n"
(#include) "#include"
(system_lib_string) "<QJsonArray>"
(preproc_include) "#include "AbstractResponse.h"\n"
(#include) "#include"
(string_literal) ""AbstractResponse.h""
(") """
(string_content) "AbstractResponse.h"
(") """
(preproc_include) "#include "ResponseCode.h"\n"
(#include) "#include"
(string_literal) ""ResponseCode.h""
(") """
(string_content) "ResponseCode.h"
(") """
(preproc_include) "#include "Entities/Account.h"\n"
(#include) "#include"
(string_literal) ""Entities/Account.h""
(") """
(string_content) "Entities/Account.h"
(") """
(function_definition) "class GetAccountByIdResponse : public AbstractResponse\n{\npublic:\n GetAccountByIdResponse() = default;\n ~GetAccountByIdResponse() override;\n\n Account* _Account;\n\n void read(const QJsonObject& json) override;\n void write(QJsonObject& json) const override;\n}"
(type_identifier) "class"
(identifier) "GetAccountByIdResponse"
(ERROR) ": public AbstractResponse"
(:) ":"
(identifier) "public"
(identifier) "AbstractResponse"
(compound_statement) "{\npublic:\n GetAccountByIdResponse() = default;\n ~GetAccountByIdResponse() override;\n\n Account* _Account;\n\n void read(const QJsonObject& json) override;\n void write(QJsonObject& json) const override;\n}"
({) "{"
(labeled_statement) "public:\n GetAccountByIdResponse() = default;"
(statement_identifier) "public"
(:) ":"
(expression_statement) "GetAccountByIdResponse() = default;"
(assignment_expression) "GetAccountByIdResponse() = default"
(call_expression) "GetAccountByIdResponse()"
(identifier) "GetAccountByIdResponse"
(argument_list) "()"
(() "("
()) ")"
(=) "="
(identifier) "default"
(;) ";"
(expression_statement) "~GetAccountByIdResponse() override;"
(unary_expression) "~GetAccountByIdResponse()"
(~) "~"
(call_expression) "GetAccountByIdResponse()"
(identifier) "GetAccountByIdResponse"
(argument_list) "()"
(() "("
()) ")"
(ERROR) "override"
(identifier) "override"
(;) ";"
(declaration) "Account* _Account;"
(type_identifier) "Account"
(pointer_declarator) "* _Account"
(*) "*"
(identifier) "_Account"
(;) ";"
(ERROR) "void read(const QJsonObject& json) override"
(primitive_type) "void"
(function_declarator) "read(const QJsonObject& json) override"
(identifier) "read"
(parameter_list) "(const QJsonObject& json)"
(() "("
(parameter_declaration) "const QJsonObject& json"
(type_qualifier) "const"
(const) "const"
(type_identifier) "QJsonObject"
(ERROR) "&"
(&) "&"
(identifier) "json"
()) ")"
(identifier) "override"
(expression_statement) ";"
(;) ";"
(ERROR) "void write(QJsonObject& json) const override"
(primitive_type) "void"
(function_declarator) "write(QJsonObject& json) const override"
(identifier) "write"
(parameter_list) "(QJsonObject& json)"
(() "("
(parameter_declaration) "QJsonObject& json"
(type_identifier) "QJsonObject"
(ERROR) "&"
(&) "&"
(identifier) "json"
()) ")"
(identifier) "const"
(identifier) "override"
(expression_statement) ";"
(;) ";"
(}) "}"
(expression_statement) ";"
(;) ";"
| 103
| 6
|
{"language": "c", "success": true, "metadata": {"lines": 15, "avg_line_length": 25.6, "nodes": 59, "errors": 0, "source_hash": "0818aace4f9b517dadc1f23526657bb68bcd72c15569c7054d33d3dde164c680", "categorized_nodes": 42}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include <QJsonObject>\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": "<QJsonObject>", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 22}}, {"id": 6, "type": "preproc_include", "text": "#include <QJsonArray>\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": "<QJsonArray>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 21}}, {"id": 9, "type": "preproc_include", "text": "#include \"AbstractResponse.h\"\n", "parent": null, "children": [10, 11], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"AbstractResponse.h\"", "parent": 9, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 29}}, {"id": 12, "type": "preproc_include", "text": "#include \"ResponseCode.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": "\"ResponseCode.h\"", "parent": 12, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 25}}, {"id": 15, "type": "preproc_include", "text": "#include \"Entities/Account.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": "\"Entities/Account.h\"", "parent": 15, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 29}}, {"id": 18, "type": "function_definition", "text": "class GetAccountByIdResponse : public AbstractResponse\n{\npublic:\n\tGetAccountByIdResponse() = default;\n\t~GetAccountByIdResponse() override;\n\n\tAccount* _Account;\n\n\tvoid read(const QJsonObject& json) override;\n\tvoid write(QJsonObject& json) const override;\n}", "parent": null, "children": [19, 20], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 19, "type": "identifier", "text": "GetAccountByIdResponse", "parent": 18, "children": [], "start_point": {"row": 9, "column": 6}, "end_point": {"row": 9, "column": 28}}, {"id": 20, "type": "ERROR", "text": ": public AbstractResponse", "parent": 18, "children": [21], "start_point": {"row": 9, "column": 29}, "end_point": {"row": 9, "column": 54}}, {"id": 21, "type": "identifier", "text": "AbstractResponse", "parent": 20, "children": [], "start_point": {"row": 9, "column": 38}, "end_point": {"row": 9, "column": 54}}, {"id": 22, "type": "labeled_statement", "text": "public:\n\tGetAccountByIdResponse() = default;", "parent": 18, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 36}}, {"id": 23, "type": "assignment_expression", "text": "GetAccountByIdResponse() = default", "parent": 22, "children": [24, 27, 28], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 35}}, {"id": 24, "type": "call_expression", "text": "GetAccountByIdResponse()", "parent": 23, "children": [25, 26], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 25}}, {"id": 25, "type": "identifier", "text": "GetAccountByIdResponse", "parent": 24, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 23}}, {"id": 26, "type": "argument_list", "text": "()", "parent": 24, "children": [], "start_point": {"row": 12, "column": 23}, "end_point": {"row": 12, "column": 25}}, {"id": 27, "type": "=", "text": "=", "parent": 23, "children": [], "start_point": {"row": 12, "column": 26}, "end_point": {"row": 12, "column": 27}}, {"id": 28, "type": "identifier", "text": "default", "parent": 23, "children": [], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 12, "column": 35}}, {"id": 29, "type": "unary_expression", "text": "~GetAccountByIdResponse()", "parent": 18, "children": [30, 31], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 26}}, {"id": 30, "type": "~", "text": "~", "parent": 29, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 2}}, {"id": 31, "type": "call_expression", "text": "GetAccountByIdResponse()", "parent": 29, "children": [32, 33], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 26}}, {"id": 32, "type": "identifier", "text": "GetAccountByIdResponse", "parent": 31, "children": [], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 24}}, {"id": 33, "type": "argument_list", "text": "()", "parent": 31, "children": [], "start_point": {"row": 13, "column": 24}, "end_point": {"row": 13, "column": 26}}, {"id": 34, "type": "ERROR", "text": "override", "parent": 18, "children": [35], "start_point": {"row": 13, "column": 27}, "end_point": {"row": 13, "column": 35}}, {"id": 35, "type": "identifier", "text": "override", "parent": 34, "children": [], "start_point": {"row": 13, "column": 27}, "end_point": {"row": 13, "column": 35}}, {"id": 36, "type": "declaration", "text": "Account* _Account;", "parent": 18, "children": [37, 38], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 19}}, {"id": 37, "type": "type_identifier", "text": "Account", "parent": 36, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 8}}, {"id": 38, "type": "pointer_declarator", "text": "* _Account", "parent": 36, "children": [39, 40], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 18}}, {"id": 39, "type": "*", "text": "*", "parent": 38, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 9}}, {"id": 40, "type": "identifier", "text": "_Account", "parent": 38, "children": [], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 18}}, {"id": 41, "type": "ERROR", "text": "void read(const QJsonObject& json) override", "parent": 18, "children": [42, 43], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 44}}, {"id": 42, "type": "primitive_type", "text": "void", "parent": 41, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 5}}, {"id": 43, "type": "function_declarator", "text": "read(const QJsonObject& json) override", "parent": 41, "children": [44, 45, 49], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 44}}, {"id": 44, "type": "identifier", "text": "read", "parent": 43, "children": [], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 10}}, {"id": 45, "type": "parameter_list", "text": "(const QJsonObject& json)", "parent": 43, "children": [46], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 35}}, {"id": 46, "type": "parameter_declaration", "text": "const QJsonObject& json", "parent": 45, "children": [47, 48], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 34}}, {"id": 47, "type": "type_identifier", "text": "QJsonObject", "parent": 46, "children": [], "start_point": {"row": 17, "column": 17}, "end_point": {"row": 17, "column": 28}}, {"id": 48, "type": "identifier", "text": "json", "parent": 46, "children": [], "start_point": {"row": 17, "column": 30}, "end_point": {"row": 17, "column": 34}}, {"id": 49, "type": "identifier", "text": "override", "parent": 43, "children": [], "start_point": {"row": 17, "column": 36}, "end_point": {"row": 17, "column": 44}}, {"id": 50, "type": "ERROR", "text": "void write(QJsonObject& json) const override", "parent": 18, "children": [51, 52], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 45}}, {"id": 51, "type": "primitive_type", "text": "void", "parent": 50, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 5}}, {"id": 52, "type": "function_declarator", "text": "write(QJsonObject& json) const override", "parent": 50, "children": [53, 54, 58], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 45}}, {"id": 53, "type": "identifier", "text": "write", "parent": 52, "children": [], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 11}}, {"id": 54, "type": "parameter_list", "text": "(QJsonObject& json)", "parent": 52, "children": [55], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 30}}, {"id": 55, "type": "parameter_declaration", "text": "QJsonObject& json", "parent": 54, "children": [56, 57], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 29}}, {"id": 56, "type": "type_identifier", "text": "QJsonObject", "parent": 55, "children": [], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 23}}, {"id": 57, "type": "identifier", "text": "json", "parent": 55, "children": [], "start_point": {"row": 18, "column": 25}, "end_point": {"row": 18, "column": 29}}, {"id": 58, "type": "identifier", "text": "override", "parent": 52, "children": [], "start_point": {"row": 18, "column": 37}, "end_point": {"row": 18, "column": 45}}]}, "node_categories": {"declarations": {"functions": [18, 43, 52], "variables": [36, 46, 55], "classes": [], "imports": [3, 4, 6, 7, 9, 10, 12, 13, 15, 16], "modules": [], "enums": []}, "statements": {"expressions": [24, 29, 31], "assignments": [23], "loops": [], "conditionals": [19, 21, 25, 28, 32, 35, 37, 40, 44, 47, 48, 49, 53, 56, 57, 58], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11, 14, 17], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 18, "universal_type": "function", "name": "GetAccountByIdResponse", "text_snippet": "class GetAccountByIdResponse : public AbstractResponse\n{\npublic:\n\tGetAccountByIdResponse() = default"}, {"node_id": 43, "universal_type": "function", "name": "unknown", "text_snippet": "read(const QJsonObject& json) override"}, {"node_id": 52, "universal_type": "function", "name": "unknown", "text_snippet": "write(QJsonObject& json) const override"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include <QJsonObject>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <QJsonArray>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"AbstractResponse.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"ResponseCode.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"Entities/Account.h\"\n"}, {"node_id": 16, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include <QJsonObject>\n#include <QJsonArray>\n\n#include \"AbstractResponse.h\"\n#include \"ResponseCode.h\"\n#include \"Entities/Account.h\"\n\nclass GetAccountByIdResponse : public AbstractResponse\n{\npublic:\n\tGetAccountByIdResponse() = default;\n\t~GetAccountByIdResponse() override;\n\n\tAccount* _Account;\n\n\tvoid read(const QJsonObject& json) override;\n\tvoid write(QJsonObject& json) const override;\n};\n\n"}
| 81,211
|
c
|
#ifndef __CONFIG_TASK_H__
#define __CONFIG_TASK_H__
extern TaskHandle_t config_task_handle;
void ConfigTaskSetup();
void ConfigTask(void * param);
#endif
| 24.67
| 6
|
(translation_unit) "#ifndef __CONFIG_TASK_H__\n#define __CONFIG_TASK_H__\n\nextern TaskHandle_t config_task_handle;\n\nvoid ConfigTaskSetup();\nvoid ConfigTask(void * param);\n\n#endif\n"
(preproc_ifdef) "#ifndef __CONFIG_TASK_H__\n#define __CONFIG_TASK_H__\n\nextern TaskHandle_t config_task_handle;\n\nvoid ConfigTaskSetup();\nvoid ConfigTask(void * param);\n\n#endif"
(#ifndef) "#ifndef"
(identifier) "__CONFIG_TASK_H__"
(preproc_def) "#define __CONFIG_TASK_H__\n"
(#define) "#define"
(identifier) "__CONFIG_TASK_H__"
(declaration) "extern TaskHandle_t config_task_handle;"
(storage_class_specifier) "extern"
(extern) "extern"
(type_identifier) "TaskHandle_t"
(identifier) "config_task_handle"
(;) ";"
(declaration) "void ConfigTaskSetup();"
(primitive_type) "void"
(function_declarator) "ConfigTaskSetup()"
(identifier) "ConfigTaskSetup"
(parameter_list) "()"
(() "("
()) ")"
(;) ";"
(declaration) "void ConfigTask(void * param);"
(primitive_type) "void"
(function_declarator) "ConfigTask(void * param)"
(identifier) "ConfigTask"
(parameter_list) "(void * param)"
(() "("
(parameter_declaration) "void * param"
(primitive_type) "void"
(pointer_declarator) "* param"
(*) "*"
(identifier) "param"
()) ")"
(;) ";"
(#endif) "#endif"
| 35
| 0
|
{"language": "c", "success": true, "metadata": {"lines": 6, "avg_line_length": 24.67, "nodes": 27, "errors": 0, "source_hash": "87fc1034a8b77098c93b725b7f02ce1e1a7f20fc1075685480cbf6830434a19a", "categorized_nodes": 17}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __CONFIG_TASK_H__\n#define __CONFIG_TASK_H__\n\nextern TaskHandle_t config_task_handle;\n\nvoid ConfigTaskSetup();\nvoid ConfigTask(void * param);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 11, 16, 26], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 8, "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": "__CONFIG_TASK_H__", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 25}}, {"id": 3, "type": "preproc_def", "text": "#define __CONFIG_TASK_H__\n", "parent": 0, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 7}}, {"id": 5, "type": "identifier", "text": "__CONFIG_TASK_H__", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 25}}, {"id": 6, "type": "declaration", "text": "extern TaskHandle_t config_task_handle;", "parent": 0, "children": [7, 9, 10], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 39}}, {"id": 7, "type": "storage_class_specifier", "text": "extern", "parent": 6, "children": [8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 6}}, {"id": 8, "type": "extern", "text": "extern", "parent": 7, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 6}}, {"id": 9, "type": "type_identifier", "text": "TaskHandle_t", "parent": 6, "children": [], "start_point": {"row": 3, "column": 7}, "end_point": {"row": 3, "column": 19}}, {"id": 10, "type": "identifier", "text": "config_task_handle", "parent": 6, "children": [], "start_point": {"row": 3, "column": 20}, "end_point": {"row": 3, "column": 38}}, {"id": 11, "type": "declaration", "text": "void ConfigTaskSetup();", "parent": 0, "children": [12, 13], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 23}}, {"id": 12, "type": "primitive_type", "text": "void", "parent": 11, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 4}}, {"id": 13, "type": "function_declarator", "text": "ConfigTaskSetup()", "parent": 11, "children": [14, 15], "start_point": {"row": 5, "column": 5}, "end_point": {"row": 5, "column": 22}}, {"id": 14, "type": "identifier", "text": "ConfigTaskSetup", "parent": 13, "children": [], "start_point": {"row": 5, "column": 5}, "end_point": {"row": 5, "column": 20}}, {"id": 15, "type": "parameter_list", "text": "()", "parent": 13, "children": [], "start_point": {"row": 5, "column": 20}, "end_point": {"row": 5, "column": 22}}, {"id": 16, "type": "declaration", "text": "void ConfigTask(void * param);", "parent": 0, "children": [17, 18], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 30}}, {"id": 17, "type": "primitive_type", "text": "void", "parent": 16, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 4}}, {"id": 18, "type": "function_declarator", "text": "ConfigTask(void * param)", "parent": 16, "children": [19, 20], "start_point": {"row": 6, "column": 5}, "end_point": {"row": 6, "column": 29}}, {"id": 19, "type": "identifier", "text": "ConfigTask", "parent": 18, "children": [], "start_point": {"row": 6, "column": 5}, "end_point": {"row": 6, "column": 15}}, {"id": 20, "type": "parameter_list", "text": "(void * param)", "parent": 18, "children": [21], "start_point": {"row": 6, "column": 15}, "end_point": {"row": 6, "column": 29}}, {"id": 21, "type": "parameter_declaration", "text": "void * param", "parent": 20, "children": [22, 23], "start_point": {"row": 6, "column": 16}, "end_point": {"row": 6, "column": 28}}, {"id": 22, "type": "primitive_type", "text": "void", "parent": 21, "children": [], "start_point": {"row": 6, "column": 16}, "end_point": {"row": 6, "column": 20}}, {"id": 23, "type": "pointer_declarator", "text": "* param", "parent": 21, "children": [24, 25], "start_point": {"row": 6, "column": 21}, "end_point": {"row": 6, "column": 28}}, {"id": 24, "type": "*", "text": "*", "parent": 23, "children": [], "start_point": {"row": 6, "column": 21}, "end_point": {"row": 6, "column": 22}}, {"id": 25, "type": "identifier", "text": "param", "parent": 23, "children": [], "start_point": {"row": 6, "column": 23}, "end_point": {"row": 6, "column": 28}}, {"id": 26, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 6}}]}, "node_categories": {"declarations": {"functions": [13, 18], "variables": [6, 11, 16, 21], "classes": [7], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 9, 10, 14, 19, 25, 26], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 13, "universal_type": "function", "name": "unknown", "text_snippet": "ConfigTaskSetup()"}, {"node_id": 18, "universal_type": "function", "name": "unknown", "text_snippet": "ConfigTask(void * param)"}], "class_declarations": [{"node_id": 7, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}], "import_statements": []}, "original_source_code": "#ifndef __CONFIG_TASK_H__\n#define __CONFIG_TASK_H__\n\nextern TaskHandle_t config_task_handle;\n\nvoid ConfigTaskSetup();\nvoid ConfigTask(void * param);\n\n#endif\n"}
| 81,212
|
c
|
#include<stdio.h>
int main(){
int T,count=0;
long long n,i;
scanf("%d", &T);
for(i=0;i<T/2;i++){
printf("denate ");
scanf("%lld",&n);
count+=n;
printf("report ");
printf("%d\n",count);
}
return 0;
}
| 16.62
| 16
|
(translation_unit) "#include<stdio.h>
\nint main(){
\n
\n int T,count=0;
\n long long n,i;
\n
\n scanf("%d", &T);
\n for(i=0;i<T/2;i++){
\n printf("denate ");
\n scanf("%lld",&n);
\n count+=n;
\n printf("report ");
\n printf("%d\n",count);
\n }
\n return 0;
\n}
\n"
(preproc_include) "#include<stdio.h>
\n"
(#include) "#include"
(system_lib_string) "<stdio.h>"
(function_definition) "int main(){
\n
\n int T,count=0;
\n long long n,i;
\n
\n scanf("%d", &T);
\n for(i=0;i<T/2;i++){
\n printf("denate ");
\n scanf("%lld",&n);
\n count+=n;
\n printf("report ");
\n printf("%d\n",count);
\n }
\n return 0;
\n}"
(primitive_type) "int"
(function_declarator) "main()"
(identifier) "main"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{
\n
\n int T,count=0;
\n long long n,i;
\n
\n scanf("%d", &T);
\n for(i=0;i<T/2;i++){
\n printf("denate ");
\n scanf("%lld",&n);
\n count+=n;
\n printf("report ");
\n printf("%d\n",count);
\n }
\n return 0;
\n}"
({) "{"
(declaration) "int T,count=0;"
(primitive_type) "int"
(identifier) "T"
(,) ","
(init_declarator) "count=0"
(identifier) "count"
(=) "="
(number_literal) "0"
(;) ";"
(declaration) "long long n,i;"
(sized_type_specifier) "long long"
(long) "long"
(long) "long"
(identifier) "n"
(,) ","
(identifier) "i"
(;) ";"
(expression_statement) "scanf("%d", &T);"
(call_expression) "scanf("%d", &T)"
(identifier) "scanf"
(argument_list) "("%d", &T)"
(() "("
(string_literal) ""%d""
(") """
(string_content) "%d"
(") """
(,) ","
(pointer_expression) "&T"
(&) "&"
(identifier) "T"
()) ")"
(;) ";"
(for_statement) "for(i=0;i<T/2;i++){
\n printf("denate ");
\n scanf("%lld",&n);
\n count+=n;
\n printf("report ");
\n printf("%d\n",count);
\n }"
(for) "for"
(() "("
(assignment_expression) "i=0"
(identifier) "i"
(=) "="
(number_literal) "0"
(;) ";"
(binary_expression) "i<T/2"
(identifier) "i"
(<) "<"
(binary_expression) "T/2"
(identifier) "T"
(/) "/"
(number_literal) "2"
(;) ";"
(update_expression) "i++"
(identifier) "i"
(++) "++"
()) ")"
(compound_statement) "{
\n printf("denate ");
\n scanf("%lld",&n);
\n count+=n;
\n printf("report ");
\n printf("%d\n",count);
\n }"
({) "{"
(expression_statement) "printf("denate ");"
(call_expression) "printf("denate ")"
(identifier) "printf"
(argument_list) "("denate ")"
(() "("
(string_literal) ""denate ""
(") """
(string_content) "denate "
(") """
()) ")"
(;) ";"
(expression_statement) "scanf("%lld",&n);"
(call_expression) "scanf("%lld",&n)"
(identifier) "scanf"
(argument_list) "("%lld",&n)"
(() "("
(string_literal) ""%lld""
(") """
(string_content) "%lld"
(") """
(,) ","
(pointer_expression) "&n"
(&) "&"
(identifier) "n"
()) ")"
(;) ";"
(expression_statement) "count+=n;"
(assignment_expression) "count+=n"
(identifier) "count"
(+=) "+="
(identifier) "n"
(;) ";"
(expression_statement) "printf("report ");"
(call_expression) "printf("report ")"
(identifier) "printf"
(argument_list) "("report ")"
(() "("
(string_literal) ""report ""
(") """
(string_content) "report "
(") """
()) ")"
(;) ";"
(expression_statement) "printf("%d\n",count);"
(call_expression) "printf("%d\n",count)"
(identifier) "printf"
(argument_list) "("%d\n",count)"
(() "("
(string_literal) ""%d\n""
(") """
(string_content) "%d"
(escape_sequence) "\n"
(") """
(,) ","
(identifier) "count"
()) ")"
(;) ";"
(}) "}"
(return_statement) "return 0;"
(return) "return"
(number_literal) "0"
(;) ";"
(}) "}"
| 130
| 0
|
{"language": "c", "success": true, "metadata": {"lines": 16, "avg_line_length": 16.62, "nodes": 68, "errors": 0, "source_hash": "e84a32fd5a19ac8144112796b0bcb41033826c01253a326bead0498e7b6daf43", "categorized_nodes": 50}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include<stdio.h>\r\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 17}}, {"id": 3, "type": "function_definition", "text": "int main(){\r\n\r\n int T,count=0;\r\n long long n,i;\r\n\r\n scanf(\"%d\", &T);\r\n for(i=0;i<T/2;i++){\r\n printf(\"denate \");\r\n scanf(\"%lld\",&n);\r\n count+=n;\r\n printf(\"report \");\r\n printf(\"%d\\n\",count);\r\n }\r\n return 0;\r\n}", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 4, "type": "primitive_type", "text": "int", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 3}}, {"id": 5, "type": "function_declarator", "text": "main()", "parent": 3, "children": [6, 7], "start_point": {"row": 1, "column": 4}, "end_point": {"row": 1, "column": 10}}, {"id": 6, "type": "identifier", "text": "main", "parent": 5, "children": [], "start_point": {"row": 1, "column": 4}, "end_point": {"row": 1, "column": 8}}, {"id": 7, "type": "parameter_list", "text": "()", "parent": 5, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 10}}, {"id": 8, "type": "declaration", "text": "int T,count=0;", "parent": 3, "children": [9, 10, 11], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 18}}, {"id": 9, "type": "primitive_type", "text": "int", "parent": 8, "children": [], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 7}}, {"id": 10, "type": "identifier", "text": "T", "parent": 8, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 9}}, {"id": 11, "type": "init_declarator", "text": "count=0", "parent": 8, "children": [12, 13, 14], "start_point": {"row": 3, "column": 10}, "end_point": {"row": 3, "column": 17}}, {"id": 12, "type": "identifier", "text": "count", "parent": 11, "children": [], "start_point": {"row": 3, "column": 10}, "end_point": {"row": 3, "column": 15}}, {"id": 13, "type": "=", "text": "=", "parent": 11, "children": [], "start_point": {"row": 3, "column": 15}, "end_point": {"row": 3, "column": 16}}, {"id": 14, "type": "number_literal", "text": "0", "parent": 11, "children": [], "start_point": {"row": 3, "column": 16}, "end_point": {"row": 3, "column": 17}}, {"id": 15, "type": "declaration", "text": "long long n,i;", "parent": 3, "children": [16, 19, 20], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 18}}, {"id": 16, "type": "sized_type_specifier", "text": "long long", "parent": 15, "children": [17, 18], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 13}}, {"id": 17, "type": "long", "text": "long", "parent": 16, "children": [], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 8}}, {"id": 18, "type": "long", "text": "long", "parent": 16, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 13}}, {"id": 19, "type": "identifier", "text": "n", "parent": 15, "children": [], "start_point": {"row": 4, "column": 14}, "end_point": {"row": 4, "column": 15}}, {"id": 20, "type": "identifier", "text": "i", "parent": 15, "children": [], "start_point": {"row": 4, "column": 16}, "end_point": {"row": 4, "column": 17}}, {"id": 21, "type": "call_expression", "text": "scanf(\"%d\", &T)", "parent": 3, "children": [22, 23], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 19}}, {"id": 22, "type": "identifier", "text": "scanf", "parent": 21, "children": [], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 9}}, {"id": 23, "type": "argument_list", "text": "(\"%d\", &T)", "parent": 21, "children": [24, 25], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 19}}, {"id": 24, "type": "string_literal", "text": "\"%d\"", "parent": 23, "children": [], "start_point": {"row": 6, "column": 10}, "end_point": {"row": 6, "column": 14}}, {"id": 25, "type": "pointer_expression", "text": "&T", "parent": 23, "children": [26], "start_point": {"row": 6, "column": 16}, "end_point": {"row": 6, "column": 18}}, {"id": 26, "type": "identifier", "text": "T", "parent": 25, "children": [], "start_point": {"row": 6, "column": 17}, "end_point": {"row": 6, "column": 18}}, {"id": 27, "type": "for_statement", "text": "for(i=0;i<T/2;i++){\r\n printf(\"denate \");\r\n scanf(\"%lld\",&n);\r\n count+=n;\r\n printf(\"report \");\r\n printf(\"%d\\n\",count);\r\n }", "parent": 3, "children": [28, 32, 39], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 13, "column": 5}}, {"id": 28, "type": "assignment_expression", "text": "i=0", "parent": 27, "children": [29, 30, 31], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 11}}, {"id": 29, "type": "identifier", "text": "i", "parent": 28, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 9}}, {"id": 30, "type": "=", "text": "=", "parent": 28, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 10}}, {"id": 31, "type": "number_literal", "text": "0", "parent": 28, "children": [], "start_point": {"row": 7, "column": 10}, "end_point": {"row": 7, "column": 11}}, {"id": 32, "type": "binary_expression", "text": "i<T/2", "parent": 27, "children": [33, 34, 35], "start_point": {"row": 7, "column": 12}, "end_point": {"row": 7, "column": 17}}, {"id": 33, "type": "identifier", "text": "i", "parent": 32, "children": [], "start_point": {"row": 7, "column": 12}, "end_point": {"row": 7, "column": 13}}, {"id": 34, "type": "<", "text": "<", "parent": 32, "children": [], "start_point": {"row": 7, "column": 13}, "end_point": {"row": 7, "column": 14}}, {"id": 35, "type": "binary_expression", "text": "T/2", "parent": 32, "children": [36, 37, 38], "start_point": {"row": 7, "column": 14}, "end_point": {"row": 7, "column": 17}}, {"id": 36, "type": "identifier", "text": "T", "parent": 35, "children": [], "start_point": {"row": 7, "column": 14}, "end_point": {"row": 7, "column": 15}}, {"id": 37, "type": "/", "text": "/", "parent": 35, "children": [], "start_point": {"row": 7, "column": 15}, "end_point": {"row": 7, "column": 16}}, {"id": 38, "type": "number_literal", "text": "2", "parent": 35, "children": [], "start_point": {"row": 7, "column": 16}, "end_point": {"row": 7, "column": 17}}, {"id": 39, "type": "update_expression", "text": "i++", "parent": 27, "children": [40, 41], "start_point": {"row": 7, "column": 18}, "end_point": {"row": 7, "column": 21}}, {"id": 40, "type": "identifier", "text": "i", "parent": 39, "children": [], "start_point": {"row": 7, "column": 18}, "end_point": {"row": 7, "column": 19}}, {"id": 41, "type": "++", "text": "++", "parent": 39, "children": [], "start_point": {"row": 7, "column": 19}, "end_point": {"row": 7, "column": 21}}, {"id": 42, "type": "call_expression", "text": "printf(\"denate \")", "parent": 27, "children": [43, 44], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 26}}, {"id": 43, "type": "identifier", "text": "printf", "parent": 42, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 14}}, {"id": 44, "type": "argument_list", "text": "(\"denate \")", "parent": 42, "children": [45], "start_point": {"row": 8, "column": 14}, "end_point": {"row": 8, "column": 26}}, {"id": 45, "type": "string_literal", "text": "\"denate \"", "parent": 44, "children": [], "start_point": {"row": 8, "column": 15}, "end_point": {"row": 8, "column": 25}}, {"id": 46, "type": "call_expression", "text": "scanf(\"%lld\",&n)", "parent": 27, "children": [47, 48], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 24}}, {"id": 47, "type": "identifier", "text": "scanf", "parent": 46, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 13}}, {"id": 48, "type": "argument_list", "text": "(\"%lld\",&n)", "parent": 46, "children": [49, 50], "start_point": {"row": 9, "column": 13}, "end_point": {"row": 9, "column": 24}}, {"id": 49, "type": "string_literal", "text": "\"%lld\"", "parent": 48, "children": [], "start_point": {"row": 9, "column": 14}, "end_point": {"row": 9, "column": 20}}, {"id": 50, "type": "pointer_expression", "text": "&n", "parent": 48, "children": [51], "start_point": {"row": 9, "column": 21}, "end_point": {"row": 9, "column": 23}}, {"id": 51, "type": "identifier", "text": "n", "parent": 50, "children": [], "start_point": {"row": 9, "column": 22}, "end_point": {"row": 9, "column": 23}}, {"id": 52, "type": "assignment_expression", "text": "count+=n", "parent": 27, "children": [53, 54, 55], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 16}}, {"id": 53, "type": "identifier", "text": "count", "parent": 52, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 13}}, {"id": 54, "type": "+=", "text": "+=", "parent": 52, "children": [], "start_point": {"row": 10, "column": 13}, "end_point": {"row": 10, "column": 15}}, {"id": 55, "type": "identifier", "text": "n", "parent": 52, "children": [], "start_point": {"row": 10, "column": 15}, "end_point": {"row": 10, "column": 16}}, {"id": 56, "type": "call_expression", "text": "printf(\"report \")", "parent": 27, "children": [57, 58], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 26}}, {"id": 57, "type": "identifier", "text": "printf", "parent": 56, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 14}}, {"id": 58, "type": "argument_list", "text": "(\"report \")", "parent": 56, "children": [59], "start_point": {"row": 11, "column": 14}, "end_point": {"row": 11, "column": 26}}, {"id": 59, "type": "string_literal", "text": "\"report \"", "parent": 58, "children": [], "start_point": {"row": 11, "column": 15}, "end_point": {"row": 11, "column": 25}}, {"id": 60, "type": "call_expression", "text": "printf(\"%d\\n\",count)", "parent": 27, "children": [61, 62], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 28}}, {"id": 61, "type": "identifier", "text": "printf", "parent": 60, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 14}}, {"id": 62, "type": "argument_list", "text": "(\"%d\\n\",count)", "parent": 60, "children": [63, 65], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 28}}, {"id": 63, "type": "string_literal", "text": "\"%d\\n\"", "parent": 62, "children": [64], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 21}}, {"id": 64, "type": "escape_sequence", "text": "\\n", "parent": 63, "children": [], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 20}}, {"id": 65, "type": "identifier", "text": "count", "parent": 62, "children": [], "start_point": {"row": 12, "column": 22}, "end_point": {"row": 12, "column": 27}}, {"id": 66, "type": "return_statement", "text": "return 0;", "parent": 3, "children": [67], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 13}}, {"id": 67, "type": "number_literal", "text": "0", "parent": 66, "children": [], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 12}}]}, "node_categories": {"declarations": {"functions": [3, 5], "variables": [8, 15], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [21, 25, 32, 35, 39, 42, 46, 50, 56, 60], "assignments": [28, 52], "loops": [27], "conditionals": [6, 10, 12, 16, 19, 20, 22, 26, 29, 33, 36, 40, 43, 47, 51, 53, 55, 57, 61, 65], "returns": [66], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 14, 24, 31, 38, 45, 49, 59, 63, 67], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "main", "text_snippet": "int main(){\r\n\r\n int T,count=0;\r\n long long n,i;\r\n\r\n scanf(\"%d\", &T);\r\n for(i=0;i<T/2;i++"}, {"node_id": 5, "universal_type": "function", "name": "unknown", "text_snippet": "main()"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include<stdio.h>\r\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "#include<stdio.h>\r\nint main(){\r\n\r\n int T,count=0;\r\n long long n,i;\r\n\r\n scanf(\"%d\", &T);\r\n for(i=0;i<T/2;i++){\r\n printf(\"denate \");\r\n scanf(\"%lld\",&n);\r\n count+=n;\r\n printf(\"report \");\r\n printf(\"%d\\n\",count);\r\n }\r\n return 0;\r\n}\r\n"}
| 81,213
|
c
|
#include "posicion.h"
#include "circulo.h"
class Camino : public Posicion
{
private:
Figura *_pc;
estado _estado;
int _xInicial;
int _yInicial;
public:
Camino(Laberinto * _l, int _x, int _y);
~Camino();
void cambiarEstado(estado nuevoEstado);
void dibujar();
bool esValida();
char getTipo();
int getEstado();
};
| 14.86
| 22
|
(translation_unit) "#include "posicion.h"
\n#include "circulo.h"
\n
\nclass Camino : public Posicion
\n{
\nprivate:
\n Figura *_pc;
\n estado _estado;
\n int _xInicial;
\n int _yInicial;
\n
\n
\npublic:
\n Camino(Laberinto * _l, int _x, int _y);
\n ~Camino();
\n void cambiarEstado(estado nuevoEstado);
\n void dibujar();
\n bool esValida();
\n char getTipo();
\n int getEstado();
\n
\n};"
(preproc_include) "#include "posicion.h"
\n"
(#include) "#include"
(string_literal) ""posicion.h""
(") """
(string_content) "posicion.h"
(") """
(preproc_include) "#include "circulo.h"
\n"
(#include) "#include"
(string_literal) ""circulo.h""
(") """
(string_content) "circulo.h"
(") """
(function_definition) "class Camino : public Posicion
\n{
\nprivate:
\n Figura *_pc;
\n estado _estado;
\n int _xInicial;
\n int _yInicial;
\n
\n
\npublic:
\n Camino(Laberinto * _l, int _x, int _y);
\n ~Camino();
\n void cambiarEstado(estado nuevoEstado);
\n void dibujar();
\n bool esValida();
\n char getTipo();
\n int getEstado();
\n
\n}"
(type_identifier) "class"
(ERROR) "Camino : public"
(identifier) "Camino"
(:) ":"
(identifier) "public"
(identifier) "Posicion"
(compound_statement) "{
\nprivate:
\n Figura *_pc;
\n estado _estado;
\n int _xInicial;
\n int _yInicial;
\n
\n
\npublic:
\n Camino(Laberinto * _l, int _x, int _y);
\n ~Camino();
\n void cambiarEstado(estado nuevoEstado);
\n void dibujar();
\n bool esValida();
\n char getTipo();
\n int getEstado();
\n
\n}"
({) "{"
(labeled_statement) "private:
\n Figura *_pc;"
(statement_identifier) "private"
(:) ":"
(declaration) "Figura *_pc;"
(type_identifier) "Figura"
(pointer_declarator) "*_pc"
(*) "*"
(identifier) "_pc"
(;) ";"
(declaration) "estado _estado;"
(type_identifier) "estado"
(identifier) "_estado"
(;) ";"
(declaration) "int _xInicial;"
(primitive_type) "int"
(identifier) "_xInicial"
(;) ";"
(declaration) "int _yInicial;"
(primitive_type) "int"
(identifier) "_yInicial"
(;) ";"
(labeled_statement) "public:
\n Camino(Laberinto * _l, int _x, int _y);"
(statement_identifier) "public"
(:) ":"
(expression_statement) "Camino(Laberinto * _l, int _x, int _y);"
(call_expression) "Camino(Laberinto * _l, int _x, int _y)"
(identifier) "Camino"
(argument_list) "(Laberinto * _l, int _x, int _y)"
(() "("
(binary_expression) "Laberinto * _l"
(identifier) "Laberinto"
(*) "*"
(identifier) "_l"
(,) ","
(identifier) "int"
(ERROR) "_x"
(identifier) "_x"
(,) ","
(identifier) "int"
(ERROR) "_y"
(identifier) "_y"
()) ")"
(;) ";"
(expression_statement) "~Camino();"
(unary_expression) "~Camino()"
(~) "~"
(call_expression) "Camino()"
(identifier) "Camino"
(argument_list) "()"
(() "("
()) ")"
(;) ";"
(declaration) "void cambiarEstado(estado nuevoEstado);"
(primitive_type) "void"
(function_declarator) "cambiarEstado(estado nuevoEstado)"
(identifier) "cambiarEstado"
(parameter_list) "(estado nuevoEstado)"
(() "("
(parameter_declaration) "estado nuevoEstado"
(type_identifier) "estado"
(identifier) "nuevoEstado"
()) ")"
(;) ";"
(declaration) "void dibujar();"
(primitive_type) "void"
(function_declarator) "dibujar()"
(identifier) "dibujar"
(parameter_list) "()"
(() "("
()) ")"
(;) ";"
(declaration) "bool esValida();"
(primitive_type) "bool"
(function_declarator) "esValida()"
(identifier) "esValida"
(parameter_list) "()"
(() "("
()) ")"
(;) ";"
(declaration) "char getTipo();"
(primitive_type) "char"
(function_declarator) "getTipo()"
(identifier) "getTipo"
(parameter_list) "()"
(() "("
()) ")"
(;) ";"
(declaration) "int getEstado();"
(primitive_type) "int"
(function_declarator) "getEstado()"
(identifier) "getEstado"
(parameter_list) "()"
(() "("
()) ")"
(;) ";"
(}) "}"
(expression_statement) ";"
(;) ";"
| 120
| 3
|
{"language": "c", "success": true, "metadata": {"lines": 22, "avg_line_length": 14.86, "nodes": 72, "errors": 0, "source_hash": "a9f4d8ed3aadb2c403979777bdf903264367cc2ed986552ca9c4e967468f0cda", "categorized_nodes": 49}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"posicion.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": "string_literal", "text": "\"posicion.h\"", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 21}}, {"id": 3, "type": "preproc_include", "text": "#include \"circulo.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": "\"circulo.h\"", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 20}}, {"id": 6, "type": "function_definition", "text": "class Camino : public Posicion\r\n{\r\nprivate:\r\n\tFigura *_pc;\r\n\testado _estado;\r\n\tint\t_xInicial;\r\n\tint _yInicial;\r\n\r\n\r\npublic:\r\n\tCamino(Laberinto * _l, int _x, int _y);\r\n\t~Camino();\r\n\tvoid cambiarEstado(estado nuevoEstado);\r\n\tvoid dibujar();\r\n\tbool esValida();\r\n\tchar getTipo();\r\n\tint getEstado();\r\n\t\r\n}", "parent": null, "children": [7, 9], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 7, "type": "ERROR", "text": "Camino : public", "parent": 6, "children": [8], "start_point": {"row": 3, "column": 6}, "end_point": {"row": 3, "column": 21}}, {"id": 8, "type": "identifier", "text": "Camino", "parent": 7, "children": [], "start_point": {"row": 3, "column": 6}, "end_point": {"row": 3, "column": 12}}, {"id": 9, "type": "identifier", "text": "Posicion", "parent": 6, "children": [], "start_point": {"row": 3, "column": 22}, "end_point": {"row": 3, "column": 30}}, {"id": 10, "type": "labeled_statement", "text": "private:\r\n\tFigura *_pc;", "parent": 6, "children": [11], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 13}}, {"id": 11, "type": "declaration", "text": "Figura *_pc;", "parent": 10, "children": [12, 13], "start_point": {"row": 6, "column": 1}, "end_point": {"row": 6, "column": 13}}, {"id": 12, "type": "type_identifier", "text": "Figura", "parent": 11, "children": [], "start_point": {"row": 6, "column": 1}, "end_point": {"row": 6, "column": 7}}, {"id": 13, "type": "pointer_declarator", "text": "*_pc", "parent": 11, "children": [14, 15], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 12}}, {"id": 14, "type": "*", "text": "*", "parent": 13, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 9}}, {"id": 15, "type": "identifier", "text": "_pc", "parent": 13, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 12}}, {"id": 16, "type": "declaration", "text": "estado _estado;", "parent": 6, "children": [17, 18], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 16}}, {"id": 17, "type": "type_identifier", "text": "estado", "parent": 16, "children": [], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 7}}, {"id": 18, "type": "identifier", "text": "_estado", "parent": 16, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 15}}, {"id": 19, "type": "declaration", "text": "int\t_xInicial;", "parent": 6, "children": [20, 21], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 15}}, {"id": 20, "type": "primitive_type", "text": "int", "parent": 19, "children": [], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 4}}, {"id": 21, "type": "identifier", "text": "_xInicial", "parent": 19, "children": [], "start_point": {"row": 8, "column": 5}, "end_point": {"row": 8, "column": 14}}, {"id": 22, "type": "declaration", "text": "int _yInicial;", "parent": 6, "children": [23, 24], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 15}}, {"id": 23, "type": "primitive_type", "text": "int", "parent": 22, "children": [], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 4}}, {"id": 24, "type": "identifier", "text": "_yInicial", "parent": 22, "children": [], "start_point": {"row": 9, "column": 5}, "end_point": {"row": 9, "column": 14}}, {"id": 25, "type": "labeled_statement", "text": "public:\r\n\tCamino(Laberinto * _l, int _x, int _y);", "parent": 6, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 40}}, {"id": 26, "type": "call_expression", "text": "Camino(Laberinto * _l, int _x, int _y)", "parent": 25, "children": [27, 28], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 39}}, {"id": 27, "type": "identifier", "text": "Camino", "parent": 26, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 7}}, {"id": 28, "type": "argument_list", "text": "(Laberinto * _l, int _x, int _y)", "parent": 26, "children": [29, 33, 34, 36, 37], "start_point": {"row": 13, "column": 7}, "end_point": {"row": 13, "column": 39}}, {"id": 29, "type": "binary_expression", "text": "Laberinto * _l", "parent": 28, "children": [30, 31, 32], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 22}}, {"id": 30, "type": "identifier", "text": "Laberinto", "parent": 29, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 17}}, {"id": 31, "type": "*", "text": "*", "parent": 29, "children": [], "start_point": {"row": 13, "column": 18}, "end_point": {"row": 13, "column": 19}}, {"id": 32, "type": "identifier", "text": "_l", "parent": 29, "children": [], "start_point": {"row": 13, "column": 20}, "end_point": {"row": 13, "column": 22}}, {"id": 33, "type": "identifier", "text": "int", "parent": 28, "children": [], "start_point": {"row": 13, "column": 24}, "end_point": {"row": 13, "column": 27}}, {"id": 34, "type": "ERROR", "text": "_x", "parent": 28, "children": [35], "start_point": {"row": 13, "column": 28}, "end_point": {"row": 13, "column": 30}}, {"id": 35, "type": "identifier", "text": "_x", "parent": 34, "children": [], "start_point": {"row": 13, "column": 28}, "end_point": {"row": 13, "column": 30}}, {"id": 36, "type": "identifier", "text": "int", "parent": 28, "children": [], "start_point": {"row": 13, "column": 32}, "end_point": {"row": 13, "column": 35}}, {"id": 37, "type": "ERROR", "text": "_y", "parent": 28, "children": [38], "start_point": {"row": 13, "column": 36}, "end_point": {"row": 13, "column": 38}}, {"id": 38, "type": "identifier", "text": "_y", "parent": 37, "children": [], "start_point": {"row": 13, "column": 36}, "end_point": {"row": 13, "column": 38}}, {"id": 39, "type": "unary_expression", "text": "~Camino()", "parent": 6, "children": [40, 41], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 10}}, {"id": 40, "type": "~", "text": "~", "parent": 39, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 2}}, {"id": 41, "type": "call_expression", "text": "Camino()", "parent": 39, "children": [42, 43], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 10}}, {"id": 42, "type": "identifier", "text": "Camino", "parent": 41, "children": [], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 8}}, {"id": 43, "type": "argument_list", "text": "()", "parent": 41, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 10}}, {"id": 44, "type": "declaration", "text": "void cambiarEstado(estado nuevoEstado);", "parent": 6, "children": [45, 46], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 40}}, {"id": 45, "type": "primitive_type", "text": "void", "parent": 44, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 5}}, {"id": 46, "type": "function_declarator", "text": "cambiarEstado(estado nuevoEstado)", "parent": 44, "children": [47, 48], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 39}}, {"id": 47, "type": "identifier", "text": "cambiarEstado", "parent": 46, "children": [], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 19}}, {"id": 48, "type": "parameter_list", "text": "(estado nuevoEstado)", "parent": 46, "children": [49], "start_point": {"row": 15, "column": 19}, "end_point": {"row": 15, "column": 39}}, {"id": 49, "type": "parameter_declaration", "text": "estado nuevoEstado", "parent": 48, "children": [50, 51], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 38}}, {"id": 50, "type": "type_identifier", "text": "estado", "parent": 49, "children": [], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 26}}, {"id": 51, "type": "identifier", "text": "nuevoEstado", "parent": 49, "children": [], "start_point": {"row": 15, "column": 27}, "end_point": {"row": 15, "column": 38}}, {"id": 52, "type": "declaration", "text": "void dibujar();", "parent": 6, "children": [53, 54], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 16}}, {"id": 53, "type": "primitive_type", "text": "void", "parent": 52, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 5}}, {"id": 54, "type": "function_declarator", "text": "dibujar()", "parent": 52, "children": [55, 56], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 15}}, {"id": 55, "type": "identifier", "text": "dibujar", "parent": 54, "children": [], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 13}}, {"id": 56, "type": "parameter_list", "text": "()", "parent": 54, "children": [], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 15}}, {"id": 57, "type": "declaration", "text": "bool esValida();", "parent": 6, "children": [58, 59], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 17}}, {"id": 58, "type": "primitive_type", "text": "bool", "parent": 57, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 5}}, {"id": 59, "type": "function_declarator", "text": "esValida()", "parent": 57, "children": [60, 61], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 16}}, {"id": 60, "type": "identifier", "text": "esValida", "parent": 59, "children": [], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 14}}, {"id": 61, "type": "parameter_list", "text": "()", "parent": 59, "children": [], "start_point": {"row": 17, "column": 14}, "end_point": {"row": 17, "column": 16}}, {"id": 62, "type": "declaration", "text": "char getTipo();", "parent": 6, "children": [63, 64], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 16}}, {"id": 63, "type": "primitive_type", "text": "char", "parent": 62, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 5}}, {"id": 64, "type": "function_declarator", "text": "getTipo()", "parent": 62, "children": [65, 66], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 15}}, {"id": 65, "type": "identifier", "text": "getTipo", "parent": 64, "children": [], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 13}}, {"id": 66, "type": "parameter_list", "text": "()", "parent": 64, "children": [], "start_point": {"row": 18, "column": 13}, "end_point": {"row": 18, "column": 15}}, {"id": 67, "type": "declaration", "text": "int getEstado();", "parent": 6, "children": [68, 69], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 17}}, {"id": 68, "type": "primitive_type", "text": "int", "parent": 67, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 4}}, {"id": 69, "type": "function_declarator", "text": "getEstado()", "parent": 67, "children": [70, 71], "start_point": {"row": 19, "column": 5}, "end_point": {"row": 19, "column": 16}}, {"id": 70, "type": "identifier", "text": "getEstado", "parent": 69, "children": [], "start_point": {"row": 19, "column": 5}, "end_point": {"row": 19, "column": 14}}, {"id": 71, "type": "parameter_list", "text": "()", "parent": 69, "children": [], "start_point": {"row": 19, "column": 14}, "end_point": {"row": 19, "column": 16}}]}, "node_categories": {"declarations": {"functions": [6, 46, 54, 59, 64, 69], "variables": [11, 16, 19, 22, 44, 49, 52, 57, 62, 67], "classes": [], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [26, 29, 39, 41], "assignments": [], "loops": [], "conditionals": [8, 9, 12, 15, 17, 18, 21, 24, 27, 30, 32, 33, 35, 36, 38, 42, 47, 50, 51, 55, 60, 65, 70], "returns": [], "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": "Camino", "text_snippet": "class Camino : public Posicion\r\n{\r\nprivate:\r\n\tFigura *_pc;\r\n\testado _estado;\r\n\tint\t_xInicial;\r\n\tint "}, {"node_id": 46, "universal_type": "function", "name": "unknown", "text_snippet": "cambiarEstado(estado nuevoEstado)"}, {"node_id": 54, "universal_type": "function", "name": "unknown", "text_snippet": "dibujar()"}, {"node_id": 59, "universal_type": "function", "name": "unknown", "text_snippet": "esValida()"}, {"node_id": 64, "universal_type": "function", "name": "unknown", "text_snippet": "getTipo()"}, {"node_id": 69, "universal_type": "function", "name": "unknown", "text_snippet": "getEstado()"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"posicion.h\"\r\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"circulo.h\"\r\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#include \"posicion.h\"\r\n#include \"circulo.h\"\r\n\r\nclass Camino : public Posicion\r\n{\r\nprivate:\r\n\tFigura *_pc;\r\n\testado _estado;\r\n\tint\t_xInicial;\r\n\tint _yInicial;\r\n\r\n\r\npublic:\r\n\tCamino(Laberinto * _l, int _x, int _y);\r\n\t~Camino();\r\n\tvoid cambiarEstado(estado nuevoEstado);\r\n\tvoid dibujar();\r\n\tbool esValida();\r\n\tchar getTipo();\r\n\tint getEstado();\r\n\t\r\n};"}
| 81,214
|
c
|
void print_desc_line (int n, char *desc) {
print (" %s\n\n", desc);
}
void print_description (void *desc) {
if (desc) {
char *buffer = strdup (desc);
process_buffer (buffer, print_desc_line);
free (buffer);
}
}
void print_field_doc (char *name, Field *f) {
print (" @var SE_%s_t::%s\n", name, f->name);
print_description (f->desc);
}
void print_particle_doc (char *name, Particle *part, SchemaType *head) {
Particle *p;
Field *f;
foreach (p, part) {
switch (p->kind) {
case PartElement:
f = &p->field;
if (f->prim != XS_BOOLEAN)
print_field_doc (name, &p->field);
break;
case PartGroup:
case PartChoice:
case PartSequence:
print_particle_doc (name, p->child, head);
case PartAny:
break;
}
}
}
void print_fields_doc (char *name, SchemaType *t, SchemaType *head) {
List *attr;
SchemaType *u;
if (t->base && (u = find_by_name (head, t->base)))
print_fields_doc (name, u, head);
if (!t->restriction) {
foreach (attr, t->attr) {
AttrDecl *a = attr->data;
print_field_doc (name, &a->field);
}
print_particle_doc (name, t->part, head);
}
}
void print_flags_doc (SchemaType *t, SchemaType *head) {
List *f;
if (t->base) print_flags_doc (find_by_name (head, t->base), head);
foreach (f, t->flags) {
print_flag (f->data, 0);
print ("\n");
}
}
void print_type_doc (SchemaType *t, SchemaType *head) {
char *base = t->base ? t->base : "se_types";
print ("/** @defgroup %s %s\n", t->name, t->name);
switch (t->kind) {
case ComplexType:
print (" @ingroup %s\n\n", base);
print_description (t->desc);
print (" @{ */\n\n");
print ("/** @struct SE_%s_t se_types.h\n\n", t->name);
print_description (t->desc);
if (has_flags (t, head)) {
print (" @var SE_%s_t::_flags\n", t->name);
print_flags_doc (t, head);
}
print_fields_doc (t->name, t, head);
break;
case AtomicType:
if (string_index (base, xs_names, 12) < 12)
print (" @ingroup se_typedefs\n\n");
else print (" @ingroup %s\n\n", base);
print_description (t->desc);
print (" @{ */\n\n");
print ("/** @typedef SE_%s_t\n\n", t->name);
print_description (t->desc);
break;
}
print ("*/\n\n/** @} */\n\n");
}
void print_types_doc (List *list, SchemaType *head) {
List *l;
print ("/** @defgroup se_types IEEE 2030.5 Types */\n\n");
print ("/** @defgroup se_typedefs Typedefs \n");
print (" @ingroup se_types */\n\n");
foreach (l, list) print_type_doc (l->data, head);
}
| 28.01
| 89
|
(translation_unit) "void print_desc_line (int n, char *desc) {\n print (" %s\n\n", desc);\n}\n\nvoid print_description (void *desc) {\n if (desc) {\n char *buffer = strdup (desc);\n process_buffer (buffer, print_desc_line);\n free (buffer);\n }\n}\n\nvoid print_field_doc (char *name, Field *f) {\n print (" @var SE_%s_t::%s\n", name, f->name);\n print_description (f->desc);\n}\n\nvoid print_particle_doc (char *name, Particle *part, SchemaType *head) {\n Particle *p;\n Field *f;\n foreach (p, part) {\n switch (p->kind) {\n case PartElement:\n f = &p->field;\n if (f->prim != XS_BOOLEAN)\n print_field_doc (name, &p->field);\n break;\n case PartGroup:\n case PartChoice:\n case PartSequence:\n print_particle_doc (name, p->child, head);\n case PartAny:\n break;\n }\n }\n}\n\nvoid print_fields_doc (char *name, SchemaType *t, SchemaType *head) {\n List *attr;\n SchemaType *u;\n if (t->base && (u = find_by_name (head, t->base)))\n print_fields_doc (name, u, head);\n if (!t->restriction) {\n foreach (attr, t->attr) {\n AttrDecl *a = attr->data;\n print_field_doc (name, &a->field);\n }\n print_particle_doc (name, t->part, head);\n }\n}\n\nvoid print_flags_doc (SchemaType *t, SchemaType *head) {\n List *f;\n if (t->base) print_flags_doc (find_by_name (head, t->base), head);\n foreach (f, t->flags) {\n print_flag (f->data, 0);\n print ("\n");\n }\n}\n\nvoid print_type_doc (SchemaType *t, SchemaType *head) {\n char *base = t->base ? t->base : "se_types";\n print ("/** @defgroup %s %s\n", t->name, t->name);\n switch (t->kind) {\n case ComplexType:\n print (" @ingroup %s\n\n", base);\n print_description (t->desc);\n print (" @{ */\n\n");\n print ("/** @struct SE_%s_t se_types.h\n\n", t->name);\n print_description (t->desc);\n if (has_flags (t, head)) {\n print (" @var SE_%s_t::_flags\n", t->name);\n print_flags_doc (t, head);\n }\n print_fields_doc (t->name, t, head);\n break;\n case AtomicType:\n if (string_index (base, xs_names, 12) < 12)\n print (" @ingroup se_typedefs\n\n");\n else print (" @ingroup %s\n\n", base);\n print_description (t->desc);\n print (" @{ */\n\n");\n print ("/** @typedef SE_%s_t\n\n", t->name);\n print_description (t->desc);\n break;\n }\n print ("*/\n\n/** @} */\n\n");\n}\n\nvoid print_types_doc (List *list, SchemaType *head) {\n List *l;\n print ("/** @defgroup se_types IEEE 2030.5 Types */\n\n");\n print ("/** @defgroup se_typedefs Typedefs \n");\n print (" @ingroup se_types */\n\n");\n foreach (l, list) print_type_doc (l->data, head);\n}\n"
(function_definition) "void print_desc_line (int n, char *desc) {\n print (" %s\n\n", desc);\n}"
(primitive_type) "void"
(function_declarator) "print_desc_line (int n, char *desc)"
(identifier) "print_desc_line"
(parameter_list) "(int n, char *desc)"
(() "("
(parameter_declaration) "int n"
(primitive_type) "int"
(identifier) "n"
(,) ","
(parameter_declaration) "char *desc"
(primitive_type) "char"
(pointer_declarator) "*desc"
(*) "*"
(identifier) "desc"
()) ")"
(compound_statement) "{\n print (" %s\n\n", desc);\n}"
({) "{"
(expression_statement) "print (" %s\n\n", desc);"
(call_expression) "print (" %s\n\n", desc)"
(identifier) "print"
(argument_list) "(" %s\n\n", desc)"
(() "("
(string_literal) "" %s\n\n""
(") """
(string_content) " %s"
(escape_sequence) "\n"
(escape_sequence) "\n"
(") """
(,) ","
(identifier) "desc"
()) ")"
(;) ";"
(}) "}"
(function_definition) "void print_description (void *desc) {\n if (desc) {\n char *buffer = strdup (desc);\n process_buffer (buffer, print_desc_line);\n free (buffer);\n }\n}"
(primitive_type) "void"
(function_declarator) "print_description (void *desc)"
(identifier) "print_description"
(parameter_list) "(void *desc)"
(() "("
(parameter_declaration) "void *desc"
(primitive_type) "void"
(pointer_declarator) "*desc"
(*) "*"
(identifier) "desc"
()) ")"
(compound_statement) "{\n if (desc) {\n char *buffer = strdup (desc);\n process_buffer (buffer, print_desc_line);\n free (buffer);\n }\n}"
({) "{"
(if_statement) "if (desc) {\n char *buffer = strdup (desc);\n process_buffer (buffer, print_desc_line);\n free (buffer);\n }"
(if) "if"
(parenthesized_expression) "(desc)"
(() "("
(identifier) "desc"
()) ")"
(compound_statement) "{\n char *buffer = strdup (desc);\n process_buffer (buffer, print_desc_line);\n free (buffer);\n }"
({) "{"
(declaration) "char *buffer = strdup (desc);"
(primitive_type) "char"
(init_declarator) "*buffer = strdup (desc)"
(pointer_declarator) "*buffer"
(*) "*"
(identifier) "buffer"
(=) "="
(call_expression) "strdup (desc)"
(identifier) "strdup"
(argument_list) "(desc)"
(() "("
(identifier) "desc"
()) ")"
(;) ";"
(expression_statement) "process_buffer (buffer, print_desc_line);"
(call_expression) "process_buffer (buffer, print_desc_line)"
(identifier) "process_buffer"
(argument_list) "(buffer, print_desc_line)"
(() "("
(identifier) "buffer"
(,) ","
(identifier) "print_desc_line"
()) ")"
(;) ";"
(expression_statement) "free (buffer);"
(call_expression) "free (buffer)"
(identifier) "free"
(argument_list) "(buffer)"
(() "("
(identifier) "buffer"
()) ")"
(;) ";"
(}) "}"
(}) "}"
(function_definition) "void print_field_doc (char *name, Field *f) {\n print (" @var SE_%s_t::%s\n", name, f->name);\n print_description (f->desc);\n}"
(primitive_type) "void"
(function_declarator) "print_field_doc (char *name, Field *f)"
(identifier) "print_field_doc"
(parameter_list) "(char *name, Field *f)"
(() "("
(parameter_declaration) "char *name"
(primitive_type) "char"
(pointer_declarator) "*name"
(*) "*"
(identifier) "name"
(,) ","
(parameter_declaration) "Field *f"
(type_identifier) "Field"
(pointer_declarator) "*f"
(*) "*"
(identifier) "f"
()) ")"
(compound_statement) "{\n print (" @var SE_%s_t::%s\n", name, f->name);\n print_description (f->desc);\n}"
({) "{"
(expression_statement) "print (" @var SE_%s_t::%s\n", name, f->name);"
(call_expression) "print (" @var SE_%s_t::%s\n", name, f->name)"
(identifier) "print"
(argument_list) "(" @var SE_%s_t::%s\n", name, f->name)"
(() "("
(string_literal) "" @var SE_%s_t::%s\n""
(") """
(string_content) " @var SE_%s_t::%s"
(escape_sequence) "\n"
(") """
(,) ","
(identifier) "name"
(,) ","
(field_expression) "f->name"
(identifier) "f"
(->) "->"
(field_identifier) "name"
()) ")"
(;) ";"
(expression_statement) "print_description (f->desc);"
(call_expression) "print_description (f->desc)"
(identifier) "print_description"
(argument_list) "(f->desc)"
(() "("
(field_expression) "f->desc"
(identifier) "f"
(->) "->"
(field_identifier) "desc"
()) ")"
(;) ";"
(}) "}"
(function_definition) "void print_particle_doc (char *name, Particle *part, SchemaType *head) {\n Particle *p;\n Field *f;\n foreach (p, part) {\n switch (p->kind) {\n case PartElement:\n f = &p->field;\n if (f->prim != XS_BOOLEAN)\n print_field_doc (name, &p->field);\n break;\n case PartGroup:\n case PartChoice:\n case PartSequence:\n print_particle_doc (name, p->child, head);\n case PartAny:\n break;\n }\n }\n}"
(primitive_type) "void"
(function_declarator) "print_particle_doc (char *name, Particle *part, SchemaType *head)"
(identifier) "print_particle_doc"
(parameter_list) "(char *name, Particle *part, SchemaType *head)"
(() "("
(parameter_declaration) "char *name"
(primitive_type) "char"
(pointer_declarator) "*name"
(*) "*"
(identifier) "name"
(,) ","
(parameter_declaration) "Particle *part"
(type_identifier) "Particle"
(pointer_declarator) "*part"
(*) "*"
(identifier) "part"
(,) ","
(parameter_declaration) "SchemaType *head"
(type_identifier) "SchemaType"
(pointer_declarator) "*head"
(*) "*"
(identifier) "head"
()) ")"
(compound_statement) "{\n Particle *p;\n Field *f;\n foreach (p, part) {\n switch (p->kind) {\n case PartElement:\n f = &p->field;\n if (f->prim != XS_BOOLEAN)\n print_field_doc (name, &p->field);\n break;\n case PartGroup:\n case PartChoice:\n case PartSequence:\n print_particle_doc (name, p->child, head);\n case PartAny:\n break;\n }\n }\n}"
({) "{"
(declaration) "Particle *p;"
(type_identifier) "Particle"
(pointer_declarator) "*p"
(*) "*"
(identifier) "p"
(;) ";"
(declaration) "Field *f;"
(type_identifier) "Field"
(pointer_declarator) "*f"
(*) "*"
(identifier) "f"
(;) ";"
(expression_statement) "foreach (p, part)"
(call_expression) "foreach (p, part)"
(identifier) "foreach"
(argument_list) "(p, part)"
(() "("
(identifier) "p"
(,) ","
(identifier) "part"
()) ")"
(;) ""
(compound_statement) "{\n switch (p->kind) {\n case PartElement:\n f = &p->field;\n if (f->prim != XS_BOOLEAN)\n print_field_doc (name, &p->field);\n break;\n case PartGroup:\n case PartChoice:\n case PartSequence:\n print_particle_doc (name, p->child, head);\n case PartAny:\n break;\n }\n }"
({) "{"
(switch_statement) "switch (p->kind) {\n case PartElement:\n f = &p->field;\n if (f->prim != XS_BOOLEAN)\n print_field_doc (name, &p->field);\n break;\n case PartGroup:\n case PartChoice:\n case PartSequence:\n print_particle_doc (name, p->child, head);\n case PartAny:\n break;\n }"
(switch) "switch"
(parenthesized_expression) "(p->kind)"
(() "("
(field_expression) "p->kind"
(identifier) "p"
(->) "->"
(field_identifier) "kind"
()) ")"
(compound_statement) "{\n case PartElement:\n f = &p->field;\n if (f->prim != XS_BOOLEAN)\n print_field_doc (name, &p->field);\n break;\n case PartGroup:\n case PartChoice:\n case PartSequence:\n print_particle_doc (name, p->child, head);\n case PartAny:\n break;\n }"
({) "{"
(case_statement) "case PartElement:\n f = &p->field;\n if (f->prim != XS_BOOLEAN)\n print_field_doc (name, &p->field);\n break;"
(case) "case"
(identifier) "PartElement"
(:) ":"
(expression_statement) "f = &p->field;"
(assignment_expression) "f = &p->field"
(identifier) "f"
(=) "="
(pointer_expression) "&p->field"
(&) "&"
(field_expression) "p->field"
(identifier) "p"
(->) "->"
(field_identifier) "field"
(;) ";"
(if_statement) "if (f->prim != XS_BOOLEAN)\n print_field_doc (name, &p->field);"
(if) "if"
(parenthesized_expression) "(f->prim != XS_BOOLEAN)"
(() "("
(binary_expression) "f->prim != XS_BOOLEAN"
(field_expression) "f->prim"
(identifier) "f"
(->) "->"
(field_identifier) "prim"
(!=) "!="
(identifier) "XS_BOOLEAN"
()) ")"
(expression_statement) "print_field_doc (name, &p->field);"
(call_expression) "print_field_doc (name, &p->field)"
(identifier) "print_field_doc"
(argument_list) "(name, &p->field)"
(() "("
(identifier) "name"
(,) ","
(pointer_expression) "&p->field"
(&) "&"
(field_expression) "p->field"
(identifier) "p"
(->) "->"
(field_identifier) "field"
()) ")"
(;) ";"
(break_statement) "break;"
(break) "break"
(;) ";"
(case_statement) "case PartGroup:"
(case) "case"
(identifier) "PartGroup"
(:) ":"
(case_statement) "case PartChoice:"
(case) "case"
(identifier) "PartChoice"
(:) ":"
(case_statement) "case PartSequence:\n print_particle_doc (name, p->child, head);"
(case) "case"
(identifier) "PartSequence"
(:) ":"
(expression_statement) "print_particle_doc (name, p->child, head);"
(call_expression) "print_particle_doc (name, p->child, head)"
(identifier) "print_particle_doc"
(argument_list) "(name, p->child, head)"
(() "("
(identifier) "name"
(,) ","
(field_expression) "p->child"
(identifier) "p"
(->) "->"
(field_identifier) "child"
(,) ","
(identifier) "head"
()) ")"
(;) ";"
(case_statement) "case PartAny:\n break;"
(case) "case"
(identifier) "PartAny"
(:) ":"
(break_statement) "break;"
(break) "break"
(;) ";"
(}) "}"
(}) "}"
(}) "}"
(function_definition) "void print_fields_doc (char *name, SchemaType *t, SchemaType *head) {\n List *attr;\n SchemaType *u;\n if (t->base && (u = find_by_name (head, t->base)))\n print_fields_doc (name, u, head);\n if (!t->restriction) {\n foreach (attr, t->attr) {\n AttrDecl *a = attr->data;\n print_field_doc (name, &a->field);\n }\n print_particle_doc (name, t->part, head);\n }\n}"
(primitive_type) "void"
(function_declarator) "print_fields_doc (char *name, SchemaType *t, SchemaType *head)"
(identifier) "print_fields_doc"
(parameter_list) "(char *name, SchemaType *t, SchemaType *head)"
(() "("
(parameter_declaration) "char *name"
(primitive_type) "char"
(pointer_declarator) "*name"
(*) "*"
(identifier) "name"
(,) ","
(parameter_declaration) "SchemaType *t"
(type_identifier) "SchemaType"
(pointer_declarator) "*t"
(*) "*"
(identifier) "t"
(,) ","
(parameter_declaration) "SchemaType *head"
(type_identifier) "SchemaType"
(pointer_declarator) "*head"
(*) "*"
(identifier) "head"
()) ")"
(compound_statement) "{\n List *attr;\n SchemaType *u;\n if (t->base && (u = find_by_name (head, t->base)))\n print_fields_doc (name, u, head);\n if (!t->restriction) {\n foreach (attr, t->attr) {\n AttrDecl *a = attr->data;\n print_field_doc (name, &a->field);\n }\n print_particle_doc (name, t->part, head);\n }\n}"
({) "{"
(declaration) "List *attr;"
(type_identifier) "List"
(pointer_declarator) "*attr"
(*) "*"
(identifier) "attr"
(;) ";"
(declaration) "SchemaType *u;"
(type_identifier) "SchemaType"
(pointer_declarator) "*u"
(*) "*"
(identifier) "u"
(;) ";"
(if_statement) "if (t->base && (u = find_by_name (head, t->base)))\n print_fields_doc (name, u, head);"
(if) "if"
(parenthesized_expression) "(t->base && (u = find_by_name (head, t->base)))"
(() "("
(binary_expression) "t->base && (u = find_by_name (head, t->base))"
(field_expression) "t->base"
(identifier) "t"
(->) "->"
(field_identifier) "base"
(&&) "&&"
(parenthesized_expression) "(u = find_by_name (head, t->base))"
(() "("
(assignment_expression) "u = find_by_name (head, t->base)"
(identifier) "u"
(=) "="
(call_expression) "find_by_name (head, t->base)"
(identifier) "find_by_name"
(argument_list) "(head, t->base)"
(() "("
(identifier) "head"
(,) ","
(field_expression) "t->base"
(identifier) "t"
(->) "->"
(field_identifier) "base"
()) ")"
()) ")"
()) ")"
(expression_statement) "print_fields_doc (name, u, head);"
(call_expression) "print_fields_doc (name, u, head)"
(identifier) "print_fields_doc"
(argument_list) "(name, u, head)"
(() "("
(identifier) "name"
(,) ","
(identifier) "u"
(,) ","
(identifier) "head"
()) ")"
(;) ";"
(if_statement) "if (!t->restriction) {\n foreach (attr, t->attr) {\n AttrDecl *a = attr->data;\n print_field_doc (name, &a->field);\n }\n print_particle_doc (name, t->part, head);\n }"
(if) "if"
(parenthesized_expression) "(!t->restriction)"
(() "("
(unary_expression) "!t->restriction"
(!) "!"
(field_expression) "t->restriction"
(identifier) "t"
(->) "->"
(field_identifier) "restriction"
()) ")"
(compound_statement) "{\n foreach (attr, t->attr) {\n AttrDecl *a = attr->data;\n print_field_doc (name, &a->field);\n }\n print_particle_doc (name, t->part, head);\n }"
({) "{"
(expression_statement) "foreach (attr, t->attr)"
(call_expression) "foreach (attr, t->attr)"
(identifier) "foreach"
(argument_list) "(attr, t->attr)"
(() "("
(identifier) "attr"
(,) ","
(field_expression) "t->attr"
(identifier) "t"
(->) "->"
(field_identifier) "attr"
()) ")"
(;) ""
(compound_statement) "{\n AttrDecl *a = attr->data;\n print_field_doc (name, &a->field);\n }"
({) "{"
(declaration) "AttrDecl *a = attr->data;"
(type_identifier) "AttrDecl"
(init_declarator) "*a = attr->data"
(pointer_declarator) "*a"
(*) "*"
(identifier) "a"
(=) "="
(field_expression) "attr->data"
(identifier) "attr"
(->) "->"
(field_identifier) "data"
(;) ";"
(expression_statement) "print_field_doc (name, &a->field);"
(call_expression) "print_field_doc (name, &a->field)"
(identifier) "print_field_doc"
(argument_list) "(name, &a->field)"
(() "("
(identifier) "name"
(,) ","
(pointer_expression) "&a->field"
(&) "&"
(field_expression) "a->field"
(identifier) "a"
(->) "->"
(field_identifier) "field"
()) ")"
(;) ";"
(}) "}"
(expression_statement) "print_particle_doc (name, t->part, head);"
(call_expression) "print_particle_doc (name, t->part, head)"
(identifier) "print_particle_doc"
(argument_list) "(name, t->part, head)"
(() "("
(identifier) "name"
(,) ","
(field_expression) "t->part"
(identifier) "t"
(->) "->"
(field_identifier) "part"
(,) ","
(identifier) "head"
()) ")"
(;) ";"
(}) "}"
(}) "}"
(function_definition) "void print_flags_doc (SchemaType *t, SchemaType *head) {\n List *f;\n if (t->base) print_flags_doc (find_by_name (head, t->base), head);\n foreach (f, t->flags) {\n print_flag (f->data, 0);\n print ("\n");\n }\n}"
(primitive_type) "void"
(function_declarator) "print_flags_doc (SchemaType *t, SchemaType *head)"
(identifier) "print_flags_doc"
(parameter_list) "(SchemaType *t, SchemaType *head)"
(() "("
(parameter_declaration) "SchemaType *t"
(type_identifier) "SchemaType"
(pointer_declarator) "*t"
(*) "*"
(identifier) "t"
(,) ","
(parameter_declaration) "SchemaType *head"
(type_identifier) "SchemaType"
(pointer_declarator) "*head"
(*) "*"
(identifier) "head"
()) ")"
(compound_statement) "{\n List *f;\n if (t->base) print_flags_doc (find_by_name (head, t->base), head);\n foreach (f, t->flags) {\n print_flag (f->data, 0);\n print ("\n");\n }\n}"
({) "{"
(declaration) "List *f;"
(type_identifier) "List"
(pointer_declarator) "*f"
(*) "*"
(identifier) "f"
(;) ";"
(if_statement) "if (t->base) print_flags_doc (find_by_name (head, t->base), head);"
(if) "if"
(parenthesized_expression) "(t->base)"
(() "("
(field_expression) "t->base"
(identifier) "t"
(->) "->"
(field_identifier) "base"
()) ")"
(expression_statement) "print_flags_doc (find_by_name (head, t->base), head);"
(call_expression) "print_flags_doc (find_by_name (head, t->base), head)"
(identifier) "print_flags_doc"
(argument_list) "(find_by_name (head, t->base), head)"
(() "("
(call_expression) "find_by_name (head, t->base)"
(identifier) "find_by_name"
(argument_list) "(head, t->base)"
(() "("
(identifier) "head"
(,) ","
(field_expression) "t->base"
(identifier) "t"
(->) "->"
(field_identifier) "base"
()) ")"
(,) ","
(identifier) "head"
()) ")"
(;) ";"
(expression_statement) "foreach (f, t->flags)"
(call_expression) "foreach (f, t->flags)"
(identifier) "foreach"
(argument_list) "(f, t->flags)"
(() "("
(identifier) "f"
(,) ","
(field_expression) "t->flags"
(identifier) "t"
(->) "->"
(field_identifier) "flags"
()) ")"
(;) ""
(compound_statement) "{\n print_flag (f->data, 0);\n print ("\n");\n }"
({) "{"
(expression_statement) "print_flag (f->data, 0);"
(call_expression) "print_flag (f->data, 0)"
(identifier) "print_flag"
(argument_list) "(f->data, 0)"
(() "("
(field_expression) "f->data"
(identifier) "f"
(->) "->"
(field_identifier) "data"
(,) ","
(number_literal) "0"
()) ")"
(;) ";"
(expression_statement) "print ("\n");"
(call_expression) "print ("\n")"
(identifier) "print"
(argument_list) "("\n")"
(() "("
(string_literal) ""\n""
(") """
(escape_sequence) "\n"
(") """
()) ")"
(;) ";"
(}) "}"
(}) "}"
(function_definition) "void print_type_doc (SchemaType *t, SchemaType *head) {\n char *base = t->base ? t->base : "se_types";\n print ("/** @defgroup %s %s\n", t->name, t->name);\n switch (t->kind) {\n case ComplexType:\n print (" @ingroup %s\n\n", base);\n print_description (t->desc);\n print (" @{ */\n\n");\n print ("/** @struct SE_%s_t se_types.h\n\n", t->name);\n print_description (t->desc);\n if (has_flags (t, head)) {\n print (" @var SE_%s_t::_flags\n", t->name);\n print_flags_doc (t, head);\n }\n print_fields_doc (t->name, t, head);\n break;\n case AtomicType:\n if (string_index (base, xs_names, 12) < 12)\n print (" @ingroup se_typedefs\n\n");\n else print (" @ingroup %s\n\n", base);\n print_description (t->desc);\n print (" @{ */\n\n");\n print ("/** @typedef SE_%s_t\n\n", t->name);\n print_description (t->desc);\n break;\n }\n print ("*/\n\n/** @} */\n\n");\n}"
(primitive_type) "void"
(function_declarator) "print_type_doc (SchemaType *t, SchemaType *head)"
(identifier) "print_type_doc"
(parameter_list) "(SchemaType *t, SchemaType *head)"
(() "("
(parameter_declaration) "SchemaType *t"
(type_identifier) "SchemaType"
(pointer_declarator) "*t"
(*) "*"
(identifier) "t"
(,) ","
(parameter_declaration) "SchemaType *head"
(type_identifier) "SchemaType"
(pointer_declarator) "*head"
(*) "*"
(identifier) "head"
()) ")"
(compound_statement) "{\n char *base = t->base ? t->base : "se_types";\n print ("/** @defgroup %s %s\n", t->name, t->name);\n switch (t->kind) {\n case ComplexType:\n print (" @ingroup %s\n\n", base);\n print_description (t->desc);\n print (" @{ */\n\n");\n print ("/** @struct SE_%s_t se_types.h\n\n", t->name);\n print_description (t->desc);\n if (has_flags (t, head)) {\n print (" @var SE_%s_t::_flags\n", t->name);\n print_flags_doc (t, head);\n }\n print_fields_doc (t->name, t, head);\n break;\n case AtomicType:\n if (string_index (base, xs_names, 12) < 12)\n print (" @ingroup se_typedefs\n\n");\n else print (" @ingroup %s\n\n", base);\n print_description (t->desc);\n print (" @{ */\n\n");\n print ("/** @typedef SE_%s_t\n\n", t->name);\n print_description (t->desc);\n break;\n }\n print ("*/\n\n/** @} */\n\n");\n}"
({) "{"
(declaration) "char *base = t->base ? t->base : "se_types";"
(primitive_type) "char"
(init_declarator) "*base = t->base ? t->base : "se_types""
(pointer_declarator) "*base"
(*) "*"
(identifier) "base"
(=) "="
(conditional_expression) "t->base ? t->base : "se_types""
(field_expression) "t->base"
(identifier) "t"
(->) "->"
(field_identifier) "base"
(?) "?"
(field_expression) "t->base"
(identifier) "t"
(->) "->"
(field_identifier) "base"
(:) ":"
(string_literal) ""se_types""
(") """
(string_content) "se_types"
(") """
(;) ";"
(expression_statement) "print ("/** @defgroup %s %s\n", t->name, t->name);"
(call_expression) "print ("/** @defgroup %s %s\n", t->name, t->name)"
(identifier) "print"
(argument_list) "("/** @defgroup %s %s\n", t->name, t->name)"
(() "("
(string_literal) ""/** @defgroup %s %s\n""
(") """
(string_content) "/** @defgroup %s %s"
(escape_sequence) "\n"
(") """
(,) ","
(field_expression) "t->name"
(identifier) "t"
(->) "->"
(field_identifier) "name"
(,) ","
(field_expression) "t->name"
(identifier) "t"
(->) "->"
(field_identifier) "name"
()) ")"
(;) ";"
(switch_statement) "switch (t->kind) {\n case ComplexType:\n print (" @ingroup %s\n\n", base);\n print_description (t->desc);\n print (" @{ */\n\n");\n print ("/** @struct SE_%s_t se_types.h\n\n", t->name);\n print_description (t->desc);\n if (has_flags (t, head)) {\n print (" @var SE_%s_t::_flags\n", t->name);\n print_flags_doc (t, head);\n }\n print_fields_doc (t->name, t, head);\n break;\n case AtomicType:\n if (string_index (base, xs_names, 12) < 12)\n print (" @ingroup se_typedefs\n\n");\n else print (" @ingroup %s\n\n", base);\n print_description (t->desc);\n print (" @{ */\n\n");\n print ("/** @typedef SE_%s_t\n\n", t->name);\n print_description (t->desc);\n break;\n }"
(switch) "switch"
(parenthesized_expression) "(t->kind)"
(() "("
(field_expression) "t->kind"
(identifier) "t"
(->) "->"
(field_identifier) "kind"
()) ")"
(compound_statement) "{\n case ComplexType:\n print (" @ingroup %s\n\n", base);\n print_description (t->desc);\n print (" @{ */\n\n");\n print ("/** @struct SE_%s_t se_types.h\n\n", t->name);\n print_description (t->desc);\n if (has_flags (t, head)) {\n print (" @var SE_%s_t::_flags\n", t->name);\n print_flags_doc (t, head);\n }\n print_fields_doc (t->name, t, head);\n break;\n case AtomicType:\n if (string_index (base, xs_names, 12) < 12)\n print (" @ingroup se_typedefs\n\n");\n else print (" @ingroup %s\n\n", base);\n print_description (t->desc);\n print (" @{ */\n\n");\n print ("/** @typedef SE_%s_t\n\n", t->name);\n print_description (t->desc);\n break;\n }"
({) "{"
(case_statement) "case ComplexType:\n print (" @ingroup %s\n\n", base);\n print_description (t->desc);\n print (" @{ */\n\n");\n print ("/** @struct SE_%s_t se_types.h\n\n", t->name);\n print_description (t->desc);\n if (has_flags (t, head)) {\n print (" @var SE_%s_t::_flags\n", t->name);\n print_flags_doc (t, head);\n }\n print_fields_doc (t->name, t, head);\n break;"
(case) "case"
(identifier) "ComplexType"
(:) ":"
(expression_statement) "print (" @ingroup %s\n\n", base);"
(call_expression) "print (" @ingroup %s\n\n", base)"
(identifier) "print"
(argument_list) "(" @ingroup %s\n\n", base)"
(() "("
(string_literal) "" @ingroup %s\n\n""
(") """
(string_content) " @ingroup %s"
(escape_sequence) "\n"
(escape_sequence) "\n"
(") """
(,) ","
(identifier) "base"
()) ")"
(;) ";"
(expression_statement) "print_description (t->desc);"
(call_expression) "print_description (t->desc)"
(identifier) "print_description"
(argument_list) "(t->desc)"
(() "("
(field_expression) "t->desc"
(identifier) "t"
(->) "->"
(field_identifier) "desc"
()) ")"
(;) ";"
(expression_statement) "print (" @{ */\n\n");"
(call_expression) "print (" @{ */\n\n")"
(identifier) "print"
(argument_list) "(" @{ */\n\n")"
(() "("
(string_literal) "" @{ */\n\n""
(") """
(string_content) " @{ */"
(escape_sequence) "\n"
(escape_sequence) "\n"
(") """
()) ")"
(;) ";"
(expression_statement) "print ("/** @struct SE_%s_t se_types.h\n\n", t->name);"
(call_expression) "print ("/** @struct SE_%s_t se_types.h\n\n", t->name)"
(identifier) "print"
(argument_list) "("/** @struct SE_%s_t se_types.h\n\n", t->name)"
(() "("
(string_literal) ""/** @struct SE_%s_t se_types.h\n\n""
(") """
(string_content) "/** @struct SE_%s_t se_types.h"
(escape_sequence) "\n"
(escape_sequence) "\n"
(") """
(,) ","
(field_expression) "t->name"
(identifier) "t"
(->) "->"
(field_identifier) "name"
()) ")"
(;) ";"
(expression_statement) "print_description (t->desc);"
(call_expression) "print_description (t->desc)"
(identifier) "print_description"
(argument_list) "(t->desc)"
(() "("
(field_expression) "t->desc"
(identifier) "t"
(->) "->"
(field_identifier) "desc"
()) ")"
(;) ";"
(if_statement) "if (has_flags (t, head)) {\n print (" @var SE_%s_t::_flags\n", t->name);\n print_flags_doc (t, head);\n }"
(if) "if"
(parenthesized_expression) "(has_flags (t, head))"
(() "("
(call_expression) "has_flags (t, head)"
(identifier) "has_flags"
(argument_list) "(t, head)"
(() "("
(identifier) "t"
(,) ","
(identifier) "head"
()) ")"
()) ")"
(compound_statement) "{\n print (" @var SE_%s_t::_flags\n", t->name);\n print_flags_doc (t, head);\n }"
({) "{"
(expression_statement) "print (" @var SE_%s_t::_flags\n", t->name);"
(call_expression) "print (" @var SE_%s_t::_flags\n", t->name)"
(identifier) "print"
(argument_list) "(" @var SE_%s_t::_flags\n", t->name)"
(() "("
(string_literal) "" @var SE_%s_t::_flags\n""
(") """
(string_content) " @var SE_%s_t::_flags"
(escape_sequence) "\n"
(") """
(,) ","
(field_expression) "t->name"
(identifier) "t"
(->) "->"
(field_identifier) "name"
()) ")"
(;) ";"
(expression_statement) "print_flags_doc (t, head);"
(call_expression) "print_flags_doc (t, head)"
(identifier) "print_flags_doc"
(argument_list) "(t, head)"
(() "("
(identifier) "t"
(,) ","
(identifier) "head"
()) ")"
(;) ";"
(}) "}"
(expression_statement) "print_fields_doc (t->name, t, head);"
(call_expression) "print_fields_doc (t->name, t, head)"
(identifier) "print_fields_doc"
(argument_list) "(t->name, t, head)"
(() "("
(field_expression) "t->name"
(identifier) "t"
(->) "->"
(field_identifier) "name"
(,) ","
(identifier) "t"
(,) ","
(identifier) "head"
()) ")"
(;) ";"
(break_statement) "break;"
(break) "break"
(;) ";"
(case_statement) "case AtomicType:\n if (string_index (base, xs_names, 12) < 12)\n print (" @ingroup se_typedefs\n\n");\n else print (" @ingroup %s\n\n", base);\n print_description (t->desc);\n print (" @{ */\n\n");\n print ("/** @typedef SE_%s_t\n\n", t->name);\n print_description (t->desc);\n break;"
(case) "case"
(identifier) "AtomicType"
(:) ":"
(if_statement) "if (string_index (base, xs_names, 12) < 12)\n print (" @ingroup se_typedefs\n\n");\n else print (" @ingroup %s\n\n", base);"
(if) "if"
(parenthesized_expression) "(string_index (base, xs_names, 12) < 12)"
(() "("
(binary_expression) "string_index (base, xs_names, 12) < 12"
(call_expression) "string_index (base, xs_names, 12)"
(identifier) "string_index"
(argument_list) "(base, xs_names, 12)"
(() "("
(identifier) "base"
(,) ","
(identifier) "xs_names"
(,) ","
(number_literal) "12"
()) ")"
(<) "<"
(number_literal) "12"
()) ")"
(expression_statement) "print (" @ingroup se_typedefs\n\n");"
(call_expression) "print (" @ingroup se_typedefs\n\n")"
(identifier) "print"
(argument_list) "(" @ingroup se_typedefs\n\n")"
(() "("
(string_literal) "" @ingroup se_typedefs\n\n""
(") """
(string_content) " @ingroup se_typedefs"
(escape_sequence) "\n"
(escape_sequence) "\n"
(") """
()) ")"
(;) ";"
(else_clause) "else print (" @ingroup %s\n\n", base);"
(else) "else"
(expression_statement) "print (" @ingroup %s\n\n", base);"
(call_expression) "print (" @ingroup %s\n\n", base)"
(identifier) "print"
(argument_list) "(" @ingroup %s\n\n", base)"
(() "("
(string_literal) "" @ingroup %s\n\n""
(") """
(string_content) " @ingroup %s"
(escape_sequence) "\n"
(escape_sequence) "\n"
(") """
(,) ","
(identifier) "base"
()) ")"
(;) ";"
(expression_statement) "print_description (t->desc);"
(call_expression) "print_description (t->desc)"
(identifier) "print_description"
(argument_list) "(t->desc)"
(() "("
(field_expression) "t->desc"
(identifier) "t"
(->) "->"
(field_identifier) "desc"
()) ")"
(;) ";"
(expression_statement) "print (" @{ */\n\n");"
(call_expression) "print (" @{ */\n\n")"
(identifier) "print"
(argument_list) "(" @{ */\n\n")"
(() "("
(string_literal) "" @{ */\n\n""
(") """
(string_content) " @{ */"
(escape_sequence) "\n"
(escape_sequence) "\n"
(") """
()) ")"
(;) ";"
(expression_statement) "print ("/** @typedef SE_%s_t\n\n", t->name);"
(call_expression) "print ("/** @typedef SE_%s_t\n\n", t->name)"
(identifier) "print"
(argument_list) "("/** @typedef SE_%s_t\n\n", t->name)"
(() "("
(string_literal) ""/** @typedef SE_%s_t\n\n""
(") """
(string_content) "/** @typedef SE_%s_t"
(escape_sequence) "\n"
(escape_sequence) "\n"
(") """
(,) ","
(field_expression) "t->name"
(identifier) "t"
(->) "->"
(field_identifier) "name"
()) ")"
(;) ";"
(expression_statement) "print_description (t->desc);"
(call_expression) "print_description (t->desc)"
(identifier) "print_description"
(argument_list) "(t->desc)"
(() "("
(field_expression) "t->desc"
(identifier) "t"
(->) "->"
(field_identifier) "desc"
()) ")"
(;) ";"
(break_statement) "break;"
(break) "break"
(;) ";"
(}) "}"
(expression_statement) "print ("*/\n\n/** @} */\n\n");"
(call_expression) "print ("*/\n\n/** @} */\n\n")"
(identifier) "print"
(argument_list) "("*/\n\n/** @} */\n\n")"
(() "("
(string_literal) ""*/\n\n/** @} */\n\n""
(") """
(string_content) "*/"
(escape_sequence) "\n"
(escape_sequence) "\n"
(string_content) "/** @} */"
(escape_sequence) "\n"
(escape_sequence) "\n"
(") """
()) ")"
(;) ";"
(}) "}"
(function_definition) "void print_types_doc (List *list, SchemaType *head) {\n List *l;\n print ("/** @defgroup se_types IEEE 2030.5 Types */\n\n");\n print ("/** @defgroup se_typedefs Typedefs \n");\n print (" @ingroup se_types */\n\n");\n foreach (l, list) print_type_doc (l->data, head);\n}"
(primitive_type) "void"
(function_declarator) "print_types_doc (List *list, SchemaType *head)"
(identifier) "print_types_doc"
(parameter_list) "(List *list, SchemaType *head)"
(() "("
(parameter_declaration) "List *list"
(type_identifier) "List"
(pointer_declarator) "*list"
(*) "*"
(identifier) "list"
(,) ","
(parameter_declaration) "SchemaType *head"
(type_identifier) "SchemaType"
(pointer_declarator) "*head"
(*) "*"
(identifier) "head"
()) ")"
(compound_statement) "{\n List *l;\n print ("/** @defgroup se_types IEEE 2030.5 Types */\n\n");\n print ("/** @defgroup se_typedefs Typedefs \n");\n print (" @ingroup se_types */\n\n");\n foreach (l, list) print_type_doc (l->data, head);\n}"
({) "{"
(declaration) "List *l;"
(type_identifier) "List"
(pointer_declarator) "*l"
(*) "*"
(identifier) "l"
(;) ";"
(expression_statement) "print ("/** @defgroup se_types IEEE 2030.5 Types */\n\n");"
(call_expression) "print ("/** @defgroup se_types IEEE 2030.5 Types */\n\n")"
(identifier) "print"
(argument_list) "("/** @defgroup se_types IEEE 2030.5 Types */\n\n")"
(() "("
(string_literal) ""/** @defgroup se_types IEEE 2030.5 Types */\n\n""
(") """
(string_content) "/** @defgroup se_types IEEE 2030.5 Types */"
(escape_sequence) "\n"
(escape_sequence) "\n"
(") """
()) ")"
(;) ";"
(expression_statement) "print ("/** @defgroup se_typedefs Typedefs \n");"
(call_expression) "print ("/** @defgroup se_typedefs Typedefs \n")"
(identifier) "print"
(argument_list) "("/** @defgroup se_typedefs Typedefs \n")"
(() "("
(string_literal) ""/** @defgroup se_typedefs Typedefs \n""
(") """
(string_content) "/** @defgroup se_typedefs Typedefs "
(escape_sequence) "\n"
(") """
()) ")"
(;) ";"
(expression_statement) "print (" @ingroup se_types */\n\n");"
(call_expression) "print (" @ingroup se_types */\n\n")"
(identifier) "print"
(argument_list) "(" @ingroup se_types */\n\n")"
(() "("
(string_literal) "" @ingroup se_types */\n\n""
(") """
(string_content) " @ingroup se_types */"
(escape_sequence) "\n"
(escape_sequence) "\n"
(") """
()) ")"
(;) ";"
(expression_statement) "foreach (l, list)"
(call_expression) "foreach (l, list)"
(identifier) "foreach"
(argument_list) "(l, list)"
(() "("
(identifier) "l"
(,) ","
(identifier) "list"
()) ")"
(;) ""
(expression_statement) "print_type_doc (l->data, head);"
(call_expression) "print_type_doc (l->data, head)"
(identifier) "print_type_doc"
(argument_list) "(l->data, head)"
(() "("
(field_expression) "l->data"
(identifier) "l"
(->) "->"
(field_identifier) "data"
(,) ","
(identifier) "head"
()) ")"
(;) ";"
(}) "}"
| 955
| 0
|
{"language": "c", "success": true, "metadata": {"lines": 89, "avg_line_length": 28.01, "nodes": 552, "errors": 0, "source_hash": "26557d2e2923a2443cf481819b3f5dec454d42f8a180729690aeb04c3cec135c", "categorized_nodes": 385}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "function_definition", "text": "void print_desc_line (int n, char *desc) {\n print (\" %s\\n\\n\", desc);\n}", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 2, "column": 1}}, {"id": 1, "type": "primitive_type", "text": "void", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 4}}, {"id": 2, "type": "function_declarator", "text": "print_desc_line (int n, char *desc)", "parent": 0, "children": [3, 4], "start_point": {"row": 0, "column": 5}, "end_point": {"row": 0, "column": 40}}, {"id": 3, "type": "identifier", "text": "print_desc_line", "parent": 2, "children": [], "start_point": {"row": 0, "column": 5}, "end_point": {"row": 0, "column": 20}}, {"id": 4, "type": "parameter_list", "text": "(int n, char *desc)", "parent": 2, "children": [5, 8], "start_point": {"row": 0, "column": 21}, "end_point": {"row": 0, "column": 40}}, {"id": 5, "type": "parameter_declaration", "text": "int n", "parent": 4, "children": [6, 7], "start_point": {"row": 0, "column": 22}, "end_point": {"row": 0, "column": 27}}, {"id": 6, "type": "primitive_type", "text": "int", "parent": 5, "children": [], "start_point": {"row": 0, "column": 22}, "end_point": {"row": 0, "column": 25}}, {"id": 7, "type": "identifier", "text": "n", "parent": 5, "children": [], "start_point": {"row": 0, "column": 26}, "end_point": {"row": 0, "column": 27}}, {"id": 8, "type": "parameter_declaration", "text": "char *desc", "parent": 4, "children": [9, 10], "start_point": {"row": 0, "column": 29}, "end_point": {"row": 0, "column": 39}}, {"id": 9, "type": "primitive_type", "text": "char", "parent": 8, "children": [], "start_point": {"row": 0, "column": 29}, "end_point": {"row": 0, "column": 33}}, {"id": 10, "type": "pointer_declarator", "text": "*desc", "parent": 8, "children": [11, 12], "start_point": {"row": 0, "column": 34}, "end_point": {"row": 0, "column": 39}}, {"id": 11, "type": "*", "text": "*", "parent": 10, "children": [], "start_point": {"row": 0, "column": 34}, "end_point": {"row": 0, "column": 35}}, {"id": 12, "type": "identifier", "text": "desc", "parent": 10, "children": [], "start_point": {"row": 0, "column": 35}, "end_point": {"row": 0, "column": 39}}, {"id": 13, "type": "call_expression", "text": "print (\" %s\\n\\n\", desc)", "parent": 0, "children": [14, 15], "start_point": {"row": 1, "column": 2}, "end_point": {"row": 1, "column": 28}}, {"id": 14, "type": "identifier", "text": "print", "parent": 13, "children": [], "start_point": {"row": 1, "column": 2}, "end_point": {"row": 1, "column": 7}}, {"id": 15, "type": "argument_list", "text": "(\" %s\\n\\n\", desc)", "parent": 13, "children": [16, 19], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 28}}, {"id": 16, "type": "string_literal", "text": "\" %s\\n\\n\"", "parent": 15, "children": [17, 18], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 21}}, {"id": 17, "type": "escape_sequence", "text": "\\n", "parent": 16, "children": [], "start_point": {"row": 1, "column": 16}, "end_point": {"row": 1, "column": 18}}, {"id": 18, "type": "escape_sequence", "text": "\\n", "parent": 16, "children": [], "start_point": {"row": 1, "column": 18}, "end_point": {"row": 1, "column": 20}}, {"id": 19, "type": "identifier", "text": "desc", "parent": 15, "children": [], "start_point": {"row": 1, "column": 23}, "end_point": {"row": 1, "column": 27}}, {"id": 20, "type": "function_definition", "text": "void print_description (void *desc) {\n if (desc) {\n char *buffer = strdup (desc);\n process_buffer (buffer, print_desc_line);\n free (buffer);\n }\n}", "parent": null, "children": [21, 22], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 21, "type": "primitive_type", "text": "void", "parent": 20, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 4}}, {"id": 22, "type": "function_declarator", "text": "print_description (void *desc)", "parent": 20, "children": [23, 24], "start_point": {"row": 4, "column": 5}, "end_point": {"row": 4, "column": 35}}, {"id": 23, "type": "identifier", "text": "print_description", "parent": 22, "children": [], "start_point": {"row": 4, "column": 5}, "end_point": {"row": 4, "column": 22}}, {"id": 24, "type": "parameter_list", "text": "(void *desc)", "parent": 22, "children": [25], "start_point": {"row": 4, "column": 23}, "end_point": {"row": 4, "column": 35}}, {"id": 25, "type": "parameter_declaration", "text": "void *desc", "parent": 24, "children": [26, 27], "start_point": {"row": 4, "column": 24}, "end_point": {"row": 4, "column": 34}}, {"id": 26, "type": "primitive_type", "text": "void", "parent": 25, "children": [], "start_point": {"row": 4, "column": 24}, "end_point": {"row": 4, "column": 28}}, {"id": 27, "type": "pointer_declarator", "text": "*desc", "parent": 25, "children": [28, 29], "start_point": {"row": 4, "column": 29}, "end_point": {"row": 4, "column": 34}}, {"id": 28, "type": "*", "text": "*", "parent": 27, "children": [], "start_point": {"row": 4, "column": 29}, "end_point": {"row": 4, "column": 30}}, {"id": 29, "type": "identifier", "text": "desc", "parent": 27, "children": [], "start_point": {"row": 4, "column": 30}, "end_point": {"row": 4, "column": 34}}, {"id": 30, "type": "if_statement", "text": "if (desc) {\n char *buffer = strdup (desc);\n process_buffer (buffer, print_desc_line);\n free (buffer);\n }", "parent": 20, "children": [31], "start_point": {"row": 5, "column": 2}, "end_point": {"row": 9, "column": 3}}, {"id": 31, "type": "parenthesized_expression", "text": "(desc)", "parent": 30, "children": [32], "start_point": {"row": 5, "column": 5}, "end_point": {"row": 5, "column": 11}}, {"id": 32, "type": "identifier", "text": "desc", "parent": 31, "children": [], "start_point": {"row": 5, "column": 6}, "end_point": {"row": 5, "column": 10}}, {"id": 33, "type": "declaration", "text": "char *buffer = strdup (desc);", "parent": 30, "children": [34, 35], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 33}}, {"id": 34, "type": "primitive_type", "text": "char", "parent": 33, "children": [], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 8}}, {"id": 35, "type": "init_declarator", "text": "*buffer = strdup (desc)", "parent": 33, "children": [36, 39, 40], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 32}}, {"id": 36, "type": "pointer_declarator", "text": "*buffer", "parent": 35, "children": [37, 38], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 16}}, {"id": 37, "type": "*", "text": "*", "parent": 36, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 10}}, {"id": 38, "type": "identifier", "text": "buffer", "parent": 36, "children": [], "start_point": {"row": 6, "column": 10}, "end_point": {"row": 6, "column": 16}}, {"id": 39, "type": "=", "text": "=", "parent": 35, "children": [], "start_point": {"row": 6, "column": 17}, "end_point": {"row": 6, "column": 18}}, {"id": 40, "type": "call_expression", "text": "strdup (desc)", "parent": 35, "children": [41, 42], "start_point": {"row": 6, "column": 19}, "end_point": {"row": 6, "column": 32}}, {"id": 41, "type": "identifier", "text": "strdup", "parent": 40, "children": [], "start_point": {"row": 6, "column": 19}, "end_point": {"row": 6, "column": 25}}, {"id": 42, "type": "argument_list", "text": "(desc)", "parent": 40, "children": [43], "start_point": {"row": 6, "column": 26}, "end_point": {"row": 6, "column": 32}}, {"id": 43, "type": "identifier", "text": "desc", "parent": 42, "children": [], "start_point": {"row": 6, "column": 27}, "end_point": {"row": 6, "column": 31}}, {"id": 44, "type": "call_expression", "text": "process_buffer (buffer, print_desc_line)", "parent": 30, "children": [45, 46], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 44}}, {"id": 45, "type": "identifier", "text": "process_buffer", "parent": 44, "children": [], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 18}}, {"id": 46, "type": "argument_list", "text": "(buffer, print_desc_line)", "parent": 44, "children": [47, 48], "start_point": {"row": 7, "column": 19}, "end_point": {"row": 7, "column": 44}}, {"id": 47, "type": "identifier", "text": "buffer", "parent": 46, "children": [], "start_point": {"row": 7, "column": 20}, "end_point": {"row": 7, "column": 26}}, {"id": 48, "type": "identifier", "text": "print_desc_line", "parent": 46, "children": [], "start_point": {"row": 7, "column": 28}, "end_point": {"row": 7, "column": 43}}, {"id": 49, "type": "call_expression", "text": "free (buffer)", "parent": 30, "children": [50, 51], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 17}}, {"id": 50, "type": "identifier", "text": "free", "parent": 49, "children": [], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 8}}, {"id": 51, "type": "argument_list", "text": "(buffer)", "parent": 49, "children": [52], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 17}}, {"id": 52, "type": "identifier", "text": "buffer", "parent": 51, "children": [], "start_point": {"row": 8, "column": 10}, "end_point": {"row": 8, "column": 16}}, {"id": 53, "type": "function_definition", "text": "void print_field_doc (char *name, Field *f) {\n print (\" @var SE_%s_t::%s\\n\", name, f->name);\n print_description (f->desc);\n}", "parent": null, "children": [54, 55], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 54, "type": "primitive_type", "text": "void", "parent": 53, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 4}}, {"id": 55, "type": "function_declarator", "text": "print_field_doc (char *name, Field *f)", "parent": 53, "children": [56, 57], "start_point": {"row": 12, "column": 5}, "end_point": {"row": 12, "column": 43}}, {"id": 56, "type": "identifier", "text": "print_field_doc", "parent": 55, "children": [], "start_point": {"row": 12, "column": 5}, "end_point": {"row": 12, "column": 20}}, {"id": 57, "type": "parameter_list", "text": "(char *name, Field *f)", "parent": 55, "children": [58, 63], "start_point": {"row": 12, "column": 21}, "end_point": {"row": 12, "column": 43}}, {"id": 58, "type": "parameter_declaration", "text": "char *name", "parent": 57, "children": [59, 60], "start_point": {"row": 12, "column": 22}, "end_point": {"row": 12, "column": 32}}, {"id": 59, "type": "primitive_type", "text": "char", "parent": 58, "children": [], "start_point": {"row": 12, "column": 22}, "end_point": {"row": 12, "column": 26}}, {"id": 60, "type": "pointer_declarator", "text": "*name", "parent": 58, "children": [61, 62], "start_point": {"row": 12, "column": 27}, "end_point": {"row": 12, "column": 32}}, {"id": 61, "type": "*", "text": "*", "parent": 60, "children": [], "start_point": {"row": 12, "column": 27}, "end_point": {"row": 12, "column": 28}}, {"id": 62, "type": "identifier", "text": "name", "parent": 60, "children": [], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 12, "column": 32}}, {"id": 63, "type": "parameter_declaration", "text": "Field *f", "parent": 57, "children": [64, 65], "start_point": {"row": 12, "column": 34}, "end_point": {"row": 12, "column": 42}}, {"id": 64, "type": "type_identifier", "text": "Field", "parent": 63, "children": [], "start_point": {"row": 12, "column": 34}, "end_point": {"row": 12, "column": 39}}, {"id": 65, "type": "pointer_declarator", "text": "*f", "parent": 63, "children": [66, 67], "start_point": {"row": 12, "column": 40}, "end_point": {"row": 12, "column": 42}}, {"id": 66, "type": "*", "text": "*", "parent": 65, "children": [], "start_point": {"row": 12, "column": 40}, "end_point": {"row": 12, "column": 41}}, {"id": 67, "type": "identifier", "text": "f", "parent": 65, "children": [], "start_point": {"row": 12, "column": 41}, "end_point": {"row": 12, "column": 42}}, {"id": 68, "type": "call_expression", "text": "print (\" @var SE_%s_t::%s\\n\", name, f->name)", "parent": 53, "children": [69, 70], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 49}}, {"id": 69, "type": "identifier", "text": "print", "parent": 68, "children": [], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 7}}, {"id": 70, "type": "argument_list", "text": "(\" @var SE_%s_t::%s\\n\", name, f->name)", "parent": 68, "children": [71, 73, 74], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 49}}, {"id": 71, "type": "string_literal", "text": "\" @var SE_%s_t::%s\\n\"", "parent": 70, "children": [72], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 33}}, {"id": 72, "type": "escape_sequence", "text": "\\n", "parent": 71, "children": [], "start_point": {"row": 13, "column": 30}, "end_point": {"row": 13, "column": 32}}, {"id": 73, "type": "identifier", "text": "name", "parent": 70, "children": [], "start_point": {"row": 13, "column": 35}, "end_point": {"row": 13, "column": 39}}, {"id": 74, "type": "field_expression", "text": "f->name", "parent": 70, "children": [75, 76], "start_point": {"row": 13, "column": 41}, "end_point": {"row": 13, "column": 48}}, {"id": 75, "type": "identifier", "text": "f", "parent": 74, "children": [], "start_point": {"row": 13, "column": 41}, "end_point": {"row": 13, "column": 42}}, {"id": 76, "type": "field_identifier", "text": "name", "parent": 74, "children": [], "start_point": {"row": 13, "column": 44}, "end_point": {"row": 13, "column": 48}}, {"id": 77, "type": "call_expression", "text": "print_description (f->desc)", "parent": 53, "children": [78, 79], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 29}}, {"id": 78, "type": "identifier", "text": "print_description", "parent": 77, "children": [], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 19}}, {"id": 79, "type": "argument_list", "text": "(f->desc)", "parent": 77, "children": [80], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 29}}, {"id": 80, "type": "field_expression", "text": "f->desc", "parent": 79, "children": [81, 82], "start_point": {"row": 14, "column": 21}, "end_point": {"row": 14, "column": 28}}, {"id": 81, "type": "identifier", "text": "f", "parent": 80, "children": [], "start_point": {"row": 14, "column": 21}, "end_point": {"row": 14, "column": 22}}, {"id": 82, "type": "field_identifier", "text": "desc", "parent": 80, "children": [], "start_point": {"row": 14, "column": 24}, "end_point": {"row": 14, "column": 28}}, {"id": 83, "type": "function_definition", "text": "void print_particle_doc (char *name, Particle *part, SchemaType *head) {\n Particle *p;\n Field *f;\n foreach (p, part) {\n switch (p->kind) {\n case PartElement:\n f = &p->field;\n if (f->prim != XS_BOOLEAN)\n print_field_doc (name, &p->field);\n break;\n case PartGroup:\n case PartChoice:\n case PartSequence:\n print_particle_doc (name, p->child, head);\n case PartAny:\n break;\n }\n }\n}", "parent": null, "children": [84, 85], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 35, "column": 1}}, {"id": 84, "type": "primitive_type", "text": "void", "parent": 83, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 4}}, {"id": 85, "type": "function_declarator", "text": "print_particle_doc (char *name, Particle *part, SchemaType *head)", "parent": 83, "children": [86, 87], "start_point": {"row": 17, "column": 5}, "end_point": {"row": 17, "column": 70}}, {"id": 86, "type": "identifier", "text": "print_particle_doc", "parent": 85, "children": [], "start_point": {"row": 17, "column": 5}, "end_point": {"row": 17, "column": 23}}, {"id": 87, "type": "parameter_list", "text": "(char *name, Particle *part, SchemaType *head)", "parent": 85, "children": [88, 93, 98], "start_point": {"row": 17, "column": 24}, "end_point": {"row": 17, "column": 70}}, {"id": 88, "type": "parameter_declaration", "text": "char *name", "parent": 87, "children": [89, 90], "start_point": {"row": 17, "column": 25}, "end_point": {"row": 17, "column": 35}}, {"id": 89, "type": "primitive_type", "text": "char", "parent": 88, "children": [], "start_point": {"row": 17, "column": 25}, "end_point": {"row": 17, "column": 29}}, {"id": 90, "type": "pointer_declarator", "text": "*name", "parent": 88, "children": [91, 92], "start_point": {"row": 17, "column": 30}, "end_point": {"row": 17, "column": 35}}, {"id": 91, "type": "*", "text": "*", "parent": 90, "children": [], "start_point": {"row": 17, "column": 30}, "end_point": {"row": 17, "column": 31}}, {"id": 92, "type": "identifier", "text": "name", "parent": 90, "children": [], "start_point": {"row": 17, "column": 31}, "end_point": {"row": 17, "column": 35}}, {"id": 93, "type": "parameter_declaration", "text": "Particle *part", "parent": 87, "children": [94, 95], "start_point": {"row": 17, "column": 37}, "end_point": {"row": 17, "column": 51}}, {"id": 94, "type": "type_identifier", "text": "Particle", "parent": 93, "children": [], "start_point": {"row": 17, "column": 37}, "end_point": {"row": 17, "column": 45}}, {"id": 95, "type": "pointer_declarator", "text": "*part", "parent": 93, "children": [96, 97], "start_point": {"row": 17, "column": 46}, "end_point": {"row": 17, "column": 51}}, {"id": 96, "type": "*", "text": "*", "parent": 95, "children": [], "start_point": {"row": 17, "column": 46}, "end_point": {"row": 17, "column": 47}}, {"id": 97, "type": "identifier", "text": "part", "parent": 95, "children": [], "start_point": {"row": 17, "column": 47}, "end_point": {"row": 17, "column": 51}}, {"id": 98, "type": "parameter_declaration", "text": "SchemaType *head", "parent": 87, "children": [99, 100], "start_point": {"row": 17, "column": 53}, "end_point": {"row": 17, "column": 69}}, {"id": 99, "type": "type_identifier", "text": "SchemaType", "parent": 98, "children": [], "start_point": {"row": 17, "column": 53}, "end_point": {"row": 17, "column": 63}}, {"id": 100, "type": "pointer_declarator", "text": "*head", "parent": 98, "children": [101, 102], "start_point": {"row": 17, "column": 64}, "end_point": {"row": 17, "column": 69}}, {"id": 101, "type": "*", "text": "*", "parent": 100, "children": [], "start_point": {"row": 17, "column": 64}, "end_point": {"row": 17, "column": 65}}, {"id": 102, "type": "identifier", "text": "head", "parent": 100, "children": [], "start_point": {"row": 17, "column": 65}, "end_point": {"row": 17, "column": 69}}, {"id": 103, "type": "declaration", "text": "Particle *p;", "parent": 83, "children": [104, 105], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 14}}, {"id": 104, "type": "type_identifier", "text": "Particle", "parent": 103, "children": [], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 10}}, {"id": 105, "type": "pointer_declarator", "text": "*p", "parent": 103, "children": [106, 107], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 13}}, {"id": 106, "type": "*", "text": "*", "parent": 105, "children": [], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 12}}, {"id": 107, "type": "identifier", "text": "p", "parent": 105, "children": [], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 13}}, {"id": 108, "type": "declaration", "text": "Field *f;", "parent": 83, "children": [109, 110], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 11}}, {"id": 109, "type": "type_identifier", "text": "Field", "parent": 108, "children": [], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 7}}, {"id": 110, "type": "pointer_declarator", "text": "*f", "parent": 108, "children": [111, 112], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 10}}, {"id": 111, "type": "*", "text": "*", "parent": 110, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 9}}, {"id": 112, "type": "identifier", "text": "f", "parent": 110, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 10}}, {"id": 113, "type": "call_expression", "text": "foreach (p, part)", "parent": 83, "children": [114, 115], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 19}}, {"id": 114, "type": "identifier", "text": "foreach", "parent": 113, "children": [], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 9}}, {"id": 115, "type": "argument_list", "text": "(p, part)", "parent": 113, "children": [116, 117], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 19}}, {"id": 116, "type": "identifier", "text": "p", "parent": 115, "children": [], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 12}}, {"id": 117, "type": "identifier", "text": "part", "parent": 115, "children": [], "start_point": {"row": 20, "column": 14}, "end_point": {"row": 20, "column": 18}}, {"id": 118, "type": "switch_statement", "text": "switch (p->kind) {\n case PartElement:\n f = &p->field;\n if (f->prim != XS_BOOLEAN)\n print_field_doc (name, &p->field);\n break;\n case PartGroup:\n case PartChoice:\n case PartSequence:\n print_particle_doc (name, p->child, head);\n case PartAny:\n break;\n }", "parent": 83, "children": [119, 120], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 33, "column": 5}}, {"id": 119, "type": "switch", "text": "switch", "parent": 118, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 10}}, {"id": 120, "type": "parenthesized_expression", "text": "(p->kind)", "parent": 118, "children": [121], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 20}}, {"id": 121, "type": "field_expression", "text": "p->kind", "parent": 120, "children": [122, 123], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 21, "column": 19}}, {"id": 122, "type": "identifier", "text": "p", "parent": 121, "children": [], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 21, "column": 13}}, {"id": 123, "type": "field_identifier", "text": "kind", "parent": 121, "children": [], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 19}}, {"id": 124, "type": "case_statement", "text": "case PartElement:\n f = &p->field;\n if (f->prim != XS_BOOLEAN)\n print_field_doc (name, &p->field);\n break;", "parent": 118, "children": [125, 126, 134, 150], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 26, "column": 12}}, {"id": 125, "type": "case", "text": "case", "parent": 124, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 8}}, {"id": 126, "type": "identifier", "text": "PartElement", "parent": 124, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 20}}, {"id": 127, "type": "assignment_expression", "text": "f = &p->field", "parent": 124, "children": [128, 129, 130], "start_point": {"row": 23, "column": 6}, "end_point": {"row": 23, "column": 19}}, {"id": 128, "type": "identifier", "text": "f", "parent": 127, "children": [], "start_point": {"row": 23, "column": 6}, "end_point": {"row": 23, "column": 7}}, {"id": 129, "type": "=", "text": "=", "parent": 127, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 9}}, {"id": 130, "type": "pointer_expression", "text": "&p->field", "parent": 127, "children": [131], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 19}}, {"id": 131, "type": "field_expression", "text": "p->field", "parent": 130, "children": [132, 133], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 19}}, {"id": 132, "type": "identifier", "text": "p", "parent": 131, "children": [], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 12}}, {"id": 133, "type": "field_identifier", "text": "field", "parent": 131, "children": [], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 19}}, {"id": 134, "type": "if_statement", "text": "if (f->prim != XS_BOOLEAN)\n print_field_doc (name, &p->field);", "parent": 124, "children": [135], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 25, "column": 42}}, {"id": 135, "type": "parenthesized_expression", "text": "(f->prim != XS_BOOLEAN)", "parent": 134, "children": [136], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 32}}, {"id": 136, "type": "binary_expression", "text": "f->prim != XS_BOOLEAN", "parent": 135, "children": [137, 140, 141], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 31}}, {"id": 137, "type": "field_expression", "text": "f->prim", "parent": 136, "children": [138, 139], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 17}}, {"id": 138, "type": "identifier", "text": "f", "parent": 137, "children": [], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 11}}, {"id": 139, "type": "field_identifier", "text": "prim", "parent": 137, "children": [], "start_point": {"row": 24, "column": 13}, "end_point": {"row": 24, "column": 17}}, {"id": 140, "type": "!=", "text": "!=", "parent": 136, "children": [], "start_point": {"row": 24, "column": 18}, "end_point": {"row": 24, "column": 20}}, {"id": 141, "type": "identifier", "text": "XS_BOOLEAN", "parent": 136, "children": [], "start_point": {"row": 24, "column": 21}, "end_point": {"row": 24, "column": 31}}, {"id": 142, "type": "call_expression", "text": "print_field_doc (name, &p->field)", "parent": 134, "children": [143, 144], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 41}}, {"id": 143, "type": "identifier", "text": "print_field_doc", "parent": 142, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 23}}, {"id": 144, "type": "argument_list", "text": "(name, &p->field)", "parent": 142, "children": [145, 146], "start_point": {"row": 25, "column": 24}, "end_point": {"row": 25, "column": 41}}, {"id": 145, "type": "identifier", "text": "name", "parent": 144, "children": [], "start_point": {"row": 25, "column": 25}, "end_point": {"row": 25, "column": 29}}, {"id": 146, "type": "pointer_expression", "text": "&p->field", "parent": 144, "children": [147], "start_point": {"row": 25, "column": 31}, "end_point": {"row": 25, "column": 40}}, {"id": 147, "type": "field_expression", "text": "p->field", "parent": 146, "children": [148, 149], "start_point": {"row": 25, "column": 32}, "end_point": {"row": 25, "column": 40}}, {"id": 148, "type": "identifier", "text": "p", "parent": 147, "children": [], "start_point": {"row": 25, "column": 32}, "end_point": {"row": 25, "column": 33}}, {"id": 149, "type": "field_identifier", "text": "field", "parent": 147, "children": [], "start_point": {"row": 25, "column": 35}, "end_point": {"row": 25, "column": 40}}, {"id": 150, "type": "break_statement", "text": "break;", "parent": 124, "children": [151], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 12}}, {"id": 151, "type": "break", "text": "break", "parent": 150, "children": [], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 11}}, {"id": 152, "type": "case_statement", "text": "case PartGroup:", "parent": 118, "children": [153, 154], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 19}}, {"id": 153, "type": "case", "text": "case", "parent": 152, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 8}}, {"id": 154, "type": "identifier", "text": "PartGroup", "parent": 152, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 18}}, {"id": 155, "type": "case_statement", "text": "case PartChoice:", "parent": 118, "children": [156, 157], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 20}}, {"id": 156, "type": "case", "text": "case", "parent": 155, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 8}}, {"id": 157, "type": "identifier", "text": "PartChoice", "parent": 155, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 19}}, {"id": 158, "type": "case_statement", "text": "case PartSequence:\n print_particle_doc (name, p->child, head);", "parent": 118, "children": [159, 160], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 30, "column": 48}}, {"id": 159, "type": "case", "text": "case", "parent": 158, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 8}}, {"id": 160, "type": "identifier", "text": "PartSequence", "parent": 158, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 21}}, {"id": 161, "type": "call_expression", "text": "print_particle_doc (name, p->child, head)", "parent": 158, "children": [162, 163], "start_point": {"row": 30, "column": 6}, "end_point": {"row": 30, "column": 47}}, {"id": 162, "type": "identifier", "text": "print_particle_doc", "parent": 161, "children": [], "start_point": {"row": 30, "column": 6}, "end_point": {"row": 30, "column": 24}}, {"id": 163, "type": "argument_list", "text": "(name, p->child, head)", "parent": 161, "children": [164, 165, 168], "start_point": {"row": 30, "column": 25}, "end_point": {"row": 30, "column": 47}}, {"id": 164, "type": "identifier", "text": "name", "parent": 163, "children": [], "start_point": {"row": 30, "column": 26}, "end_point": {"row": 30, "column": 30}}, {"id": 165, "type": "field_expression", "text": "p->child", "parent": 163, "children": [166, 167], "start_point": {"row": 30, "column": 32}, "end_point": {"row": 30, "column": 40}}, {"id": 166, "type": "identifier", "text": "p", "parent": 165, "children": [], "start_point": {"row": 30, "column": 32}, "end_point": {"row": 30, "column": 33}}, {"id": 167, "type": "field_identifier", "text": "child", "parent": 165, "children": [], "start_point": {"row": 30, "column": 35}, "end_point": {"row": 30, "column": 40}}, {"id": 168, "type": "identifier", "text": "head", "parent": 163, "children": [], "start_point": {"row": 30, "column": 42}, "end_point": {"row": 30, "column": 46}}, {"id": 169, "type": "case_statement", "text": "case PartAny:\n break;", "parent": 118, "children": [170, 171, 172], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 32, "column": 12}}, {"id": 170, "type": "case", "text": "case", "parent": 169, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 8}}, {"id": 171, "type": "identifier", "text": "PartAny", "parent": 169, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 16}}, {"id": 172, "type": "break_statement", "text": "break;", "parent": 169, "children": [173], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 12}}, {"id": 173, "type": "break", "text": "break", "parent": 172, "children": [], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 11}}, {"id": 174, "type": "function_definition", "text": "void print_fields_doc (char *name, SchemaType *t, SchemaType *head) {\n List *attr;\n SchemaType *u;\n if (t->base && (u = find_by_name (head, t->base)))\n print_fields_doc (name, u, head);\n if (!t->restriction) {\n foreach (attr, t->attr) {\n AttrDecl *a = attr->data;\n print_field_doc (name, &a->field);\n }\n print_particle_doc (name, t->part, head);\n }\n}", "parent": null, "children": [175, 176], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 49, "column": 1}}, {"id": 175, "type": "primitive_type", "text": "void", "parent": 174, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 4}}, {"id": 176, "type": "function_declarator", "text": "print_fields_doc (char *name, SchemaType *t, SchemaType *head)", "parent": 174, "children": [177, 178], "start_point": {"row": 37, "column": 5}, "end_point": {"row": 37, "column": 67}}, {"id": 177, "type": "identifier", "text": "print_fields_doc", "parent": 176, "children": [], "start_point": {"row": 37, "column": 5}, "end_point": {"row": 37, "column": 21}}, {"id": 178, "type": "parameter_list", "text": "(char *name, SchemaType *t, SchemaType *head)", "parent": 176, "children": [179, 184, 189], "start_point": {"row": 37, "column": 22}, "end_point": {"row": 37, "column": 67}}, {"id": 179, "type": "parameter_declaration", "text": "char *name", "parent": 178, "children": [180, 181], "start_point": {"row": 37, "column": 23}, "end_point": {"row": 37, "column": 33}}, {"id": 180, "type": "primitive_type", "text": "char", "parent": 179, "children": [], "start_point": {"row": 37, "column": 23}, "end_point": {"row": 37, "column": 27}}, {"id": 181, "type": "pointer_declarator", "text": "*name", "parent": 179, "children": [182, 183], "start_point": {"row": 37, "column": 28}, "end_point": {"row": 37, "column": 33}}, {"id": 182, "type": "*", "text": "*", "parent": 181, "children": [], "start_point": {"row": 37, "column": 28}, "end_point": {"row": 37, "column": 29}}, {"id": 183, "type": "identifier", "text": "name", "parent": 181, "children": [], "start_point": {"row": 37, "column": 29}, "end_point": {"row": 37, "column": 33}}, {"id": 184, "type": "parameter_declaration", "text": "SchemaType *t", "parent": 178, "children": [185, 186], "start_point": {"row": 37, "column": 35}, "end_point": {"row": 37, "column": 48}}, {"id": 185, "type": "type_identifier", "text": "SchemaType", "parent": 184, "children": [], "start_point": {"row": 37, "column": 35}, "end_point": {"row": 37, "column": 45}}, {"id": 186, "type": "pointer_declarator", "text": "*t", "parent": 184, "children": [187, 188], "start_point": {"row": 37, "column": 46}, "end_point": {"row": 37, "column": 48}}, {"id": 187, "type": "*", "text": "*", "parent": 186, "children": [], "start_point": {"row": 37, "column": 46}, "end_point": {"row": 37, "column": 47}}, {"id": 188, "type": "identifier", "text": "t", "parent": 186, "children": [], "start_point": {"row": 37, "column": 47}, "end_point": {"row": 37, "column": 48}}, {"id": 189, "type": "parameter_declaration", "text": "SchemaType *head", "parent": 178, "children": [190, 191], "start_point": {"row": 37, "column": 50}, "end_point": {"row": 37, "column": 66}}, {"id": 190, "type": "type_identifier", "text": "SchemaType", "parent": 189, "children": [], "start_point": {"row": 37, "column": 50}, "end_point": {"row": 37, "column": 60}}, {"id": 191, "type": "pointer_declarator", "text": "*head", "parent": 189, "children": [192, 193], "start_point": {"row": 37, "column": 61}, "end_point": {"row": 37, "column": 66}}, {"id": 192, "type": "*", "text": "*", "parent": 191, "children": [], "start_point": {"row": 37, "column": 61}, "end_point": {"row": 37, "column": 62}}, {"id": 193, "type": "identifier", "text": "head", "parent": 191, "children": [], "start_point": {"row": 37, "column": 62}, "end_point": {"row": 37, "column": 66}}, {"id": 194, "type": "declaration", "text": "List *attr;", "parent": 174, "children": [195, 196], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 13}}, {"id": 195, "type": "type_identifier", "text": "List", "parent": 194, "children": [], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 6}}, {"id": 196, "type": "pointer_declarator", "text": "*attr", "parent": 194, "children": [197, 198], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 12}}, {"id": 197, "type": "*", "text": "*", "parent": 196, "children": [], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 8}}, {"id": 198, "type": "identifier", "text": "attr", "parent": 196, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 12}}, {"id": 199, "type": "declaration", "text": "SchemaType *u;", "parent": 174, "children": [200, 201], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 16}}, {"id": 200, "type": "type_identifier", "text": "SchemaType", "parent": 199, "children": [], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 12}}, {"id": 201, "type": "pointer_declarator", "text": "*u", "parent": 199, "children": [202, 203], "start_point": {"row": 39, "column": 13}, "end_point": {"row": 39, "column": 15}}, {"id": 202, "type": "*", "text": "*", "parent": 201, "children": [], "start_point": {"row": 39, "column": 13}, "end_point": {"row": 39, "column": 14}}, {"id": 203, "type": "identifier", "text": "u", "parent": 201, "children": [], "start_point": {"row": 39, "column": 14}, "end_point": {"row": 39, "column": 15}}, {"id": 204, "type": "if_statement", "text": "if (t->base && (u = find_by_name (head, t->base)))\n print_fields_doc (name, u, head);", "parent": 174, "children": [205], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 41, "column": 37}}, {"id": 205, "type": "parenthesized_expression", "text": "(t->base && (u = find_by_name (head, t->base)))", "parent": 204, "children": [206], "start_point": {"row": 40, "column": 5}, "end_point": {"row": 40, "column": 52}}, {"id": 206, "type": "binary_expression", "text": "t->base && (u = find_by_name (head, t->base))", "parent": 205, "children": [207, 210, 211], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 51}}, {"id": 207, "type": "field_expression", "text": "t->base", "parent": 206, "children": [208, 209], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 13}}, {"id": 208, "type": "identifier", "text": "t", "parent": 207, "children": [], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 7}}, {"id": 209, "type": "field_identifier", "text": "base", "parent": 207, "children": [], "start_point": {"row": 40, "column": 9}, "end_point": {"row": 40, "column": 13}}, {"id": 210, "type": "&&", "text": "&&", "parent": 206, "children": [], "start_point": {"row": 40, "column": 14}, "end_point": {"row": 40, "column": 16}}, {"id": 211, "type": "parenthesized_expression", "text": "(u = find_by_name (head, t->base))", "parent": 206, "children": [212], "start_point": {"row": 40, "column": 17}, "end_point": {"row": 40, "column": 51}}, {"id": 212, "type": "assignment_expression", "text": "u = find_by_name (head, t->base)", "parent": 211, "children": [213, 214, 215], "start_point": {"row": 40, "column": 18}, "end_point": {"row": 40, "column": 50}}, {"id": 213, "type": "identifier", "text": "u", "parent": 212, "children": [], "start_point": {"row": 40, "column": 18}, "end_point": {"row": 40, "column": 19}}, {"id": 214, "type": "=", "text": "=", "parent": 212, "children": [], "start_point": {"row": 40, "column": 20}, "end_point": {"row": 40, "column": 21}}, {"id": 215, "type": "call_expression", "text": "find_by_name (head, t->base)", "parent": 212, "children": [216, 217], "start_point": {"row": 40, "column": 22}, "end_point": {"row": 40, "column": 50}}, {"id": 216, "type": "identifier", "text": "find_by_name", "parent": 215, "children": [], "start_point": {"row": 40, "column": 22}, "end_point": {"row": 40, "column": 34}}, {"id": 217, "type": "argument_list", "text": "(head, t->base)", "parent": 215, "children": [218, 219], "start_point": {"row": 40, "column": 35}, "end_point": {"row": 40, "column": 50}}, {"id": 218, "type": "identifier", "text": "head", "parent": 217, "children": [], "start_point": {"row": 40, "column": 36}, "end_point": {"row": 40, "column": 40}}, {"id": 219, "type": "field_expression", "text": "t->base", "parent": 217, "children": [220, 221], "start_point": {"row": 40, "column": 42}, "end_point": {"row": 40, "column": 49}}, {"id": 220, "type": "identifier", "text": "t", "parent": 219, "children": [], "start_point": {"row": 40, "column": 42}, "end_point": {"row": 40, "column": 43}}, {"id": 221, "type": "field_identifier", "text": "base", "parent": 219, "children": [], "start_point": {"row": 40, "column": 45}, "end_point": {"row": 40, "column": 49}}, {"id": 222, "type": "call_expression", "text": "print_fields_doc (name, u, head)", "parent": 204, "children": [223, 224], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 36}}, {"id": 223, "type": "identifier", "text": "print_fields_doc", "parent": 222, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 20}}, {"id": 224, "type": "argument_list", "text": "(name, u, head)", "parent": 222, "children": [225, 226, 227], "start_point": {"row": 41, "column": 21}, "end_point": {"row": 41, "column": 36}}, {"id": 225, "type": "identifier", "text": "name", "parent": 224, "children": [], "start_point": {"row": 41, "column": 22}, "end_point": {"row": 41, "column": 26}}, {"id": 226, "type": "identifier", "text": "u", "parent": 224, "children": [], "start_point": {"row": 41, "column": 28}, "end_point": {"row": 41, "column": 29}}, {"id": 227, "type": "identifier", "text": "head", "parent": 224, "children": [], "start_point": {"row": 41, "column": 31}, "end_point": {"row": 41, "column": 35}}, {"id": 228, "type": "if_statement", "text": "if (!t->restriction) {\n foreach (attr, t->attr) {\n AttrDecl *a = attr->data;\n print_field_doc (name, &a->field);\n }\n print_particle_doc (name, t->part, head);\n }", "parent": 174, "children": [229], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 48, "column": 3}}, {"id": 229, "type": "parenthesized_expression", "text": "(!t->restriction)", "parent": 228, "children": [230], "start_point": {"row": 42, "column": 5}, "end_point": {"row": 42, "column": 22}}, {"id": 230, "type": "unary_expression", "text": "!t->restriction", "parent": 229, "children": [231, 232], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 21}}, {"id": 231, "type": "!", "text": "!", "parent": 230, "children": [], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 7}}, {"id": 232, "type": "field_expression", "text": "t->restriction", "parent": 230, "children": [233, 234], "start_point": {"row": 42, "column": 7}, "end_point": {"row": 42, "column": 21}}, {"id": 233, "type": "identifier", "text": "t", "parent": 232, "children": [], "start_point": {"row": 42, "column": 7}, "end_point": {"row": 42, "column": 8}}, {"id": 234, "type": "field_identifier", "text": "restriction", "parent": 232, "children": [], "start_point": {"row": 42, "column": 10}, "end_point": {"row": 42, "column": 21}}, {"id": 235, "type": "call_expression", "text": "foreach (attr, t->attr)", "parent": 228, "children": [236, 237], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 27}}, {"id": 236, "type": "identifier", "text": "foreach", "parent": 235, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 11}}, {"id": 237, "type": "argument_list", "text": "(attr, t->attr)", "parent": 235, "children": [238, 239], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 27}}, {"id": 238, "type": "identifier", "text": "attr", "parent": 237, "children": [], "start_point": {"row": 43, "column": 13}, "end_point": {"row": 43, "column": 17}}, {"id": 239, "type": "field_expression", "text": "t->attr", "parent": 237, "children": [240, 241], "start_point": {"row": 43, "column": 19}, "end_point": {"row": 43, "column": 26}}, {"id": 240, "type": "identifier", "text": "t", "parent": 239, "children": [], "start_point": {"row": 43, "column": 19}, "end_point": {"row": 43, "column": 20}}, {"id": 241, "type": "field_identifier", "text": "attr", "parent": 239, "children": [], "start_point": {"row": 43, "column": 22}, "end_point": {"row": 43, "column": 26}}, {"id": 242, "type": "declaration", "text": "AttrDecl *a = attr->data;", "parent": 228, "children": [243, 244], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 31}}, {"id": 243, "type": "type_identifier", "text": "AttrDecl", "parent": 242, "children": [], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 14}}, {"id": 244, "type": "init_declarator", "text": "*a = attr->data", "parent": 242, "children": [245, 248, 249], "start_point": {"row": 44, "column": 15}, "end_point": {"row": 44, "column": 30}}, {"id": 245, "type": "pointer_declarator", "text": "*a", "parent": 244, "children": [246, 247], "start_point": {"row": 44, "column": 15}, "end_point": {"row": 44, "column": 17}}, {"id": 246, "type": "*", "text": "*", "parent": 245, "children": [], "start_point": {"row": 44, "column": 15}, "end_point": {"row": 44, "column": 16}}, {"id": 247, "type": "identifier", "text": "a", "parent": 245, "children": [], "start_point": {"row": 44, "column": 16}, "end_point": {"row": 44, "column": 17}}, {"id": 248, "type": "=", "text": "=", "parent": 244, "children": [], "start_point": {"row": 44, "column": 18}, "end_point": {"row": 44, "column": 19}}, {"id": 249, "type": "field_expression", "text": "attr->data", "parent": 244, "children": [250, 251], "start_point": {"row": 44, "column": 20}, "end_point": {"row": 44, "column": 30}}, {"id": 250, "type": "identifier", "text": "attr", "parent": 249, "children": [], "start_point": {"row": 44, "column": 20}, "end_point": {"row": 44, "column": 24}}, {"id": 251, "type": "field_identifier", "text": "data", "parent": 249, "children": [], "start_point": {"row": 44, "column": 26}, "end_point": {"row": 44, "column": 30}}, {"id": 252, "type": "call_expression", "text": "print_field_doc (name, &a->field)", "parent": 228, "children": [253, 254], "start_point": {"row": 45, "column": 6}, "end_point": {"row": 45, "column": 39}}, {"id": 253, "type": "identifier", "text": "print_field_doc", "parent": 252, "children": [], "start_point": {"row": 45, "column": 6}, "end_point": {"row": 45, "column": 21}}, {"id": 254, "type": "argument_list", "text": "(name, &a->field)", "parent": 252, "children": [255, 256], "start_point": {"row": 45, "column": 22}, "end_point": {"row": 45, "column": 39}}, {"id": 255, "type": "identifier", "text": "name", "parent": 254, "children": [], "start_point": {"row": 45, "column": 23}, "end_point": {"row": 45, "column": 27}}, {"id": 256, "type": "pointer_expression", "text": "&a->field", "parent": 254, "children": [257], "start_point": {"row": 45, "column": 29}, "end_point": {"row": 45, "column": 38}}, {"id": 257, "type": "field_expression", "text": "a->field", "parent": 256, "children": [258, 259], "start_point": {"row": 45, "column": 30}, "end_point": {"row": 45, "column": 38}}, {"id": 258, "type": "identifier", "text": "a", "parent": 257, "children": [], "start_point": {"row": 45, "column": 30}, "end_point": {"row": 45, "column": 31}}, {"id": 259, "type": "field_identifier", "text": "field", "parent": 257, "children": [], "start_point": {"row": 45, "column": 33}, "end_point": {"row": 45, "column": 38}}, {"id": 260, "type": "call_expression", "text": "print_particle_doc (name, t->part, head)", "parent": 228, "children": [261, 262], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 44}}, {"id": 261, "type": "identifier", "text": "print_particle_doc", "parent": 260, "children": [], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 22}}, {"id": 262, "type": "argument_list", "text": "(name, t->part, head)", "parent": 260, "children": [263, 264, 267], "start_point": {"row": 47, "column": 23}, "end_point": {"row": 47, "column": 44}}, {"id": 263, "type": "identifier", "text": "name", "parent": 262, "children": [], "start_point": {"row": 47, "column": 24}, "end_point": {"row": 47, "column": 28}}, {"id": 264, "type": "field_expression", "text": "t->part", "parent": 262, "children": [265, 266], "start_point": {"row": 47, "column": 30}, "end_point": {"row": 47, "column": 37}}, {"id": 265, "type": "identifier", "text": "t", "parent": 264, "children": [], "start_point": {"row": 47, "column": 30}, "end_point": {"row": 47, "column": 31}}, {"id": 266, "type": "field_identifier", "text": "part", "parent": 264, "children": [], "start_point": {"row": 47, "column": 33}, "end_point": {"row": 47, "column": 37}}, {"id": 267, "type": "identifier", "text": "head", "parent": 262, "children": [], "start_point": {"row": 47, "column": 39}, "end_point": {"row": 47, "column": 43}}, {"id": 268, "type": "function_definition", "text": "void print_flags_doc (SchemaType *t, SchemaType *head) {\n List *f;\n if (t->base) print_flags_doc (find_by_name (head, t->base), head);\n foreach (f, t->flags) {\n print_flag (f->data, 0);\n print (\"\\n\");\n }\n}", "parent": null, "children": [269, 270], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 58, "column": 1}}, {"id": 269, "type": "primitive_type", "text": "void", "parent": 268, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 4}}, {"id": 270, "type": "function_declarator", "text": "print_flags_doc (SchemaType *t, SchemaType *head)", "parent": 268, "children": [271, 272], "start_point": {"row": 51, "column": 5}, "end_point": {"row": 51, "column": 54}}, {"id": 271, "type": "identifier", "text": "print_flags_doc", "parent": 270, "children": [], "start_point": {"row": 51, "column": 5}, "end_point": {"row": 51, "column": 20}}, {"id": 272, "type": "parameter_list", "text": "(SchemaType *t, SchemaType *head)", "parent": 270, "children": [273, 278], "start_point": {"row": 51, "column": 21}, "end_point": {"row": 51, "column": 54}}, {"id": 273, "type": "parameter_declaration", "text": "SchemaType *t", "parent": 272, "children": [274, 275], "start_point": {"row": 51, "column": 22}, "end_point": {"row": 51, "column": 35}}, {"id": 274, "type": "type_identifier", "text": "SchemaType", "parent": 273, "children": [], "start_point": {"row": 51, "column": 22}, "end_point": {"row": 51, "column": 32}}, {"id": 275, "type": "pointer_declarator", "text": "*t", "parent": 273, "children": [276, 277], "start_point": {"row": 51, "column": 33}, "end_point": {"row": 51, "column": 35}}, {"id": 276, "type": "*", "text": "*", "parent": 275, "children": [], "start_point": {"row": 51, "column": 33}, "end_point": {"row": 51, "column": 34}}, {"id": 277, "type": "identifier", "text": "t", "parent": 275, "children": [], "start_point": {"row": 51, "column": 34}, "end_point": {"row": 51, "column": 35}}, {"id": 278, "type": "parameter_declaration", "text": "SchemaType *head", "parent": 272, "children": [279, 280], "start_point": {"row": 51, "column": 37}, "end_point": {"row": 51, "column": 53}}, {"id": 279, "type": "type_identifier", "text": "SchemaType", "parent": 278, "children": [], "start_point": {"row": 51, "column": 37}, "end_point": {"row": 51, "column": 47}}, {"id": 280, "type": "pointer_declarator", "text": "*head", "parent": 278, "children": [281, 282], "start_point": {"row": 51, "column": 48}, "end_point": {"row": 51, "column": 53}}, {"id": 281, "type": "*", "text": "*", "parent": 280, "children": [], "start_point": {"row": 51, "column": 48}, "end_point": {"row": 51, "column": 49}}, {"id": 282, "type": "identifier", "text": "head", "parent": 280, "children": [], "start_point": {"row": 51, "column": 49}, "end_point": {"row": 51, "column": 53}}, {"id": 283, "type": "declaration", "text": "List *f;", "parent": 268, "children": [284, 285], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 10}}, {"id": 284, "type": "type_identifier", "text": "List", "parent": 283, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 6}}, {"id": 285, "type": "pointer_declarator", "text": "*f", "parent": 283, "children": [286, 287], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 9}}, {"id": 286, "type": "*", "text": "*", "parent": 285, "children": [], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 8}}, {"id": 287, "type": "identifier", "text": "f", "parent": 285, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 9}}, {"id": 288, "type": "if_statement", "text": "if (t->base) print_flags_doc (find_by_name (head, t->base), head);", "parent": 268, "children": [289], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 68}}, {"id": 289, "type": "parenthesized_expression", "text": "(t->base)", "parent": 288, "children": [290], "start_point": {"row": 53, "column": 5}, "end_point": {"row": 53, "column": 14}}, {"id": 290, "type": "field_expression", "text": "t->base", "parent": 289, "children": [291, 292], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 13}}, {"id": 291, "type": "identifier", "text": "t", "parent": 290, "children": [], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 7}}, {"id": 292, "type": "field_identifier", "text": "base", "parent": 290, "children": [], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 13}}, {"id": 293, "type": "call_expression", "text": "print_flags_doc (find_by_name (head, t->base), head)", "parent": 288, "children": [294, 295], "start_point": {"row": 53, "column": 15}, "end_point": {"row": 53, "column": 67}}, {"id": 294, "type": "identifier", "text": "print_flags_doc", "parent": 293, "children": [], "start_point": {"row": 53, "column": 15}, "end_point": {"row": 53, "column": 30}}, {"id": 295, "type": "argument_list", "text": "(find_by_name (head, t->base), head)", "parent": 293, "children": [296, 303], "start_point": {"row": 53, "column": 31}, "end_point": {"row": 53, "column": 67}}, {"id": 296, "type": "call_expression", "text": "find_by_name (head, t->base)", "parent": 295, "children": [297, 298], "start_point": {"row": 53, "column": 32}, "end_point": {"row": 53, "column": 60}}, {"id": 297, "type": "identifier", "text": "find_by_name", "parent": 296, "children": [], "start_point": {"row": 53, "column": 32}, "end_point": {"row": 53, "column": 44}}, {"id": 298, "type": "argument_list", "text": "(head, t->base)", "parent": 296, "children": [299, 300], "start_point": {"row": 53, "column": 45}, "end_point": {"row": 53, "column": 60}}, {"id": 299, "type": "identifier", "text": "head", "parent": 298, "children": [], "start_point": {"row": 53, "column": 46}, "end_point": {"row": 53, "column": 50}}, {"id": 300, "type": "field_expression", "text": "t->base", "parent": 298, "children": [301, 302], "start_point": {"row": 53, "column": 52}, "end_point": {"row": 53, "column": 59}}, {"id": 301, "type": "identifier", "text": "t", "parent": 300, "children": [], "start_point": {"row": 53, "column": 52}, "end_point": {"row": 53, "column": 53}}, {"id": 302, "type": "field_identifier", "text": "base", "parent": 300, "children": [], "start_point": {"row": 53, "column": 55}, "end_point": {"row": 53, "column": 59}}, {"id": 303, "type": "identifier", "text": "head", "parent": 295, "children": [], "start_point": {"row": 53, "column": 62}, "end_point": {"row": 53, "column": 66}}, {"id": 304, "type": "call_expression", "text": "foreach (f, t->flags)", "parent": 268, "children": [305, 306], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 23}}, {"id": 305, "type": "identifier", "text": "foreach", "parent": 304, "children": [], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 9}}, {"id": 306, "type": "argument_list", "text": "(f, t->flags)", "parent": 304, "children": [307, 308], "start_point": {"row": 54, "column": 10}, "end_point": {"row": 54, "column": 23}}, {"id": 307, "type": "identifier", "text": "f", "parent": 306, "children": [], "start_point": {"row": 54, "column": 11}, "end_point": {"row": 54, "column": 12}}, {"id": 308, "type": "field_expression", "text": "t->flags", "parent": 306, "children": [309, 310], "start_point": {"row": 54, "column": 14}, "end_point": {"row": 54, "column": 22}}, {"id": 309, "type": "identifier", "text": "t", "parent": 308, "children": [], "start_point": {"row": 54, "column": 14}, "end_point": {"row": 54, "column": 15}}, {"id": 310, "type": "field_identifier", "text": "flags", "parent": 308, "children": [], "start_point": {"row": 54, "column": 17}, "end_point": {"row": 54, "column": 22}}, {"id": 311, "type": "call_expression", "text": "print_flag (f->data, 0)", "parent": 268, "children": [312, 313], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 27}}, {"id": 312, "type": "identifier", "text": "print_flag", "parent": 311, "children": [], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 14}}, {"id": 313, "type": "argument_list", "text": "(f->data, 0)", "parent": 311, "children": [314, 317], "start_point": {"row": 55, "column": 15}, "end_point": {"row": 55, "column": 27}}, {"id": 314, "type": "field_expression", "text": "f->data", "parent": 313, "children": [315, 316], "start_point": {"row": 55, "column": 16}, "end_point": {"row": 55, "column": 23}}, {"id": 315, "type": "identifier", "text": "f", "parent": 314, "children": [], "start_point": {"row": 55, "column": 16}, "end_point": {"row": 55, "column": 17}}, {"id": 316, "type": "field_identifier", "text": "data", "parent": 314, "children": [], "start_point": {"row": 55, "column": 19}, "end_point": {"row": 55, "column": 23}}, {"id": 317, "type": "number_literal", "text": "0", "parent": 313, "children": [], "start_point": {"row": 55, "column": 25}, "end_point": {"row": 55, "column": 26}}, {"id": 318, "type": "call_expression", "text": "print (\"\\n\")", "parent": 268, "children": [319, 320], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 16}}, {"id": 319, "type": "identifier", "text": "print", "parent": 318, "children": [], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 9}}, {"id": 320, "type": "argument_list", "text": "(\"\\n\")", "parent": 318, "children": [321], "start_point": {"row": 56, "column": 10}, "end_point": {"row": 56, "column": 16}}, {"id": 321, "type": "string_literal", "text": "\"\\n\"", "parent": 320, "children": [322], "start_point": {"row": 56, "column": 11}, "end_point": {"row": 56, "column": 15}}, {"id": 322, "type": "escape_sequence", "text": "\\n", "parent": 321, "children": [], "start_point": {"row": 56, "column": 12}, "end_point": {"row": 56, "column": 14}}, {"id": 323, "type": "function_definition", "text": "void print_type_doc (SchemaType *t, SchemaType *head) {\n char *base = t->base ? t->base : \"se_types\";\n print (\"/** @defgroup %s %s\\n\", t->name, t->name);\n switch (t->kind) {\n case ComplexType:\n print (\" @ingroup %s\\n\\n\", base);\n print_description (t->desc);\n print (\" @{ */\\n\\n\");\n print (\"/** @struct SE_%s_t se_types.h\\n\\n\", t->name);\n print_description (t->desc);\n if (has_flags (t, head)) {\n print (\" @var SE_%s_t::_flags\\n\", t->name);\n print_flags_doc (t, head);\n }\n print_fields_doc (t->name, t, head);\n break;\n case AtomicType:\n if (string_index (base, xs_names, 12) < 12)\n print (\" @ingroup se_typedefs\\n\\n\");\n else print (\" @ingroup %s\\n\\n\", base);\n print_description (t->desc);\n print (\" @{ */\\n\\n\");\n print (\"/** @typedef SE_%s_t\\n\\n\", t->name);\n print_description (t->desc);\n break;\n }\n print (\"*/\\n\\n/** @} */\\n\\n\");\n}", "parent": null, "children": [324, 325], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 87, "column": 1}}, {"id": 324, "type": "primitive_type", "text": "void", "parent": 323, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 4}}, {"id": 325, "type": "function_declarator", "text": "print_type_doc (SchemaType *t, SchemaType *head)", "parent": 323, "children": [326, 327], "start_point": {"row": 60, "column": 5}, "end_point": {"row": 60, "column": 53}}, {"id": 326, "type": "identifier", "text": "print_type_doc", "parent": 325, "children": [], "start_point": {"row": 60, "column": 5}, "end_point": {"row": 60, "column": 19}}, {"id": 327, "type": "parameter_list", "text": "(SchemaType *t, SchemaType *head)", "parent": 325, "children": [328, 333], "start_point": {"row": 60, "column": 20}, "end_point": {"row": 60, "column": 53}}, {"id": 328, "type": "parameter_declaration", "text": "SchemaType *t", "parent": 327, "children": [329, 330], "start_point": {"row": 60, "column": 21}, "end_point": {"row": 60, "column": 34}}, {"id": 329, "type": "type_identifier", "text": "SchemaType", "parent": 328, "children": [], "start_point": {"row": 60, "column": 21}, "end_point": {"row": 60, "column": 31}}, {"id": 330, "type": "pointer_declarator", "text": "*t", "parent": 328, "children": [331, 332], "start_point": {"row": 60, "column": 32}, "end_point": {"row": 60, "column": 34}}, {"id": 331, "type": "*", "text": "*", "parent": 330, "children": [], "start_point": {"row": 60, "column": 32}, "end_point": {"row": 60, "column": 33}}, {"id": 332, "type": "identifier", "text": "t", "parent": 330, "children": [], "start_point": {"row": 60, "column": 33}, "end_point": {"row": 60, "column": 34}}, {"id": 333, "type": "parameter_declaration", "text": "SchemaType *head", "parent": 327, "children": [334, 335], "start_point": {"row": 60, "column": 36}, "end_point": {"row": 60, "column": 52}}, {"id": 334, "type": "type_identifier", "text": "SchemaType", "parent": 333, "children": [], "start_point": {"row": 60, "column": 36}, "end_point": {"row": 60, "column": 46}}, {"id": 335, "type": "pointer_declarator", "text": "*head", "parent": 333, "children": [336, 337], "start_point": {"row": 60, "column": 47}, "end_point": {"row": 60, "column": 52}}, {"id": 336, "type": "*", "text": "*", "parent": 335, "children": [], "start_point": {"row": 60, "column": 47}, "end_point": {"row": 60, "column": 48}}, {"id": 337, "type": "identifier", "text": "head", "parent": 335, "children": [], "start_point": {"row": 60, "column": 48}, "end_point": {"row": 60, "column": 52}}, {"id": 338, "type": "declaration", "text": "char *base = t->base ? t->base : \"se_types\";", "parent": 323, "children": [339, 340], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 46}}, {"id": 339, "type": "primitive_type", "text": "char", "parent": 338, "children": [], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 6}}, {"id": 340, "type": "init_declarator", "text": "*base = t->base ? t->base : \"se_types\"", "parent": 338, "children": [341, 344, 345], "start_point": {"row": 61, "column": 7}, "end_point": {"row": 61, "column": 45}}, {"id": 341, "type": "pointer_declarator", "text": "*base", "parent": 340, "children": [342, 343], "start_point": {"row": 61, "column": 7}, "end_point": {"row": 61, "column": 12}}, {"id": 342, "type": "*", "text": "*", "parent": 341, "children": [], "start_point": {"row": 61, "column": 7}, "end_point": {"row": 61, "column": 8}}, {"id": 343, "type": "identifier", "text": "base", "parent": 341, "children": [], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 12}}, {"id": 344, "type": "=", "text": "=", "parent": 340, "children": [], "start_point": {"row": 61, "column": 13}, "end_point": {"row": 61, "column": 14}}, {"id": 345, "type": "conditional_expression", "text": "t->base ? t->base : \"se_types\"", "parent": 340, "children": [346, 349, 350, 353], "start_point": {"row": 61, "column": 15}, "end_point": {"row": 61, "column": 45}}, {"id": 346, "type": "field_expression", "text": "t->base", "parent": 345, "children": [347, 348], "start_point": {"row": 61, "column": 15}, "end_point": {"row": 61, "column": 22}}, {"id": 347, "type": "identifier", "text": "t", "parent": 346, "children": [], "start_point": {"row": 61, "column": 15}, "end_point": {"row": 61, "column": 16}}, {"id": 348, "type": "field_identifier", "text": "base", "parent": 346, "children": [], "start_point": {"row": 61, "column": 18}, "end_point": {"row": 61, "column": 22}}, {"id": 349, "type": "?", "text": "?", "parent": 345, "children": [], "start_point": {"row": 61, "column": 23}, "end_point": {"row": 61, "column": 24}}, {"id": 350, "type": "field_expression", "text": "t->base", "parent": 345, "children": [351, 352], "start_point": {"row": 61, "column": 25}, "end_point": {"row": 61, "column": 32}}, {"id": 351, "type": "identifier", "text": "t", "parent": 350, "children": [], "start_point": {"row": 61, "column": 25}, "end_point": {"row": 61, "column": 26}}, {"id": 352, "type": "field_identifier", "text": "base", "parent": 350, "children": [], "start_point": {"row": 61, "column": 28}, "end_point": {"row": 61, "column": 32}}, {"id": 353, "type": "string_literal", "text": "\"se_types\"", "parent": 345, "children": [], "start_point": {"row": 61, "column": 35}, "end_point": {"row": 61, "column": 45}}, {"id": 354, "type": "call_expression", "text": "print (\"/** @defgroup %s %s\\n\", t->name, t->name)", "parent": 323, "children": [355, 356], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 51}}, {"id": 355, "type": "identifier", "text": "print", "parent": 354, "children": [], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 7}}, {"id": 356, "type": "argument_list", "text": "(\"/** @defgroup %s %s\\n\", t->name, t->name)", "parent": 354, "children": [357, 359, 362], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 51}}, {"id": 357, "type": "string_literal", "text": "\"/** @defgroup %s %s\\n\"", "parent": 356, "children": [358], "start_point": {"row": 62, "column": 9}, "end_point": {"row": 62, "column": 32}}, {"id": 358, "type": "escape_sequence", "text": "\\n", "parent": 357, "children": [], "start_point": {"row": 62, "column": 29}, "end_point": {"row": 62, "column": 31}}, {"id": 359, "type": "field_expression", "text": "t->name", "parent": 356, "children": [360, 361], "start_point": {"row": 62, "column": 34}, "end_point": {"row": 62, "column": 41}}, {"id": 360, "type": "identifier", "text": "t", "parent": 359, "children": [], "start_point": {"row": 62, "column": 34}, "end_point": {"row": 62, "column": 35}}, {"id": 361, "type": "field_identifier", "text": "name", "parent": 359, "children": [], "start_point": {"row": 62, "column": 37}, "end_point": {"row": 62, "column": 41}}, {"id": 362, "type": "field_expression", "text": "t->name", "parent": 356, "children": [363, 364], "start_point": {"row": 62, "column": 43}, "end_point": {"row": 62, "column": 50}}, {"id": 363, "type": "identifier", "text": "t", "parent": 362, "children": [], "start_point": {"row": 62, "column": 43}, "end_point": {"row": 62, "column": 44}}, {"id": 364, "type": "field_identifier", "text": "name", "parent": 362, "children": [], "start_point": {"row": 62, "column": 46}, "end_point": {"row": 62, "column": 50}}, {"id": 365, "type": "switch_statement", "text": "switch (t->kind) {\n case ComplexType:\n print (\" @ingroup %s\\n\\n\", base);\n print_description (t->desc);\n print (\" @{ */\\n\\n\");\n print (\"/** @struct SE_%s_t se_types.h\\n\\n\", t->name);\n print_description (t->desc);\n if (has_flags (t, head)) {\n print (\" @var SE_%s_t::_flags\\n\", t->name);\n print_flags_doc (t, head);\n }\n print_fields_doc (t->name, t, head);\n break;\n case AtomicType:\n if (string_index (base, xs_names, 12) < 12)\n print (\" @ingroup se_typedefs\\n\\n\");\n else print (\" @ingroup %s\\n\\n\", base);\n print_description (t->desc);\n print (\" @{ */\\n\\n\");\n print (\"/** @typedef SE_%s_t\\n\\n\", t->name);\n print_description (t->desc);\n break;\n }", "parent": 323, "children": [366, 367], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 85, "column": 3}}, {"id": 366, "type": "switch", "text": "switch", "parent": 365, "children": [], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 8}}, {"id": 367, "type": "parenthesized_expression", "text": "(t->kind)", "parent": 365, "children": [368], "start_point": {"row": 63, "column": 9}, "end_point": {"row": 63, "column": 18}}, {"id": 368, "type": "field_expression", "text": "t->kind", "parent": 367, "children": [369, 370], "start_point": {"row": 63, "column": 10}, "end_point": {"row": 63, "column": 17}}, {"id": 369, "type": "identifier", "text": "t", "parent": 368, "children": [], "start_point": {"row": 63, "column": 10}, "end_point": {"row": 63, "column": 11}}, {"id": 370, "type": "field_identifier", "text": "kind", "parent": 368, "children": [], "start_point": {"row": 63, "column": 13}, "end_point": {"row": 63, "column": 17}}, {"id": 371, "type": "case_statement", "text": "case ComplexType:\n print (\" @ingroup %s\\n\\n\", base);\n print_description (t->desc);\n print (\" @{ */\\n\\n\");\n print (\"/** @struct SE_%s_t se_types.h\\n\\n\", t->name);\n print_description (t->desc);\n if (has_flags (t, head)) {\n print (\" @var SE_%s_t::_flags\\n\", t->name);\n print_flags_doc (t, head);\n }\n print_fields_doc (t->name, t, head);\n break;", "parent": 365, "children": [372, 373, 408, 436], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 75, "column": 10}}, {"id": 372, "type": "case", "text": "case", "parent": 371, "children": [], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 6}}, {"id": 373, "type": "identifier", "text": "ComplexType", "parent": 371, "children": [], "start_point": {"row": 64, "column": 7}, "end_point": {"row": 64, "column": 18}}, {"id": 374, "type": "call_expression", "text": "print (\" @ingroup %s\\n\\n\", base)", "parent": 371, "children": [375, 376], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 39}}, {"id": 375, "type": "identifier", "text": "print", "parent": 374, "children": [], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 9}}, {"id": 376, "type": "argument_list", "text": "(\" @ingroup %s\\n\\n\", base)", "parent": 374, "children": [377, 380], "start_point": {"row": 65, "column": 10}, "end_point": {"row": 65, "column": 39}}, {"id": 377, "type": "string_literal", "text": "\" @ingroup %s\\n\\n\"", "parent": 376, "children": [378, 379], "start_point": {"row": 65, "column": 11}, "end_point": {"row": 65, "column": 32}}, {"id": 378, "type": "escape_sequence", "text": "\\n", "parent": 377, "children": [], "start_point": {"row": 65, "column": 27}, "end_point": {"row": 65, "column": 29}}, {"id": 379, "type": "escape_sequence", "text": "\\n", "parent": 377, "children": [], "start_point": {"row": 65, "column": 29}, "end_point": {"row": 65, "column": 31}}, {"id": 380, "type": "identifier", "text": "base", "parent": 376, "children": [], "start_point": {"row": 65, "column": 34}, "end_point": {"row": 65, "column": 38}}, {"id": 381, "type": "call_expression", "text": "print_description (t->desc)", "parent": 371, "children": [382, 383], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 31}}, {"id": 382, "type": "identifier", "text": "print_description", "parent": 381, "children": [], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 21}}, {"id": 383, "type": "argument_list", "text": "(t->desc)", "parent": 381, "children": [384], "start_point": {"row": 66, "column": 22}, "end_point": {"row": 66, "column": 31}}, {"id": 384, "type": "field_expression", "text": "t->desc", "parent": 383, "children": [385, 386], "start_point": {"row": 66, "column": 23}, "end_point": {"row": 66, "column": 30}}, {"id": 385, "type": "identifier", "text": "t", "parent": 384, "children": [], "start_point": {"row": 66, "column": 23}, "end_point": {"row": 66, "column": 24}}, {"id": 386, "type": "field_identifier", "text": "desc", "parent": 384, "children": [], "start_point": {"row": 66, "column": 26}, "end_point": {"row": 66, "column": 30}}, {"id": 387, "type": "call_expression", "text": "print (\" @{ */\\n\\n\")", "parent": 371, "children": [388, 389], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 27}}, {"id": 388, "type": "identifier", "text": "print", "parent": 387, "children": [], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 9}}, {"id": 389, "type": "argument_list", "text": "(\" @{ */\\n\\n\")", "parent": 387, "children": [390], "start_point": {"row": 67, "column": 10}, "end_point": {"row": 67, "column": 27}}, {"id": 390, "type": "string_literal", "text": "\" @{ */\\n\\n\"", "parent": 389, "children": [391, 392], "start_point": {"row": 67, "column": 11}, "end_point": {"row": 67, "column": 26}}, {"id": 391, "type": "escape_sequence", "text": "\\n", "parent": 390, "children": [], "start_point": {"row": 67, "column": 21}, "end_point": {"row": 67, "column": 23}}, {"id": 392, "type": "escape_sequence", "text": "\\n", "parent": 390, "children": [], "start_point": {"row": 67, "column": 23}, "end_point": {"row": 67, "column": 25}}, {"id": 393, "type": "call_expression", "text": "print (\"/** @struct SE_%s_t se_types.h\\n\\n\", t->name)", "parent": 371, "children": [394, 395], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 57}}, {"id": 394, "type": "identifier", "text": "print", "parent": 393, "children": [], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 9}}, {"id": 395, "type": "argument_list", "text": "(\"/** @struct SE_%s_t se_types.h\\n\\n\", t->name)", "parent": 393, "children": [396, 399], "start_point": {"row": 68, "column": 10}, "end_point": {"row": 68, "column": 57}}, {"id": 396, "type": "string_literal", "text": "\"/** @struct SE_%s_t se_types.h\\n\\n\"", "parent": 395, "children": [397, 398], "start_point": {"row": 68, "column": 11}, "end_point": {"row": 68, "column": 47}}, {"id": 397, "type": "escape_sequence", "text": "\\n", "parent": 396, "children": [], "start_point": {"row": 68, "column": 42}, "end_point": {"row": 68, "column": 44}}, {"id": 398, "type": "escape_sequence", "text": "\\n", "parent": 396, "children": [], "start_point": {"row": 68, "column": 44}, "end_point": {"row": 68, "column": 46}}, {"id": 399, "type": "field_expression", "text": "t->name", "parent": 395, "children": [400, 401], "start_point": {"row": 68, "column": 49}, "end_point": {"row": 68, "column": 56}}, {"id": 400, "type": "identifier", "text": "t", "parent": 399, "children": [], "start_point": {"row": 68, "column": 49}, "end_point": {"row": 68, "column": 50}}, {"id": 401, "type": "field_identifier", "text": "name", "parent": 399, "children": [], "start_point": {"row": 68, "column": 52}, "end_point": {"row": 68, "column": 56}}, {"id": 402, "type": "call_expression", "text": "print_description (t->desc)", "parent": 371, "children": [403, 404], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 31}}, {"id": 403, "type": "identifier", "text": "print_description", "parent": 402, "children": [], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 21}}, {"id": 404, "type": "argument_list", "text": "(t->desc)", "parent": 402, "children": [405], "start_point": {"row": 69, "column": 22}, "end_point": {"row": 69, "column": 31}}, {"id": 405, "type": "field_expression", "text": "t->desc", "parent": 404, "children": [406, 407], "start_point": {"row": 69, "column": 23}, "end_point": {"row": 69, "column": 30}}, {"id": 406, "type": "identifier", "text": "t", "parent": 405, "children": [], "start_point": {"row": 69, "column": 23}, "end_point": {"row": 69, "column": 24}}, {"id": 407, "type": "field_identifier", "text": "desc", "parent": 405, "children": [], "start_point": {"row": 69, "column": 26}, "end_point": {"row": 69, "column": 30}}, {"id": 408, "type": "if_statement", "text": "if (has_flags (t, head)) {\n print (\" @var SE_%s_t::_flags\\n\", t->name);\n print_flags_doc (t, head);\n }", "parent": 371, "children": [409], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 73, "column": 5}}, {"id": 409, "type": "parenthesized_expression", "text": "(has_flags (t, head))", "parent": 408, "children": [410], "start_point": {"row": 70, "column": 7}, "end_point": {"row": 70, "column": 28}}, {"id": 410, "type": "call_expression", "text": "has_flags (t, head)", "parent": 409, "children": [411, 412], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 27}}, {"id": 411, "type": "identifier", "text": "has_flags", "parent": 410, "children": [], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 17}}, {"id": 412, "type": "argument_list", "text": "(t, head)", "parent": 410, "children": [413, 414], "start_point": {"row": 70, "column": 18}, "end_point": {"row": 70, "column": 27}}, {"id": 413, "type": "identifier", "text": "t", "parent": 412, "children": [], "start_point": {"row": 70, "column": 19}, "end_point": {"row": 70, "column": 20}}, {"id": 414, "type": "identifier", "text": "head", "parent": 412, "children": [], "start_point": {"row": 70, "column": 22}, "end_point": {"row": 70, "column": 26}}, {"id": 415, "type": "call_expression", "text": "print (\" @var SE_%s_t::_flags\\n\", t->name)", "parent": 408, "children": [416, 417], "start_point": {"row": 71, "column": 6}, "end_point": {"row": 71, "column": 51}}, {"id": 416, "type": "identifier", "text": "print", "parent": 415, "children": [], "start_point": {"row": 71, "column": 6}, "end_point": {"row": 71, "column": 11}}, {"id": 417, "type": "argument_list", "text": "(\" @var SE_%s_t::_flags\\n\", t->name)", "parent": 415, "children": [418, 420], "start_point": {"row": 71, "column": 12}, "end_point": {"row": 71, "column": 51}}, {"id": 418, "type": "string_literal", "text": "\" @var SE_%s_t::_flags\\n\"", "parent": 417, "children": [419], "start_point": {"row": 71, "column": 13}, "end_point": {"row": 71, "column": 41}}, {"id": 419, "type": "escape_sequence", "text": "\\n", "parent": 418, "children": [], "start_point": {"row": 71, "column": 38}, "end_point": {"row": 71, "column": 40}}, {"id": 420, "type": "field_expression", "text": "t->name", "parent": 417, "children": [421, 422], "start_point": {"row": 71, "column": 43}, "end_point": {"row": 71, "column": 50}}, {"id": 421, "type": "identifier", "text": "t", "parent": 420, "children": [], "start_point": {"row": 71, "column": 43}, "end_point": {"row": 71, "column": 44}}, {"id": 422, "type": "field_identifier", "text": "name", "parent": 420, "children": [], "start_point": {"row": 71, "column": 46}, "end_point": {"row": 71, "column": 50}}, {"id": 423, "type": "call_expression", "text": "print_flags_doc (t, head)", "parent": 408, "children": [424, 425], "start_point": {"row": 72, "column": 6}, "end_point": {"row": 72, "column": 31}}, {"id": 424, "type": "identifier", "text": "print_flags_doc", "parent": 423, "children": [], "start_point": {"row": 72, "column": 6}, "end_point": {"row": 72, "column": 21}}, {"id": 425, "type": "argument_list", "text": "(t, head)", "parent": 423, "children": [426, 427], "start_point": {"row": 72, "column": 22}, "end_point": {"row": 72, "column": 31}}, {"id": 426, "type": "identifier", "text": "t", "parent": 425, "children": [], "start_point": {"row": 72, "column": 23}, "end_point": {"row": 72, "column": 24}}, {"id": 427, "type": "identifier", "text": "head", "parent": 425, "children": [], "start_point": {"row": 72, "column": 26}, "end_point": {"row": 72, "column": 30}}, {"id": 428, "type": "call_expression", "text": "print_fields_doc (t->name, t, head)", "parent": 371, "children": [429, 430], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 74, "column": 39}}, {"id": 429, "type": "identifier", "text": "print_fields_doc", "parent": 428, "children": [], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 74, "column": 20}}, {"id": 430, "type": "argument_list", "text": "(t->name, t, head)", "parent": 428, "children": [431, 434, 435], "start_point": {"row": 74, "column": 21}, "end_point": {"row": 74, "column": 39}}, {"id": 431, "type": "field_expression", "text": "t->name", "parent": 430, "children": [432, 433], "start_point": {"row": 74, "column": 22}, "end_point": {"row": 74, "column": 29}}, {"id": 432, "type": "identifier", "text": "t", "parent": 431, "children": [], "start_point": {"row": 74, "column": 22}, "end_point": {"row": 74, "column": 23}}, {"id": 433, "type": "field_identifier", "text": "name", "parent": 431, "children": [], "start_point": {"row": 74, "column": 25}, "end_point": {"row": 74, "column": 29}}, {"id": 434, "type": "identifier", "text": "t", "parent": 430, "children": [], "start_point": {"row": 74, "column": 31}, "end_point": {"row": 74, "column": 32}}, {"id": 435, "type": "identifier", "text": "head", "parent": 430, "children": [], "start_point": {"row": 74, "column": 34}, "end_point": {"row": 74, "column": 38}}, {"id": 436, "type": "break_statement", "text": "break;", "parent": 371, "children": [437], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 10}}, {"id": 437, "type": "break", "text": "break", "parent": 436, "children": [], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 9}}, {"id": 438, "type": "case_statement", "text": "case AtomicType:\n if (string_index (base, xs_names, 12) < 12)\n print (\" @ingroup se_typedefs\\n\\n\");\n else print (\" @ingroup %s\\n\\n\", base);\n print_description (t->desc);\n print (\" @{ */\\n\\n\");\n print (\"/** @typedef SE_%s_t\\n\\n\", t->name);\n print_description (t->desc);\n break;", "parent": 365, "children": [439, 440, 441, 493], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 84, "column": 10}}, {"id": 439, "type": "case", "text": "case", "parent": 438, "children": [], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 76, "column": 6}}, {"id": 440, "type": "identifier", "text": "AtomicType", "parent": 438, "children": [], "start_point": {"row": 76, "column": 7}, "end_point": {"row": 76, "column": 17}}, {"id": 441, "type": "if_statement", "text": "if (string_index (base, xs_names, 12) < 12)\n print (\" @ingroup se_typedefs\\n\\n\");\n else print (\" @ingroup %s\\n\\n\", base);", "parent": 438, "children": [442, 458], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 79, "column": 45}}, {"id": 442, "type": "parenthesized_expression", "text": "(string_index (base, xs_names, 12) < 12)", "parent": 441, "children": [443], "start_point": {"row": 77, "column": 7}, "end_point": {"row": 77, "column": 47}}, {"id": 443, "type": "binary_expression", "text": "string_index (base, xs_names, 12) < 12", "parent": 442, "children": [444, 450, 451], "start_point": {"row": 77, "column": 8}, "end_point": {"row": 77, "column": 46}}, {"id": 444, "type": "call_expression", "text": "string_index (base, xs_names, 12)", "parent": 443, "children": [445, 446], "start_point": {"row": 77, "column": 8}, "end_point": {"row": 77, "column": 41}}, {"id": 445, "type": "identifier", "text": "string_index", "parent": 444, "children": [], "start_point": {"row": 77, "column": 8}, "end_point": {"row": 77, "column": 20}}, {"id": 446, "type": "argument_list", "text": "(base, xs_names, 12)", "parent": 444, "children": [447, 448, 449], "start_point": {"row": 77, "column": 21}, "end_point": {"row": 77, "column": 41}}, {"id": 447, "type": "identifier", "text": "base", "parent": 446, "children": [], "start_point": {"row": 77, "column": 22}, "end_point": {"row": 77, "column": 26}}, {"id": 448, "type": "identifier", "text": "xs_names", "parent": 446, "children": [], "start_point": {"row": 77, "column": 28}, "end_point": {"row": 77, "column": 36}}, {"id": 449, "type": "number_literal", "text": "12", "parent": 446, "children": [], "start_point": {"row": 77, "column": 38}, "end_point": {"row": 77, "column": 40}}, {"id": 450, "type": "<", "text": "<", "parent": 443, "children": [], "start_point": {"row": 77, "column": 42}, "end_point": {"row": 77, "column": 43}}, {"id": 451, "type": "number_literal", "text": "12", "parent": 443, "children": [], "start_point": {"row": 77, "column": 44}, "end_point": {"row": 77, "column": 46}}, {"id": 452, "type": "call_expression", "text": "print (\" @ingroup se_typedefs\\n\\n\")", "parent": 441, "children": [453, 454], "start_point": {"row": 78, "column": 6}, "end_point": {"row": 78, "column": 44}}, {"id": 453, "type": "identifier", "text": "print", "parent": 452, "children": [], "start_point": {"row": 78, "column": 6}, "end_point": {"row": 78, "column": 11}}, {"id": 454, "type": "argument_list", "text": "(\" @ingroup se_typedefs\\n\\n\")", "parent": 452, "children": [455], "start_point": {"row": 78, "column": 12}, "end_point": {"row": 78, "column": 44}}, {"id": 455, "type": "string_literal", "text": "\" @ingroup se_typedefs\\n\\n\"", "parent": 454, "children": [456, 457], "start_point": {"row": 78, "column": 13}, "end_point": {"row": 78, "column": 43}}, {"id": 456, "type": "escape_sequence", "text": "\\n", "parent": 455, "children": [], "start_point": {"row": 78, "column": 38}, "end_point": {"row": 78, "column": 40}}, {"id": 457, "type": "escape_sequence", "text": "\\n", "parent": 455, "children": [], "start_point": {"row": 78, "column": 40}, "end_point": {"row": 78, "column": 42}}, {"id": 458, "type": "else_clause", "text": "else print (\" @ingroup %s\\n\\n\", base);", "parent": 441, "children": [], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 79, "column": 45}}, {"id": 459, "type": "call_expression", "text": "print (\" @ingroup %s\\n\\n\", base)", "parent": 458, "children": [460, 461], "start_point": {"row": 79, "column": 9}, "end_point": {"row": 79, "column": 44}}, {"id": 460, "type": "identifier", "text": "print", "parent": 459, "children": [], "start_point": {"row": 79, "column": 9}, "end_point": {"row": 79, "column": 14}}, {"id": 461, "type": "argument_list", "text": "(\" @ingroup %s\\n\\n\", base)", "parent": 459, "children": [462, 465], "start_point": {"row": 79, "column": 15}, "end_point": {"row": 79, "column": 44}}, {"id": 462, "type": "string_literal", "text": "\" @ingroup %s\\n\\n\"", "parent": 461, "children": [463, 464], "start_point": {"row": 79, "column": 16}, "end_point": {"row": 79, "column": 37}}, {"id": 463, "type": "escape_sequence", "text": "\\n", "parent": 462, "children": [], "start_point": {"row": 79, "column": 32}, "end_point": {"row": 79, "column": 34}}, {"id": 464, "type": "escape_sequence", "text": "\\n", "parent": 462, "children": [], "start_point": {"row": 79, "column": 34}, "end_point": {"row": 79, "column": 36}}, {"id": 465, "type": "identifier", "text": "base", "parent": 461, "children": [], "start_point": {"row": 79, "column": 39}, "end_point": {"row": 79, "column": 43}}, {"id": 466, "type": "call_expression", "text": "print_description (t->desc)", "parent": 438, "children": [467, 468], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 31}}, {"id": 467, "type": "identifier", "text": "print_description", "parent": 466, "children": [], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 21}}, {"id": 468, "type": "argument_list", "text": "(t->desc)", "parent": 466, "children": [469], "start_point": {"row": 80, "column": 22}, "end_point": {"row": 80, "column": 31}}, {"id": 469, "type": "field_expression", "text": "t->desc", "parent": 468, "children": [470, 471], "start_point": {"row": 80, "column": 23}, "end_point": {"row": 80, "column": 30}}, {"id": 470, "type": "identifier", "text": "t", "parent": 469, "children": [], "start_point": {"row": 80, "column": 23}, "end_point": {"row": 80, "column": 24}}, {"id": 471, "type": "field_identifier", "text": "desc", "parent": 469, "children": [], "start_point": {"row": 80, "column": 26}, "end_point": {"row": 80, "column": 30}}, {"id": 472, "type": "call_expression", "text": "print (\" @{ */\\n\\n\")", "parent": 438, "children": [473, 474], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 27}}, {"id": 473, "type": "identifier", "text": "print", "parent": 472, "children": [], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 9}}, {"id": 474, "type": "argument_list", "text": "(\" @{ */\\n\\n\")", "parent": 472, "children": [475], "start_point": {"row": 81, "column": 10}, "end_point": {"row": 81, "column": 27}}, {"id": 475, "type": "string_literal", "text": "\" @{ */\\n\\n\"", "parent": 474, "children": [476, 477], "start_point": {"row": 81, "column": 11}, "end_point": {"row": 81, "column": 26}}, {"id": 476, "type": "escape_sequence", "text": "\\n", "parent": 475, "children": [], "start_point": {"row": 81, "column": 21}, "end_point": {"row": 81, "column": 23}}, {"id": 477, "type": "escape_sequence", "text": "\\n", "parent": 475, "children": [], "start_point": {"row": 81, "column": 23}, "end_point": {"row": 81, "column": 25}}, {"id": 478, "type": "call_expression", "text": "print (\"/** @typedef SE_%s_t\\n\\n\", t->name)", "parent": 438, "children": [479, 480], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 47}}, {"id": 479, "type": "identifier", "text": "print", "parent": 478, "children": [], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 9}}, {"id": 480, "type": "argument_list", "text": "(\"/** @typedef SE_%s_t\\n\\n\", t->name)", "parent": 478, "children": [481, 484], "start_point": {"row": 82, "column": 10}, "end_point": {"row": 82, "column": 47}}, {"id": 481, "type": "string_literal", "text": "\"/** @typedef SE_%s_t\\n\\n\"", "parent": 480, "children": [482, 483], "start_point": {"row": 82, "column": 11}, "end_point": {"row": 82, "column": 37}}, {"id": 482, "type": "escape_sequence", "text": "\\n", "parent": 481, "children": [], "start_point": {"row": 82, "column": 32}, "end_point": {"row": 82, "column": 34}}, {"id": 483, "type": "escape_sequence", "text": "\\n", "parent": 481, "children": [], "start_point": {"row": 82, "column": 34}, "end_point": {"row": 82, "column": 36}}, {"id": 484, "type": "field_expression", "text": "t->name", "parent": 480, "children": [485, 486], "start_point": {"row": 82, "column": 39}, "end_point": {"row": 82, "column": 46}}, {"id": 485, "type": "identifier", "text": "t", "parent": 484, "children": [], "start_point": {"row": 82, "column": 39}, "end_point": {"row": 82, "column": 40}}, {"id": 486, "type": "field_identifier", "text": "name", "parent": 484, "children": [], "start_point": {"row": 82, "column": 42}, "end_point": {"row": 82, "column": 46}}, {"id": 487, "type": "call_expression", "text": "print_description (t->desc)", "parent": 438, "children": [488, 489], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 31}}, {"id": 488, "type": "identifier", "text": "print_description", "parent": 487, "children": [], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 21}}, {"id": 489, "type": "argument_list", "text": "(t->desc)", "parent": 487, "children": [490], "start_point": {"row": 83, "column": 22}, "end_point": {"row": 83, "column": 31}}, {"id": 490, "type": "field_expression", "text": "t->desc", "parent": 489, "children": [491, 492], "start_point": {"row": 83, "column": 23}, "end_point": {"row": 83, "column": 30}}, {"id": 491, "type": "identifier", "text": "t", "parent": 490, "children": [], "start_point": {"row": 83, "column": 23}, "end_point": {"row": 83, "column": 24}}, {"id": 492, "type": "field_identifier", "text": "desc", "parent": 490, "children": [], "start_point": {"row": 83, "column": 26}, "end_point": {"row": 83, "column": 30}}, {"id": 493, "type": "break_statement", "text": "break;", "parent": 438, "children": [494], "start_point": {"row": 84, "column": 4}, "end_point": {"row": 84, "column": 10}}, {"id": 494, "type": "break", "text": "break", "parent": 493, "children": [], "start_point": {"row": 84, "column": 4}, "end_point": {"row": 84, "column": 9}}, {"id": 495, "type": "call_expression", "text": "print (\"*/\\n\\n/** @} */\\n\\n\")", "parent": 323, "children": [496, 497], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 31}}, {"id": 496, "type": "identifier", "text": "print", "parent": 495, "children": [], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 7}}, {"id": 497, "type": "argument_list", "text": "(\"*/\\n\\n/** @} */\\n\\n\")", "parent": 495, "children": [498], "start_point": {"row": 86, "column": 8}, "end_point": {"row": 86, "column": 31}}, {"id": 498, "type": "string_literal", "text": "\"*/\\n\\n/** @} */\\n\\n\"", "parent": 497, "children": [499, 500, 501, 502], "start_point": {"row": 86, "column": 9}, "end_point": {"row": 86, "column": 30}}, {"id": 499, "type": "escape_sequence", "text": "\\n", "parent": 498, "children": [], "start_point": {"row": 86, "column": 12}, "end_point": {"row": 86, "column": 14}}, {"id": 500, "type": "escape_sequence", "text": "\\n", "parent": 498, "children": [], "start_point": {"row": 86, "column": 14}, "end_point": {"row": 86, "column": 16}}, {"id": 501, "type": "escape_sequence", "text": "\\n", "parent": 498, "children": [], "start_point": {"row": 86, "column": 25}, "end_point": {"row": 86, "column": 27}}, {"id": 502, "type": "escape_sequence", "text": "\\n", "parent": 498, "children": [], "start_point": {"row": 86, "column": 27}, "end_point": {"row": 86, "column": 29}}, {"id": 503, "type": "function_definition", "text": "void print_types_doc (List *list, SchemaType *head) {\n List *l;\n print (\"/** @defgroup se_types IEEE 2030.5 Types */\\n\\n\");\n print (\"/** @defgroup se_typedefs Typedefs \\n\");\n print (\" @ingroup se_types */\\n\\n\");\n foreach (l, list) print_type_doc (l->data, head);\n}", "parent": null, "children": [504, 505], "start_point": {"row": 89, "column": 0}, "end_point": {"row": 95, "column": 1}}, {"id": 504, "type": "primitive_type", "text": "void", "parent": 503, "children": [], "start_point": {"row": 89, "column": 0}, "end_point": {"row": 89, "column": 4}}, {"id": 505, "type": "function_declarator", "text": "print_types_doc (List *list, SchemaType *head)", "parent": 503, "children": [506, 507], "start_point": {"row": 89, "column": 5}, "end_point": {"row": 89, "column": 51}}, {"id": 506, "type": "identifier", "text": "print_types_doc", "parent": 505, "children": [], "start_point": {"row": 89, "column": 5}, "end_point": {"row": 89, "column": 20}}, {"id": 507, "type": "parameter_list", "text": "(List *list, SchemaType *head)", "parent": 505, "children": [508, 513], "start_point": {"row": 89, "column": 21}, "end_point": {"row": 89, "column": 51}}, {"id": 508, "type": "parameter_declaration", "text": "List *list", "parent": 507, "children": [509, 510], "start_point": {"row": 89, "column": 22}, "end_point": {"row": 89, "column": 32}}, {"id": 509, "type": "type_identifier", "text": "List", "parent": 508, "children": [], "start_point": {"row": 89, "column": 22}, "end_point": {"row": 89, "column": 26}}, {"id": 510, "type": "pointer_declarator", "text": "*list", "parent": 508, "children": [511, 512], "start_point": {"row": 89, "column": 27}, "end_point": {"row": 89, "column": 32}}, {"id": 511, "type": "*", "text": "*", "parent": 510, "children": [], "start_point": {"row": 89, "column": 27}, "end_point": {"row": 89, "column": 28}}, {"id": 512, "type": "identifier", "text": "list", "parent": 510, "children": [], "start_point": {"row": 89, "column": 28}, "end_point": {"row": 89, "column": 32}}, {"id": 513, "type": "parameter_declaration", "text": "SchemaType *head", "parent": 507, "children": [514, 515], "start_point": {"row": 89, "column": 34}, "end_point": {"row": 89, "column": 50}}, {"id": 514, "type": "type_identifier", "text": "SchemaType", "parent": 513, "children": [], "start_point": {"row": 89, "column": 34}, "end_point": {"row": 89, "column": 44}}, {"id": 515, "type": "pointer_declarator", "text": "*head", "parent": 513, "children": [516, 517], "start_point": {"row": 89, "column": 45}, "end_point": {"row": 89, "column": 50}}, {"id": 516, "type": "*", "text": "*", "parent": 515, "children": [], "start_point": {"row": 89, "column": 45}, "end_point": {"row": 89, "column": 46}}, {"id": 517, "type": "identifier", "text": "head", "parent": 515, "children": [], "start_point": {"row": 89, "column": 46}, "end_point": {"row": 89, "column": 50}}, {"id": 518, "type": "declaration", "text": "List *l;", "parent": 503, "children": [519, 520], "start_point": {"row": 90, "column": 2}, "end_point": {"row": 90, "column": 10}}, {"id": 519, "type": "type_identifier", "text": "List", "parent": 518, "children": [], "start_point": {"row": 90, "column": 2}, "end_point": {"row": 90, "column": 6}}, {"id": 520, "type": "pointer_declarator", "text": "*l", "parent": 518, "children": [521, 522], "start_point": {"row": 90, "column": 7}, "end_point": {"row": 90, "column": 9}}, {"id": 521, "type": "*", "text": "*", "parent": 520, "children": [], "start_point": {"row": 90, "column": 7}, "end_point": {"row": 90, "column": 8}}, {"id": 522, "type": "identifier", "text": "l", "parent": 520, "children": [], "start_point": {"row": 90, "column": 8}, "end_point": {"row": 90, "column": 9}}, {"id": 523, "type": "call_expression", "text": "print (\"/** @defgroup se_types IEEE 2030.5 Types */\\n\\n\")", "parent": 503, "children": [524, 525], "start_point": {"row": 91, "column": 2}, "end_point": {"row": 91, "column": 59}}, {"id": 524, "type": "identifier", "text": "print", "parent": 523, "children": [], "start_point": {"row": 91, "column": 2}, "end_point": {"row": 91, "column": 7}}, {"id": 525, "type": "argument_list", "text": "(\"/** @defgroup se_types IEEE 2030.5 Types */\\n\\n\")", "parent": 523, "children": [526], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 59}}, {"id": 526, "type": "string_literal", "text": "\"/** @defgroup se_types IEEE 2030.5 Types */\\n\\n\"", "parent": 525, "children": [527, 528], "start_point": {"row": 91, "column": 9}, "end_point": {"row": 91, "column": 58}}, {"id": 527, "type": "escape_sequence", "text": "\\n", "parent": 526, "children": [], "start_point": {"row": 91, "column": 53}, "end_point": {"row": 91, "column": 55}}, {"id": 528, "type": "escape_sequence", "text": "\\n", "parent": 526, "children": [], "start_point": {"row": 91, "column": 55}, "end_point": {"row": 91, "column": 57}}, {"id": 529, "type": "call_expression", "text": "print (\"/** @defgroup se_typedefs Typedefs \\n\")", "parent": 503, "children": [530, 531], "start_point": {"row": 92, "column": 2}, "end_point": {"row": 92, "column": 49}}, {"id": 530, "type": "identifier", "text": "print", "parent": 529, "children": [], "start_point": {"row": 92, "column": 2}, "end_point": {"row": 92, "column": 7}}, {"id": 531, "type": "argument_list", "text": "(\"/** @defgroup se_typedefs Typedefs \\n\")", "parent": 529, "children": [532], "start_point": {"row": 92, "column": 8}, "end_point": {"row": 92, "column": 49}}, {"id": 532, "type": "string_literal", "text": "\"/** @defgroup se_typedefs Typedefs \\n\"", "parent": 531, "children": [533], "start_point": {"row": 92, "column": 9}, "end_point": {"row": 92, "column": 48}}, {"id": 533, "type": "escape_sequence", "text": "\\n", "parent": 532, "children": [], "start_point": {"row": 92, "column": 45}, "end_point": {"row": 92, "column": 47}}, {"id": 534, "type": "call_expression", "text": "print (\" @ingroup se_types */\\n\\n\")", "parent": 503, "children": [535, 536], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 40}}, {"id": 535, "type": "identifier", "text": "print", "parent": 534, "children": [], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 7}}, {"id": 536, "type": "argument_list", "text": "(\" @ingroup se_types */\\n\\n\")", "parent": 534, "children": [537], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 40}}, {"id": 537, "type": "string_literal", "text": "\" @ingroup se_types */\\n\\n\"", "parent": 536, "children": [538, 539], "start_point": {"row": 93, "column": 9}, "end_point": {"row": 93, "column": 39}}, {"id": 538, "type": "escape_sequence", "text": "\\n", "parent": 537, "children": [], "start_point": {"row": 93, "column": 34}, "end_point": {"row": 93, "column": 36}}, {"id": 539, "type": "escape_sequence", "text": "\\n", "parent": 537, "children": [], "start_point": {"row": 93, "column": 36}, "end_point": {"row": 93, "column": 38}}, {"id": 540, "type": "call_expression", "text": "foreach (l, list)", "parent": 503, "children": [541, 542], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 19}}, {"id": 541, "type": "identifier", "text": "foreach", "parent": 540, "children": [], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 9}}, {"id": 542, "type": "argument_list", "text": "(l, list)", "parent": 540, "children": [543, 544], "start_point": {"row": 94, "column": 10}, "end_point": {"row": 94, "column": 19}}, {"id": 543, "type": "identifier", "text": "l", "parent": 542, "children": [], "start_point": {"row": 94, "column": 11}, "end_point": {"row": 94, "column": 12}}, {"id": 544, "type": "identifier", "text": "list", "parent": 542, "children": [], "start_point": {"row": 94, "column": 14}, "end_point": {"row": 94, "column": 18}}, {"id": 545, "type": "call_expression", "text": "print_type_doc (l->data, head)", "parent": 503, "children": [546, 547], "start_point": {"row": 94, "column": 20}, "end_point": {"row": 94, "column": 50}}, {"id": 546, "type": "identifier", "text": "print_type_doc", "parent": 545, "children": [], "start_point": {"row": 94, "column": 20}, "end_point": {"row": 94, "column": 34}}, {"id": 547, "type": "argument_list", "text": "(l->data, head)", "parent": 545, "children": [548, 551], "start_point": {"row": 94, "column": 35}, "end_point": {"row": 94, "column": 50}}, {"id": 548, "type": "field_expression", "text": "l->data", "parent": 547, "children": [549, 550], "start_point": {"row": 94, "column": 36}, "end_point": {"row": 94, "column": 43}}, {"id": 549, "type": "identifier", "text": "l", "parent": 548, "children": [], "start_point": {"row": 94, "column": 36}, "end_point": {"row": 94, "column": 37}}, {"id": 550, "type": "field_identifier", "text": "data", "parent": 548, "children": [], "start_point": {"row": 94, "column": 39}, "end_point": {"row": 94, "column": 43}}, {"id": 551, "type": "identifier", "text": "head", "parent": 547, "children": [], "start_point": {"row": 94, "column": 45}, "end_point": {"row": 94, "column": 49}}]}, "node_categories": {"declarations": {"functions": [0, 2, 20, 22, 53, 55, 83, 85, 174, 176, 268, 270, 323, 325, 503, 505], "variables": [5, 8, 25, 33, 58, 63, 88, 93, 98, 103, 108, 179, 184, 189, 194, 199, 242, 273, 278, 283, 328, 333, 338, 508, 513, 518], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [13, 31, 40, 44, 49, 68, 74, 77, 80, 113, 120, 121, 130, 131, 135, 136, 137, 142, 146, 147, 161, 165, 205, 206, 207, 211, 215, 219, 222, 229, 230, 232, 235, 239, 249, 252, 256, 257, 260, 264, 289, 290, 293, 296, 300, 304, 308, 311, 314, 318, 346, 350, 354, 359, 362, 367, 368, 374, 381, 384, 387, 393, 399, 402, 405, 409, 410, 415, 420, 423, 428, 431, 442, 443, 444, 452, 459, 466, 469, 472, 478, 484, 487, 490, 495, 523, 529, 534, 540, 545, 548], "assignments": [127, 212], "loops": [], "conditionals": [3, 7, 12, 14, 19, 23, 29, 30, 32, 38, 41, 43, 45, 47, 48, 50, 52, 56, 62, 64, 67, 69, 73, 75, 76, 78, 81, 82, 86, 92, 94, 97, 99, 102, 104, 107, 109, 112, 114, 116, 117, 118, 119, 122, 123, 124, 125, 126, 128, 132, 133, 134, 138, 139, 141, 143, 145, 148, 149, 152, 153, 154, 155, 156, 157, 158, 159, 160, 162, 164, 166, 167, 168, 169, 170, 171, 177, 183, 185, 188, 190, 193, 195, 198, 200, 203, 204, 208, 209, 213, 216, 218, 220, 221, 223, 225, 226, 227, 228, 233, 234, 236, 238, 240, 241, 243, 247, 250, 251, 253, 255, 258, 259, 261, 263, 265, 266, 267, 271, 274, 277, 279, 282, 284, 287, 288, 291, 292, 294, 297, 299, 301, 302, 303, 305, 307, 309, 310, 312, 315, 316, 319, 326, 329, 332, 334, 337, 343, 345, 347, 348, 351, 352, 355, 360, 361, 363, 364, 365, 366, 369, 370, 371, 372, 373, 375, 380, 382, 385, 386, 388, 394, 400, 401, 403, 406, 407, 408, 411, 413, 414, 416, 421, 422, 424, 426, 427, 429, 432, 433, 434, 435, 438, 439, 440, 441, 445, 447, 448, 453, 460, 465, 467, 470, 471, 473, 479, 485, 486, 488, 491, 492, 496, 506, 509, 512, 514, 517, 519, 522, 524, 530, 535, 541, 543, 544, 546, 549, 550, 551], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [16, 71, 317, 321, 353, 357, 377, 390, 396, 418, 449, 451, 455, 462, 475, 481, 498, 526, 532, 537], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 0, "universal_type": "function", "name": "print_desc_line", "text_snippet": "void print_desc_line (int n, char *desc) {\n print (\" %s\\n\\n\", desc);\n}"}, {"node_id": 2, "universal_type": "function", "name": "unknown", "text_snippet": "print_desc_line (int n, char *desc)"}, {"node_id": 20, "universal_type": "function", "name": "print_description", "text_snippet": "void print_description (void *desc) {\n if (desc) {\n char *buffer = strdup (desc);\n process_bu"}, {"node_id": 22, "universal_type": "function", "name": "unknown", "text_snippet": "print_description (void *desc)"}, {"node_id": 53, "universal_type": "function", "name": "print_field_doc", "text_snippet": "void print_field_doc (char *name, Field *f) {\n print (\" @var SE_%s_t::%s\\n\", name, f->name);\n p"}, {"node_id": 55, "universal_type": "function", "name": "unknown", "text_snippet": "print_field_doc (char *name, Field *f)"}, {"node_id": 83, "universal_type": "function", "name": "print_particle_doc", "text_snippet": "void print_particle_doc (char *name, Particle *part, SchemaType *head) {\n Particle *p;\n Field *f;\n"}, {"node_id": 85, "universal_type": "function", "name": "unknown", "text_snippet": "print_particle_doc (char *name, Particle *part, SchemaType *head)"}, {"node_id": 174, "universal_type": "function", "name": "print_fields_doc", "text_snippet": "void print_fields_doc (char *name, SchemaType *t, SchemaType *head) {\n List *attr;\n SchemaType *u;"}, {"node_id": 176, "universal_type": "function", "name": "unknown", "text_snippet": "print_fields_doc (char *name, SchemaType *t, SchemaType *head)"}, {"node_id": 268, "universal_type": "function", "name": "print_flags_doc", "text_snippet": "void print_flags_doc (SchemaType *t, SchemaType *head) {\n List *f;\n if (t->base) print_flags_doc ("}, {"node_id": 270, "universal_type": "function", "name": "unknown", "text_snippet": "print_flags_doc (SchemaType *t, SchemaType *head)"}, {"node_id": 323, "universal_type": "function", "name": "print_type_doc", "text_snippet": "void print_type_doc (SchemaType *t, SchemaType *head) {\n char *base = t->base ? t->base : \"se_types"}, {"node_id": 325, "universal_type": "function", "name": "unknown", "text_snippet": "print_type_doc (SchemaType *t, SchemaType *head)"}, {"node_id": 503, "universal_type": "function", "name": "print_types_doc", "text_snippet": "void print_types_doc (List *list, SchemaType *head) {\n List *l;\n print (\"/** @defgroup se_types IE"}, {"node_id": 505, "universal_type": "function", "name": "unknown", "text_snippet": "print_types_doc (List *list, SchemaType *head)"}], "class_declarations": [], "import_statements": []}, "original_source_code": "void print_desc_line (int n, char *desc) {\n print (\" %s\\n\\n\", desc);\n}\n\nvoid print_description (void *desc) {\n if (desc) {\n char *buffer = strdup (desc);\n process_buffer (buffer, print_desc_line);\n free (buffer);\n }\n}\n\nvoid print_field_doc (char *name, Field *f) {\n print (\" @var SE_%s_t::%s\\n\", name, f->name);\n print_description (f->desc);\n}\n\nvoid print_particle_doc (char *name, Particle *part, SchemaType *head) {\n Particle *p;\n Field *f;\n foreach (p, part) {\n switch (p->kind) {\n case PartElement:\n f = &p->field;\n if (f->prim != XS_BOOLEAN)\n print_field_doc (name, &p->field);\n break;\n case PartGroup:\n case PartChoice:\n case PartSequence:\n print_particle_doc (name, p->child, head);\n case PartAny:\n break;\n }\n }\n}\n\nvoid print_fields_doc (char *name, SchemaType *t, SchemaType *head) {\n List *attr;\n SchemaType *u;\n if (t->base && (u = find_by_name (head, t->base)))\n print_fields_doc (name, u, head);\n if (!t->restriction) {\n foreach (attr, t->attr) {\n AttrDecl *a = attr->data;\n print_field_doc (name, &a->field);\n }\n print_particle_doc (name, t->part, head);\n }\n}\n\nvoid print_flags_doc (SchemaType *t, SchemaType *head) {\n List *f;\n if (t->base) print_flags_doc (find_by_name (head, t->base), head);\n foreach (f, t->flags) {\n print_flag (f->data, 0);\n print (\"\\n\");\n }\n}\n\nvoid print_type_doc (SchemaType *t, SchemaType *head) {\n char *base = t->base ? t->base : \"se_types\";\n print (\"/** @defgroup %s %s\\n\", t->name, t->name);\n switch (t->kind) {\n case ComplexType:\n print (\" @ingroup %s\\n\\n\", base);\n print_description (t->desc);\n print (\" @{ */\\n\\n\");\n print (\"/** @struct SE_%s_t se_types.h\\n\\n\", t->name);\n print_description (t->desc);\n if (has_flags (t, head)) {\n print (\" @var SE_%s_t::_flags\\n\", t->name);\n print_flags_doc (t, head);\n }\n print_fields_doc (t->name, t, head);\n break;\n case AtomicType:\n if (string_index (base, xs_names, 12) < 12)\n print (\" @ingroup se_typedefs\\n\\n\");\n else print (\" @ingroup %s\\n\\n\", base);\n print_description (t->desc);\n print (\" @{ */\\n\\n\");\n print (\"/** @typedef SE_%s_t\\n\\n\", t->name);\n print_description (t->desc);\n break;\n }\n print (\"*/\\n\\n/** @} */\\n\\n\");\n}\n\nvoid print_types_doc (List *list, SchemaType *head) {\n List *l;\n print (\"/** @defgroup se_types IEEE 2030.5 Types */\\n\\n\");\n print (\"/** @defgroup se_typedefs Typedefs \\n\");\n print (\" @ingroup se_types */\\n\\n\");\n foreach (l, list) print_type_doc (l->data, head);\n}\n"}
| 81,215
|
c
|
#ifndef _POLOLU_CONFIG_H_
#define _POLOLU_CONFIG_H_
#define ENCODER_CPR 12
#define GEAR_RATIO_75_1 75.81
#define GEAR_RATIO_50_1 51.45
#define WHEEL_3PI 32
#define WHEEL_ZUMO 35
#define WHEEL_BALBOA 80
#define WHEEL_ROMI 70
#endif /* _POLOLU_CONFIG_H_ */
| 21
| 12
|
(translation_unit) "#ifndef _POLOLU_CONFIG_H_\n#define _POLOLU_CONFIG_H_\n\n\n#define ENCODER_CPR 12\n#define GEAR_RATIO_75_1 75.81\n#define GEAR_RATIO_50_1 51.45\n\n#define WHEEL_3PI 32\n#define WHEEL_ZUMO 35\n#define WHEEL_BALBOA 80\n#define WHEEL_ROMI 70\n\n\n#endif /* _POLOLU_CONFIG_H_ */\n"
(preproc_ifdef) "#ifndef _POLOLU_CONFIG_H_\n#define _POLOLU_CONFIG_H_\n\n\n#define ENCODER_CPR 12\n#define GEAR_RATIO_75_1 75.81\n#define GEAR_RATIO_50_1 51.45\n\n#define WHEEL_3PI 32\n#define WHEEL_ZUMO 35\n#define WHEEL_BALBOA 80\n#define WHEEL_ROMI 70\n\n\n#endif"
(#ifndef) "#ifndef"
(identifier) "_POLOLU_CONFIG_H_"
(preproc_def) "#define _POLOLU_CONFIG_H_\n"
(#define) "#define"
(identifier) "_POLOLU_CONFIG_H_"
(preproc_def) "#define ENCODER_CPR 12\n"
(#define) "#define"
(identifier) "ENCODER_CPR"
(preproc_arg) "12"
(preproc_def) "#define GEAR_RATIO_75_1 75.81\n"
(#define) "#define"
(identifier) "GEAR_RATIO_75_1"
(preproc_arg) "75.81"
(preproc_def) "#define GEAR_RATIO_50_1 51.45\n"
(#define) "#define"
(identifier) "GEAR_RATIO_50_1"
(preproc_arg) "51.45"
(preproc_def) "#define WHEEL_3PI 32\n"
(#define) "#define"
(identifier) "WHEEL_3PI"
(preproc_arg) "32"
(preproc_def) "#define WHEEL_ZUMO 35\n"
(#define) "#define"
(identifier) "WHEEL_ZUMO"
(preproc_arg) "35"
(preproc_def) "#define WHEEL_BALBOA 80\n"
(#define) "#define"
(identifier) "WHEEL_BALBOA"
(preproc_arg) "80"
(preproc_def) "#define WHEEL_ROMI 70\n"
(#define) "#define"
(identifier) "WHEEL_ROMI"
(preproc_arg) "70"
(#endif) "#endif"
(comment) "/* _POLOLU_CONFIG_H_ */"
| 37
| 0
|
{"language": "c", "success": true, "metadata": {"lines": 12, "avg_line_length": 21.0, "nodes": 35, "errors": 0, "source_hash": "5edce91d4eb414ab8e6ee7ce8614dd6a8a442ecaf0450d574799b9e6873d7849", "categorized_nodes": 12}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef _POLOLU_CONFIG_H_\n#define _POLOLU_CONFIG_H_\n\n\n#define ENCODER_CPR\t\t12\n#define GEAR_RATIO_75_1\t\t75.81\n#define GEAR_RATIO_50_1\t\t51.45\n\n#define WHEEL_3PI\t\t32\n#define WHEEL_ZUMO\t\t35\n#define WHEEL_BALBOA\t\t80\n#define WHEEL_ROMI\t\t70\n\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 10, 14, 18, 22, 26, 30, 34], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 14, "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": "_POLOLU_CONFIG_H_", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 25}}, {"id": 3, "type": "preproc_def", "text": "#define _POLOLU_CONFIG_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": "_POLOLU_CONFIG_H_", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 25}}, {"id": 6, "type": "preproc_def", "text": "#define ENCODER_CPR\t\t12\n", "parent": 0, "children": [7, 8, 9], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 7, "type": "#define", "text": "#define", "parent": 6, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 8, "type": "identifier", "text": "ENCODER_CPR", "parent": 6, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 19}}, {"id": 9, "type": "preproc_arg", "text": "12", "parent": 6, "children": [], "start_point": {"row": 4, "column": 21}, "end_point": {"row": 4, "column": 23}}, {"id": 10, "type": "preproc_def", "text": "#define GEAR_RATIO_75_1\t\t75.81\n", "parent": 0, "children": [11, 12, 13], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 11, "type": "#define", "text": "#define", "parent": 10, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 12, "type": "identifier", "text": "GEAR_RATIO_75_1", "parent": 10, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 23}}, {"id": 13, "type": "preproc_arg", "text": "75.81", "parent": 10, "children": [], "start_point": {"row": 5, "column": 25}, "end_point": {"row": 5, "column": 30}}, {"id": 14, "type": "preproc_def", "text": "#define GEAR_RATIO_50_1\t\t51.45\n", "parent": 0, "children": [15, 16, 17], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 15, "type": "#define", "text": "#define", "parent": 14, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 7}}, {"id": 16, "type": "identifier", "text": "GEAR_RATIO_50_1", "parent": 14, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 23}}, {"id": 17, "type": "preproc_arg", "text": "51.45", "parent": 14, "children": [], "start_point": {"row": 6, "column": 25}, "end_point": {"row": 6, "column": 30}}, {"id": 18, "type": "preproc_def", "text": "#define WHEEL_3PI\t\t32\n", "parent": 0, "children": [19, 20, 21], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 19, "type": "#define", "text": "#define", "parent": 18, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 20, "type": "identifier", "text": "WHEEL_3PI", "parent": 18, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 17}}, {"id": 21, "type": "preproc_arg", "text": "32", "parent": 18, "children": [], "start_point": {"row": 8, "column": 19}, "end_point": {"row": 8, "column": 21}}, {"id": 22, "type": "preproc_def", "text": "#define WHEEL_ZUMO\t\t35\n", "parent": 0, "children": [23, 24, 25], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 23, "type": "#define", "text": "#define", "parent": 22, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 24, "type": "identifier", "text": "WHEEL_ZUMO", "parent": 22, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 18}}, {"id": 25, "type": "preproc_arg", "text": "35", "parent": 22, "children": [], "start_point": {"row": 9, "column": 20}, "end_point": {"row": 9, "column": 22}}, {"id": 26, "type": "preproc_def", "text": "#define WHEEL_BALBOA\t\t80\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": "WHEEL_BALBOA", "parent": 26, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 20}}, {"id": 29, "type": "preproc_arg", "text": "80", "parent": 26, "children": [], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 24}}, {"id": 30, "type": "preproc_def", "text": "#define WHEEL_ROMI\t\t70\n", "parent": 0, "children": [31, 32, 33], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 31, "type": "#define", "text": "#define", "parent": 30, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 32, "type": "identifier", "text": "WHEEL_ROMI", "parent": 30, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 18}}, {"id": 33, "type": "preproc_arg", "text": "70", "parent": 30, "children": [], "start_point": {"row": 11, "column": 20}, "end_point": {"row": 11, "column": 22}}, {"id": 34, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 6}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 8, 12, 16, 20, 24, 28, 32, 34], "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 _POLOLU_CONFIG_H_\n#define _POLOLU_CONFIG_H_\n\n\n#define ENCODER_CPR\t\t12\n#define GEAR_RATIO_75_1\t\t75.81\n#define GEAR_RATIO_50_1\t\t51.45\n\n#define WHEEL_3PI\t\t32\n#define WHEEL_ZUMO\t\t35\n#define WHEEL_BALBOA\t\t80\n#define WHEEL_ROMI\t\t70\n\n\n#endif /* _POLOLU_CONFIG_H_ */\n"}
| 81,216
|
c
|
#ifndef PLAYER_OBJECT_MODULE_H
#define PLAYER_OBJECT_MODULE_H
#include "player_object.h"
#endif
| 23
| 4
|
(translation_unit) "#ifndef PLAYER_OBJECT_MODULE_H\n#define PLAYER_OBJECT_MODULE_H\n\n#include "player_object.h"\n\n#endif\n"
(preproc_ifdef) "#ifndef PLAYER_OBJECT_MODULE_H\n#define PLAYER_OBJECT_MODULE_H\n\n#include "player_object.h"\n\n#endif"
(#ifndef) "#ifndef"
(identifier) "PLAYER_OBJECT_MODULE_H"
(preproc_def) "#define PLAYER_OBJECT_MODULE_H\n"
(#define) "#define"
(identifier) "PLAYER_OBJECT_MODULE_H"
(preproc_include) "#include "player_object.h"\n"
(#include) "#include"
(string_literal) ""player_object.h""
(") """
(string_content) "player_object.h"
(") """
(#endif) "#endif"
| 14
| 0
|
{"language": "c", "success": true, "metadata": {"lines": 4, "avg_line_length": 23.0, "nodes": 10, "errors": 0, "source_hash": "a18f87aa65c33cb2bf5865722605d345e009d21eb99d502b60e112d44e4a6eaf", "categorized_nodes": 8}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef PLAYER_OBJECT_MODULE_H\n#define PLAYER_OBJECT_MODULE_H\n\n#include \"player_object.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": "PLAYER_OBJECT_MODULE_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 30}}, {"id": 3, "type": "preproc_def", "text": "#define PLAYER_OBJECT_MODULE_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": "PLAYER_OBJECT_MODULE_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 30}}, {"id": 6, "type": "preproc_include", "text": "#include \"player_object.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": "\"player_object.h\"", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 26}}, {"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 \"player_object.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#ifndef PLAYER_OBJECT_MODULE_H\n#define PLAYER_OBJECT_MODULE_H\n\n#include \"player_object.h\"\n\n#endif\n"}
| 81,217
|
c
|
//
// LZBadgeButton.h
// Pods
//
// Created by Dear.Q on 16/8/12.
//
//
#import <UIKit/UIKit.h>
@interface LZLoadingButton : UIView
/** 标题样式 */
@property (nonatomic, copy) NSAttributedString *attributedTitle;
/** 边框颜色,默认 [UIColor blackColor] */
@property (nonatomic, strong) UIColor *shapeColor;
/** 点击圆圈颜色,默认 [UIColor blackColor] */
@property (nonatomic, strong) UIColor *circleColor;
/** 遮盖颜色,默认 [UIColor blackColor] */
@property (nonatomic, strong) UIColor *maskColor;
/** 加载颜色,默认 [UIColor blackColor] */
@property (nonatomic, strong) UIColor *loadColor;
/** 最短动画时间,默认 0 不限制 */
@property (nonatomic, assign) NSTimeInterval minAnimationTime;
/**
实例方法
@param title NSAttributedString
@param shapColor 边框颜色
@param frame Frame
@return LZButton
*/
- (instancetype)initWithTitle:(NSAttributedString *)title
shapColor:(UIColor *)shapColor
frame:(CGRect)frame;
/**
添加点击事件
@param target Target
@param action SEL
*/
- (void)addTarget:(id)target
action:(SEL)action;
/**
结束动画
*/
- (void)animationFinish;
@end
| 23.84
| 44
|
(ERROR) "//\n// LZBadgeButton.h\n// Pods\n//\n// Created by Dear.Q on 16/8/12.\n//\n//\n\n#import <UIKit/UIKit.h>\n\n@interface LZLoadingButton : UIView\n\n/** 标题样式 */\n@property (nonatomic, copy) NSAttributedString *attributedTitle;\n/** 边框颜色,默认 [UIColor blackColor] */\n@property (nonatomic, strong) UIColor *shapeColor;\n/** 点击圆圈颜色,默认 [UIColor blackColor] */\n@property (nonatomic, strong) UIColor *circleColor;\n/** 遮盖颜色,默认 [UIColor blackColor] */\n@property (nonatomic, strong) UIColor *maskColor;\n/** 加载颜色,默认 [UIColor blackColor] */\n@property (nonatomic, strong) UIColor *loadColor;\n/** 最短动画时间,默认 0 不限制 */\n@property (nonatomic, assign) NSTimeInterval minAnimationTime;\n\n\n/**\n 实例方法\n\n @param title NSAttributedString\n @param shapColor 边框颜色\n @param frame Frame\n\n @return LZButton\n */\n- (instancetype)initWithTitle:(NSAttributedString *)title\n shapColor:(UIColor *)shapColor\n frame:(CGRect)frame;\n\n/**\n 添加点击事件\n\n @param target Target\n @param action SEL\n */\n- (void)addTarget:(id)target\n action:(SEL)action;\n\n/**\n 结束动画\n */\n- (void)animationFinish;\n\n@end\n"
(comment) "//"
(comment) "// LZBadgeButton.h"
(comment) "// Pods"
(comment) "//"
(comment) "// Created by Dear.Q on 16/8/12."
(comment) "//"
(comment) "//"
(preproc_call) "#import <UIKit/UIKit.h>\n"
(preproc_directive) "#import"
(preproc_arg) "<UIKit/UIKit.h>"
(ERROR) "@"
(ERROR) "@"
(type_identifier) "interface"
(ERROR) "LZLoadingButton : UIView\n\n/** 标题样式 */\n@property"
(identifier) "LZLoadingButton"
(:) ":"
(identifier) "UIView"
(comment) "/** 标题样式 */\n@proper"
(ERROR) "y"
(function_declarator) " (nonatomic, copy) NSAttri"
(identifier) " (nonato"
(parameter_list) "ic, copy) NSAttri"
(() "i"
(identifier) "c, copy) "
(,) "N"
(identifier) "Attr"
()) "i"
(declaration) "utedString *attributedTitle;\n/** 边框颜"
(type_identifier) "utedString *attrib"
(pointer_declarator) "tedTitle;\n/** 边框"
(*) "t"
(identifier) "edTitle;\n/** 边框"
(;) "颜"
(comment) ",默认 [UIColor blackColor] */\n@property (nonatomic,"
(ERROR) "s"
(ERROR) "s"
(declaration) "trong) UIColor *shapeColor;\n/** 点击圆圈颜色,默认 [UIColo"
(macro_type_specifier) "trong) UIColor *shapeColor;\n"
(identifier) "trong) U"
(() "C"
(type_descriptor) "olor *sha"
(type_identifier) "olor *sha"
(ERROR) "peColor;"
(,) "p"
(identifier) "Color;"
()) "\n"
(ERROR) "** 点击圆圈"
(identifier) "** 点击圆圈"
(pointer_declarator) "色,默认 [UICol"
(*) "色"
(identifier) ",默认 [UICol"
(;) "o"
(comment) " blackColor] */\n@property (nonatomic, strong) UIColor *"
(ERROR) "i"
(ERROR) "i"
(declaration) "rcleColor;\n/** 遮盖颜色,默认 [UIColor blackColor] */\n@pr"
(macro_type_specifier) "rcleColor;\n/** 遮盖颜色,默认 [UICo"
(identifier) "rcleColo"
(() ";"
(type_descriptor) "\n/** 遮盖颜色"
(type_identifier) "\n/** 遮盖颜色"
(ERROR) ",默认 [UIC"
(,) ","
(identifier) "认 [UIC"
()) "o"
(ERROR) "or blac"
(identifier) "or blac"
(pointer_declarator) "Color] */\n@p"
(*) "C"
(identifier) "olor] */\n@p"
(;) "r"
(comment) "perty (nonatomic, strong) UIColor *maskColor;\n/**"
(ERROR) "加"
(ERROR) "加"
(declaration) "载颜色,默认 [UIColor blackColor] */\n@property (nonato"
(macro_type_specifier) "载颜色,默认 [UIColor blackColor] "
(identifier) "载颜色,默认 ["
(() "I"
(type_descriptor) "Color bla"
(type_identifier) "Color bla"
(ERROR) "ckColor]"
(,) "c"
(identifier) "Color]"
()) " "
(ERROR) "/\n@prop"
(identifier) "/\n@prop"
(pointer_declarator) "rty (nonat"
(*) "r"
(identifier) "ty (nonat"
(;) "o"
(comment) "ic, strong) UIColor *loadColor;\n/** 最短动画时间,默认 0 不"
(ERROR) "制"
(ERROR) "制"
(declaration) " */\n@property (nonatomic, assign) NSTimeInterval"
(macro_type_specifier) " */\n@property (nonatomic, as"
(identifier) " */\n@pro"
(() "e"
(type_descriptor) "rty (nona"
(type_identifier) "rty (nona"
(ERROR) "tomic, a"
(,) "t"
(identifier) "mic, a"
()) "s"
(ERROR) "ign) NS"
(identifier) "ign) NS"
(pointer_declarator) "imeInterva"
(*) "i"
(identifier) "meInterva"
(;) "l"
(comment) "minAnimationTime;\n\n\n/**\n 实例方法\n\n @param title "
(ERROR) "N"
(ERROR) "N"
(declaration) "SAttributedString\n @param shapColor 边框颜色\n @param frame "
(macro_type_specifier) "SAttributedString\n @param sh"
(identifier) "SAttribu"
(() "e"
(type_descriptor) "dString\n "
(type_identifier) "dString\n "
(ERROR) "@param s"
(,) "@"
(identifier) "aram s"
()) "h"
(ERROR) "pColor 边框颜色\n "
(identifier) "pColor 边框颜色\n "
(identifier) "param frame "
(;) " "
(comment) "ame\n\n @return LZButton\n */\n- (instancetype)initWithTitle:(NSAttributedString *)title\n shapColor:(UIColor *)shapColor"
(ERROR) " "
(-) " "
(() " "
(declaration) " frame:(CGRect)frame;\n\n/**\n 添加点击事件\n\n @param target Target\n @param action SEL\n */\n- (void)addTarget:(id)target\n "
(type_identifier) " "
(ERROR) " frame:(CGRect)frame;\n\n/**\n 添加点击事件\n\n @param target Target\n @param action SEL\n */\n- (void)addTarget:(id)target"
()) " "
(identifier) " frame"
(:) ":"
(() "("
(identifier) "CGRect)frame;\n\n/**"
(*) " "
()) "添"
(identifier) "加点击事件"
(identifier) " Targe"
(:) "t"
(() "\n"
(identifier) " @param"
(*) "a"
()) "c"
(identifier) "tion "
(identifier) "get:("
(:) "i"
(() "d"
(identifier) ")targe"
()) "t"
(identifier) "\n "
(;) " "
(comment) " action:(SEL)action;\n\n/**\n 结束动画\n */\n- (void)animationFinish;\n\n@end\n"
(ERROR) ""
(-) ""
(() ""
(primitive_type) ""
(ERROR) ""
()) ""
(identifier) ""
(:) ""
(() ""
(identifier) ""
()) ""
(identifier) ""
(identifier) ""
(:) ""
(() ""
(identifier) ""
()) ""
(identifier) ""
(;) ""
(comment) ""
(-) ""
(() ""
(primitive_type) ""
()) ""
(identifier) ""
(;) ""
(ERROR) ""
(identifier) ""
| 185
| 30
|
{"language": "c", "success": true, "metadata": {"lines": 44, "avg_line_length": 23.84, "nodes": 120, "errors": 0, "source_hash": "d430a795627cddd0a01ccdf1b8328c18872989fe95631ad985987f92f2a069bb", "categorized_nodes": 65}, "ast": {"root": "ERROR", "nodes": [{"id": 0, "type": "ERROR", "text": "//\n// LZBadgeButton.h\n// Pods\n//\n// Created by Dear.Q on 16/8/12.\n//\n//\n\n#import <UIKit/UIKit.h>\n\n@interface LZLoadingButton : UIView\n\n/** \u6807\u9898\u6837\u5f0f */\n@property (nonatomic, copy) NSAttributedString *attributedTitle;\n/** \u8fb9\u6846\u989c\u8272\uff0c\u9ed8\u8ba4 [UIColor blackColor] */\n@property (nonatomic, strong) UIColor *shapeColor;\n/** \u70b9\u51fb\u5706\u5708\u989c\u8272\uff0c\u9ed8\u8ba4 [UIColor blackColor] */\n@property (nonatomic, strong) UIColor *circleColor;\n/** \u906e\u76d6\u989c\u8272\uff0c\u9ed8\u8ba4 [UIColor blackColor] */\n@property (nonatomic, strong) UIColor *maskColor;\n/** \u52a0\u8f7d\u989c\u8272\uff0c\u9ed8\u8ba4 [UIColor blackColor] */\n@property (nonatomic, strong) UIColor *loadColor;\n/** \u6700\u77ed\u52a8\u753b\u65f6\u95f4\uff0c\u9ed8\u8ba4 0 \u4e0d\u9650\u5236 */\n@property (nonatomic, assign) NSTimeInterval minAnimationTime;\n\n\n/**\n \u5b9e\u4f8b\u65b9\u6cd5\n\n @param title \t\tNSAttributedString\n @param shapColor \t\u8fb9\u6846\u989c\u8272\n @param frame Frame\n\n @return LZButton\n */\n- (instancetype)initWithTitle:(NSAttributedString *)title\n \tshapColor:(UIColor *)shapColor\n frame:(CGRect)frame;\n\n/**\n \u6dfb\u52a0\u70b9\u51fb\u4e8b\u4ef6\n\n @param target Target\n @param action SEL\n */\n- (void)addTarget:(id)target\n action:(SEL)action;\n\n/**\n \u7ed3\u675f\u52a8\u753b\n */\n- (void)animationFinish;\n\n@end\n", "parent": null, "children": [1, 4, 6, 7, 11, 16, 21, 23, 35, 37, 49, 51, 63, 65, 77, 79, 89, 91, 105, 107, 108, 111, 112, 113, 114, 115, 116, 117, 118, 119], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 54, "column": 0}}, {"id": 1, "type": "preproc_call", "text": "#import <UIKit/UIKit.h>\n", "parent": 0, "children": [2, 3], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 2, "type": "preproc_directive", "text": "#import", "parent": 1, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 3, "type": "preproc_arg", "text": "<UIKit/UIKit.h>", "parent": 1, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 23}}, {"id": 4, "type": "ERROR", "text": "@", "parent": 0, "children": [5], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 5, "type": "ERROR", "text": "@", "parent": 4, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 6, "type": "type_identifier", "text": "interface", "parent": 0, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 10}}, {"id": 7, "type": "ERROR", "text": "LZLoadingButton : UIView\n\n/** \u6807\u9898\u6837\u5f0f */\n@property", "parent": 0, "children": [8, 9, 10], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 13, "column": 1}}, {"id": 8, "type": "identifier", "text": "LZLoadingButton", "parent": 7, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 26}}, {"id": 9, "type": "identifier", "text": "UIView", "parent": 7, "children": [], "start_point": {"row": 10, "column": 29}, "end_point": {"row": 10, "column": 35}}, {"id": 10, "type": "ERROR", "text": "y", "parent": 7, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 11, "type": "function_declarator", "text": " (nonatomic, copy) NSAttri", "parent": 0, "children": [12, 13], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 27}}, {"id": 12, "type": "identifier", "text": " (nonato", "parent": 11, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 9}}, {"id": 13, "type": "parameter_list", "text": "ic, copy) NSAttri", "parent": 11, "children": [14, 15], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 27}}, {"id": 14, "type": "identifier", "text": "c, copy) ", "parent": 13, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 20}}, {"id": 15, "type": "identifier", "text": "Attr", "parent": 13, "children": [], "start_point": {"row": 13, "column": 22}, "end_point": {"row": 13, "column": 26}}, {"id": 16, "type": "declaration", "text": "utedString *attributedTitle;\n/** \u8fb9\u6846\u989c", "parent": 0, "children": [17, 18], "start_point": {"row": 13, "column": 28}, "end_point": {"row": 13, "column": 64}}, {"id": 17, "type": "type_identifier", "text": "utedString *attrib", "parent": 16, "children": [], "start_point": {"row": 13, "column": 28}, "end_point": {"row": 13, "column": 46}}, {"id": 18, "type": "pointer_declarator", "text": "tedTitle;\n/** \u8fb9\u6846", "parent": 16, "children": [19, 20], "start_point": {"row": 13, "column": 47}, "end_point": {"row": 13, "column": 63}}, {"id": 19, "type": "*", "text": "t", "parent": 18, "children": [], "start_point": {"row": 13, "column": 47}, "end_point": {"row": 13, "column": 48}}, {"id": 20, "type": "identifier", "text": "edTitle;\n/** \u8fb9\u6846", "parent": 18, "children": [], "start_point": {"row": 13, "column": 48}, "end_point": {"row": 13, "column": 63}}, {"id": 21, "type": "ERROR", "text": "s", "parent": 0, "children": [22], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 22, "type": "ERROR", "text": "s", "parent": 21, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 23, "type": "declaration", "text": "trong) UIColor *shapeColor;\n/** \u70b9\u51fb\u5706\u5708\u989c\u8272\uff0c\u9ed8\u8ba4 [UIColo", "parent": 0, "children": [24, 30, 32], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 50}}, {"id": 24, "type": "macro_type_specifier", "text": "trong) UIColor *shapeColor;\n", "parent": 23, "children": [25, 26, 28], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 29}}, {"id": 25, "type": "identifier", "text": "trong) U", "parent": 24, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 9}}, {"id": 26, "type": "type_descriptor", "text": "olor *sha", "parent": 24, "children": [27], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 20}}, {"id": 27, "type": "type_identifier", "text": "olor *sha", "parent": 26, "children": [], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 20}}, {"id": 28, "type": "ERROR", "text": "peColor;", "parent": 24, "children": [29], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 28}}, {"id": 29, "type": "identifier", "text": "Color;", "parent": 28, "children": [], "start_point": {"row": 15, "column": 22}, "end_point": {"row": 15, "column": 28}}, {"id": 30, "type": "ERROR", "text": "** \u70b9\u51fb\u5706\u5708", "parent": 23, "children": [31], "start_point": {"row": 15, "column": 30}, "end_point": {"row": 15, "column": 37}}, {"id": 31, "type": "identifier", "text": "** \u70b9\u51fb\u5706\u5708", "parent": 30, "children": [], "start_point": {"row": 15, "column": 30}, "end_point": {"row": 15, "column": 37}}, {"id": 32, "type": "pointer_declarator", "text": "\u8272\uff0c\u9ed8\u8ba4 [UICol", "parent": 23, "children": [33, 34], "start_point": {"row": 15, "column": 38}, "end_point": {"row": 15, "column": 49}}, {"id": 33, "type": "*", "text": "\u8272", "parent": 32, "children": [], "start_point": {"row": 15, "column": 38}, "end_point": {"row": 15, "column": 39}}, {"id": 34, "type": "identifier", "text": "\uff0c\u9ed8\u8ba4 [UICol", "parent": 32, "children": [], "start_point": {"row": 15, "column": 39}, "end_point": {"row": 15, "column": 49}}, {"id": 35, "type": "ERROR", "text": "i", "parent": 0, "children": [36], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 36, "type": "ERROR", "text": "i", "parent": 35, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 37, "type": "declaration", "text": "rcleColor;\n/** \u906e\u76d6\u989c\u8272\uff0c\u9ed8\u8ba4 [UIColor blackColor] */\n@pr", "parent": 0, "children": [38, 44, 46], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 51}}, {"id": 38, "type": "macro_type_specifier", "text": "rcleColor;\n/** \u906e\u76d6\u989c\u8272\uff0c\u9ed8\u8ba4 [UICo", "parent": 37, "children": [39, 40, 42], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 29}}, {"id": 39, "type": "identifier", "text": "rcleColo", "parent": 38, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 9}}, {"id": 40, "type": "type_descriptor", "text": "\n/** \u906e\u76d6\u989c\u8272", "parent": 38, "children": [41], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 20}}, {"id": 41, "type": "type_identifier", "text": "\n/** \u906e\u76d6\u989c\u8272", "parent": 40, "children": [], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 20}}, {"id": 42, "type": "ERROR", "text": "\uff0c\u9ed8\u8ba4 [UIC", "parent": 38, "children": [43], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 28}}, {"id": 43, "type": "identifier", "text": "\u8ba4 [UIC", "parent": 42, "children": [], "start_point": {"row": 17, "column": 22}, "end_point": {"row": 17, "column": 28}}, {"id": 44, "type": "ERROR", "text": "or blac", "parent": 37, "children": [45], "start_point": {"row": 17, "column": 30}, "end_point": {"row": 17, "column": 37}}, {"id": 45, "type": "identifier", "text": "or blac", "parent": 44, "children": [], "start_point": {"row": 17, "column": 30}, "end_point": {"row": 17, "column": 37}}, {"id": 46, "type": "pointer_declarator", "text": "Color] */\n@p", "parent": 37, "children": [47, 48], "start_point": {"row": 17, "column": 38}, "end_point": {"row": 17, "column": 50}}, {"id": 47, "type": "*", "text": "C", "parent": 46, "children": [], "start_point": {"row": 17, "column": 38}, "end_point": {"row": 17, "column": 39}}, {"id": 48, "type": "identifier", "text": "olor] */\n@p", "parent": 46, "children": [], "start_point": {"row": 17, "column": 39}, "end_point": {"row": 17, "column": 50}}, {"id": 49, "type": "ERROR", "text": "\u52a0", "parent": 0, "children": [50], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 50, "type": "ERROR", "text": "\u52a0", "parent": 49, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 51, "type": "declaration", "text": "\u8f7d\u989c\u8272\uff0c\u9ed8\u8ba4 [UIColor blackColor] */\n@property (nonato", "parent": 0, "children": [52, 58, 60], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 49}}, {"id": 52, "type": "macro_type_specifier", "text": "\u8f7d\u989c\u8272\uff0c\u9ed8\u8ba4 [UIColor blackColor] ", "parent": 51, "children": [53, 54, 56], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 29}}, {"id": 53, "type": "identifier", "text": "\u8f7d\u989c\u8272\uff0c\u9ed8\u8ba4 [", "parent": 52, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 9}}, {"id": 54, "type": "type_descriptor", "text": "Color bla", "parent": 52, "children": [55], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 20}}, {"id": 55, "type": "type_identifier", "text": "Color bla", "parent": 54, "children": [], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 20}}, {"id": 56, "type": "ERROR", "text": "ckColor]", "parent": 52, "children": [57], "start_point": {"row": 19, "column": 20}, "end_point": {"row": 19, "column": 28}}, {"id": 57, "type": "identifier", "text": "Color]", "parent": 56, "children": [], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 28}}, {"id": 58, "type": "ERROR", "text": "/\n@prop", "parent": 51, "children": [59], "start_point": {"row": 19, "column": 30}, "end_point": {"row": 19, "column": 37}}, {"id": 59, "type": "identifier", "text": "/\n@prop", "parent": 58, "children": [], "start_point": {"row": 19, "column": 30}, "end_point": {"row": 19, "column": 37}}, {"id": 60, "type": "pointer_declarator", "text": "rty (nonat", "parent": 51, "children": [61, 62], "start_point": {"row": 19, "column": 38}, "end_point": {"row": 19, "column": 48}}, {"id": 61, "type": "*", "text": "r", "parent": 60, "children": [], "start_point": {"row": 19, "column": 38}, "end_point": {"row": 19, "column": 39}}, {"id": 62, "type": "identifier", "text": "ty (nonat", "parent": 60, "children": [], "start_point": {"row": 19, "column": 39}, "end_point": {"row": 19, "column": 48}}, {"id": 63, "type": "ERROR", "text": "\u5236", "parent": 0, "children": [64], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 64, "type": "ERROR", "text": "\u5236", "parent": 63, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 65, "type": "declaration", "text": " */\n@property (nonatomic, assign) NSTimeInterval", "parent": 0, "children": [66, 72, 74], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 49}}, {"id": 66, "type": "macro_type_specifier", "text": " */\n@property (nonatomic, as", "parent": 65, "children": [67, 68, 70], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 29}}, {"id": 67, "type": "identifier", "text": " */\n@pro", "parent": 66, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 9}}, {"id": 68, "type": "type_descriptor", "text": "rty (nona", "parent": 66, "children": [69], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 20}}, {"id": 69, "type": "type_identifier", "text": "rty (nona", "parent": 68, "children": [], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 20}}, {"id": 70, "type": "ERROR", "text": "tomic, a", "parent": 66, "children": [71], "start_point": {"row": 21, "column": 20}, "end_point": {"row": 21, "column": 28}}, {"id": 71, "type": "identifier", "text": "mic, a", "parent": 70, "children": [], "start_point": {"row": 21, "column": 22}, "end_point": {"row": 21, "column": 28}}, {"id": 72, "type": "ERROR", "text": "ign) NS", "parent": 65, "children": [73], "start_point": {"row": 21, "column": 30}, "end_point": {"row": 21, "column": 37}}, {"id": 73, "type": "identifier", "text": "ign) NS", "parent": 72, "children": [], "start_point": {"row": 21, "column": 30}, "end_point": {"row": 21, "column": 37}}, {"id": 74, "type": "pointer_declarator", "text": "imeInterva", "parent": 65, "children": [75, 76], "start_point": {"row": 21, "column": 38}, "end_point": {"row": 21, "column": 48}}, {"id": 75, "type": "*", "text": "i", "parent": 74, "children": [], "start_point": {"row": 21, "column": 38}, "end_point": {"row": 21, "column": 39}}, {"id": 76, "type": "identifier", "text": "meInterva", "parent": 74, "children": [], "start_point": {"row": 21, "column": 39}, "end_point": {"row": 21, "column": 48}}, {"id": 77, "type": "ERROR", "text": "N", "parent": 0, "children": [78], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 78, "type": "ERROR", "text": "N", "parent": 77, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 79, "type": "declaration", "text": "SAttributedString\n @param shapColor \t\u8fb9\u6846\u989c\u8272\n @param frame ", "parent": 0, "children": [80, 86, 88], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 62}}, {"id": 80, "type": "macro_type_specifier", "text": "SAttributedString\n @param sh", "parent": 79, "children": [81, 82, 84], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 29}}, {"id": 81, "type": "identifier", "text": "SAttribu", "parent": 80, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 9}}, {"id": 82, "type": "type_descriptor", "text": "dString\n ", "parent": 80, "children": [83], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 20}}, {"id": 83, "type": "type_identifier", "text": "dString\n ", "parent": 82, "children": [], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 20}}, {"id": 84, "type": "ERROR", "text": "@param s", "parent": 80, "children": [85], "start_point": {"row": 23, "column": 20}, "end_point": {"row": 23, "column": 28}}, {"id": 85, "type": "identifier", "text": "aram s", "parent": 84, "children": [], "start_point": {"row": 23, "column": 22}, "end_point": {"row": 23, "column": 28}}, {"id": 86, "type": "ERROR", "text": "pColor \t\u8fb9\u6846\u989c\u8272\n ", "parent": 79, "children": [87], "start_point": {"row": 23, "column": 30}, "end_point": {"row": 23, "column": 44}}, {"id": 87, "type": "identifier", "text": "pColor \t\u8fb9\u6846\u989c\u8272\n ", "parent": 86, "children": [], "start_point": {"row": 23, "column": 30}, "end_point": {"row": 23, "column": 44}}, {"id": 88, "type": "identifier", "text": "param frame ", "parent": 79, "children": [], "start_point": {"row": 23, "column": 45}, "end_point": {"row": 23, "column": 61}}, {"id": 89, "type": "ERROR", "text": " ", "parent": 0, "children": [90], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 3}}, {"id": 90, "type": "-", "text": " ", "parent": 89, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 1}}, {"id": 91, "type": "declaration", "text": " frame:(CGRect)frame;\n\n/**\n \u6dfb\u52a0\u70b9\u51fb\u4e8b\u4ef6\n\n @param target Target\n @param action SEL\n */\n- (void)addTarget:(id)target\n ", "parent": 0, "children": [92, 93, 104], "start_point": {"row": 35, "column": 3}, "end_point": {"row": 37, "column": 44}}, {"id": 92, "type": "type_identifier", "text": " ", "parent": 91, "children": [], "start_point": {"row": 35, "column": 3}, "end_point": {"row": 35, "column": 15}}, {"id": 93, "type": "ERROR", "text": " frame:(CGRect)frame;\n\n/**\n \u6dfb\u52a0\u70b9\u51fb\u4e8b\u4ef6\n\n @param target Target\n @param action SEL\n */\n- (void)addTarget:(id)target", "parent": 91, "children": [94, 95, 96, 97, 98, 99, 100, 101, 102, 103], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 37, "column": 38}}, {"id": 94, "type": "identifier", "text": " frame", "parent": 93, "children": [], "start_point": {"row": 35, "column": 16}, "end_point": {"row": 35, "column": 29}}, {"id": 95, "type": "identifier", "text": "CGRect)frame;\n\n/**", "parent": 93, "children": [], "start_point": {"row": 35, "column": 31}, "end_point": {"row": 35, "column": 49}}, {"id": 96, "type": "*", "text": " ", "parent": 93, "children": [], "start_point": {"row": 35, "column": 50}, "end_point": {"row": 35, "column": 51}}, {"id": 97, "type": "identifier", "text": "\u52a0\u70b9\u51fb\u4e8b\u4ef6", "parent": 93, "children": [], "start_point": {"row": 35, "column": 52}, "end_point": {"row": 35, "column": 57}}, {"id": 98, "type": "identifier", "text": " Targe", "parent": 93, "children": [], "start_point": {"row": 36, "column": 19}, "end_point": {"row": 36, "column": 28}}, {"id": 99, "type": "identifier", "text": " @param", "parent": 93, "children": [], "start_point": {"row": 36, "column": 30}, "end_point": {"row": 36, "column": 37}}, {"id": 100, "type": "*", "text": "a", "parent": 93, "children": [], "start_point": {"row": 36, "column": 38}, "end_point": {"row": 36, "column": 39}}, {"id": 101, "type": "identifier", "text": "tion ", "parent": 93, "children": [], "start_point": {"row": 36, "column": 40}, "end_point": {"row": 36, "column": 49}}, {"id": 102, "type": "identifier", "text": "get:(", "parent": 93, "children": [], "start_point": {"row": 37, "column": 24}, "end_point": {"row": 37, "column": 29}}, {"id": 103, "type": "identifier", "text": ")targe", "parent": 93, "children": [], "start_point": {"row": 37, "column": 31}, "end_point": {"row": 37, "column": 37}}, {"id": 104, "type": "identifier", "text": "\n ", "parent": 91, "children": [], "start_point": {"row": 37, "column": 38}, "end_point": {"row": 37, "column": 43}}, {"id": 105, "type": "ERROR", "text": "", "parent": 0, "children": [106], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 3}}, {"id": 106, "type": "-", "text": "", "parent": 105, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 1}}, {"id": 107, "type": "primitive_type", "text": "", "parent": 0, "children": [], "start_point": {"row": 45, "column": 3}, "end_point": {"row": 45, "column": 7}}, {"id": 108, "type": "ERROR", "text": "", "parent": 0, "children": [109, 110], "start_point": {"row": 45, "column": 7}, "end_point": {"row": 45, "column": 22}}, {"id": 109, "type": "identifier", "text": "", "parent": 108, "children": [], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 17}}, {"id": 110, "type": "identifier", "text": "", "parent": 108, "children": [], "start_point": {"row": 45, "column": 19}, "end_point": {"row": 45, "column": 21}}, {"id": 111, "type": "identifier", "text": "", "parent": 0, "children": [], "start_point": {"row": 45, "column": 22}, "end_point": {"row": 45, "column": 28}}, {"id": 112, "type": "identifier", "text": "", "parent": 0, "children": [], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 17}}, {"id": 113, "type": "identifier", "text": "", "parent": 0, "children": [], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 22}}, {"id": 114, "type": "identifier", "text": "", "parent": 0, "children": [], "start_point": {"row": 46, "column": 23}, "end_point": {"row": 46, "column": 29}}, {"id": 115, "type": "-", "text": "", "parent": 0, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 1}}, {"id": 116, "type": "primitive_type", "text": "", "parent": 0, "children": [], "start_point": {"row": 51, "column": 3}, "end_point": {"row": 51, "column": 7}}, {"id": 117, "type": "identifier", "text": "", "parent": 0, "children": [], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 23}}, {"id": 118, "type": "ERROR", "text": "", "parent": 0, "children": [], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 1}}, {"id": 119, "type": "identifier", "text": "", "parent": 0, "children": [], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 4}}]}, "node_categories": {"declarations": {"functions": [11], "variables": [16, 23, 37, 51, 65, 79, 91], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [6, 8, 9, 12, 14, 15, 17, 20, 24, 25, 27, 29, 31, 34, 38, 39, 41, 43, 45, 48, 52, 53, 55, 57, 59, 62, 66, 67, 69, 71, 73, 76, 80, 81, 83, 85, 87, 88, 92, 94, 95, 97, 98, 99, 101, 102, 103, 104, 109, 110, 111, 112, 113, 114, 117, 119], "returns": [], "exceptions": []}, "expressions": {"calls": [1], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 11, "universal_type": "function", "name": "unknown", "text_snippet": " (nonatomic, copy) NSAttri"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// LZBadgeButton.h\n// Pods\n//\n// Created by Dear.Q on 16/8/12.\n//\n//\n\n#import <UIKit/UIKit.h>\n\n@interface LZLoadingButton : UIView\n\n/** \u6807\u9898\u6837\u5f0f */\n@property (nonatomic, copy) NSAttributedString *attributedTitle;\n/** \u8fb9\u6846\u989c\u8272\uff0c\u9ed8\u8ba4 [UIColor blackColor] */\n@property (nonatomic, strong) UIColor *shapeColor;\n/** \u70b9\u51fb\u5706\u5708\u989c\u8272\uff0c\u9ed8\u8ba4 [UIColor blackColor] */\n@property (nonatomic, strong) UIColor *circleColor;\n/** \u906e\u76d6\u989c\u8272\uff0c\u9ed8\u8ba4 [UIColor blackColor] */\n@property (nonatomic, strong) UIColor *maskColor;\n/** \u52a0\u8f7d\u989c\u8272\uff0c\u9ed8\u8ba4 [UIColor blackColor] */\n@property (nonatomic, strong) UIColor *loadColor;\n/** \u6700\u77ed\u52a8\u753b\u65f6\u95f4\uff0c\u9ed8\u8ba4 0 \u4e0d\u9650\u5236 */\n@property (nonatomic, assign) NSTimeInterval minAnimationTime;\n\n\n/**\n \u5b9e\u4f8b\u65b9\u6cd5\n\n @param title \t\tNSAttributedString\n @param shapColor \t\u8fb9\u6846\u989c\u8272\n @param frame Frame\n\n @return LZButton\n */\n- (instancetype)initWithTitle:(NSAttributedString *)title\n \tshapColor:(UIColor *)shapColor\n frame:(CGRect)frame;\n\n/**\n \u6dfb\u52a0\u70b9\u51fb\u4e8b\u4ef6\n\n @param target Target\n @param action SEL\n */\n- (void)addTarget:(id)target\n action:(SEL)action;\n\n/**\n \u7ed3\u675f\u52a8\u753b\n */\n- (void)animationFinish;\n\n@end\n"}
| 81,218
|
c
|
/*
-Procedure spkuds_c ( SPK - unpack segment descriptor )
-Abstract
Unpack the contents of an SPK segment descriptor.
-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
SPK
-Keywords
SPK
*/
#include "SpiceUsr.h"
#include "SpiceZfc.h"
#include "SpiceZim.h"
#undef spkuds_c
void spkuds_c ( ConstSpiceDouble descr [5],
SpiceInt * body,
SpiceInt * center,
SpiceInt * frame,
SpiceInt * type,
SpiceDouble * first,
SpiceDouble * last,
SpiceInt * baddrs,
SpiceInt * eaddrs )
/*
-Brief_I/O
VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
descr I An SPK segment descriptor.
body O The NAIF ID code for the body of the segment.
center O The center of motion for `body'.
frame O The code for the frame of this segment.
type O The type of SPK segment.
first O The first epoch for which the segment is valid.
last O The last epoch for which the segment is valid.
baddrs O Beginning DAF address of the segment.
eaddrs O Ending DAF address of the segment.
-Detailed_Input
descr is an SPK segment descriptor.
-Detailed_Output
body is the NAIF ID code for the body of the segment.
center is the center of motion for `body'.
frame is the SPICE integer code for the frame to which states
for the body are be referenced.
type is the type of SPK segment.
first is the first epoch for which the segment has
ephemeris data.
last is the last epoch for which the segment has
ephemeris data.
baddrs is the starting address of the data associated
with this descriptor.
eaddrs is the last address of the data associated with
this descriptor.
-Parameters
None.
-Exceptions
Error free.
1) If the input descriptor `descr' is invalid, it's possible for
the output times to contain bit patterns that don't represent
normal double precision values. This error is not diagnosed.
-Files
None.
-Particulars
This routine extracts the contents of an SPK segment
descriptor into the components needed for reading and
evaluating the data stored in the segment. It serves
as a macro for expanding the SPK segment descriptor.
-Examples
Suppose you wished to summarize a particular SPK segment
and that you have the descriptor for that segment in hand.
The following code fragment shows how you might use this
routine to create a summary message concerning the segment.
#include <stdio.h>
#include "SpiceUsr.h"
#define TIMLEN 35
.
.
.
spkuds_c ( descr, &body, ¢er, &frame,
&type, &first, &last, &baddr, &eaddr );
/.
Convert the start and stop times to TDB calendar strings.
./
etcal_c ( first, TIMLEN, fstcal );
etcal_c ( last, TIMLEN, lstcal );
printf ( "\n"
"Body : %d\n"
"Center : %d\n"
"Frame ID : %d\n"
"Data Type: %d\n"
"\n"
"Segment Start : %s\n"
"Segment Stop : %s\n",
body,
center,
frame,
type,
fstcal,
lstcal );
-Restrictions
None.
-Literature_References
None.
-Author_and_Institution
<NAME> (JPL)
<NAME> (ODC Space)
<NAME> (JPL)
<NAME> (JPL)
-Version
-CSPICE Version 1.2.0, 17-JUN-2021 (JDR)
Changed the output argument names "begin" and "end" to "baddrs" and
"eaddrs" for consistency with other routines.
Edited the header to comply with NAIF standard. Added -Exceptions
section.
-CSPICE Version 1.1.0, 24-JUL-2001 (NJB)
Changed prototype: input descr is now type (ConstSpiceDouble *).
Implemented interface macro for casting input descr to const.
-CSPICE Version 1.0.0, 22-JUL-1999 (NJB) (WLT) (KRG)
-Index_Entries
Unpack and SPK segment descriptor
-&
*/
{ /* Begin spkuds_c */
/*
Participate in error tracing.
*/
chkin_c ( "spkuds_c" );
spkuds_ ( ( doublereal * ) descr,
( integer * ) body,
( integer * ) center,
( integer * ) frame,
( integer * ) type,
( doublereal * ) first,
( doublereal * ) last,
( integer * ) baddrs,
( integer * ) eaddrs );
chkout_c ( "spkuds_c" );
} /* End spkuds_c */
| 37.27
| 161
|
(translation_unit) "/*\n\n-Procedure spkuds_c ( SPK - unpack segment descriptor )\n\n-Abstract\n\n Unpack the contents of an SPK segment descriptor.\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 SPK\n\n-Keywords\n\n SPK\n\n*/\n\n #include "SpiceUsr.h"\n #include "SpiceZfc.h"\n #include "SpiceZim.h"\n #undef spkuds_c\n\n\n void spkuds_c ( ConstSpiceDouble descr [5],\n SpiceInt * body,\n SpiceInt * center,\n SpiceInt * frame,\n SpiceInt * type,\n SpiceDouble * first,\n SpiceDouble * last,\n SpiceInt * baddrs,\n SpiceInt * eaddrs )\n\n/*\n\n-Brief_I/O\n\n VARIABLE I/O DESCRIPTION\n -------- --- --------------------------------------------------\n descr I An SPK segment descriptor.\n body O The NAIF ID code for the body of the segment.\n center O The center of motion for `body'.\n frame O The code for the frame of this segment.\n type O The type of SPK segment.\n first O The first epoch for which the segment is valid.\n last O The last epoch for which the segment is valid.\n baddrs O Beginning DAF address of the segment.\n eaddrs O Ending DAF address of the segment.\n\n-Detailed_Input\n\n descr is an SPK segment descriptor.\n\n-Detailed_Output\n\n body is the NAIF ID code for the body of the segment.\n\n center is the center of motion for `body'.\n\n frame is the SPICE integer code for the frame to which states\n for the body are be referenced.\n\n type is the type of SPK segment.\n\n first is the first epoch for which the segment has\n ephemeris data.\n\n last is the last epoch for which the segment has\n ephemeris data.\n\n baddrs is the starting address of the data associated\n with this descriptor.\n\n eaddrs is the last address of the data associated with\n this descriptor.\n\n-Parameters\n\n None.\n\n-Exceptions\n\n Error free.\n\n 1) If the input descriptor `descr' is invalid, it's possible for\n the output times to contain bit patterns that don't represent\n normal double precision values. This error is not diagnosed.\n\n-Files\n\n None.\n\n-Particulars\n\n This routine extracts the contents of an SPK segment\n descriptor into the components needed for reading and\n evaluating the data stored in the segment. It serves\n as a macro for expanding the SPK segment descriptor.\n\n-Examples\n\n Suppose you wished to summarize a particular SPK segment\n and that you have the descriptor for that segment in hand.\n The following code fragment shows how you might use this\n routine to create a summary message concerning the segment.\n\n #include <stdio.h>\n #include "SpiceUsr.h"\n\n #define TIMLEN 35\n .\n .\n .\n\n spkuds_c ( descr, &body, ¢er, &frame,\n &type, &first, &last, &baddr, &eaddr );\n\n /.\n Convert the start and stop times to TDB calendar strings.\n ./\n etcal_c ( first, TIMLEN, fstcal );\n etcal_c ( last, TIMLEN, lstcal );\n\n printf ( "\n"\n "Body : %d\n"\n "Center : %d\n"\n "Frame ID : %d\n"\n "Data Type: %d\n"\n "\n"\n "Segment Start : %s\n"\n "Segment Stop : %s\n",\n body,\n center,\n frame,\n type,\n fstcal,\n lstcal );\n\n-Restrictions\n\n None.\n\n-Literature_References\n\n None.\n\n-Author_and_Institution\n\n <NAME> (JPL)\n <NAME> (ODC Space)\n <NAME> (JPL)\n <NAME> (JPL)\n\n-Version\n\n -CSPICE Version 1.2.0, 17-JUN-2021 (JDR)\n\n Changed the output argument names "begin" and "end" to "baddrs" and\n "eaddrs" for consistency with other routines.\n\n Edited the header to comply with NAIF standard. Added -Exceptions\n section.\n\n -CSPICE Version 1.1.0, 24-JUL-2001 (NJB)\n\n Changed prototype: input descr is now type (ConstSpiceDouble *).\n Implemented interface macro for casting input descr to const.\n\n -CSPICE Version 1.0.0, 22-JUL-1999 (NJB) (WLT) (KRG)\n\n-Index_Entries\n\n Unpack and SPK segment descriptor\n\n-&\n*/\n\n{ /* Begin spkuds_c */\n\n\n /*\n Participate in error tracing.\n */\n chkin_c ( "spkuds_c" );\n\n\n spkuds_ ( ( doublereal * ) descr,\n ( integer * ) body,\n ( integer * ) center,\n ( integer * ) frame,\n ( integer * ) type,\n ( doublereal * ) first,\n ( doublereal * ) last,\n ( integer * ) baddrs,\n ( integer * ) eaddrs );\n\n\n chkout_c ( "spkuds_c" );\n\n} /* End spkuds_c */\n"
(comment) "/*\n\n-Procedure spkuds_c ( SPK - unpack segment descriptor )\n\n-Abstract\n\n Unpack the contents of an SPK segment descriptor.\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 SPK\n\n-Keywords\n\n SPK\n\n*/"
(preproc_include) "#include "SpiceUsr.h"\n"
(#include) "#include"
(string_literal) ""SpiceUsr.h""
(") """
(string_content) "SpiceUsr.h"
(") """
(preproc_include) "#include "SpiceZfc.h"\n"
(#include) "#include"
(string_literal) ""SpiceZfc.h""
(") """
(string_content) "SpiceZfc.h"
(") """
(preproc_include) "#include "SpiceZim.h"\n"
(#include) "#include"
(string_literal) ""SpiceZim.h""
(") """
(string_content) "SpiceZim.h"
(") """
(preproc_call) "#undef spkuds_c\n"
(preproc_directive) "#undef"
(preproc_arg) "spkuds_c"
(function_definition) "void spkuds_c ( ConstSpiceDouble descr [5],\n SpiceInt * body,\n SpiceInt * center,\n SpiceInt * frame,\n SpiceInt * type,\n SpiceDouble * first,\n SpiceDouble * last,\n SpiceInt * baddrs,\n SpiceInt * eaddrs )\n\n/*\n\n-Brief_I/O\n\n VARIABLE I/O DESCRIPTION\n -------- --- --------------------------------------------------\n descr I An SPK segment descriptor.\n body O The NAIF ID code for the body of the segment.\n center O The center of motion for `body'.\n frame O The code for the frame of this segment.\n type O The type of SPK segment.\n first O The first epoch for which the segment is valid.\n last O The last epoch for which the segment is valid.\n baddrs O Beginning DAF address of the segment.\n eaddrs O Ending DAF address of the segment.\n\n-Detailed_Input\n\n descr is an SPK segment descriptor.\n\n-Detailed_Output\n\n body is the NAIF ID code for the body of the segment.\n\n center is the center of motion for `body'.\n\n frame is the SPICE integer code for the frame to which states\n for the body are be referenced.\n\n type is the type of SPK segment.\n\n first is the first epoch for which the segment has\n ephemeris data.\n\n last is the last epoch for which the segment has\n ephemeris data.\n\n baddrs is the starting address of the data associated\n with this descriptor.\n\n eaddrs is the last address of the data associated with\n this descriptor.\n\n-Parameters\n\n None.\n\n-Exceptions\n\n Error free.\n\n 1) If the input descriptor `descr' is invalid, it's possible for\n the output times to contain bit patterns that don't represent\n normal double precision values. This error is not diagnosed.\n\n-Files\n\n None.\n\n-Particulars\n\n This routine extracts the contents of an SPK segment\n descriptor into the components needed for reading and\n evaluating the data stored in the segment. It serves\n as a macro for expanding the SPK segment descriptor.\n\n-Examples\n\n Suppose you wished to summarize a particular SPK segment\n and that you have the descriptor for that segment in hand.\n The following code fragment shows how you might use this\n routine to create a summary message concerning the segment.\n\n #include <stdio.h>\n #include "SpiceUsr.h"\n\n #define TIMLEN 35\n .\n .\n .\n\n spkuds_c ( descr, &body, ¢er, &frame,\n &type, &first, &last, &baddr, &eaddr );\n\n /.\n Convert the start and stop times to TDB calendar strings.\n ./\n etcal_c ( first, TIMLEN, fstcal );\n etcal_c ( last, TIMLEN, lstcal );\n\n printf ( "\n"\n "Body : %d\n"\n "Center : %d\n"\n "Frame ID : %d\n"\n "Data Type: %d\n"\n "\n"\n "Segment Start : %s\n"\n "Segment Stop : %s\n",\n body,\n center,\n frame,\n type,\n fstcal,\n lstcal );\n\n-Restrictions\n\n None.\n\n-Literature_References\n\n None.\n\n-Author_and_Institution\n\n <NAME> (JPL)\n <NAME> (ODC Space)\n <NAME> (JPL)\n <NAME> (JPL)\n\n-Version\n\n -CSPICE Version 1.2.0, 17-JUN-2021 (JDR)\n\n Changed the output argument names "begin" and "end" to "baddrs" and\n "eaddrs" for consistency with other routines.\n\n Edited the header to comply with NAIF standard. Added -Exceptions\n section.\n\n -CSPICE Version 1.1.0, 24-JUL-2001 (NJB)\n\n Changed prototype: input descr is now type (ConstSpiceDouble *).\n Implemented interface macro for casting input descr to const.\n\n -CSPICE Version 1.0.0, 22-JUL-1999 (NJB) (WLT) (KRG)\n\n-Index_Entries\n\n Unpack and SPK segment descriptor\n\n-&\n*/\n\n{ /* Begin spkuds_c */\n\n\n /*\n Participate in error tracing.\n */\n chkin_c ( "spkuds_c" );\n\n\n spkuds_ ( ( doublereal * ) descr,\n ( integer * ) body,\n ( integer * ) center,\n ( integer * ) frame,\n ( integer * ) type,\n ( doublereal * ) first,\n ( doublereal * ) last,\n ( integer * ) baddrs,\n ( integer * ) eaddrs );\n\n\n chkout_c ( "spkuds_c" );\n\n}"
(primitive_type) "void"
(function_declarator) "spkuds_c ( ConstSpiceDouble descr [5],\n SpiceInt * body,\n SpiceInt * center,\n SpiceInt * frame,\n SpiceInt * type,\n SpiceDouble * first,\n SpiceDouble * last,\n SpiceInt * baddrs,\n SpiceInt * eaddrs )"
(identifier) "spkuds_c"
(parameter_list) "( ConstSpiceDouble descr [5],\n SpiceInt * body,\n SpiceInt * center,\n SpiceInt * frame,\n SpiceInt * type,\n SpiceDouble * first,\n SpiceDouble * last,\n SpiceInt * baddrs,\n SpiceInt * eaddrs )"
(() "("
(parameter_declaration) "ConstSpiceDouble descr [5]"
(type_identifier) "ConstSpiceDouble"
(array_declarator) "descr [5]"
(identifier) "descr"
([) "["
(number_literal) "5"
(]) "]"
(,) ","
(parameter_declaration) "SpiceInt * body"
(type_identifier) "SpiceInt"
(pointer_declarator) "* body"
(*) "*"
(identifier) "body"
(,) ","
(parameter_declaration) "SpiceInt * center"
(type_identifier) "SpiceInt"
(pointer_declarator) "* center"
(*) "*"
(identifier) "center"
(,) ","
(parameter_declaration) "SpiceInt * frame"
(type_identifier) "SpiceInt"
(pointer_declarator) "* frame"
(*) "*"
(identifier) "frame"
(,) ","
(parameter_declaration) "SpiceInt * type"
(type_identifier) "SpiceInt"
(pointer_declarator) "* type"
(*) "*"
(identifier) "type"
(,) ","
(parameter_declaration) "SpiceDouble * first"
(type_identifier) "SpiceDouble"
(pointer_declarator) "* first"
(*) "*"
(identifier) "first"
(,) ","
(parameter_declaration) "SpiceDouble * last"
(type_identifier) "SpiceDouble"
(pointer_declarator) "* last"
(*) "*"
(identifier) "last"
(,) ","
(parameter_declaration) "SpiceInt * baddrs"
(type_identifier) "SpiceInt"
(pointer_declarator) "* baddrs"
(*) "*"
(identifier) "baddrs"
(,) ","
(parameter_declaration) "SpiceInt * eaddrs"
(type_identifier) "SpiceInt"
(pointer_declarator) "* eaddrs"
(*) "*"
(identifier) "eaddrs"
()) ")"
(comment) "/*\n\n-Brief_I/O\n\n VARIABLE I/O DESCRIPTION\n -------- --- --------------------------------------------------\n descr I An SPK segment descriptor.\n body O The NAIF ID code for the body of the segment.\n center O The center of motion for `body'.\n frame O The code for the frame of this segment.\n type O The type of SPK segment.\n first O The first epoch for which the segment is valid.\n last O The last epoch for which the segment is valid.\n baddrs O Beginning DAF address of the segment.\n eaddrs O Ending DAF address of the segment.\n\n-Detailed_Input\n\n descr is an SPK segment descriptor.\n\n-Detailed_Output\n\n body is the NAIF ID code for the body of the segment.\n\n center is the center of motion for `body'.\n\n frame is the SPICE integer code for the frame to which states\n for the body are be referenced.\n\n type is the type of SPK segment.\n\n first is the first epoch for which the segment has\n ephemeris data.\n\n last is the last epoch for which the segment has\n ephemeris data.\n\n baddrs is the starting address of the data associated\n with this descriptor.\n\n eaddrs is the last address of the data associated with\n this descriptor.\n\n-Parameters\n\n None.\n\n-Exceptions\n\n Error free.\n\n 1) If the input descriptor `descr' is invalid, it's possible for\n the output times to contain bit patterns that don't represent\n normal double precision values. This error is not diagnosed.\n\n-Files\n\n None.\n\n-Particulars\n\n This routine extracts the contents of an SPK segment\n descriptor into the components needed for reading and\n evaluating the data stored in the segment. It serves\n as a macro for expanding the SPK segment descriptor.\n\n-Examples\n\n Suppose you wished to summarize a particular SPK segment\n and that you have the descriptor for that segment in hand.\n The following code fragment shows how you might use this\n routine to create a summary message concerning the segment.\n\n #include <stdio.h>\n #include "SpiceUsr.h"\n\n #define TIMLEN 35\n .\n .\n .\n\n spkuds_c ( descr, &body, ¢er, &frame,\n &type, &first, &last, &baddr, &eaddr );\n\n /.\n Convert the start and stop times to TDB calendar strings.\n ./\n etcal_c ( first, TIMLEN, fstcal );\n etcal_c ( last, TIMLEN, lstcal );\n\n printf ( "\n"\n "Body : %d\n"\n "Center : %d\n"\n "Frame ID : %d\n"\n "Data Type: %d\n"\n "\n"\n "Segment Start : %s\n"\n "Segment Stop : %s\n",\n body,\n center,\n frame,\n type,\n fstcal,\n lstcal );\n\n-Restrictions\n\n None.\n\n-Literature_References\n\n None.\n\n-Author_and_Institution\n\n <NAME> (JPL)\n <NAME> (ODC Space)\n <NAME> (JPL)\n <NAME> (JPL)\n\n-Version\n\n -CSPICE Version 1.2.0, 17-JUN-2021 (JDR)\n\n Changed the output argument names "begin" and "end" to "baddrs" and\n "eaddrs" for consistency with other routines.\n\n Edited the header to comply with NAIF standard. Added -Exceptions\n section.\n\n -CSPICE Version 1.1.0, 24-JUL-2001 (NJB)\n\n Changed prototype: input descr is now type (ConstSpiceDouble *).\n Implemented interface macro for casting input descr to const.\n\n -CSPICE Version 1.0.0, 22-JUL-1999 (NJB) (WLT) (KRG)\n\n-Index_Entries\n\n Unpack and SPK segment descriptor\n\n-&\n*/"
(compound_statement) "{ /* Begin spkuds_c */\n\n\n /*\n Participate in error tracing.\n */\n chkin_c ( "spkuds_c" );\n\n\n spkuds_ ( ( doublereal * ) descr,\n ( integer * ) body,\n ( integer * ) center,\n ( integer * ) frame,\n ( integer * ) type,\n ( doublereal * ) first,\n ( doublereal * ) last,\n ( integer * ) baddrs,\n ( integer * ) eaddrs );\n\n\n chkout_c ( "spkuds_c" );\n\n}"
({) "{"
(comment) "/* Begin spkuds_c */"
(comment) "/*\n Participate in error tracing.\n */"
(expression_statement) "chkin_c ( "spkuds_c" );"
(call_expression) "chkin_c ( "spkuds_c" )"
(identifier) "chkin_c"
(argument_list) "( "spkuds_c" )"
(() "("
(string_literal) ""spkuds_c""
(") """
(string_content) "spkuds_c"
(") """
()) ")"
(;) ";"
(expression_statement) "spkuds_ ( ( doublereal * ) descr,\n ( integer * ) body,\n ( integer * ) center,\n ( integer * ) frame,\n ( integer * ) type,\n ( doublereal * ) first,\n ( doublereal * ) last,\n ( integer * ) baddrs,\n ( integer * ) eaddrs );"
(call_expression) "spkuds_ ( ( doublereal * ) descr,\n ( integer * ) body,\n ( integer * ) center,\n ( integer * ) frame,\n ( integer * ) type,\n ( doublereal * ) first,\n ( doublereal * ) last,\n ( integer * ) baddrs,\n ( integer * ) eaddrs )"
(identifier) "spkuds_"
(argument_list) "( ( doublereal * ) descr,\n ( integer * ) body,\n ( integer * ) center,\n ( integer * ) frame,\n ( integer * ) type,\n ( doublereal * ) first,\n ( doublereal * ) last,\n ( integer * ) baddrs,\n ( integer * ) eaddrs )"
(() "("
(cast_expression) "( doublereal * ) descr"
(() "("
(type_descriptor) "doublereal *"
(type_identifier) "doublereal"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(identifier) "descr"
(,) ","
(cast_expression) "( integer * ) body"
(() "("
(type_descriptor) "integer *"
(type_identifier) "integer"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(identifier) "body"
(,) ","
(cast_expression) "( integer * ) center"
(() "("
(type_descriptor) "integer *"
(type_identifier) "integer"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(identifier) "center"
(,) ","
(cast_expression) "( integer * ) frame"
(() "("
(type_descriptor) "integer *"
(type_identifier) "integer"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(identifier) "frame"
(,) ","
(cast_expression) "( integer * ) type"
(() "("
(type_descriptor) "integer *"
(type_identifier) "integer"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(identifier) "type"
(,) ","
(cast_expression) "( doublereal * ) first"
(() "("
(type_descriptor) "doublereal *"
(type_identifier) "doublereal"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(identifier) "first"
(,) ","
(cast_expression) "( doublereal * ) last"
(() "("
(type_descriptor) "doublereal *"
(type_identifier) "doublereal"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(identifier) "last"
(,) ","
(cast_expression) "( integer * ) baddrs"
(() "("
(type_descriptor) "integer *"
(type_identifier) "integer"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(identifier) "baddrs"
(,) ","
(cast_expression) "( integer * ) eaddrs"
(() "("
(type_descriptor) "integer *"
(type_identifier) "integer"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(identifier) "eaddrs"
()) ")"
(;) ";"
(expression_statement) "chkout_c ( "spkuds_c" );"
(call_expression) "chkout_c ( "spkuds_c" )"
(identifier) "chkout_c"
(argument_list) "( "spkuds_c" )"
(() "("
(string_literal) ""spkuds_c""
(") """
(string_content) "spkuds_c"
(") """
()) ")"
(;) ";"
(}) "}"
(comment) "/* End spkuds_c */"
| 201
| 0
|
{"language": "c", "success": true, "metadata": {"lines": 161, "avg_line_length": 37.27, "nodes": 127, "errors": 0, "source_hash": "97e41a7d13337e5556b9612045260b8135a2ad97dbdd1e7231d0ac6fb303b41a", "categorized_nodes": 76}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"SpiceUsr.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 43, "column": 3}, "end_point": {"row": 44, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 43, "column": 3}, "end_point": {"row": 43, "column": 11}}, {"id": 2, "type": "string_literal", "text": "\"SpiceUsr.h\"", "parent": 0, "children": [], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 24}}, {"id": 3, "type": "preproc_include", "text": "#include \"SpiceZfc.h\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 44, "column": 3}, "end_point": {"row": 45, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 44, "column": 3}, "end_point": {"row": 44, "column": 11}}, {"id": 5, "type": "string_literal", "text": "\"SpiceZfc.h\"", "parent": 3, "children": [], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 24}}, {"id": 6, "type": "preproc_include", "text": "#include \"SpiceZim.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 45, "column": 3}, "end_point": {"row": 46, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 45, "column": 3}, "end_point": {"row": 45, "column": 11}}, {"id": 8, "type": "string_literal", "text": "\"SpiceZim.h\"", "parent": 6, "children": [], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 24}}, {"id": 9, "type": "preproc_call", "text": "#undef spkuds_c\n", "parent": null, "children": [10, 11], "start_point": {"row": 46, "column": 3}, "end_point": {"row": 47, "column": 0}}, {"id": 10, "type": "preproc_directive", "text": "#undef", "parent": 9, "children": [], "start_point": {"row": 46, "column": 3}, "end_point": {"row": 46, "column": 9}}, {"id": 11, "type": "preproc_arg", "text": "spkuds_c", "parent": 9, "children": [], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 21}}, {"id": 12, "type": "function_definition", "text": "void spkuds_c ( ConstSpiceDouble descr [5],\n SpiceInt * body,\n SpiceInt * center,\n SpiceInt * frame,\n SpiceInt * type,\n SpiceDouble * first,\n SpiceDouble * last,\n SpiceInt * baddrs,\n SpiceInt * eaddrs )\n\n/*\n\n-Brief_I/O\n\n VARIABLE I/O DESCRIPTION\n -------- --- --------------------------------------------------\n descr I An SPK segment descriptor.\n body O The NAIF ID code for the body of the segment.\n center O The center of motion for `body'.\n frame O The code for the frame of this segment.\n type O The type of SPK segment.\n first O The first epoch for which the segment is valid.\n last O The last epoch for which the segment is valid.\n baddrs O Beginning DAF address of the segment.\n eaddrs O Ending DAF address of the segment.\n\n-Detailed_Input\n\n descr is an SPK segment descriptor.\n\n-Detailed_Output\n\n body is the NAIF ID code for the body of the segment.\n\n center is the center of motion for `body'.\n\n frame is the SPICE integer code for the frame to which states\n for the body are be referenced.\n\n type is the type of SPK segment.\n\n first is the first epoch for which the segment has\n ephemeris data.\n\n last is the last epoch for which the segment has\n ephemeris data.\n\n baddrs is the starting address of the data associated\n with this descriptor.\n\n eaddrs is the last address of the data associated with\n this descriptor.\n\n-Parameters\n\n None.\n\n-Exceptions\n\n Error free.\n\n 1) If the input descriptor `descr' is invalid, it's possible for\n the output times to contain bit patterns that don't represent\n normal double precision values. This error is not diagnosed.\n\n-Files\n\n None.\n\n-Particulars\n\n This routine extracts the contents of an SPK segment\n descriptor into the components needed for reading and\n evaluating the data stored in the segment. It serves\n as a macro for expanding the SPK segment descriptor.\n\n-Examples\n\n Suppose you wished to summarize a particular SPK segment\n and that you have the descriptor for that segment in hand.\n The following code fragment shows how you might use this\n routine to create a summary message concerning the segment.\n\n #include <stdio.h>\n #include \"SpiceUsr.h\"\n\n #define TIMLEN 35\n .\n .\n .\n\n spkuds_c ( descr, &body, ¢er, &frame,\n &type, &first, &last, &baddr, &eaddr );\n\n /.\n Convert the start and stop times to TDB calendar strings.\n ./\n etcal_c ( first, TIMLEN, fstcal );\n etcal_c ( last, TIMLEN, lstcal );\n\n printf ( \"\\n\"\n \"Body : %d\\n\"\n \"Center : %d\\n\"\n \"Frame ID : %d\\n\"\n \"Data Type: %d\\n\"\n \"\\n\"\n \"Segment Start : %s\\n\"\n \"Segment Stop : %s\\n\",\n body,\n center,\n frame,\n type,\n fstcal,\n lstcal );\n\n-Restrictions\n\n None.\n\n-Literature_References\n\n None.\n\n-Author_and_Institution\n\n <NAME> (JPL)\n <NAME> (ODC Space)\n <NAME> (JPL)\n <NAME> (JPL)\n\n-Version\n\n -CSPICE Version 1.2.0, 17-JUN-2021 (JDR)\n\n Changed the output argument names \"begin\" and \"end\" to \"baddrs\" and\n \"eaddrs\" for consistency with other routines.\n\n Edited the header to comply with NAIF standard. Added -Exceptions\n section.\n\n -CSPICE Version 1.1.0, 24-JUL-2001 (NJB)\n\n Changed prototype: input descr is now type (ConstSpiceDouble *).\n Implemented interface macro for casting input descr to const.\n\n -CSPICE Version 1.0.0, 22-JUL-1999 (NJB) (WLT) (KRG)\n\n-Index_Entries\n\n Unpack and SPK segment descriptor\n\n-&\n*/\n\n{ /* Begin spkuds_c */\n\n\n /*\n Participate in error tracing.\n */\n chkin_c ( \"spkuds_c\" );\n\n\n spkuds_ ( ( doublereal * ) descr,\n ( integer * ) body,\n ( integer * ) center,\n ( integer * ) frame,\n ( integer * ) type,\n ( doublereal * ) first,\n ( doublereal * ) last,\n ( integer * ) baddrs,\n ( integer * ) eaddrs );\n\n\n chkout_c ( \"spkuds_c\" );\n\n}", "parent": null, "children": [13, 14], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 225, "column": 1}}, {"id": 13, "type": "primitive_type", "text": "void", "parent": 12, "children": [], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 7}}, {"id": 14, "type": "function_declarator", "text": "spkuds_c ( ConstSpiceDouble descr [5],\n SpiceInt * body,\n SpiceInt * center,\n SpiceInt * frame,\n SpiceInt * type,\n SpiceDouble * first,\n SpiceDouble * last,\n SpiceInt * baddrs,\n SpiceInt * eaddrs )", "parent": 12, "children": [15, 16], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 57, "column": 52}}, {"id": 15, "type": "identifier", "text": "spkuds_c", "parent": 14, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 16}}, {"id": 16, "type": "parameter_list", "text": "( ConstSpiceDouble descr [5],\n SpiceInt * body,\n SpiceInt * center,\n SpiceInt * frame,\n SpiceInt * type,\n SpiceDouble * first,\n SpiceDouble * last,\n SpiceInt * baddrs,\n SpiceInt * eaddrs )", "parent": 14, "children": [17, 22, 27, 32, 37, 42, 47, 52, 57], "start_point": {"row": 49, "column": 17}, "end_point": {"row": 57, "column": 52}}, {"id": 17, "type": "parameter_declaration", "text": "ConstSpiceDouble descr [5]", "parent": 16, "children": [18, 19], "start_point": {"row": 49, "column": 19}, "end_point": {"row": 49, "column": 49}}, {"id": 18, "type": "type_identifier", "text": "ConstSpiceDouble", "parent": 17, "children": [], "start_point": {"row": 49, "column": 19}, "end_point": {"row": 49, "column": 35}}, {"id": 19, "type": "array_declarator", "text": "descr [5]", "parent": 17, "children": [20, 21], "start_point": {"row": 49, "column": 40}, "end_point": {"row": 49, "column": 49}}, {"id": 20, "type": "identifier", "text": "descr", "parent": 19, "children": [], "start_point": {"row": 49, "column": 40}, "end_point": {"row": 49, "column": 45}}, {"id": 21, "type": "number_literal", "text": "5", "parent": 19, "children": [], "start_point": {"row": 49, "column": 47}, "end_point": {"row": 49, "column": 48}}, {"id": 22, "type": "parameter_declaration", "text": "SpiceInt * body", "parent": 16, "children": [23, 24], "start_point": {"row": 50, "column": 19}, "end_point": {"row": 50, "column": 44}}, {"id": 23, "type": "type_identifier", "text": "SpiceInt", "parent": 22, "children": [], "start_point": {"row": 50, "column": 19}, "end_point": {"row": 50, "column": 27}}, {"id": 24, "type": "pointer_declarator", "text": "* body", "parent": 22, "children": [25, 26], "start_point": {"row": 50, "column": 38}, "end_point": {"row": 50, "column": 44}}, {"id": 25, "type": "*", "text": "*", "parent": 24, "children": [], "start_point": {"row": 50, "column": 38}, "end_point": {"row": 50, "column": 39}}, {"id": 26, "type": "identifier", "text": "body", "parent": 24, "children": [], "start_point": {"row": 50, "column": 40}, "end_point": {"row": 50, "column": 44}}, {"id": 27, "type": "parameter_declaration", "text": "SpiceInt * center", "parent": 16, "children": [28, 29], "start_point": {"row": 51, "column": 19}, "end_point": {"row": 51, "column": 46}}, {"id": 28, "type": "type_identifier", "text": "SpiceInt", "parent": 27, "children": [], "start_point": {"row": 51, "column": 19}, "end_point": {"row": 51, "column": 27}}, {"id": 29, "type": "pointer_declarator", "text": "* center", "parent": 27, "children": [30, 31], "start_point": {"row": 51, "column": 38}, "end_point": {"row": 51, "column": 46}}, {"id": 30, "type": "*", "text": "*", "parent": 29, "children": [], "start_point": {"row": 51, "column": 38}, "end_point": {"row": 51, "column": 39}}, {"id": 31, "type": "identifier", "text": "center", "parent": 29, "children": [], "start_point": {"row": 51, "column": 40}, "end_point": {"row": 51, "column": 46}}, {"id": 32, "type": "parameter_declaration", "text": "SpiceInt * frame", "parent": 16, "children": [33, 34], "start_point": {"row": 52, "column": 19}, "end_point": {"row": 52, "column": 45}}, {"id": 33, "type": "type_identifier", "text": "SpiceInt", "parent": 32, "children": [], "start_point": {"row": 52, "column": 19}, "end_point": {"row": 52, "column": 27}}, {"id": 34, "type": "pointer_declarator", "text": "* frame", "parent": 32, "children": [35, 36], "start_point": {"row": 52, "column": 38}, "end_point": {"row": 52, "column": 45}}, {"id": 35, "type": "*", "text": "*", "parent": 34, "children": [], "start_point": {"row": 52, "column": 38}, "end_point": {"row": 52, "column": 39}}, {"id": 36, "type": "identifier", "text": "frame", "parent": 34, "children": [], "start_point": {"row": 52, "column": 40}, "end_point": {"row": 52, "column": 45}}, {"id": 37, "type": "parameter_declaration", "text": "SpiceInt * type", "parent": 16, "children": [38, 39], "start_point": {"row": 53, "column": 19}, "end_point": {"row": 53, "column": 44}}, {"id": 38, "type": "type_identifier", "text": "SpiceInt", "parent": 37, "children": [], "start_point": {"row": 53, "column": 19}, "end_point": {"row": 53, "column": 27}}, {"id": 39, "type": "pointer_declarator", "text": "* type", "parent": 37, "children": [40, 41], "start_point": {"row": 53, "column": 38}, "end_point": {"row": 53, "column": 44}}, {"id": 40, "type": "*", "text": "*", "parent": 39, "children": [], "start_point": {"row": 53, "column": 38}, "end_point": {"row": 53, "column": 39}}, {"id": 41, "type": "identifier", "text": "type", "parent": 39, "children": [], "start_point": {"row": 53, "column": 40}, "end_point": {"row": 53, "column": 44}}, {"id": 42, "type": "parameter_declaration", "text": "SpiceDouble * first", "parent": 16, "children": [43, 44], "start_point": {"row": 54, "column": 19}, "end_point": {"row": 54, "column": 45}}, {"id": 43, "type": "type_identifier", "text": "SpiceDouble", "parent": 42, "children": [], "start_point": {"row": 54, "column": 19}, "end_point": {"row": 54, "column": 30}}, {"id": 44, "type": "pointer_declarator", "text": "* first", "parent": 42, "children": [45, 46], "start_point": {"row": 54, "column": 38}, "end_point": {"row": 54, "column": 45}}, {"id": 45, "type": "*", "text": "*", "parent": 44, "children": [], "start_point": {"row": 54, "column": 38}, "end_point": {"row": 54, "column": 39}}, {"id": 46, "type": "identifier", "text": "first", "parent": 44, "children": [], "start_point": {"row": 54, "column": 40}, "end_point": {"row": 54, "column": 45}}, {"id": 47, "type": "parameter_declaration", "text": "SpiceDouble * last", "parent": 16, "children": [48, 49], "start_point": {"row": 55, "column": 19}, "end_point": {"row": 55, "column": 44}}, {"id": 48, "type": "type_identifier", "text": "SpiceDouble", "parent": 47, "children": [], "start_point": {"row": 55, "column": 19}, "end_point": {"row": 55, "column": 30}}, {"id": 49, "type": "pointer_declarator", "text": "* last", "parent": 47, "children": [50, 51], "start_point": {"row": 55, "column": 38}, "end_point": {"row": 55, "column": 44}}, {"id": 50, "type": "*", "text": "*", "parent": 49, "children": [], "start_point": {"row": 55, "column": 38}, "end_point": {"row": 55, "column": 39}}, {"id": 51, "type": "identifier", "text": "last", "parent": 49, "children": [], "start_point": {"row": 55, "column": 40}, "end_point": {"row": 55, "column": 44}}, {"id": 52, "type": "parameter_declaration", "text": "SpiceInt * baddrs", "parent": 16, "children": [53, 54], "start_point": {"row": 56, "column": 19}, "end_point": {"row": 56, "column": 46}}, {"id": 53, "type": "type_identifier", "text": "SpiceInt", "parent": 52, "children": [], "start_point": {"row": 56, "column": 19}, "end_point": {"row": 56, "column": 27}}, {"id": 54, "type": "pointer_declarator", "text": "* baddrs", "parent": 52, "children": [55, 56], "start_point": {"row": 56, "column": 38}, "end_point": {"row": 56, "column": 46}}, {"id": 55, "type": "*", "text": "*", "parent": 54, "children": [], "start_point": {"row": 56, "column": 38}, "end_point": {"row": 56, "column": 39}}, {"id": 56, "type": "identifier", "text": "baddrs", "parent": 54, "children": [], "start_point": {"row": 56, "column": 40}, "end_point": {"row": 56, "column": 46}}, {"id": 57, "type": "parameter_declaration", "text": "SpiceInt * eaddrs", "parent": 16, "children": [58, 59], "start_point": {"row": 57, "column": 19}, "end_point": {"row": 57, "column": 46}}, {"id": 58, "type": "type_identifier", "text": "SpiceInt", "parent": 57, "children": [], "start_point": {"row": 57, "column": 19}, "end_point": {"row": 57, "column": 27}}, {"id": 59, "type": "pointer_declarator", "text": "* eaddrs", "parent": 57, "children": [60, 61], "start_point": {"row": 57, "column": 38}, "end_point": {"row": 57, "column": 46}}, {"id": 60, "type": "*", "text": "*", "parent": 59, "children": [], "start_point": {"row": 57, "column": 38}, "end_point": {"row": 57, "column": 39}}, {"id": 61, "type": "identifier", "text": "eaddrs", "parent": 59, "children": [], "start_point": {"row": 57, "column": 40}, "end_point": {"row": 57, "column": 46}}, {"id": 62, "type": "call_expression", "text": "chkin_c ( \"spkuds_c\" )", "parent": 12, "children": [63, 64], "start_point": {"row": 209, "column": 3}, "end_point": {"row": 209, "column": 25}}, {"id": 63, "type": "identifier", "text": "chkin_c", "parent": 62, "children": [], "start_point": {"row": 209, "column": 3}, "end_point": {"row": 209, "column": 10}}, {"id": 64, "type": "argument_list", "text": "( \"spkuds_c\" )", "parent": 62, "children": [65], "start_point": {"row": 209, "column": 11}, "end_point": {"row": 209, "column": 25}}, {"id": 65, "type": "string_literal", "text": "\"spkuds_c\"", "parent": 64, "children": [], "start_point": {"row": 209, "column": 13}, "end_point": {"row": 209, "column": 23}}, {"id": 66, "type": "call_expression", "text": "spkuds_ ( ( doublereal * ) descr,\n ( integer * ) body,\n ( integer * ) center,\n ( integer * ) frame,\n ( integer * ) type,\n ( doublereal * ) first,\n ( doublereal * ) last,\n ( integer * ) baddrs,\n ( integer * ) eaddrs )", "parent": 12, "children": [67, 68], "start_point": {"row": 212, "column": 3}, "end_point": {"row": 220, "column": 43}}, {"id": 67, "type": "identifier", "text": "spkuds_", "parent": 66, "children": [], "start_point": {"row": 212, "column": 3}, "end_point": {"row": 212, "column": 10}}, {"id": 68, "type": "argument_list", "text": "( ( doublereal * ) descr,\n ( integer * ) body,\n ( integer * ) center,\n ( integer * ) frame,\n ( integer * ) type,\n ( doublereal * ) first,\n ( doublereal * ) last,\n ( integer * ) baddrs,\n ( integer * ) eaddrs )", "parent": 66, "children": [69, 75, 81, 87, 93, 99, 105, 111, 117], "start_point": {"row": 212, "column": 11}, "end_point": {"row": 220, "column": 43}}, {"id": 69, "type": "cast_expression", "text": "( doublereal * ) descr", "parent": 68, "children": [70, 74], "start_point": {"row": 212, "column": 14}, "end_point": {"row": 212, "column": 37}}, {"id": 70, "type": "type_descriptor", "text": "doublereal *", "parent": 69, "children": [71, 72], "start_point": {"row": 212, "column": 16}, "end_point": {"row": 212, "column": 29}}, {"id": 71, "type": "type_identifier", "text": "doublereal", "parent": 70, "children": [], "start_point": {"row": 212, "column": 16}, "end_point": {"row": 212, "column": 26}}, {"id": 72, "type": "abstract_pointer_declarator", "text": "*", "parent": 70, "children": [73], "start_point": {"row": 212, "column": 28}, "end_point": {"row": 212, "column": 29}}, {"id": 73, "type": "*", "text": "*", "parent": 72, "children": [], "start_point": {"row": 212, "column": 28}, "end_point": {"row": 212, "column": 29}}, {"id": 74, "type": "identifier", "text": "descr", "parent": 69, "children": [], "start_point": {"row": 212, "column": 32}, "end_point": {"row": 212, "column": 37}}, {"id": 75, "type": "cast_expression", "text": "( integer * ) body", "parent": 68, "children": [76, 80], "start_point": {"row": 213, "column": 14}, "end_point": {"row": 213, "column": 36}}, {"id": 76, "type": "type_descriptor", "text": "integer *", "parent": 75, "children": [77, 78], "start_point": {"row": 213, "column": 16}, "end_point": {"row": 213, "column": 29}}, {"id": 77, "type": "type_identifier", "text": "integer", "parent": 76, "children": [], "start_point": {"row": 213, "column": 16}, "end_point": {"row": 213, "column": 23}}, {"id": 78, "type": "abstract_pointer_declarator", "text": "*", "parent": 76, "children": [79], "start_point": {"row": 213, "column": 28}, "end_point": {"row": 213, "column": 29}}, {"id": 79, "type": "*", "text": "*", "parent": 78, "children": [], "start_point": {"row": 213, "column": 28}, "end_point": {"row": 213, "column": 29}}, {"id": 80, "type": "identifier", "text": "body", "parent": 75, "children": [], "start_point": {"row": 213, "column": 32}, "end_point": {"row": 213, "column": 36}}, {"id": 81, "type": "cast_expression", "text": "( integer * ) center", "parent": 68, "children": [82, 86], "start_point": {"row": 214, "column": 14}, "end_point": {"row": 214, "column": 38}}, {"id": 82, "type": "type_descriptor", "text": "integer *", "parent": 81, "children": [83, 84], "start_point": {"row": 214, "column": 16}, "end_point": {"row": 214, "column": 29}}, {"id": 83, "type": "type_identifier", "text": "integer", "parent": 82, "children": [], "start_point": {"row": 214, "column": 16}, "end_point": {"row": 214, "column": 23}}, {"id": 84, "type": "abstract_pointer_declarator", "text": "*", "parent": 82, "children": [85], "start_point": {"row": 214, "column": 28}, "end_point": {"row": 214, "column": 29}}, {"id": 85, "type": "*", "text": "*", "parent": 84, "children": [], "start_point": {"row": 214, "column": 28}, "end_point": {"row": 214, "column": 29}}, {"id": 86, "type": "identifier", "text": "center", "parent": 81, "children": [], "start_point": {"row": 214, "column": 32}, "end_point": {"row": 214, "column": 38}}, {"id": 87, "type": "cast_expression", "text": "( integer * ) frame", "parent": 68, "children": [88, 92], "start_point": {"row": 215, "column": 14}, "end_point": {"row": 215, "column": 37}}, {"id": 88, "type": "type_descriptor", "text": "integer *", "parent": 87, "children": [89, 90], "start_point": {"row": 215, "column": 16}, "end_point": {"row": 215, "column": 29}}, {"id": 89, "type": "type_identifier", "text": "integer", "parent": 88, "children": [], "start_point": {"row": 215, "column": 16}, "end_point": {"row": 215, "column": 23}}, {"id": 90, "type": "abstract_pointer_declarator", "text": "*", "parent": 88, "children": [91], "start_point": {"row": 215, "column": 28}, "end_point": {"row": 215, "column": 29}}, {"id": 91, "type": "*", "text": "*", "parent": 90, "children": [], "start_point": {"row": 215, "column": 28}, "end_point": {"row": 215, "column": 29}}, {"id": 92, "type": "identifier", "text": "frame", "parent": 87, "children": [], "start_point": {"row": 215, "column": 32}, "end_point": {"row": 215, "column": 37}}, {"id": 93, "type": "cast_expression", "text": "( integer * ) type", "parent": 68, "children": [94, 98], "start_point": {"row": 216, "column": 14}, "end_point": {"row": 216, "column": 36}}, {"id": 94, "type": "type_descriptor", "text": "integer *", "parent": 93, "children": [95, 96], "start_point": {"row": 216, "column": 16}, "end_point": {"row": 216, "column": 29}}, {"id": 95, "type": "type_identifier", "text": "integer", "parent": 94, "children": [], "start_point": {"row": 216, "column": 16}, "end_point": {"row": 216, "column": 23}}, {"id": 96, "type": "abstract_pointer_declarator", "text": "*", "parent": 94, "children": [97], "start_point": {"row": 216, "column": 28}, "end_point": {"row": 216, "column": 29}}, {"id": 97, "type": "*", "text": "*", "parent": 96, "children": [], "start_point": {"row": 216, "column": 28}, "end_point": {"row": 216, "column": 29}}, {"id": 98, "type": "identifier", "text": "type", "parent": 93, "children": [], "start_point": {"row": 216, "column": 32}, "end_point": {"row": 216, "column": 36}}, {"id": 99, "type": "cast_expression", "text": "( doublereal * ) first", "parent": 68, "children": [100, 104], "start_point": {"row": 217, "column": 14}, "end_point": {"row": 217, "column": 37}}, {"id": 100, "type": "type_descriptor", "text": "doublereal *", "parent": 99, "children": [101, 102], "start_point": {"row": 217, "column": 16}, "end_point": {"row": 217, "column": 29}}, {"id": 101, "type": "type_identifier", "text": "doublereal", "parent": 100, "children": [], "start_point": {"row": 217, "column": 16}, "end_point": {"row": 217, "column": 26}}, {"id": 102, "type": "abstract_pointer_declarator", "text": "*", "parent": 100, "children": [103], "start_point": {"row": 217, "column": 28}, "end_point": {"row": 217, "column": 29}}, {"id": 103, "type": "*", "text": "*", "parent": 102, "children": [], "start_point": {"row": 217, "column": 28}, "end_point": {"row": 217, "column": 29}}, {"id": 104, "type": "identifier", "text": "first", "parent": 99, "children": [], "start_point": {"row": 217, "column": 32}, "end_point": {"row": 217, "column": 37}}, {"id": 105, "type": "cast_expression", "text": "( doublereal * ) last", "parent": 68, "children": [106, 110], "start_point": {"row": 218, "column": 14}, "end_point": {"row": 218, "column": 36}}, {"id": 106, "type": "type_descriptor", "text": "doublereal *", "parent": 105, "children": [107, 108], "start_point": {"row": 218, "column": 16}, "end_point": {"row": 218, "column": 29}}, {"id": 107, "type": "type_identifier", "text": "doublereal", "parent": 106, "children": [], "start_point": {"row": 218, "column": 16}, "end_point": {"row": 218, "column": 26}}, {"id": 108, "type": "abstract_pointer_declarator", "text": "*", "parent": 106, "children": [109], "start_point": {"row": 218, "column": 28}, "end_point": {"row": 218, "column": 29}}, {"id": 109, "type": "*", "text": "*", "parent": 108, "children": [], "start_point": {"row": 218, "column": 28}, "end_point": {"row": 218, "column": 29}}, {"id": 110, "type": "identifier", "text": "last", "parent": 105, "children": [], "start_point": {"row": 218, "column": 32}, "end_point": {"row": 218, "column": 36}}, {"id": 111, "type": "cast_expression", "text": "( integer * ) baddrs", "parent": 68, "children": [112, 116], "start_point": {"row": 219, "column": 14}, "end_point": {"row": 219, "column": 38}}, {"id": 112, "type": "type_descriptor", "text": "integer *", "parent": 111, "children": [113, 114], "start_point": {"row": 219, "column": 16}, "end_point": {"row": 219, "column": 29}}, {"id": 113, "type": "type_identifier", "text": "integer", "parent": 112, "children": [], "start_point": {"row": 219, "column": 16}, "end_point": {"row": 219, "column": 23}}, {"id": 114, "type": "abstract_pointer_declarator", "text": "*", "parent": 112, "children": [115], "start_point": {"row": 219, "column": 28}, "end_point": {"row": 219, "column": 29}}, {"id": 115, "type": "*", "text": "*", "parent": 114, "children": [], "start_point": {"row": 219, "column": 28}, "end_point": {"row": 219, "column": 29}}, {"id": 116, "type": "identifier", "text": "baddrs", "parent": 111, "children": [], "start_point": {"row": 219, "column": 32}, "end_point": {"row": 219, "column": 38}}, {"id": 117, "type": "cast_expression", "text": "( integer * ) eaddrs", "parent": 68, "children": [118, 122], "start_point": {"row": 220, "column": 14}, "end_point": {"row": 220, "column": 38}}, {"id": 118, "type": "type_descriptor", "text": "integer *", "parent": 117, "children": [119, 120], "start_point": {"row": 220, "column": 16}, "end_point": {"row": 220, "column": 29}}, {"id": 119, "type": "type_identifier", "text": "integer", "parent": 118, "children": [], "start_point": {"row": 220, "column": 16}, "end_point": {"row": 220, "column": 23}}, {"id": 120, "type": "abstract_pointer_declarator", "text": "*", "parent": 118, "children": [121], "start_point": {"row": 220, "column": 28}, "end_point": {"row": 220, "column": 29}}, {"id": 121, "type": "*", "text": "*", "parent": 120, "children": [], "start_point": {"row": 220, "column": 28}, "end_point": {"row": 220, "column": 29}}, {"id": 122, "type": "identifier", "text": "eaddrs", "parent": 117, "children": [], "start_point": {"row": 220, "column": 32}, "end_point": {"row": 220, "column": 38}}, {"id": 123, "type": "call_expression", "text": "chkout_c ( \"spkuds_c\" )", "parent": 12, "children": [124, 125], "start_point": {"row": 223, "column": 3}, "end_point": {"row": 223, "column": 26}}, {"id": 124, "type": "identifier", "text": "chkout_c", "parent": 123, "children": [], "start_point": {"row": 223, "column": 3}, "end_point": {"row": 223, "column": 11}}, {"id": 125, "type": "argument_list", "text": "( \"spkuds_c\" )", "parent": 123, "children": [126], "start_point": {"row": 223, "column": 12}, "end_point": {"row": 223, "column": 26}}, {"id": 126, "type": "string_literal", "text": "\"spkuds_c\"", "parent": 125, "children": [], "start_point": {"row": 223, "column": 14}, "end_point": {"row": 223, "column": 24}}]}, "node_categories": {"declarations": {"functions": [12, 14], "variables": [17, 22, 27, 32, 37, 42, 47, 52, 57], "classes": [], "imports": [0, 1, 3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [62, 66, 69, 75, 81, 87, 93, 99, 105, 111, 117, 123], "assignments": [], "loops": [], "conditionals": [15, 18, 20, 23, 26, 28, 31, 33, 36, 38, 41, 43, 46, 48, 51, 53, 56, 58, 61, 63, 67, 71, 74, 77, 80, 83, 86, 89, 92, 95, 98, 101, 104, 107, 110, 113, 116, 119, 122, 124], "returns": [], "exceptions": []}, "expressions": {"calls": [9], "literals": [2, 5, 8, 21, 65, 126], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 12, "universal_type": "function", "name": "spkuds_c", "text_snippet": "void spkuds_c ( ConstSpiceDouble descr [5],\n SpiceInt * body,\n "}, {"node_id": 14, "universal_type": "function", "name": "unknown", "text_snippet": "spkuds_c ( ConstSpiceDouble descr [5],\n SpiceInt * body,\n "}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"SpiceUsr.h\"\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"SpiceZfc.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"SpiceZim.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "/*\n\n-Procedure spkuds_c ( SPK - unpack segment descriptor )\n\n-Abstract\n\n Unpack the contents of an SPK segment descriptor.\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 SPK\n\n-Keywords\n\n SPK\n\n*/\n\n #include \"SpiceUsr.h\"\n #include \"SpiceZfc.h\"\n #include \"SpiceZim.h\"\n #undef spkuds_c\n\n\n void spkuds_c ( ConstSpiceDouble descr [5],\n SpiceInt * body,\n SpiceInt * center,\n SpiceInt * frame,\n SpiceInt * type,\n SpiceDouble * first,\n SpiceDouble * last,\n SpiceInt * baddrs,\n SpiceInt * eaddrs )\n\n/*\n\n-Brief_I/O\n\n VARIABLE I/O DESCRIPTION\n -------- --- --------------------------------------------------\n descr I An SPK segment descriptor.\n body O The NAIF ID code for the body of the segment.\n center O The center of motion for `body'.\n frame O The code for the frame of this segment.\n type O The type of SPK segment.\n first O The first epoch for which the segment is valid.\n last O The last epoch for which the segment is valid.\n baddrs O Beginning DAF address of the segment.\n eaddrs O Ending DAF address of the segment.\n\n-Detailed_Input\n\n descr is an SPK segment descriptor.\n\n-Detailed_Output\n\n body is the NAIF ID code for the body of the segment.\n\n center is the center of motion for `body'.\n\n frame is the SPICE integer code for the frame to which states\n for the body are be referenced.\n\n type is the type of SPK segment.\n\n first is the first epoch for which the segment has\n ephemeris data.\n\n last is the last epoch for which the segment has\n ephemeris data.\n\n baddrs is the starting address of the data associated\n with this descriptor.\n\n eaddrs is the last address of the data associated with\n this descriptor.\n\n-Parameters\n\n None.\n\n-Exceptions\n\n Error free.\n\n 1) If the input descriptor `descr' is invalid, it's possible for\n the output times to contain bit patterns that don't represent\n normal double precision values. This error is not diagnosed.\n\n-Files\n\n None.\n\n-Particulars\n\n This routine extracts the contents of an SPK segment\n descriptor into the components needed for reading and\n evaluating the data stored in the segment. It serves\n as a macro for expanding the SPK segment descriptor.\n\n-Examples\n\n Suppose you wished to summarize a particular SPK segment\n and that you have the descriptor for that segment in hand.\n The following code fragment shows how you might use this\n routine to create a summary message concerning the segment.\n\n #include <stdio.h>\n #include \"SpiceUsr.h\"\n\n #define TIMLEN 35\n .\n .\n .\n\n spkuds_c ( descr, &body, ¢er, &frame,\n &type, &first, &last, &baddr, &eaddr );\n\n /.\n Convert the start and stop times to TDB calendar strings.\n ./\n etcal_c ( first, TIMLEN, fstcal );\n etcal_c ( last, TIMLEN, lstcal );\n\n printf ( \"\\n\"\n \"Body : %d\\n\"\n \"Center : %d\\n\"\n \"Frame ID : %d\\n\"\n \"Data Type: %d\\n\"\n \"\\n\"\n \"Segment Start : %s\\n\"\n \"Segment Stop : %s\\n\",\n body,\n center,\n frame,\n type,\n fstcal,\n lstcal );\n\n-Restrictions\n\n None.\n\n-Literature_References\n\n None.\n\n-Author_and_Institution\n\n <NAME> (JPL)\n <NAME> (ODC Space)\n <NAME> (JPL)\n <NAME> (JPL)\n\n-Version\n\n -CSPICE Version 1.2.0, 17-JUN-2021 (JDR)\n\n Changed the output argument names \"begin\" and \"end\" to \"baddrs\" and\n \"eaddrs\" for consistency with other routines.\n\n Edited the header to comply with NAIF standard. Added -Exceptions\n section.\n\n -CSPICE Version 1.1.0, 24-JUL-2001 (NJB)\n\n Changed prototype: input descr is now type (ConstSpiceDouble *).\n Implemented interface macro for casting input descr to const.\n\n -CSPICE Version 1.0.0, 22-JUL-1999 (NJB) (WLT) (KRG)\n\n-Index_Entries\n\n Unpack and SPK segment descriptor\n\n-&\n*/\n\n{ /* Begin spkuds_c */\n\n\n /*\n Participate in error tracing.\n */\n chkin_c ( \"spkuds_c\" );\n\n\n spkuds_ ( ( doublereal * ) descr,\n ( integer * ) body,\n ( integer * ) center,\n ( integer * ) frame,\n ( integer * ) type,\n ( doublereal * ) first,\n ( doublereal * ) last,\n ( integer * ) baddrs,\n ( integer * ) eaddrs );\n\n\n chkout_c ( \"spkuds_c\" );\n\n} /* End spkuds_c */\n"}
| 81,219
|
c
|
/**
* Autogenerated by Thrift Compiler (0.9.1)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
#ifndef GFXD_STRUCT_PDXSCHEMA_H
#define GFXD_STRUCT_PDXSCHEMA_H
#include "gfxd_types.h"
#include "gfxd_struct_FieldDescriptor.h"
#include "gfxd_struct_Decimal.h"
#include "gfxd_struct_Timestamp.h"
#include "gfxd_struct_FieldValue.h"
#include "gfxd_struct_PDXNode.h"
#include "gfxd_struct_PDXObject.h"
#include "gfxd_struct_PDXSchemaNode.h"
namespace com { namespace pivotal { namespace gemfirexd { namespace thrift {
class PDXSchema {
public:
static const char* ascii_fingerprint; // = "4952724FA891398142DA215A5B73EA06";
static const uint8_t binary_fingerprint[16]; // = {0x49,0x52,0x72,0x4F,0xA8,0x91,0x39,0x81,0x42,0xDA,0x21,0x5A,0x5B,0x73,0xEA,0x06};
PDXSchema() {
}
virtual ~PDXSchema() throw() {}
std::vector<PDXSchemaNode> nodes;
void __set_nodes(const std::vector<PDXSchemaNode> & val) {
nodes = val;
}
bool operator == (const PDXSchema & rhs) const
{
if (!(nodes == rhs.nodes))
return false;
return true;
}
bool operator != (const PDXSchema &rhs) const {
return !(*this == rhs);
}
bool operator < (const PDXSchema & ) const;
uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
};
void swap(PDXSchema &a, PDXSchema &b);
}}}} // namespace
#endif
| 30
| 46
|
(translation_unit) "/**\n * Autogenerated by Thrift Compiler (0.9.1)\n *\n * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n * @generated\n */\n\n#ifndef GFXD_STRUCT_PDXSCHEMA_H\n#define GFXD_STRUCT_PDXSCHEMA_H\n\n\n#include "gfxd_types.h"\n\n#include "gfxd_struct_FieldDescriptor.h"\n#include "gfxd_struct_Decimal.h"\n#include "gfxd_struct_Timestamp.h"\n#include "gfxd_struct_FieldValue.h"\n#include "gfxd_struct_PDXNode.h"\n#include "gfxd_struct_PDXObject.h"\n#include "gfxd_struct_PDXSchemaNode.h"\n\nnamespace com { namespace pivotal { namespace gemfirexd { namespace thrift {\n\n\nclass PDXSchema {\n public:\n\n static const char* ascii_fingerprint; // = "4952724FA891398142DA215A5B73EA06";\n static const uint8_t binary_fingerprint[16]; // = {0x49,0x52,0x72,0x4F,0xA8,0x91,0x39,0x81,0x42,0xDA,0x21,0x5A,0x5B,0x73,0xEA,0x06};\n\n PDXSchema() {\n }\n\n virtual ~PDXSchema() throw() {}\n\n std::vector<PDXSchemaNode> nodes;\n\n void __set_nodes(const std::vector<PDXSchemaNode> & val) {\n nodes = val;\n }\n\n bool operator == (const PDXSchema & rhs) const\n {\n if (!(nodes == rhs.nodes))\n return false;\n return true;\n }\n bool operator != (const PDXSchema &rhs) const {\n return !(*this == rhs);\n }\n\n bool operator < (const PDXSchema & ) const;\n\n uint32_t read(::apache::thrift::protocol::TProtocol* iprot);\n uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;\n\n};\n\nvoid swap(PDXSchema &a, PDXSchema &b);\n\n}}}} // namespace\n\n#endif\n"
(comment) "/**\n * Autogenerated by Thrift Compiler (0.9.1)\n *\n * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n * @generated\n */"
(preproc_ifdef) "#ifndef GFXD_STRUCT_PDXSCHEMA_H\n#define GFXD_STRUCT_PDXSCHEMA_H\n\n\n#include "gfxd_types.h"\n\n#include "gfxd_struct_FieldDescriptor.h"\n#include "gfxd_struct_Decimal.h"\n#include "gfxd_struct_Timestamp.h"\n#include "gfxd_struct_FieldValue.h"\n#include "gfxd_struct_PDXNode.h"\n#include "gfxd_struct_PDXObject.h"\n#include "gfxd_struct_PDXSchemaNode.h"\n\nnamespace com { namespace pivotal { namespace gemfirexd { namespace thrift {\n\n\nclass PDXSchema {\n public:\n\n static const char* ascii_fingerprint; // = "4952724FA891398142DA215A5B73EA06";\n static const uint8_t binary_fingerprint[16]; // = {0x49,0x52,0x72,0x4F,0xA8,0x91,0x39,0x81,0x42,0xDA,0x21,0x5A,0x5B,0x73,0xEA,0x06};\n\n PDXSchema() {\n }\n\n virtual ~PDXSchema() throw() {}\n\n std::vector<PDXSchemaNode> nodes;\n\n void __set_nodes(const std::vector<PDXSchemaNode> & val) {\n nodes = val;\n }\n\n bool operator == (const PDXSchema & rhs) const\n {\n if (!(nodes == rhs.nodes))\n return false;\n return true;\n }\n bool operator != (const PDXSchema &rhs) const {\n return !(*this == rhs);\n }\n\n bool operator < (const PDXSchema & ) const;\n\n uint32_t read(::apache::thrift::protocol::TProtocol* iprot);\n uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;\n\n};\n\nvoid swap(PDXSchema &a, PDXSchema &b);\n\n}}}} // namespace\n\n#endif"
(#ifndef) "#ifndef"
(identifier) "GFXD_STRUCT_PDXSCHEMA_H"
(preproc_def) "#define GFXD_STRUCT_PDXSCHEMA_H\n"
(#define) "#define"
(identifier) "GFXD_STRUCT_PDXSCHEMA_H"
(preproc_include) "#include "gfxd_types.h"\n"
(#include) "#include"
(string_literal) ""gfxd_types.h""
(") """
(string_content) "gfxd_types.h"
(") """
(preproc_include) "#include "gfxd_struct_FieldDescriptor.h"\n"
(#include) "#include"
(string_literal) ""gfxd_struct_FieldDescriptor.h""
(") """
(string_content) "gfxd_struct_FieldDescriptor.h"
(") """
(preproc_include) "#include "gfxd_struct_Decimal.h"\n"
(#include) "#include"
(string_literal) ""gfxd_struct_Decimal.h""
(") """
(string_content) "gfxd_struct_Decimal.h"
(") """
(preproc_include) "#include "gfxd_struct_Timestamp.h"\n"
(#include) "#include"
(string_literal) ""gfxd_struct_Timestamp.h""
(") """
(string_content) "gfxd_struct_Timestamp.h"
(") """
(preproc_include) "#include "gfxd_struct_FieldValue.h"\n"
(#include) "#include"
(string_literal) ""gfxd_struct_FieldValue.h""
(") """
(string_content) "gfxd_struct_FieldValue.h"
(") """
(preproc_include) "#include "gfxd_struct_PDXNode.h"\n"
(#include) "#include"
(string_literal) ""gfxd_struct_PDXNode.h""
(") """
(string_content) "gfxd_struct_PDXNode.h"
(") """
(preproc_include) "#include "gfxd_struct_PDXObject.h"\n"
(#include) "#include"
(string_literal) ""gfxd_struct_PDXObject.h""
(") """
(string_content) "gfxd_struct_PDXObject.h"
(") """
(preproc_include) "#include "gfxd_struct_PDXSchemaNode.h"\n"
(#include) "#include"
(string_literal) ""gfxd_struct_PDXSchemaNode.h""
(") """
(string_content) "gfxd_struct_PDXSchemaNode.h"
(") """
(function_definition) "namespace com { namespace pivotal { namespace gemfirexd { namespace thrift {\n\n\nclass PDXSchema {\n public:\n\n static const char* ascii_fingerprint; // = "4952724FA891398142DA215A5B73EA06";\n static const uint8_t binary_fingerprint[16]; // = {0x49,0x52,0x72,0x4F,0xA8,0x91,0x39,0x81,0x42,0xDA,0x21,0x5A,0x5B,0x73,0xEA,0x06};\n\n PDXSchema() {\n }\n\n virtual ~PDXSchema() throw() {}\n\n std::vector<PDXSchemaNode> nodes;\n\n void __set_nodes(const std::vector<PDXSchemaNode> & val) {\n nodes = val;\n }\n\n bool operator == (const PDXSchema & rhs) const\n {\n if (!(nodes == rhs.nodes))\n return false;\n return true;\n }\n bool operator != (const PDXSchema &rhs) const {\n return !(*this == rhs);\n }\n\n bool operator < (const PDXSchema & ) const;\n\n uint32_t read(::apache::thrift::protocol::TProtocol* iprot);\n uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;\n\n};\n\nvoid swap(PDXSchema &a, PDXSchema &b);\n\n}}}}"
(type_identifier) "namespace"
(identifier) "com"
(compound_statement) "{ namespace pivotal { namespace gemfirexd { namespace thrift {\n\n\nclass PDXSchema {\n public:\n\n static const char* ascii_fingerprint; // = "4952724FA891398142DA215A5B73EA06";\n static const uint8_t binary_fingerprint[16]; // = {0x49,0x52,0x72,0x4F,0xA8,0x91,0x39,0x81,0x42,0xDA,0x21,0x5A,0x5B,0x73,0xEA,0x06};\n\n PDXSchema() {\n }\n\n virtual ~PDXSchema() throw() {}\n\n std::vector<PDXSchemaNode> nodes;\n\n void __set_nodes(const std::vector<PDXSchemaNode> & val) {\n nodes = val;\n }\n\n bool operator == (const PDXSchema & rhs) const\n {\n if (!(nodes == rhs.nodes))\n return false;\n return true;\n }\n bool operator != (const PDXSchema &rhs) const {\n return !(*this == rhs);\n }\n\n bool operator < (const PDXSchema & ) const;\n\n uint32_t read(::apache::thrift::protocol::TProtocol* iprot);\n uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;\n\n};\n\nvoid swap(PDXSchema &a, PDXSchema &b);\n\n}}}}"
({) "{"
(function_definition) "namespace pivotal { namespace gemfirexd { namespace thrift {\n\n\nclass PDXSchema {\n public:\n\n static const char* ascii_fingerprint; // = "4952724FA891398142DA215A5B73EA06";\n static const uint8_t binary_fingerprint[16]; // = {0x49,0x52,0x72,0x4F,0xA8,0x91,0x39,0x81,0x42,0xDA,0x21,0x5A,0x5B,0x73,0xEA,0x06};\n\n PDXSchema() {\n }\n\n virtual ~PDXSchema() throw() {}\n\n std::vector<PDXSchemaNode> nodes;\n\n void __set_nodes(const std::vector<PDXSchemaNode> & val) {\n nodes = val;\n }\n\n bool operator == (const PDXSchema & rhs) const\n {\n if (!(nodes == rhs.nodes))\n return false;\n return true;\n }\n bool operator != (const PDXSchema &rhs) const {\n return !(*this == rhs);\n }\n\n bool operator < (const PDXSchema & ) const;\n\n uint32_t read(::apache::thrift::protocol::TProtocol* iprot);\n uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;\n\n};\n\nvoid swap(PDXSchema &a, PDXSchema &b);\n\n}}}"
(type_identifier) "namespace"
(identifier) "pivotal"
(compound_statement) "{ namespace gemfirexd { namespace thrift {\n\n\nclass PDXSchema {\n public:\n\n static const char* ascii_fingerprint; // = "4952724FA891398142DA215A5B73EA06";\n static const uint8_t binary_fingerprint[16]; // = {0x49,0x52,0x72,0x4F,0xA8,0x91,0x39,0x81,0x42,0xDA,0x21,0x5A,0x5B,0x73,0xEA,0x06};\n\n PDXSchema() {\n }\n\n virtual ~PDXSchema() throw() {}\n\n std::vector<PDXSchemaNode> nodes;\n\n void __set_nodes(const std::vector<PDXSchemaNode> & val) {\n nodes = val;\n }\n\n bool operator == (const PDXSchema & rhs) const\n {\n if (!(nodes == rhs.nodes))\n return false;\n return true;\n }\n bool operator != (const PDXSchema &rhs) const {\n return !(*this == rhs);\n }\n\n bool operator < (const PDXSchema & ) const;\n\n uint32_t read(::apache::thrift::protocol::TProtocol* iprot);\n uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;\n\n};\n\nvoid swap(PDXSchema &a, PDXSchema &b);\n\n}}}"
({) "{"
(function_definition) "namespace gemfirexd { namespace thrift {\n\n\nclass PDXSchema {\n public:\n\n static const char* ascii_fingerprint; // = "4952724FA891398142DA215A5B73EA06";\n static const uint8_t binary_fingerprint[16]; // = {0x49,0x52,0x72,0x4F,0xA8,0x91,0x39,0x81,0x42,0xDA,0x21,0x5A,0x5B,0x73,0xEA,0x06};\n\n PDXSchema() {\n }\n\n virtual ~PDXSchema() throw() {}\n\n std::vector<PDXSchemaNode> nodes;\n\n void __set_nodes(const std::vector<PDXSchemaNode> & val) {\n nodes = val;\n }\n\n bool operator == (const PDXSchema & rhs) const\n {\n if (!(nodes == rhs.nodes))\n return false;\n return true;\n }\n bool operator != (const PDXSchema &rhs) const {\n return !(*this == rhs);\n }\n\n bool operator < (const PDXSchema & ) const;\n\n uint32_t read(::apache::thrift::protocol::TProtocol* iprot);\n uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;\n\n};\n\nvoid swap(PDXSchema &a, PDXSchema &b);\n\n}}"
(type_identifier) "namespace"
(identifier) "gemfirexd"
(compound_statement) "{ namespace thrift {\n\n\nclass PDXSchema {\n public:\n\n static const char* ascii_fingerprint; // = "4952724FA891398142DA215A5B73EA06";\n static const uint8_t binary_fingerprint[16]; // = {0x49,0x52,0x72,0x4F,0xA8,0x91,0x39,0x81,0x42,0xDA,0x21,0x5A,0x5B,0x73,0xEA,0x06};\n\n PDXSchema() {\n }\n\n virtual ~PDXSchema() throw() {}\n\n std::vector<PDXSchemaNode> nodes;\n\n void __set_nodes(const std::vector<PDXSchemaNode> & val) {\n nodes = val;\n }\n\n bool operator == (const PDXSchema & rhs) const\n {\n if (!(nodes == rhs.nodes))\n return false;\n return true;\n }\n bool operator != (const PDXSchema &rhs) const {\n return !(*this == rhs);\n }\n\n bool operator < (const PDXSchema & ) const;\n\n uint32_t read(::apache::thrift::protocol::TProtocol* iprot);\n uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;\n\n};\n\nvoid swap(PDXSchema &a, PDXSchema &b);\n\n}}"
({) "{"
(function_definition) "namespace thrift {\n\n\nclass PDXSchema {\n public:\n\n static const char* ascii_fingerprint; // = "4952724FA891398142DA215A5B73EA06";\n static const uint8_t binary_fingerprint[16]; // = {0x49,0x52,0x72,0x4F,0xA8,0x91,0x39,0x81,0x42,0xDA,0x21,0x5A,0x5B,0x73,0xEA,0x06};\n\n PDXSchema() {\n }\n\n virtual ~PDXSchema() throw() {}\n\n std::vector<PDXSchemaNode> nodes;\n\n void __set_nodes(const std::vector<PDXSchemaNode> & val) {\n nodes = val;\n }\n\n bool operator == (const PDXSchema & rhs) const\n {\n if (!(nodes == rhs.nodes))\n return false;\n return true;\n }\n bool operator != (const PDXSchema &rhs) const {\n return !(*this == rhs);\n }\n\n bool operator < (const PDXSchema & ) const;\n\n uint32_t read(::apache::thrift::protocol::TProtocol* iprot);\n uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;\n\n};\n\nvoid swap(PDXSchema &a, PDXSchema &b);\n\n}"
(type_identifier) "namespace"
(identifier) "thrift"
(compound_statement) "{\n\n\nclass PDXSchema {\n public:\n\n static const char* ascii_fingerprint; // = "4952724FA891398142DA215A5B73EA06";\n static const uint8_t binary_fingerprint[16]; // = {0x49,0x52,0x72,0x4F,0xA8,0x91,0x39,0x81,0x42,0xDA,0x21,0x5A,0x5B,0x73,0xEA,0x06};\n\n PDXSchema() {\n }\n\n virtual ~PDXSchema() throw() {}\n\n std::vector<PDXSchemaNode> nodes;\n\n void __set_nodes(const std::vector<PDXSchemaNode> & val) {\n nodes = val;\n }\n\n bool operator == (const PDXSchema & rhs) const\n {\n if (!(nodes == rhs.nodes))\n return false;\n return true;\n }\n bool operator != (const PDXSchema &rhs) const {\n return !(*this == rhs);\n }\n\n bool operator < (const PDXSchema & ) const;\n\n uint32_t read(::apache::thrift::protocol::TProtocol* iprot);\n uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;\n\n};\n\nvoid swap(PDXSchema &a, PDXSchema &b);\n\n}"
({) "{"
(function_definition) "class PDXSchema {\n public:\n\n static const char* ascii_fingerprint; // = "4952724FA891398142DA215A5B73EA06";\n static const uint8_t binary_fingerprint[16]; // = {0x49,0x52,0x72,0x4F,0xA8,0x91,0x39,0x81,0x42,0xDA,0x21,0x5A,0x5B,0x73,0xEA,0x06};\n\n PDXSchema() {\n }\n\n virtual ~PDXSchema() throw() {}\n\n std::vector<PDXSchemaNode> nodes;\n\n void __set_nodes(const std::vector<PDXSchemaNode> & val) {\n nodes = val;\n }\n\n bool operator == (const PDXSchema & rhs) const\n {\n if (!(nodes == rhs.nodes))\n return false;\n return true;\n }\n bool operator != (const PDXSchema &rhs) const {\n return !(*this == rhs);\n }\n\n bool operator < (const PDXSchema & ) const;\n\n uint32_t read(::apache::thrift::protocol::TProtocol* iprot);\n uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;\n\n}"
(type_identifier) "class"
(identifier) "PDXSchema"
(compound_statement) "{\n public:\n\n static const char* ascii_fingerprint; // = "4952724FA891398142DA215A5B73EA06";\n static const uint8_t binary_fingerprint[16]; // = {0x49,0x52,0x72,0x4F,0xA8,0x91,0x39,0x81,0x42,0xDA,0x21,0x5A,0x5B,0x73,0xEA,0x06};\n\n PDXSchema() {\n }\n\n virtual ~PDXSchema() throw() {}\n\n std::vector<PDXSchemaNode> nodes;\n\n void __set_nodes(const std::vector<PDXSchemaNode> & val) {\n nodes = val;\n }\n\n bool operator == (const PDXSchema & rhs) const\n {\n if (!(nodes == rhs.nodes))\n return false;\n return true;\n }\n bool operator != (const PDXSchema &rhs) const {\n return !(*this == rhs);\n }\n\n bool operator < (const PDXSchema & ) const;\n\n uint32_t read(::apache::thrift::protocol::TProtocol* iprot);\n uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;\n\n}"
({) "{"
(labeled_statement) "public:\n\n static const char* ascii_fingerprint;"
(statement_identifier) "public"
(:) ":"
(declaration) "static const char* ascii_fingerprint;"
(storage_class_specifier) "static"
(static) "static"
(type_qualifier) "const"
(const) "const"
(primitive_type) "char"
(pointer_declarator) "* ascii_fingerprint"
(*) "*"
(identifier) "ascii_fingerprint"
(;) ";"
(comment) "// = "4952724FA891398142DA215A5B73EA06";"
(declaration) "static const uint8_t binary_fingerprint[16];"
(storage_class_specifier) "static"
(static) "static"
(type_qualifier) "const"
(const) "const"
(primitive_type) "uint8_t"
(array_declarator) "binary_fingerprint[16]"
(identifier) "binary_fingerprint"
([) "["
(number_literal) "16"
(]) "]"
(;) ";"
(comment) "// = {0x49,0x52,0x72,0x4F,0xA8,0x91,0x39,0x81,0x42,0xDA,0x21,0x5A,0x5B,0x73,0xEA,0x06};"
(expression_statement) "PDXSchema()"
(call_expression) "PDXSchema()"
(identifier) "PDXSchema"
(argument_list) "()"
(() "("
()) ")"
(;) ""
(compound_statement) "{\n }"
({) "{"
(}) "}"
(function_definition) "virtual ~PDXSchema() throw() {}"
(type_identifier) "virtual"
(ERROR) "~"
(~) "~"
(function_declarator) "PDXSchema() throw()"
(identifier) "PDXSchema"
(parameter_list) "()"
(() "("
()) ")"
(call_expression) "throw()"
(identifier) "throw"
(argument_list) "()"
(() "("
()) ")"
(compound_statement) "{}"
({) "{"
(}) "}"
(labeled_statement) "std::vector<PDXSchemaNode> nodes;"
(statement_identifier) "std"
(:) ":"
(ERROR) ":"
(:) ":"
(expression_statement) "vector<PDXSchemaNode> nodes;"
(binary_expression) "vector<PDXSchemaNode> nodes"
(binary_expression) "vector<PDXSchemaNode"
(identifier) "vector"
(<) "<"
(identifier) "PDXSchemaNode"
(>) ">"
(identifier) "nodes"
(;) ";"
(function_definition) "void __set_nodes(const std::vector<PDXSchemaNode> & val) {\n nodes = val;\n }"
(primitive_type) "void"
(function_declarator) "__set_nodes(const std::vector<PDXSchemaNode> & val)"
(identifier) "__set_nodes"
(parameter_list) "(const std::vector<PDXSchemaNode> & val)"
(() "("
(parameter_declaration) "const std::vector<PDXSchemaNode> & val"
(type_qualifier) "const"
(const) "const"
(type_identifier) "std"
(ERROR) "::vector<PDXSchemaNode> &"
(:) ":"
(:) ":"
(identifier) "vector"
(<) "<"
(identifier) "PDXSchemaNode"
(>) ">"
(&) "&"
(identifier) "val"
()) ")"
(compound_statement) "{\n nodes = val;\n }"
({) "{"
(expression_statement) "nodes = val;"
(assignment_expression) "nodes = val"
(identifier) "nodes"
(=) "="
(identifier) "val"
(;) ";"
(}) "}"
(function_definition) "bool operator == (const PDXSchema & rhs) const\n {\n if (!(nodes == rhs.nodes))\n return false;\n return true;\n }"
(primitive_type) "bool"
(function_declarator) "operator == (const PDXSchema & rhs) const"
(identifier) "operator"
(ERROR) "=="
(==) "=="
(parameter_list) "(const PDXSchema & rhs)"
(() "("
(parameter_declaration) "const PDXSchema & rhs"
(type_qualifier) "const"
(const) "const"
(type_identifier) "PDXSchema"
(ERROR) "&"
(&) "&"
(identifier) "rhs"
()) ")"
(identifier) "const"
(compound_statement) "{\n if (!(nodes == rhs.nodes))\n return false;\n return true;\n }"
({) "{"
(if_statement) "if (!(nodes == rhs.nodes))\n return false;"
(if) "if"
(parenthesized_expression) "(!(nodes == rhs.nodes))"
(() "("
(unary_expression) "!(nodes == rhs.nodes)"
(!) "!"
(parenthesized_expression) "(nodes == rhs.nodes)"
(() "("
(binary_expression) "nodes == rhs.nodes"
(identifier) "nodes"
(==) "=="
(field_expression) "rhs.nodes"
(identifier) "rhs"
(.) "."
(field_identifier) "nodes"
()) ")"
()) ")"
(return_statement) "return false;"
(return) "return"
(false) "false"
(;) ";"
(return_statement) "return true;"
(return) "return"
(true) "true"
(;) ";"
(}) "}"
(function_definition) "bool operator != (const PDXSchema &rhs) const {\n return !(*this == rhs);\n }"
(primitive_type) "bool"
(function_declarator) "operator != (const PDXSchema &rhs) const"
(identifier) "operator"
(ERROR) "!="
(!=) "!="
(parameter_list) "(const PDXSchema &rhs)"
(() "("
(parameter_declaration) "const PDXSchema &rhs"
(type_qualifier) "const"
(const) "const"
(type_identifier) "PDXSchema"
(ERROR) "&"
(&) "&"
(identifier) "rhs"
()) ")"
(identifier) "const"
(compound_statement) "{\n return !(*this == rhs);\n }"
({) "{"
(return_statement) "return !(*this == rhs);"
(return) "return"
(unary_expression) "!(*this == rhs)"
(!) "!"
(parenthesized_expression) "(*this == rhs)"
(() "("
(binary_expression) "*this == rhs"
(pointer_expression) "*this"
(*) "*"
(identifier) "this"
(==) "=="
(identifier) "rhs"
()) ")"
(;) ";"
(}) "}"
(ERROR) "bool operator < (const PDXSchema & ) const"
(primitive_type) "bool"
(function_declarator) "operator < (const PDXSchema & ) const"
(identifier) "operator"
(ERROR) "<"
(<) "<"
(parameter_list) "(const PDXSchema & )"
(() "("
(parameter_declaration) "const PDXSchema"
(type_qualifier) "const"
(const) "const"
(type_identifier) "PDXSchema"
(ERROR) "&"
(&) "&"
()) ")"
(identifier) "const"
(expression_statement) ";"
(;) ";"
(declaration) "uint32_t read(::apache::thrift::protocol::TProtocol* iprot);"
(primitive_type) "uint32_t"
(function_declarator) "read(::apache::thrift::protocol::TProtocol* iprot)"
(identifier) "read"
(parameter_list) "(::apache::thrift::protocol::TProtocol* iprot)"
(() "("
(ERROR) "::"
(:) ":"
(:) ":"
(parameter_declaration) "apache::thrift::protocol::TProtocol* iprot"
(type_identifier) "apache"
(ERROR) "::thrift::protocol::TProtocol"
(:) ":"
(:) ":"
(identifier) "thrift"
(:) ":"
(:) ":"
(identifier) "protocol"
(:) ":"
(:) ":"
(identifier) "TProtocol"
(pointer_declarator) "* iprot"
(*) "*"
(identifier) "iprot"
()) ")"
(;) ";"
(ERROR) "uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const"
(primitive_type) "uint32_t"
(function_declarator) "write(::apache::thrift::protocol::TProtocol* oprot) const"
(identifier) "write"
(parameter_list) "(::apache::thrift::protocol::TProtocol* oprot)"
(() "("
(ERROR) "::"
(:) ":"
(:) ":"
(parameter_declaration) "apache::thrift::protocol::TProtocol* oprot"
(type_identifier) "apache"
(ERROR) "::thrift::protocol::TProtocol"
(:) ":"
(:) ":"
(identifier) "thrift"
(:) ":"
(:) ":"
(identifier) "protocol"
(:) ":"
(:) ":"
(identifier) "TProtocol"
(pointer_declarator) "* oprot"
(*) "*"
(identifier) "oprot"
()) ")"
(identifier) "const"
(expression_statement) ";"
(;) ";"
(}) "}"
(expression_statement) ";"
(;) ";"
(declaration) "void swap(PDXSchema &a, PDXSchema &b);"
(primitive_type) "void"
(function_declarator) "swap(PDXSchema &a, PDXSchema &b)"
(identifier) "swap"
(parameter_list) "(PDXSchema &a, PDXSchema &b)"
(() "("
(parameter_declaration) "PDXSchema &a"
(type_identifier) "PDXSchema"
(ERROR) "&"
(&) "&"
(identifier) "a"
(,) ","
(parameter_declaration) "PDXSchema &b"
(type_identifier) "PDXSchema"
(ERROR) "&"
(&) "&"
(identifier) "b"
()) ")"
(;) ";"
(}) "}"
(}) "}"
(}) "}"
(}) "}"
(comment) "// namespace"
(#endif) "#endif"
| 357
| 17
|
{"language": "c", "success": true, "metadata": {"lines": 46, "avg_line_length": 30.0, "nodes": 187, "errors": 0, "source_hash": "b4749ec6e1789bd7c8fd20c6f20f5b08216af6ad447ac81d0a880433ccecf61f", "categorized_nodes": 132}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef GFXD_STRUCT_PDXSCHEMA_H\n#define GFXD_STRUCT_PDXSCHEMA_H\n\n\n#include \"gfxd_types.h\"\n\n#include \"gfxd_struct_FieldDescriptor.h\"\n#include \"gfxd_struct_Decimal.h\"\n#include \"gfxd_struct_Timestamp.h\"\n#include \"gfxd_struct_FieldValue.h\"\n#include \"gfxd_struct_PDXNode.h\"\n#include \"gfxd_struct_PDXObject.h\"\n#include \"gfxd_struct_PDXSchemaNode.h\"\n\nnamespace com { namespace pivotal { namespace gemfirexd { namespace thrift {\n\n\nclass PDXSchema {\n public:\n\n static const char* ascii_fingerprint; // = \"4952724FA891398142DA215A5B73EA06\";\n static const uint8_t binary_fingerprint[16]; // = {0x49,0x52,0x72,0x4F,0xA8,0x91,0x39,0x81,0x42,0xDA,0x21,0x5A,0x5B,0x73,0xEA,0x06};\n\n PDXSchema() {\n }\n\n virtual ~PDXSchema() throw() {}\n\n std::vector<PDXSchemaNode> nodes;\n\n void __set_nodes(const std::vector<PDXSchemaNode> & val) {\n nodes = val;\n }\n\n bool operator == (const PDXSchema & rhs) const\n {\n if (!(nodes == rhs.nodes))\n return false;\n return true;\n }\n bool operator != (const PDXSchema &rhs) const {\n return !(*this == rhs);\n }\n\n bool operator < (const PDXSchema & ) const;\n\n uint32_t read(::apache::thrift::protocol::TProtocol* iprot);\n uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;\n\n};\n\nvoid swap(PDXSchema &a, PDXSchema &b);\n\n}}}} // namespace\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 186], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 62, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 2, "type": "identifier", "text": "GFXD_STRUCT_PDXSCHEMA_H", "parent": 0, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 31}}, {"id": 3, "type": "preproc_def", "text": "#define GFXD_STRUCT_PDXSCHEMA_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 5, "type": "identifier", "text": "GFXD_STRUCT_PDXSCHEMA_H", "parent": 3, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 31}}, {"id": 6, "type": "preproc_include", "text": "#include \"gfxd_types.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"gfxd_types.h\"", "parent": 6, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 23}}, {"id": 9, "type": "preproc_include", "text": "#include \"gfxd_struct_FieldDescriptor.h\"\n", "parent": 0, "children": [10, 11], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"gfxd_struct_FieldDescriptor.h\"", "parent": 9, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 40}}, {"id": 12, "type": "preproc_include", "text": "#include \"gfxd_struct_Decimal.h\"\n", "parent": 0, "children": [13, 14], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"gfxd_struct_Decimal.h\"", "parent": 12, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 32}}, {"id": 15, "type": "preproc_include", "text": "#include \"gfxd_struct_Timestamp.h\"\n", "parent": 0, "children": [16, 17], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"gfxd_struct_Timestamp.h\"", "parent": 15, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 34}}, {"id": 18, "type": "preproc_include", "text": "#include \"gfxd_struct_FieldValue.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": "\"gfxd_struct_FieldValue.h\"", "parent": 18, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 35}}, {"id": 21, "type": "preproc_include", "text": "#include \"gfxd_struct_PDXNode.h\"\n", "parent": 0, "children": [22, 23], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 8}}, {"id": 23, "type": "string_literal", "text": "\"gfxd_struct_PDXNode.h\"", "parent": 21, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 32}}, {"id": 24, "type": "preproc_include", "text": "#include \"gfxd_struct_PDXObject.h\"\n", "parent": 0, "children": [25, 26], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 8}}, {"id": 26, "type": "string_literal", "text": "\"gfxd_struct_PDXObject.h\"", "parent": 24, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 34}}, {"id": 27, "type": "preproc_include", "text": "#include \"gfxd_struct_PDXSchemaNode.h\"\n", "parent": 0, "children": [28, 29], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 8}}, {"id": 29, "type": "string_literal", "text": "\"gfxd_struct_PDXSchemaNode.h\"", "parent": 27, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 38}}, {"id": 30, "type": "function_definition", "text": "namespace com { namespace pivotal { namespace gemfirexd { namespace thrift {\n\n\nclass PDXSchema {\n public:\n\n static const char* ascii_fingerprint; // = \"4952724FA891398142DA215A5B73EA06\";\n static const uint8_t binary_fingerprint[16]; // = {0x49,0x52,0x72,0x4F,0xA8,0x91,0x39,0x81,0x42,0xDA,0x21,0x5A,0x5B,0x73,0xEA,0x06};\n\n PDXSchema() {\n }\n\n virtual ~PDXSchema() throw() {}\n\n std::vector<PDXSchemaNode> nodes;\n\n void __set_nodes(const std::vector<PDXSchemaNode> & val) {\n nodes = val;\n }\n\n bool operator == (const PDXSchema & rhs) const\n {\n if (!(nodes == rhs.nodes))\n return false;\n return true;\n }\n bool operator != (const PDXSchema &rhs) const {\n return !(*this == rhs);\n }\n\n bool operator < (const PDXSchema & ) const;\n\n uint32_t read(::apache::thrift::protocol::TProtocol* iprot);\n uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;\n\n};\n\nvoid swap(PDXSchema &a, PDXSchema &b);\n\n}}}}", "parent": 0, "children": [31, 32], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 60, "column": 4}}, {"id": 31, "type": "type_identifier", "text": "namespace", "parent": 30, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 9}}, {"id": 32, "type": "identifier", "text": "com", "parent": 30, "children": [], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 13}}, {"id": 33, "type": "function_definition", "text": "namespace pivotal { namespace gemfirexd { namespace thrift {\n\n\nclass PDXSchema {\n public:\n\n static const char* ascii_fingerprint; // = \"4952724FA891398142DA215A5B73EA06\";\n static const uint8_t binary_fingerprint[16]; // = {0x49,0x52,0x72,0x4F,0xA8,0x91,0x39,0x81,0x42,0xDA,0x21,0x5A,0x5B,0x73,0xEA,0x06};\n\n PDXSchema() {\n }\n\n virtual ~PDXSchema() throw() {}\n\n std::vector<PDXSchemaNode> nodes;\n\n void __set_nodes(const std::vector<PDXSchemaNode> & val) {\n nodes = val;\n }\n\n bool operator == (const PDXSchema & rhs) const\n {\n if (!(nodes == rhs.nodes))\n return false;\n return true;\n }\n bool operator != (const PDXSchema &rhs) const {\n return !(*this == rhs);\n }\n\n bool operator < (const PDXSchema & ) const;\n\n uint32_t read(::apache::thrift::protocol::TProtocol* iprot);\n uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;\n\n};\n\nvoid swap(PDXSchema &a, PDXSchema &b);\n\n}}}", "parent": 30, "children": [34, 35], "start_point": {"row": 21, "column": 16}, "end_point": {"row": 60, "column": 3}}, {"id": 34, "type": "type_identifier", "text": "namespace", "parent": 33, "children": [], "start_point": {"row": 21, "column": 16}, "end_point": {"row": 21, "column": 25}}, {"id": 35, "type": "identifier", "text": "pivotal", "parent": 33, "children": [], "start_point": {"row": 21, "column": 26}, "end_point": {"row": 21, "column": 33}}, {"id": 36, "type": "function_definition", "text": "namespace gemfirexd { namespace thrift {\n\n\nclass PDXSchema {\n public:\n\n static const char* ascii_fingerprint; // = \"4952724FA891398142DA215A5B73EA06\";\n static const uint8_t binary_fingerprint[16]; // = {0x49,0x52,0x72,0x4F,0xA8,0x91,0x39,0x81,0x42,0xDA,0x21,0x5A,0x5B,0x73,0xEA,0x06};\n\n PDXSchema() {\n }\n\n virtual ~PDXSchema() throw() {}\n\n std::vector<PDXSchemaNode> nodes;\n\n void __set_nodes(const std::vector<PDXSchemaNode> & val) {\n nodes = val;\n }\n\n bool operator == (const PDXSchema & rhs) const\n {\n if (!(nodes == rhs.nodes))\n return false;\n return true;\n }\n bool operator != (const PDXSchema &rhs) const {\n return !(*this == rhs);\n }\n\n bool operator < (const PDXSchema & ) const;\n\n uint32_t read(::apache::thrift::protocol::TProtocol* iprot);\n uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;\n\n};\n\nvoid swap(PDXSchema &a, PDXSchema &b);\n\n}}", "parent": 33, "children": [37, 38], "start_point": {"row": 21, "column": 36}, "end_point": {"row": 60, "column": 2}}, {"id": 37, "type": "type_identifier", "text": "namespace", "parent": 36, "children": [], "start_point": {"row": 21, "column": 36}, "end_point": {"row": 21, "column": 45}}, {"id": 38, "type": "identifier", "text": "gemfirexd", "parent": 36, "children": [], "start_point": {"row": 21, "column": 46}, "end_point": {"row": 21, "column": 55}}, {"id": 39, "type": "function_definition", "text": "namespace thrift {\n\n\nclass PDXSchema {\n public:\n\n static const char* ascii_fingerprint; // = \"4952724FA891398142DA215A5B73EA06\";\n static const uint8_t binary_fingerprint[16]; // = {0x49,0x52,0x72,0x4F,0xA8,0x91,0x39,0x81,0x42,0xDA,0x21,0x5A,0x5B,0x73,0xEA,0x06};\n\n PDXSchema() {\n }\n\n virtual ~PDXSchema() throw() {}\n\n std::vector<PDXSchemaNode> nodes;\n\n void __set_nodes(const std::vector<PDXSchemaNode> & val) {\n nodes = val;\n }\n\n bool operator == (const PDXSchema & rhs) const\n {\n if (!(nodes == rhs.nodes))\n return false;\n return true;\n }\n bool operator != (const PDXSchema &rhs) const {\n return !(*this == rhs);\n }\n\n bool operator < (const PDXSchema & ) const;\n\n uint32_t read(::apache::thrift::protocol::TProtocol* iprot);\n uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;\n\n};\n\nvoid swap(PDXSchema &a, PDXSchema &b);\n\n}", "parent": 36, "children": [40, 41], "start_point": {"row": 21, "column": 58}, "end_point": {"row": 60, "column": 1}}, {"id": 40, "type": "type_identifier", "text": "namespace", "parent": 39, "children": [], "start_point": {"row": 21, "column": 58}, "end_point": {"row": 21, "column": 67}}, {"id": 41, "type": "identifier", "text": "thrift", "parent": 39, "children": [], "start_point": {"row": 21, "column": 68}, "end_point": {"row": 21, "column": 74}}, {"id": 42, "type": "function_definition", "text": "class PDXSchema {\n public:\n\n static const char* ascii_fingerprint; // = \"4952724FA891398142DA215A5B73EA06\";\n static const uint8_t binary_fingerprint[16]; // = {0x49,0x52,0x72,0x4F,0xA8,0x91,0x39,0x81,0x42,0xDA,0x21,0x5A,0x5B,0x73,0xEA,0x06};\n\n PDXSchema() {\n }\n\n virtual ~PDXSchema() throw() {}\n\n std::vector<PDXSchemaNode> nodes;\n\n void __set_nodes(const std::vector<PDXSchemaNode> & val) {\n nodes = val;\n }\n\n bool operator == (const PDXSchema & rhs) const\n {\n if (!(nodes == rhs.nodes))\n return false;\n return true;\n }\n bool operator != (const PDXSchema &rhs) const {\n return !(*this == rhs);\n }\n\n bool operator < (const PDXSchema & ) const;\n\n uint32_t read(::apache::thrift::protocol::TProtocol* iprot);\n uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;\n\n}", "parent": 39, "children": [43], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 56, "column": 1}}, {"id": 43, "type": "identifier", "text": "PDXSchema", "parent": 42, "children": [], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 15}}, {"id": 44, "type": "labeled_statement", "text": "public:\n\n static const char* ascii_fingerprint;", "parent": 42, "children": [45], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 27, "column": 39}}, {"id": 45, "type": "declaration", "text": "static const char* ascii_fingerprint;", "parent": 44, "children": [46, 47], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 39}}, {"id": 46, "type": "primitive_type", "text": "char", "parent": 45, "children": [], "start_point": {"row": 27, "column": 15}, "end_point": {"row": 27, "column": 19}}, {"id": 47, "type": "pointer_declarator", "text": "* ascii_fingerprint", "parent": 45, "children": [48, 49], "start_point": {"row": 27, "column": 19}, "end_point": {"row": 27, "column": 38}}, {"id": 48, "type": "*", "text": "*", "parent": 47, "children": [], "start_point": {"row": 27, "column": 19}, "end_point": {"row": 27, "column": 20}}, {"id": 49, "type": "identifier", "text": "ascii_fingerprint", "parent": 47, "children": [], "start_point": {"row": 27, "column": 21}, "end_point": {"row": 27, "column": 38}}, {"id": 50, "type": "declaration", "text": "static const uint8_t binary_fingerprint[16];", "parent": 42, "children": [51, 52], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 46}}, {"id": 51, "type": "primitive_type", "text": "uint8_t", "parent": 50, "children": [], "start_point": {"row": 28, "column": 15}, "end_point": {"row": 28, "column": 22}}, {"id": 52, "type": "array_declarator", "text": "binary_fingerprint[16]", "parent": 50, "children": [53, 54], "start_point": {"row": 28, "column": 23}, "end_point": {"row": 28, "column": 45}}, {"id": 53, "type": "identifier", "text": "binary_fingerprint", "parent": 52, "children": [], "start_point": {"row": 28, "column": 23}, "end_point": {"row": 28, "column": 41}}, {"id": 54, "type": "number_literal", "text": "16", "parent": 52, "children": [], "start_point": {"row": 28, "column": 42}, "end_point": {"row": 28, "column": 44}}, {"id": 55, "type": "call_expression", "text": "PDXSchema()", "parent": 42, "children": [56, 57], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 13}}, {"id": 56, "type": "identifier", "text": "PDXSchema", "parent": 55, "children": [], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 11}}, {"id": 57, "type": "argument_list", "text": "()", "parent": 55, "children": [], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 13}}, {"id": 58, "type": "function_definition", "text": "virtual ~PDXSchema() throw() {}", "parent": 42, "children": [59, 60, 62], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 33}}, {"id": 59, "type": "type_identifier", "text": "virtual", "parent": 58, "children": [], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 9}}, {"id": 60, "type": "ERROR", "text": "~", "parent": 58, "children": [61], "start_point": {"row": 33, "column": 10}, "end_point": {"row": 33, "column": 11}}, {"id": 61, "type": "~", "text": "~", "parent": 60, "children": [], "start_point": {"row": 33, "column": 10}, "end_point": {"row": 33, "column": 11}}, {"id": 62, "type": "function_declarator", "text": "PDXSchema() throw()", "parent": 58, "children": [63, 64, 65], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 30}}, {"id": 63, "type": "identifier", "text": "PDXSchema", "parent": 62, "children": [], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 20}}, {"id": 64, "type": "parameter_list", "text": "()", "parent": 62, "children": [], "start_point": {"row": 33, "column": 20}, "end_point": {"row": 33, "column": 22}}, {"id": 65, "type": "call_expression", "text": "throw()", "parent": 62, "children": [66], "start_point": {"row": 33, "column": 23}, "end_point": {"row": 33, "column": 30}}, {"id": 66, "type": "argument_list", "text": "()", "parent": 65, "children": [], "start_point": {"row": 33, "column": 28}, "end_point": {"row": 33, "column": 30}}, {"id": 67, "type": "labeled_statement", "text": "std::vector<PDXSchemaNode> nodes;", "parent": 42, "children": [68], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 36}}, {"id": 68, "type": "statement_identifier", "text": "std", "parent": 67, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 5}}, {"id": 69, "type": "binary_expression", "text": "vector<PDXSchemaNode> nodes", "parent": 67, "children": [70, 74, 75], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 35}}, {"id": 70, "type": "binary_expression", "text": "vector<PDXSchemaNode", "parent": 69, "children": [71, 72, 73], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 27}}, {"id": 71, "type": "identifier", "text": "vector", "parent": 70, "children": [], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 13}}, {"id": 72, "type": "<", "text": "<", "parent": 70, "children": [], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 14}}, {"id": 73, "type": "identifier", "text": "PDXSchemaNode", "parent": 70, "children": [], "start_point": {"row": 35, "column": 14}, "end_point": {"row": 35, "column": 27}}, {"id": 74, "type": ">", "text": ">", "parent": 69, "children": [], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 28}}, {"id": 75, "type": "identifier", "text": "nodes", "parent": 69, "children": [], "start_point": {"row": 35, "column": 30}, "end_point": {"row": 35, "column": 35}}, {"id": 76, "type": "function_definition", "text": "void __set_nodes(const std::vector<PDXSchemaNode> & val) {\n nodes = val;\n }", "parent": 42, "children": [77, 78], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 39, "column": 3}}, {"id": 77, "type": "primitive_type", "text": "void", "parent": 76, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 6}}, {"id": 78, "type": "function_declarator", "text": "__set_nodes(const std::vector<PDXSchemaNode> & val)", "parent": 76, "children": [79, 80], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 58}}, {"id": 79, "type": "identifier", "text": "__set_nodes", "parent": 78, "children": [], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 18}}, {"id": 80, "type": "parameter_list", "text": "(const std::vector<PDXSchemaNode> & val)", "parent": 78, "children": [81], "start_point": {"row": 37, "column": 18}, "end_point": {"row": 37, "column": 58}}, {"id": 81, "type": "parameter_declaration", "text": "const std::vector<PDXSchemaNode> & val", "parent": 80, "children": [82, 83, 88], "start_point": {"row": 37, "column": 19}, "end_point": {"row": 37, "column": 57}}, {"id": 82, "type": "type_identifier", "text": "std", "parent": 81, "children": [], "start_point": {"row": 37, "column": 25}, "end_point": {"row": 37, "column": 28}}, {"id": 83, "type": "ERROR", "text": "::vector<PDXSchemaNode> &", "parent": 81, "children": [84, 85, 86, 87], "start_point": {"row": 37, "column": 28}, "end_point": {"row": 37, "column": 53}}, {"id": 84, "type": "identifier", "text": "vector", "parent": 83, "children": [], "start_point": {"row": 37, "column": 30}, "end_point": {"row": 37, "column": 36}}, {"id": 85, "type": "<", "text": "<", "parent": 83, "children": [], "start_point": {"row": 37, "column": 36}, "end_point": {"row": 37, "column": 37}}, {"id": 86, "type": "identifier", "text": "PDXSchemaNode", "parent": 83, "children": [], "start_point": {"row": 37, "column": 37}, "end_point": {"row": 37, "column": 50}}, {"id": 87, "type": ">", "text": ">", "parent": 83, "children": [], "start_point": {"row": 37, "column": 50}, "end_point": {"row": 37, "column": 51}}, {"id": 88, "type": "identifier", "text": "val", "parent": 81, "children": [], "start_point": {"row": 37, "column": 54}, "end_point": {"row": 37, "column": 57}}, {"id": 89, "type": "assignment_expression", "text": "nodes = val", "parent": 76, "children": [90, 91, 92], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 15}}, {"id": 90, "type": "identifier", "text": "nodes", "parent": 89, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 9}}, {"id": 91, "type": "=", "text": "=", "parent": 89, "children": [], "start_point": {"row": 38, "column": 10}, "end_point": {"row": 38, "column": 11}}, {"id": 92, "type": "identifier", "text": "val", "parent": 89, "children": [], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 15}}, {"id": 93, "type": "function_definition", "text": "bool operator == (const PDXSchema & rhs) const\n {\n if (!(nodes == rhs.nodes))\n return false;\n return true;\n }", "parent": 42, "children": [94, 95], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 46, "column": 3}}, {"id": 94, "type": "primitive_type", "text": "bool", "parent": 93, "children": [], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 6}}, {"id": 95, "type": "function_declarator", "text": "operator == (const PDXSchema & rhs) const", "parent": 93, "children": [96, 97, 99], "start_point": {"row": 41, "column": 7}, "end_point": {"row": 41, "column": 48}}, {"id": 96, "type": "identifier", "text": "operator", "parent": 95, "children": [], "start_point": {"row": 41, "column": 7}, "end_point": {"row": 41, "column": 15}}, {"id": 97, "type": "ERROR", "text": "==", "parent": 95, "children": [98], "start_point": {"row": 41, "column": 16}, "end_point": {"row": 41, "column": 18}}, {"id": 98, "type": "==", "text": "==", "parent": 97, "children": [], "start_point": {"row": 41, "column": 16}, "end_point": {"row": 41, "column": 18}}, {"id": 99, "type": "parameter_list", "text": "(const PDXSchema & rhs)", "parent": 95, "children": [100], "start_point": {"row": 41, "column": 19}, "end_point": {"row": 41, "column": 42}}, {"id": 100, "type": "parameter_declaration", "text": "const PDXSchema & rhs", "parent": 99, "children": [101, 102], "start_point": {"row": 41, "column": 20}, "end_point": {"row": 41, "column": 41}}, {"id": 101, "type": "type_identifier", "text": "PDXSchema", "parent": 100, "children": [], "start_point": {"row": 41, "column": 26}, "end_point": {"row": 41, "column": 35}}, {"id": 102, "type": "identifier", "text": "rhs", "parent": 100, "children": [], "start_point": {"row": 41, "column": 38}, "end_point": {"row": 41, "column": 41}}, {"id": 103, "type": "if_statement", "text": "if (!(nodes == rhs.nodes))\n return false;", "parent": 93, "children": [104, 114], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 44, "column": 19}}, {"id": 104, "type": "parenthesized_expression", "text": "(!(nodes == rhs.nodes))", "parent": 103, "children": [105], "start_point": {"row": 43, "column": 7}, "end_point": {"row": 43, "column": 30}}, {"id": 105, "type": "unary_expression", "text": "!(nodes == rhs.nodes)", "parent": 104, "children": [106, 107], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 29}}, {"id": 106, "type": "!", "text": "!", "parent": 105, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 9}}, {"id": 107, "type": "parenthesized_expression", "text": "(nodes == rhs.nodes)", "parent": 105, "children": [108], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 29}}, {"id": 108, "type": "binary_expression", "text": "nodes == rhs.nodes", "parent": 107, "children": [109, 110, 111], "start_point": {"row": 43, "column": 10}, "end_point": {"row": 43, "column": 28}}, {"id": 109, "type": "identifier", "text": "nodes", "parent": 108, "children": [], "start_point": {"row": 43, "column": 10}, "end_point": {"row": 43, "column": 15}}, {"id": 110, "type": "==", "text": "==", "parent": 108, "children": [], "start_point": {"row": 43, "column": 16}, "end_point": {"row": 43, "column": 18}}, {"id": 111, "type": "field_expression", "text": "rhs.nodes", "parent": 108, "children": [112, 113], "start_point": {"row": 43, "column": 19}, "end_point": {"row": 43, "column": 28}}, {"id": 112, "type": "identifier", "text": "rhs", "parent": 111, "children": [], "start_point": {"row": 43, "column": 19}, "end_point": {"row": 43, "column": 22}}, {"id": 113, "type": "field_identifier", "text": "nodes", "parent": 111, "children": [], "start_point": {"row": 43, "column": 23}, "end_point": {"row": 43, "column": 28}}, {"id": 114, "type": "return_statement", "text": "return false;", "parent": 103, "children": [115], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 19}}, {"id": 115, "type": "false", "text": "false", "parent": 114, "children": [], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 18}}, {"id": 116, "type": "return_statement", "text": "return true;", "parent": 93, "children": [117], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 16}}, {"id": 117, "type": "true", "text": "true", "parent": 116, "children": [], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 15}}, {"id": 118, "type": "function_definition", "text": "bool operator != (const PDXSchema &rhs) const {\n return !(*this == rhs);\n }", "parent": 42, "children": [119, 120], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 49, "column": 3}}, {"id": 119, "type": "primitive_type", "text": "bool", "parent": 118, "children": [], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 6}}, {"id": 120, "type": "function_declarator", "text": "operator != (const PDXSchema &rhs) const", "parent": 118, "children": [121, 122, 124], "start_point": {"row": 47, "column": 7}, "end_point": {"row": 47, "column": 47}}, {"id": 121, "type": "identifier", "text": "operator", "parent": 120, "children": [], "start_point": {"row": 47, "column": 7}, "end_point": {"row": 47, "column": 15}}, {"id": 122, "type": "ERROR", "text": "!=", "parent": 120, "children": [123], "start_point": {"row": 47, "column": 16}, "end_point": {"row": 47, "column": 18}}, {"id": 123, "type": "!=", "text": "!=", "parent": 122, "children": [], "start_point": {"row": 47, "column": 16}, "end_point": {"row": 47, "column": 18}}, {"id": 124, "type": "parameter_list", "text": "(const PDXSchema &rhs)", "parent": 120, "children": [125], "start_point": {"row": 47, "column": 19}, "end_point": {"row": 47, "column": 41}}, {"id": 125, "type": "parameter_declaration", "text": "const PDXSchema &rhs", "parent": 124, "children": [126, 127], "start_point": {"row": 47, "column": 20}, "end_point": {"row": 47, "column": 40}}, {"id": 126, "type": "type_identifier", "text": "PDXSchema", "parent": 125, "children": [], "start_point": {"row": 47, "column": 26}, "end_point": {"row": 47, "column": 35}}, {"id": 127, "type": "identifier", "text": "rhs", "parent": 125, "children": [], "start_point": {"row": 47, "column": 37}, "end_point": {"row": 47, "column": 40}}, {"id": 128, "type": "return_statement", "text": "return !(*this == rhs);", "parent": 118, "children": [129], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 27}}, {"id": 129, "type": "unary_expression", "text": "!(*this == rhs)", "parent": 128, "children": [130, 131], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 26}}, {"id": 130, "type": "!", "text": "!", "parent": 129, "children": [], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 12}}, {"id": 131, "type": "parenthesized_expression", "text": "(*this == rhs)", "parent": 129, "children": [132], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 48, "column": 26}}, {"id": 132, "type": "binary_expression", "text": "*this == rhs", "parent": 131, "children": [133, 136, 137], "start_point": {"row": 48, "column": 13}, "end_point": {"row": 48, "column": 25}}, {"id": 133, "type": "pointer_expression", "text": "*this", "parent": 132, "children": [134, 135], "start_point": {"row": 48, "column": 13}, "end_point": {"row": 48, "column": 18}}, {"id": 134, "type": "*", "text": "*", "parent": 133, "children": [], "start_point": {"row": 48, "column": 13}, "end_point": {"row": 48, "column": 14}}, {"id": 135, "type": "identifier", "text": "this", "parent": 133, "children": [], "start_point": {"row": 48, "column": 14}, "end_point": {"row": 48, "column": 18}}, {"id": 136, "type": "==", "text": "==", "parent": 132, "children": [], "start_point": {"row": 48, "column": 19}, "end_point": {"row": 48, "column": 21}}, {"id": 137, "type": "identifier", "text": "rhs", "parent": 132, "children": [], "start_point": {"row": 48, "column": 22}, "end_point": {"row": 48, "column": 25}}, {"id": 138, "type": "ERROR", "text": "bool operator < (const PDXSchema & ) const", "parent": 42, "children": [139, 140], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 44}}, {"id": 139, "type": "primitive_type", "text": "bool", "parent": 138, "children": [], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 6}}, {"id": 140, "type": "function_declarator", "text": "operator < (const PDXSchema & ) const", "parent": 138, "children": [141, 142, 144], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 44}}, {"id": 141, "type": "identifier", "text": "operator", "parent": 140, "children": [], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 15}}, {"id": 142, "type": "ERROR", "text": "<", "parent": 140, "children": [143], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 17}}, {"id": 143, "type": "<", "text": "<", "parent": 142, "children": [], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 17}}, {"id": 144, "type": "parameter_list", "text": "(const PDXSchema & )", "parent": 140, "children": [145], "start_point": {"row": 51, "column": 18}, "end_point": {"row": 51, "column": 38}}, {"id": 145, "type": "parameter_declaration", "text": "const PDXSchema", "parent": 144, "children": [146], "start_point": {"row": 51, "column": 19}, "end_point": {"row": 51, "column": 34}}, {"id": 146, "type": "type_identifier", "text": "PDXSchema", "parent": 145, "children": [], "start_point": {"row": 51, "column": 25}, "end_point": {"row": 51, "column": 34}}, {"id": 147, "type": "declaration", "text": "uint32_t read(::apache::thrift::protocol::TProtocol* iprot);", "parent": 42, "children": [148, 149], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 62}}, {"id": 148, "type": "primitive_type", "text": "uint32_t", "parent": 147, "children": [], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 10}}, {"id": 149, "type": "function_declarator", "text": "read(::apache::thrift::protocol::TProtocol* iprot)", "parent": 147, "children": [150, 151], "start_point": {"row": 53, "column": 11}, "end_point": {"row": 53, "column": 61}}, {"id": 150, "type": "identifier", "text": "read", "parent": 149, "children": [], "start_point": {"row": 53, "column": 11}, "end_point": {"row": 53, "column": 15}}, {"id": 151, "type": "parameter_list", "text": "(::apache::thrift::protocol::TProtocol* iprot)", "parent": 149, "children": [152], "start_point": {"row": 53, "column": 15}, "end_point": {"row": 53, "column": 61}}, {"id": 152, "type": "parameter_declaration", "text": "apache::thrift::protocol::TProtocol* iprot", "parent": 151, "children": [153, 154, 158], "start_point": {"row": 53, "column": 18}, "end_point": {"row": 53, "column": 60}}, {"id": 153, "type": "type_identifier", "text": "apache", "parent": 152, "children": [], "start_point": {"row": 53, "column": 18}, "end_point": {"row": 53, "column": 24}}, {"id": 154, "type": "ERROR", "text": "::thrift::protocol::TProtocol", "parent": 152, "children": [155, 156, 157], "start_point": {"row": 53, "column": 24}, "end_point": {"row": 53, "column": 53}}, {"id": 155, "type": "identifier", "text": "thrift", "parent": 154, "children": [], "start_point": {"row": 53, "column": 26}, "end_point": {"row": 53, "column": 32}}, {"id": 156, "type": "identifier", "text": "protocol", "parent": 154, "children": [], "start_point": {"row": 53, "column": 34}, "end_point": {"row": 53, "column": 42}}, {"id": 157, "type": "identifier", "text": "TProtocol", "parent": 154, "children": [], "start_point": {"row": 53, "column": 44}, "end_point": {"row": 53, "column": 53}}, {"id": 158, "type": "pointer_declarator", "text": "* iprot", "parent": 152, "children": [159, 160], "start_point": {"row": 53, "column": 53}, "end_point": {"row": 53, "column": 60}}, {"id": 159, "type": "*", "text": "*", "parent": 158, "children": [], "start_point": {"row": 53, "column": 53}, "end_point": {"row": 53, "column": 54}}, {"id": 160, "type": "identifier", "text": "iprot", "parent": 158, "children": [], "start_point": {"row": 53, "column": 55}, "end_point": {"row": 53, "column": 60}}, {"id": 161, "type": "ERROR", "text": "uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const", "parent": 42, "children": [162, 163], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 68}}, {"id": 162, "type": "primitive_type", "text": "uint32_t", "parent": 161, "children": [], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 10}}, {"id": 163, "type": "function_declarator", "text": "write(::apache::thrift::protocol::TProtocol* oprot) const", "parent": 161, "children": [164, 165], "start_point": {"row": 54, "column": 11}, "end_point": {"row": 54, "column": 68}}, {"id": 164, "type": "identifier", "text": "write", "parent": 163, "children": [], "start_point": {"row": 54, "column": 11}, "end_point": {"row": 54, "column": 16}}, {"id": 165, "type": "parameter_list", "text": "(::apache::thrift::protocol::TProtocol* oprot)", "parent": 163, "children": [166], "start_point": {"row": 54, "column": 16}, "end_point": {"row": 54, "column": 62}}, {"id": 166, "type": "parameter_declaration", "text": "apache::thrift::protocol::TProtocol* oprot", "parent": 165, "children": [167, 168, 172], "start_point": {"row": 54, "column": 19}, "end_point": {"row": 54, "column": 61}}, {"id": 167, "type": "type_identifier", "text": "apache", "parent": 166, "children": [], "start_point": {"row": 54, "column": 19}, "end_point": {"row": 54, "column": 25}}, {"id": 168, "type": "ERROR", "text": "::thrift::protocol::TProtocol", "parent": 166, "children": [169, 170, 171], "start_point": {"row": 54, "column": 25}, "end_point": {"row": 54, "column": 54}}, {"id": 169, "type": "identifier", "text": "thrift", "parent": 168, "children": [], "start_point": {"row": 54, "column": 27}, "end_point": {"row": 54, "column": 33}}, {"id": 170, "type": "identifier", "text": "protocol", "parent": 168, "children": [], "start_point": {"row": 54, "column": 35}, "end_point": {"row": 54, "column": 43}}, {"id": 171, "type": "identifier", "text": "TProtocol", "parent": 168, "children": [], "start_point": {"row": 54, "column": 45}, "end_point": {"row": 54, "column": 54}}, {"id": 172, "type": "pointer_declarator", "text": "* oprot", "parent": 166, "children": [173, 174], "start_point": {"row": 54, "column": 54}, "end_point": {"row": 54, "column": 61}}, {"id": 173, "type": "*", "text": "*", "parent": 172, "children": [], "start_point": {"row": 54, "column": 54}, "end_point": {"row": 54, "column": 55}}, {"id": 174, "type": "identifier", "text": "oprot", "parent": 172, "children": [], "start_point": {"row": 54, "column": 56}, "end_point": {"row": 54, "column": 61}}, {"id": 175, "type": "declaration", "text": "void swap(PDXSchema &a, PDXSchema &b);", "parent": 39, "children": [176, 177], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 38}}, {"id": 176, "type": "primitive_type", "text": "void", "parent": 175, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 4}}, {"id": 177, "type": "function_declarator", "text": "swap(PDXSchema &a, PDXSchema &b)", "parent": 175, "children": [178, 179], "start_point": {"row": 58, "column": 5}, "end_point": {"row": 58, "column": 37}}, {"id": 178, "type": "identifier", "text": "swap", "parent": 177, "children": [], "start_point": {"row": 58, "column": 5}, "end_point": {"row": 58, "column": 9}}, {"id": 179, "type": "parameter_list", "text": "(PDXSchema &a, PDXSchema &b)", "parent": 177, "children": [180, 183], "start_point": {"row": 58, "column": 9}, "end_point": {"row": 58, "column": 37}}, {"id": 180, "type": "parameter_declaration", "text": "PDXSchema &a", "parent": 179, "children": [181, 182], "start_point": {"row": 58, "column": 10}, "end_point": {"row": 58, "column": 22}}, {"id": 181, "type": "type_identifier", "text": "PDXSchema", "parent": 180, "children": [], "start_point": {"row": 58, "column": 10}, "end_point": {"row": 58, "column": 19}}, {"id": 182, "type": "identifier", "text": "a", "parent": 180, "children": [], "start_point": {"row": 58, "column": 21}, "end_point": {"row": 58, "column": 22}}, {"id": 183, "type": "parameter_declaration", "text": "PDXSchema &b", "parent": 179, "children": [184, 185], "start_point": {"row": 58, "column": 24}, "end_point": {"row": 58, "column": 36}}, {"id": 184, "type": "type_identifier", "text": "PDXSchema", "parent": 183, "children": [], "start_point": {"row": 58, "column": 24}, "end_point": {"row": 58, "column": 33}}, {"id": 185, "type": "identifier", "text": "b", "parent": 183, "children": [], "start_point": {"row": 58, "column": 35}, "end_point": {"row": 58, "column": 36}}, {"id": 186, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 6}}]}, "node_categories": {"declarations": {"functions": [30, 33, 36, 39, 42, 58, 62, 76, 78, 93, 95, 118, 120, 140, 149, 163, 177], "variables": [45, 50, 81, 100, 125, 145, 147, 152, 166, 175, 180, 183], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28], "modules": [], "enums": []}, "statements": {"expressions": [55, 65, 69, 70, 104, 105, 107, 108, 111, 129, 131, 132, 133], "assignments": [89], "loops": [], "conditionals": [0, 1, 2, 5, 31, 32, 34, 35, 37, 38, 40, 41, 43, 49, 53, 56, 59, 63, 68, 71, 73, 75, 79, 82, 84, 86, 88, 90, 92, 96, 101, 102, 103, 109, 112, 113, 121, 126, 127, 135, 137, 141, 146, 150, 153, 155, 156, 157, 160, 164, 167, 169, 170, 171, 174, 178, 181, 182, 184, 185, 186], "returns": [114, 116, 128], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23, 26, 29, 54], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 30, "universal_type": "function", "name": "PDXSchema", "text_snippet": "namespace com { namespace pivotal { namespace gemfirexd { namespace thrift {\n\n\nclass PDXSchema {\n pu"}, {"node_id": 33, "universal_type": "function", "name": "PDXSchema", "text_snippet": "namespace pivotal { namespace gemfirexd { namespace thrift {\n\n\nclass PDXSchema {\n public:\n\n static "}, {"node_id": 36, "universal_type": "function", "name": "PDXSchema", "text_snippet": "namespace gemfirexd { namespace thrift {\n\n\nclass PDXSchema {\n public:\n\n static const char* ascii_fi"}, {"node_id": 39, "universal_type": "function", "name": "PDXSchema", "text_snippet": "namespace thrift {\n\n\nclass PDXSchema {\n public:\n\n static const char* ascii_fingerprint; // = \"49527"}, {"node_id": 42, "universal_type": "function", "name": "PDXSchema", "text_snippet": "class PDXSchema {\n public:\n\n static const char* ascii_fingerprint; // = \"4952724FA891398142DA215A5B"}, {"node_id": 58, "universal_type": "function", "name": "unknown", "text_snippet": "virtual ~PDXSchema() throw() {}"}, {"node_id": 62, "universal_type": "function", "name": "unknown", "text_snippet": "PDXSchema() throw()"}, {"node_id": 76, "universal_type": "function", "name": "__set_nodes", "text_snippet": "void __set_nodes(const std::vector<PDXSchemaNode> & val) {\n nodes = val;\n }"}, {"node_id": 78, "universal_type": "function", "name": "unknown", "text_snippet": "__set_nodes(const std::vector<PDXSchemaNode> & val)"}, {"node_id": 93, "universal_type": "function", "name": "operator", "text_snippet": "bool operator == (const PDXSchema & rhs) const\n {\n if (!(nodes == rhs.nodes))\n return false"}, {"node_id": 95, "universal_type": "function", "name": "unknown", "text_snippet": "operator == (const PDXSchema & rhs) const"}, {"node_id": 118, "universal_type": "function", "name": "operator", "text_snippet": "bool operator != (const PDXSchema &rhs) const {\n return !(*this == rhs);\n }"}, {"node_id": 120, "universal_type": "function", "name": "unknown", "text_snippet": "operator != (const PDXSchema &rhs) const"}, {"node_id": 140, "universal_type": "function", "name": "unknown", "text_snippet": "operator < (const PDXSchema & ) const"}, {"node_id": 149, "universal_type": "function", "name": "unknown", "text_snippet": "read(::apache::thrift::protocol::TProtocol* iprot)"}, {"node_id": 163, "universal_type": "function", "name": "unknown", "text_snippet": "write(::apache::thrift::protocol::TProtocol* oprot) const"}, {"node_id": 177, "universal_type": "function", "name": "unknown", "text_snippet": "swap(PDXSchema &a, PDXSchema &b)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"gfxd_types.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"gfxd_struct_FieldDescriptor.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"gfxd_struct_Decimal.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"gfxd_struct_Timestamp.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"gfxd_struct_FieldValue.h\"\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"gfxd_struct_PDXNode.h\"\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include \"gfxd_struct_PDXObject.h\"\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include \"gfxd_struct_PDXSchemaNode.h\"\n"}, {"node_id": 28, "text": "#include"}]}, "original_source_code": "/**\n * Autogenerated by Thrift Compiler (0.9.1)\n *\n * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n * @generated\n */\n\n#ifndef GFXD_STRUCT_PDXSCHEMA_H\n#define GFXD_STRUCT_PDXSCHEMA_H\n\n\n#include \"gfxd_types.h\"\n\n#include \"gfxd_struct_FieldDescriptor.h\"\n#include \"gfxd_struct_Decimal.h\"\n#include \"gfxd_struct_Timestamp.h\"\n#include \"gfxd_struct_FieldValue.h\"\n#include \"gfxd_struct_PDXNode.h\"\n#include \"gfxd_struct_PDXObject.h\"\n#include \"gfxd_struct_PDXSchemaNode.h\"\n\nnamespace com { namespace pivotal { namespace gemfirexd { namespace thrift {\n\n\nclass PDXSchema {\n public:\n\n static const char* ascii_fingerprint; // = \"4952724FA891398142DA215A5B73EA06\";\n static const uint8_t binary_fingerprint[16]; // = {0x49,0x52,0x72,0x4F,0xA8,0x91,0x39,0x81,0x42,0xDA,0x21,0x5A,0x5B,0x73,0xEA,0x06};\n\n PDXSchema() {\n }\n\n virtual ~PDXSchema() throw() {}\n\n std::vector<PDXSchemaNode> nodes;\n\n void __set_nodes(const std::vector<PDXSchemaNode> & val) {\n nodes = val;\n }\n\n bool operator == (const PDXSchema & rhs) const\n {\n if (!(nodes == rhs.nodes))\n return false;\n return true;\n }\n bool operator != (const PDXSchema &rhs) const {\n return !(*this == rhs);\n }\n\n bool operator < (const PDXSchema & ) const;\n\n uint32_t read(::apache::thrift::protocol::TProtocol* iprot);\n uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;\n\n};\n\nvoid swap(PDXSchema &a, PDXSchema &b);\n\n}}}} // namespace\n\n#endif\n"}
| 81,220
|
c
|
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
/**
*
*/
class LSYSTEMS_API Branch
{
public:
//Transform property
TArray<FVector> BranchParts;
FVector Direction;
float StartScale;
float EndScale;
Branch();
Branch(FVector direction, FVector origin, float scale);
~Branch();
};
| 14.61
| 23
|
(translation_unit) "// Fill out your copyright notice in the Description page of Project Settings.
\n
\n#pragma once
\n
\n/**
\n *
\n */
\nclass LSYSTEMS_API Branch
\n{
\n
\npublic:
\n //Transform property
\n TArray<FVector> BranchParts;
\n FVector Direction;
\n float StartScale;
\n float EndScale;
\n
\n Branch();
\n
\n Branch(FVector direction, FVector origin, float scale);
\n
\n ~Branch();
\n};
\n"
(comment) "// Fill out your copyright notice in the Description page of Project Settings.
"
(preproc_call) "#pragma once
\n"
(preproc_directive) "#pragma"
(preproc_arg) "once
"
(comment) "/**
\n *
\n */"
(function_definition) "class LSYSTEMS_API Branch
\n{
\n
\npublic:
\n //Transform property
\n TArray<FVector> BranchParts;
\n FVector Direction;
\n float StartScale;
\n float EndScale;
\n
\n Branch();
\n
\n Branch(FVector direction, FVector origin, float scale);
\n
\n ~Branch();
\n}"
(type_identifier) "class"
(identifier) "LSYSTEMS_API"
(ERROR) "Branch"
(identifier) "Branch"
(compound_statement) "{
\n
\npublic:
\n //Transform property
\n TArray<FVector> BranchParts;
\n FVector Direction;
\n float StartScale;
\n float EndScale;
\n
\n Branch();
\n
\n Branch(FVector direction, FVector origin, float scale);
\n
\n ~Branch();
\n}"
({) "{"
(labeled_statement) "public:
\n //Transform property
\n TArray<FVector> BranchParts;"
(statement_identifier) "public"
(:) ":"
(comment) "//Transform property
"
(expression_statement) "TArray<FVector> BranchParts;"
(binary_expression) "TArray<FVector> BranchParts"
(binary_expression) "TArray<FVector"
(identifier) "TArray"
(<) "<"
(identifier) "FVector"
(>) ">"
(identifier) "BranchParts"
(;) ";"
(declaration) "FVector Direction;"
(type_identifier) "FVector"
(identifier) "Direction"
(;) ";"
(declaration) "float StartScale;"
(primitive_type) "float"
(identifier) "StartScale"
(;) ";"
(declaration) "float EndScale;"
(primitive_type) "float"
(identifier) "EndScale"
(;) ";"
(expression_statement) "Branch();"
(call_expression) "Branch()"
(identifier) "Branch"
(argument_list) "()"
(() "("
()) ")"
(;) ";"
(declaration) "Branch(FVector direction, FVector origin, float scale);"
(macro_type_specifier) "Branch(FVector"
(identifier) "Branch"
(() "("
(type_descriptor) "FVector"
(type_identifier) "FVector"
()) ""
(identifier) "direction"
(,) ","
(identifier) "FVector"
(ERROR) "origin"
(identifier) "origin"
(,) ","
(identifier) "float"
(ERROR) "scale)"
(identifier) "scale"
()) ")"
(;) ";"
(expression_statement) "~Branch();"
(unary_expression) "~Branch()"
(~) "~"
(call_expression) "Branch()"
(identifier) "Branch"
(argument_list) "()"
(() "("
()) ")"
(;) ";"
(}) "}"
(expression_statement) ";"
(;) ";"
| 75
| 3
|
{"language": "c", "success": true, "metadata": {"lines": 23, "avg_line_length": 14.61, "nodes": 44, "errors": 0, "source_hash": "b79b0ce357d6a9cc8b74feb6e13f72e155b2eac91ba2f4f2ce83a1e64492fa68", "categorized_nodes": 30}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\r\n", "parent": null, "children": [1, 2], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once\r", "parent": 0, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 13}}, {"id": 3, "type": "function_definition", "text": "class LSYSTEMS_API Branch\r\n{\r\n\r\npublic:\r\n\t//Transform property\r\n\tTArray<FVector> BranchParts;\r\n\tFVector Direction;\r\n\tfloat StartScale;\r\n\tfloat EndScale;\r\n\r\n\tBranch();\r\n\r\n\tBranch(FVector direction, FVector origin, float scale);\r\n\r\n\t~Branch();\r\n}", "parent": null, "children": [4, 5], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 4, "type": "identifier", "text": "LSYSTEMS_API", "parent": 3, "children": [], "start_point": {"row": 7, "column": 6}, "end_point": {"row": 7, "column": 18}}, {"id": 5, "type": "ERROR", "text": "Branch", "parent": 3, "children": [6], "start_point": {"row": 7, "column": 19}, "end_point": {"row": 7, "column": 25}}, {"id": 6, "type": "identifier", "text": "Branch", "parent": 5, "children": [], "start_point": {"row": 7, "column": 19}, "end_point": {"row": 7, "column": 25}}, {"id": 7, "type": "labeled_statement", "text": "public:\r\n\t//Transform property\r\n\tTArray<FVector> BranchParts;", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 12, "column": 29}}, {"id": 8, "type": "binary_expression", "text": "TArray<FVector> BranchParts", "parent": 7, "children": [9, 13, 14], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 28}}, {"id": 9, "type": "binary_expression", "text": "TArray<FVector", "parent": 8, "children": [10, 11, 12], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 15}}, {"id": 10, "type": "identifier", "text": "TArray", "parent": 9, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 7}}, {"id": 11, "type": "<", "text": "<", "parent": 9, "children": [], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 8}}, {"id": 12, "type": "identifier", "text": "FVector", "parent": 9, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 15}}, {"id": 13, "type": ">", "text": ">", "parent": 8, "children": [], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 16}}, {"id": 14, "type": "identifier", "text": "BranchParts", "parent": 8, "children": [], "start_point": {"row": 12, "column": 17}, "end_point": {"row": 12, "column": 28}}, {"id": 15, "type": "declaration", "text": "FVector Direction;", "parent": 3, "children": [16, 17], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 19}}, {"id": 16, "type": "type_identifier", "text": "FVector", "parent": 15, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 8}}, {"id": 17, "type": "identifier", "text": "Direction", "parent": 15, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 18}}, {"id": 18, "type": "declaration", "text": "float StartScale;", "parent": 3, "children": [19, 20], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 18}}, {"id": 19, "type": "primitive_type", "text": "float", "parent": 18, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 6}}, {"id": 20, "type": "identifier", "text": "StartScale", "parent": 18, "children": [], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 17}}, {"id": 21, "type": "declaration", "text": "float EndScale;", "parent": 3, "children": [22, 23], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 16}}, {"id": 22, "type": "primitive_type", "text": "float", "parent": 21, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 6}}, {"id": 23, "type": "identifier", "text": "EndScale", "parent": 21, "children": [], "start_point": {"row": 15, "column": 7}, "end_point": {"row": 15, "column": 15}}, {"id": 24, "type": "call_expression", "text": "Branch()", "parent": 3, "children": [25, 26], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 9}}, {"id": 25, "type": "identifier", "text": "Branch", "parent": 24, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 7}}, {"id": 26, "type": "argument_list", "text": "()", "parent": 24, "children": [], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 17, "column": 9}}, {"id": 27, "type": "declaration", "text": "Branch(FVector direction, FVector origin, float scale);", "parent": 3, "children": [28, 32, 33, 34, 36, 37], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 56}}, {"id": 28, "type": "macro_type_specifier", "text": "Branch(FVector", "parent": 27, "children": [29, 30], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 15}}, {"id": 29, "type": "identifier", "text": "Branch", "parent": 28, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 7}}, {"id": 30, "type": "type_descriptor", "text": "FVector", "parent": 28, "children": [31], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 15}}, {"id": 31, "type": "type_identifier", "text": "FVector", "parent": 30, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 15}}, {"id": 32, "type": "identifier", "text": "direction", "parent": 27, "children": [], "start_point": {"row": 19, "column": 16}, "end_point": {"row": 19, "column": 25}}, {"id": 33, "type": "identifier", "text": "FVector", "parent": 27, "children": [], "start_point": {"row": 19, "column": 27}, "end_point": {"row": 19, "column": 34}}, {"id": 34, "type": "ERROR", "text": "origin", "parent": 27, "children": [35], "start_point": {"row": 19, "column": 35}, "end_point": {"row": 19, "column": 41}}, {"id": 35, "type": "identifier", "text": "origin", "parent": 34, "children": [], "start_point": {"row": 19, "column": 35}, "end_point": {"row": 19, "column": 41}}, {"id": 36, "type": "identifier", "text": "float", "parent": 27, "children": [], "start_point": {"row": 19, "column": 43}, "end_point": {"row": 19, "column": 48}}, {"id": 37, "type": "ERROR", "text": "scale)", "parent": 27, "children": [38], "start_point": {"row": 19, "column": 49}, "end_point": {"row": 19, "column": 55}}, {"id": 38, "type": "identifier", "text": "scale", "parent": 37, "children": [], "start_point": {"row": 19, "column": 49}, "end_point": {"row": 19, "column": 54}}, {"id": 39, "type": "unary_expression", "text": "~Branch()", "parent": 3, "children": [40, 41], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 10}}, {"id": 40, "type": "~", "text": "~", "parent": 39, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 2}}, {"id": 41, "type": "call_expression", "text": "Branch()", "parent": 39, "children": [42, 43], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 10}}, {"id": 42, "type": "identifier", "text": "Branch", "parent": 41, "children": [], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 8}}, {"id": 43, "type": "argument_list", "text": "()", "parent": 41, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 10}}]}, "node_categories": {"declarations": {"functions": [3], "variables": [15, 18, 21, 27], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [8, 9, 24, 39, 41], "assignments": [], "loops": [], "conditionals": [4, 6, 10, 12, 14, 16, 17, 20, 23, 25, 28, 29, 31, 32, 33, 35, 36, 38, 42], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "LSYSTEMS_API", "text_snippet": "class LSYSTEMS_API Branch\r\n{\r\n\r\npublic:\r\n\t//Transform property\r\n\tTArray<FVector> BranchParts;\r\n\tFVec"}], "class_declarations": [], "import_statements": []}, "original_source_code": "// Fill out your copyright notice in the Description page of Project Settings.\r\n\r\n#pragma once\r\n\r\n/**\r\n * \r\n */\r\nclass LSYSTEMS_API Branch\r\n{\r\n\r\npublic:\r\n\t//Transform property\r\n\tTArray<FVector> BranchParts;\r\n\tFVector Direction;\r\n\tfloat StartScale;\r\n\tfloat EndScale;\r\n\r\n\tBranch();\r\n\r\n\tBranch(FVector direction, FVector origin, float scale);\r\n\r\n\t~Branch();\r\n};\r\n"}
| 81,221
|
c
|
/**
bfs-test-perf-uint.c
Performance test of the BFS algorithm across graphs with only unsigned
int vertices.
The following command line arguments can be used to customize tests:
bfs-test-perf-uint
[0, uint width - 1] : a
[0, uint width - 1] : b s.t. 2**a <= V <= 2**b for rand graph test
usage examples:
./bfs-test-perf-uint
./bfs-test-perf-uint 10 14
bfs-test-perf-uint can be run with any subset of command line arguments
in the above-defined order. If the (i + 1)th argument is specified then
the ith argument must be specified for i >= 0. Default values are used
for the unspecified arguments according to the C_ARGS_DEF array.
The implementation of tests does not use stdint.h and is portable under
C89/C90 and C99. The tests require that:
- size_t and clock_t are convertible to double,
- size_t can represent values upto 65535 for default values, and
upto UINT_MAX (>= 65535) otherwise,
- the widths of the unsigned integral types are less than 2040 and even.
TODO: add portable size_t printing
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <time.h>
#include "bfs.h"
#include "graph.h"
#include "stack.h"
#include "utilities-mem.h"
#include "utilities-mod.h"
#include "utilities-lim.h"
/**
Generate random numbers in a portable way for test purposes only; rand()
in the Linux C Library uses the same generator as random(), which may not
be the case on older rand() implementations, and on current
implementations on different systems.
*/
#define RGENS_SEED() do{srand(time(NULL));}while (0)
#define RANDOM() (rand()) /* [0, RAND_MAX] */
#define DRAND() ((double)rand() / RAND_MAX) /* [0.0, 1.0] */
#define TOLU(i) ((unsigned long int)(i)) /* printing size_t under C89/C90 */
/* input handling */
const char *C_USAGE =
"bfs-test-perf-uint\n"
"[0, uint width - 1] : a\n"
"[0, uint width - 1] : b s.t. 2**a <= V <= 2**b for rand graph test\n";
const int C_ARGC_ULIMIT = 3;
const size_t C_ARGS_DEF[2] = {14u, 14u};
const size_t C_UINT_BIT = PRECISION_FROM_ULIMIT((unsigned int)-1);
/* random graph tests */
const size_t C_FN_COUNT = 4;
size_t (* const C_READ[4])(const void *) ={
graph_read_ushort,
graph_read_uint,
graph_read_ulong,
graph_read_sz};
void (* const C_WRITE[4])(void *, size_t) ={
graph_write_ushort,
graph_write_uint,
graph_write_ulong,
graph_write_sz};
void *(* const C_AT[4])(const void *, const void *) ={
graph_at_ushort,
graph_at_uint,
graph_at_ulong,
graph_at_sz};
int (* const C_CMPEQ[4])(const void *, const void *) ={
graph_cmpeq_ushort,
graph_cmpeq_uint,
graph_cmpeq_ulong,
graph_cmpeq_sz};
void (* const C_INCR[4])(void *) ={
graph_incr_ushort,
graph_incr_uint,
graph_incr_ulong,
graph_incr_sz};
const size_t C_VT_SIZES[4] = {
sizeof(unsigned short),
sizeof(unsigned int),
sizeof(unsigned long),
sizeof(size_t)};
const char *C_VT_TYPES[4] = {"ushort", "uint ", "ulong ", "sz "};
const size_t C_ITER = 10u;
const size_t C_PROBS_COUNT = 5u;
const double C_PROBS[5] = {1.00, 0.75, 0.50, 0.25, 0.00};
const double C_PROB_ONE = 1.0;
const double C_PROB_ZERO = 0.0;
/* additional operations */
void *ptr(const void *block, size_t i, size_t size);
/**
Run a bfs test on random directed graphs.
*/
struct bern_arg{
double p;
};
int bern(void *arg){
struct bern_arg *b = arg;
if (b->p >= C_PROB_ONE) return 1;
if (b->p <= C_PROB_ZERO) return 0;
if (b->p > DRAND()) return 1;
return 0;
}
void run_random_dir_graph_helper(size_t num_vts,
size_t vt_size,
const char *type_string,
size_t (*read_vt)(const void *),
void (*write_vt)(void *, size_t),
void *(*at_vt)(const void *, const void *),
int (*cmp_vt)(const void *, const void *),
void (*incr_vt)(void *),
int bern(void *),
struct bern_arg *b);
void run_random_dir_graph_test(size_t log_start, size_t log_end){
size_t i, j;
size_t num_vts;
struct bern_arg b;
printf("Run a bfs test on random directed graphs from %lu random "
"start vertices in each graph\n", TOLU(C_ITER));
for (i = 0; i < C_PROBS_COUNT; i++){
b.p = C_PROBS[i];
printf("\tP[an edge is in a graph] = %.2f\n", b.p);
for (j = log_start; j <= log_end; j++){
num_vts = pow_two_perror(j);
printf("\t\tvertices: %lu, E[# of directed edges]: %.1f\n",
TOLU(num_vts), b.p * num_vts * (num_vts - 1));
run_random_dir_graph_helper(num_vts,
C_VT_SIZES[1],
C_VT_TYPES[1],
C_READ[1],
C_WRITE[1],
C_AT[1],
C_CMPEQ[1],
C_INCR[1],
bern,
&b);
}
}
}
void run_random_dir_graph_helper(size_t num_vts,
size_t vt_size,
const char *type_string,
size_t (*read_vt)(const void *),
void (*write_vt)(void *, size_t),
void *(*at_vt)(const void *, const void *),
int (*cmp_vt)(const void *, const void *),
void (*incr_vt)(void *),
int bern(void *),
struct bern_arg *b){
size_t i;
size_t *start = NULL;
void *dist = NULL, *prev = NULL;
struct graph g;
struct adj_lst a;
clock_t t;
/* no declared type after malloc; effective type is set by bfs */
start = malloc_perror(C_ITER, sizeof(size_t));
dist = malloc_perror(num_vts, vt_size);
prev = malloc_perror(num_vts, vt_size);
for (i = 0; i < num_vts; i++){
/* avoid trap representations in tests */
write_vt(ptr(dist, i, vt_size), 0);
}
graph_base_init(&g, num_vts, vt_size, 0);
adj_lst_base_init(&a, &g);
adj_lst_rand_dir(&a, write_vt, bern, b);
for (i = 0; i < C_ITER; i++){
start[i] = RANDOM() % num_vts;
}
t = clock();
for (i = 0; i < C_ITER; i++){
bfs(&a, start[i], dist, prev, read_vt, write_vt, at_vt, cmp_vt, incr_vt);
}
t = clock() - t;
printf("\t\t\t%s ave runtime: %.6f seconds\n",
type_string, (double)t / C_ITER / CLOCKS_PER_SEC);
adj_lst_free(&a); /* deallocates blocks with effective vertex type */
free(start);
free(dist);
free(prev);
start = NULL;
dist = NULL;
prev = NULL;
}
/**
Computes a pointer to the ith element in the block of elements.
*/
void *ptr(const void *block, size_t i, size_t size){
return (void *)((char *)block + i * size);
}
int main(int argc, char *argv[]){
int i;
size_t *args = NULL;
RGENS_SEED();
if (argc > C_ARGC_ULIMIT){
printf("USAGE:\n%s", C_USAGE);
exit(EXIT_FAILURE);
}
args = malloc_perror(C_ARGC_ULIMIT - 1, sizeof(size_t));
memcpy(args, C_ARGS_DEF, (C_ARGC_ULIMIT - 1) * sizeof(size_t));
for (i = 1; i < argc; i++){
args[i - 1] = atoi(argv[i]);
}
if (args[0] > C_UINT_BIT - 1 ||
args[1] > C_UINT_BIT - 1 ||
args[1] < args[0]){
printf("USAGE:\n%s", C_USAGE);
exit(EXIT_FAILURE);
}
run_random_dir_graph_test(args[0], args[1]);
free(args);
args = NULL;
return 0;
}
| 30.54
| 216
|
(translation_unit) "/**\n bfs-test-perf-uint.c\n\n Performance test of the BFS algorithm across graphs with only unsigned\n int vertices.\n\n The following command line arguments can be used to customize tests:\n bfs-test-perf-uint\n [0, uint width - 1] : a\n [0, uint width - 1] : b s.t. 2**a <= V <= 2**b for rand graph test\n\n usage examples: \n ./bfs-test-perf-uint\n ./bfs-test-perf-uint 10 14\n\n bfs-test-perf-uint can be run with any subset of command line arguments\n in the above-defined order. If the (i + 1)th argument is specified then\n the ith argument must be specified for i >= 0. Default values are used\n for the unspecified arguments according to the C_ARGS_DEF array.\n\n The implementation of tests does not use stdint.h and is portable under\n C89/C90 and C99. The tests require that:\n - size_t and clock_t are convertible to double,\n - size_t can represent values upto 65535 for default values, and\n upto UINT_MAX (>= 65535) otherwise,\n - the widths of the unsigned integral types are less than 2040 and even.\n\n TODO: add portable size_t printing\n*/\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <limits.h>\n#include <time.h>\n#include "bfs.h"\n#include "graph.h"\n#include "stack.h"\n#include "utilities-mem.h"\n#include "utilities-mod.h"\n#include "utilities-lim.h"\n\n/**\n Generate random numbers in a portable way for test purposes only; rand()\n in the Linux C Library uses the same generator as random(), which may not\n be the case on older rand() implementations, and on current\n implementations on different systems.\n*/\n#define RGENS_SEED() do{srand(time(NULL));}while (0)\n#define RANDOM() (rand()) /* [0, RAND_MAX] */\n#define DRAND() ((double)rand() / RAND_MAX) /* [0.0, 1.0] */\n\n#define TOLU(i) ((unsigned long int)(i)) /* printing size_t under C89/C90 */\n\n/* input handling */\nconst char *C_USAGE =\n "bfs-test-perf-uint\n"\n "[0, uint width - 1] : a\n"\n "[0, uint width - 1] : b s.t. 2**a <= V <= 2**b for rand graph test\n";\nconst int C_ARGC_ULIMIT = 3;\nconst size_t C_ARGS_DEF[2] = {14u, 14u};\nconst size_t C_UINT_BIT = PRECISION_FROM_ULIMIT((unsigned int)-1);\n\n/* random graph tests */\nconst size_t C_FN_COUNT = 4;\nsize_t (* const C_READ[4])(const void *) ={\n graph_read_ushort,\n graph_read_uint,\n graph_read_ulong,\n graph_read_sz};\nvoid (* const C_WRITE[4])(void *, size_t) ={\n graph_write_ushort,\n graph_write_uint,\n graph_write_ulong,\n graph_write_sz};\nvoid *(* const C_AT[4])(const void *, const void *) ={\n graph_at_ushort,\n graph_at_uint,\n graph_at_ulong,\n graph_at_sz};\nint (* const C_CMPEQ[4])(const void *, const void *) ={\n graph_cmpeq_ushort,\n graph_cmpeq_uint,\n graph_cmpeq_ulong,\n graph_cmpeq_sz};\nvoid (* const C_INCR[4])(void *) ={\n graph_incr_ushort,\n graph_incr_uint,\n graph_incr_ulong,\n graph_incr_sz};\nconst size_t C_VT_SIZES[4] = {\n sizeof(unsigned short),\n sizeof(unsigned int),\n sizeof(unsigned long),\n sizeof(size_t)};\nconst char *C_VT_TYPES[4] = {"ushort", "uint ", "ulong ", "sz "};\nconst size_t C_ITER = 10u;\nconst size_t C_PROBS_COUNT = 5u;\nconst double C_PROBS[5] = {1.00, 0.75, 0.50, 0.25, 0.00};\nconst double C_PROB_ONE = 1.0;\nconst double C_PROB_ZERO = 0.0;\n\n/* additional operations */\nvoid *ptr(const void *block, size_t i, size_t size);\n\n/**\n Run a bfs test on random directed graphs.\n*/\n\nstruct bern_arg{\n double p;\n};\n\nint bern(void *arg){\n struct bern_arg *b = arg;\n if (b->p >= C_PROB_ONE) return 1;\n if (b->p <= C_PROB_ZERO) return 0;\n if (b->p > DRAND()) return 1;\n return 0;\n}\n\nvoid run_random_dir_graph_helper(size_t num_vts,\n size_t vt_size,\n const char *type_string,\n size_t (*read_vt)(const void *),\n void (*write_vt)(void *, size_t),\n void *(*at_vt)(const void *, const void *),\n int (*cmp_vt)(const void *, const void *),\n void (*incr_vt)(void *),\n int bern(void *),\n struct bern_arg *b);\n\nvoid run_random_dir_graph_test(size_t log_start, size_t log_end){\n size_t i, j;\n size_t num_vts;\n struct bern_arg b;\n printf("Run a bfs test on random directed graphs from %lu random "\n "start vertices in each graph\n", TOLU(C_ITER));\n for (i = 0; i < C_PROBS_COUNT; i++){\n b.p = C_PROBS[i];\n printf("\tP[an edge is in a graph] = %.2f\n", b.p);\n for (j = log_start; j <= log_end; j++){\n num_vts = pow_two_perror(j);\n printf("\t\tvertices: %lu, E[# of directed edges]: %.1f\n",\n TOLU(num_vts), b.p * num_vts * (num_vts - 1));\n run_random_dir_graph_helper(num_vts,\n C_VT_SIZES[1],\n C_VT_TYPES[1],\n C_READ[1],\n C_WRITE[1],\n C_AT[1],\n C_CMPEQ[1],\n C_INCR[1],\n bern,\n &b);\n }\n }\n}\n\nvoid run_random_dir_graph_helper(size_t num_vts,\n size_t vt_size,\n const char *type_string,\n size_t (*read_vt)(const void *),\n void (*write_vt)(void *, size_t),\n void *(*at_vt)(const void *, const void *),\n int (*cmp_vt)(const void *, const void *),\n void (*incr_vt)(void *),\n int bern(void *),\n struct bern_arg *b){\n size_t i;\n size_t *start = NULL;\n void *dist = NULL, *prev = NULL;\n struct graph g;\n struct adj_lst a;\n clock_t t;\n /* no declared type after malloc; effective type is set by bfs */\n start = malloc_perror(C_ITER, sizeof(size_t));\n dist = malloc_perror(num_vts, vt_size);\n prev = malloc_perror(num_vts, vt_size);\n for (i = 0; i < num_vts; i++){\n /* avoid trap representations in tests */\n write_vt(ptr(dist, i, vt_size), 0);\n } \n graph_base_init(&g, num_vts, vt_size, 0);\n adj_lst_base_init(&a, &g);\n adj_lst_rand_dir(&a, write_vt, bern, b);\n for (i = 0; i < C_ITER; i++){\n start[i] = RANDOM() % num_vts;\n }\n t = clock();\n for (i = 0; i < C_ITER; i++){\n bfs(&a, start[i], dist, prev, read_vt, write_vt, at_vt, cmp_vt, incr_vt);\n }\n t = clock() - t;\n printf("\t\t\t%s ave runtime: %.6f seconds\n",\n type_string, (double)t / C_ITER / CLOCKS_PER_SEC);\n adj_lst_free(&a); /* deallocates blocks with effective vertex type */\n free(start);\n free(dist);\n free(prev);\n start = NULL;\n dist = NULL;\n prev = NULL;\n}\n\n/**\n Computes a pointer to the ith element in the block of elements.\n*/\nvoid *ptr(const void *block, size_t i, size_t size){\n return (void *)((char *)block + i * size);\n}\n\nint main(int argc, char *argv[]){\n int i;\n size_t *args = NULL;\n RGENS_SEED();\n if (argc > C_ARGC_ULIMIT){\n printf("USAGE:\n%s", C_USAGE);\n exit(EXIT_FAILURE);\n }\n args = malloc_perror(C_ARGC_ULIMIT - 1, sizeof(size_t));\n memcpy(args, C_ARGS_DEF, (C_ARGC_ULIMIT - 1) * sizeof(size_t));\n for (i = 1; i < argc; i++){\n args[i - 1] = atoi(argv[i]);\n }\n if (args[0] > C_UINT_BIT - 1 ||\n args[1] > C_UINT_BIT - 1 ||\n args[1] < args[0]){\n printf("USAGE:\n%s", C_USAGE);\n exit(EXIT_FAILURE);\n }\n run_random_dir_graph_test(args[0], args[1]);\n free(args);\n args = NULL;\n return 0;\n}\n"
(comment) "/**\n bfs-test-perf-uint.c\n\n Performance test of the BFS algorithm across graphs with only unsigned\n int vertices.\n\n The following command line arguments can be used to customize tests:\n bfs-test-perf-uint\n [0, uint width - 1] : a\n [0, uint width - 1] : b s.t. 2**a <= V <= 2**b for rand graph test\n\n usage examples: \n ./bfs-test-perf-uint\n ./bfs-test-perf-uint 10 14\n\n bfs-test-perf-uint can be run with any subset of command line arguments\n in the above-defined order. If the (i + 1)th argument is specified then\n the ith argument must be specified for i >= 0. Default values are used\n for the unspecified arguments according to the C_ARGS_DEF array.\n\n The implementation of tests does not use stdint.h and is portable under\n C89/C90 and C99. The tests require that:\n - size_t and clock_t are convertible to double,\n - size_t can represent values upto 65535 for default values, and\n upto UINT_MAX (>= 65535) otherwise,\n - the widths of the unsigned integral types are less than 2040 and even.\n\n TODO: add portable size_t printing\n*/"
(preproc_include) "#include <stdio.h>\n"
(#include) "#include"
(system_lib_string) "<stdio.h>"
(preproc_include) "#include <stdlib.h>\n"
(#include) "#include"
(system_lib_string) "<stdlib.h>"
(preproc_include) "#include <string.h>\n"
(#include) "#include"
(system_lib_string) "<string.h>"
(preproc_include) "#include <limits.h>\n"
(#include) "#include"
(system_lib_string) "<limits.h>"
(preproc_include) "#include <time.h>\n"
(#include) "#include"
(system_lib_string) "<time.h>"
(preproc_include) "#include "bfs.h"\n"
(#include) "#include"
(string_literal) ""bfs.h""
(") """
(string_content) "bfs.h"
(") """
(preproc_include) "#include "graph.h"\n"
(#include) "#include"
(string_literal) ""graph.h""
(") """
(string_content) "graph.h"
(") """
(preproc_include) "#include "stack.h"\n"
(#include) "#include"
(string_literal) ""stack.h""
(") """
(string_content) "stack.h"
(") """
(preproc_include) "#include "utilities-mem.h"\n"
(#include) "#include"
(string_literal) ""utilities-mem.h""
(") """
(string_content) "utilities-mem.h"
(") """
(preproc_include) "#include "utilities-mod.h"\n"
(#include) "#include"
(string_literal) ""utilities-mod.h""
(") """
(string_content) "utilities-mod.h"
(") """
(preproc_include) "#include "utilities-lim.h"\n"
(#include) "#include"
(string_literal) ""utilities-lim.h""
(") """
(string_content) "utilities-lim.h"
(") """
(comment) "/**\n Generate random numbers in a portable way for test purposes only; rand()\n in the Linux C Library uses the same generator as random(), which may not\n be the case on older rand() implementations, and on current\n implementations on different systems.\n*/"
(preproc_function_def) "#define RGENS_SEED() do{srand(time(NULL));}while (0)\n"
(#define) "#define"
(identifier) "RGENS_SEED"
(preproc_params) "()"
(() "("
()) ")"
(preproc_arg) "do{srand(time(NULL));}while (0)"
(preproc_function_def) "#define RANDOM() (rand()) /* [0, RAND_MAX] */\n"
(#define) "#define"
(identifier) "RANDOM"
(preproc_params) "()"
(() "("
()) ")"
(preproc_arg) "(rand()) "
(comment) "/* [0, RAND_MAX] */"
(preproc_function_def) "#define DRAND() ((double)rand() / RAND_MAX) /* [0.0, 1.0] */\n"
(#define) "#define"
(identifier) "DRAND"
(preproc_params) "()"
(() "("
()) ")"
(preproc_arg) "((double)rand() / RAND_MAX) "
(comment) "/* [0.0, 1.0] */"
(preproc_function_def) "#define TOLU(i) ((unsigned long int)(i)) /* printing size_t under C89/C90 */\n"
(#define) "#define"
(identifier) "TOLU"
(preproc_params) "(i)"
(() "("
(identifier) "i"
()) ")"
(preproc_arg) "((unsigned long int)(i)) "
(comment) "/* printing size_t under C89/C90 */"
(comment) "/* input handling */"
(declaration) "const char *C_USAGE =\n "bfs-test-perf-uint\n"\n "[0, uint width - 1] : a\n"\n "[0, uint width - 1] : b s.t. 2**a <= V <= 2**b for rand graph test\n";"
(type_qualifier) "const"
(const) "const"
(primitive_type) "char"
(init_declarator) "*C_USAGE =\n "bfs-test-perf-uint\n"\n "[0, uint width - 1] : a\n"\n "[0, uint width - 1] : b s.t. 2**a <= V <= 2**b for rand graph test\n""
(pointer_declarator) "*C_USAGE"
(*) "*"
(identifier) "C_USAGE"
(=) "="
(concatenated_string) ""bfs-test-perf-uint\n"\n "[0, uint width - 1] : a\n"\n "[0, uint width - 1] : b s.t. 2**a <= V <= 2**b for rand graph test\n""
(string_literal) ""bfs-test-perf-uint\n""
(") """
(string_content) "bfs-test-perf-uint"
(escape_sequence) "\n"
(") """
(string_literal) ""[0, uint width - 1] : a\n""
(") """
(string_content) "[0, uint width - 1] : a"
(escape_sequence) "\n"
(") """
(string_literal) ""[0, uint width - 1] : b s.t. 2**a <= V <= 2**b for rand graph test\n""
(") """
(string_content) "[0, uint width - 1] : b s.t. 2**a <= V <= 2**b for rand graph test"
(escape_sequence) "\n"
(") """
(;) ";"
(declaration) "const int C_ARGC_ULIMIT = 3;"
(type_qualifier) "const"
(const) "const"
(primitive_type) "int"
(init_declarator) "C_ARGC_ULIMIT = 3"
(identifier) "C_ARGC_ULIMIT"
(=) "="
(number_literal) "3"
(;) ";"
(declaration) "const size_t C_ARGS_DEF[2] = {14u, 14u};"
(type_qualifier) "const"
(const) "const"
(primitive_type) "size_t"
(init_declarator) "C_ARGS_DEF[2] = {14u, 14u}"
(array_declarator) "C_ARGS_DEF[2]"
(identifier) "C_ARGS_DEF"
([) "["
(number_literal) "2"
(]) "]"
(=) "="
(initializer_list) "{14u, 14u}"
({) "{"
(number_literal) "14u"
(,) ","
(number_literal) "14u"
(}) "}"
(;) ";"
(declaration) "const size_t C_UINT_BIT = PRECISION_FROM_ULIMIT((unsigned int)-1);"
(type_qualifier) "const"
(const) "const"
(primitive_type) "size_t"
(init_declarator) "C_UINT_BIT = PRECISION_FROM_ULIMIT((unsigned int)-1)"
(identifier) "C_UINT_BIT"
(=) "="
(call_expression) "PRECISION_FROM_ULIMIT((unsigned int)-1)"
(identifier) "PRECISION_FROM_ULIMIT"
(argument_list) "((unsigned int)-1)"
(() "("
(cast_expression) "(unsigned int)-1"
(() "("
(type_descriptor) "unsigned int"
(sized_type_specifier) "unsigned int"
(unsigned) "unsigned"
(primitive_type) "int"
()) ")"
(number_literal) "-1"
()) ")"
(;) ";"
(comment) "/* random graph tests */"
(declaration) "const size_t C_FN_COUNT = 4;"
(type_qualifier) "const"
(const) "const"
(primitive_type) "size_t"
(init_declarator) "C_FN_COUNT = 4"
(identifier) "C_FN_COUNT"
(=) "="
(number_literal) "4"
(;) ";"
(declaration) "size_t (* const C_READ[4])(const void *) ={\n graph_read_ushort,\n graph_read_uint,\n graph_read_ulong,\n graph_read_sz};"
(primitive_type) "size_t"
(init_declarator) "(* const C_READ[4])(const void *) ={\n graph_read_ushort,\n graph_read_uint,\n graph_read_ulong,\n graph_read_sz}"
(function_declarator) "(* const C_READ[4])(const void *)"
(parenthesized_declarator) "(* const C_READ[4])"
(() "("
(pointer_declarator) "* const C_READ[4]"
(*) "*"
(type_qualifier) "const"
(const) "const"
(array_declarator) "C_READ[4]"
(identifier) "C_READ"
([) "["
(number_literal) "4"
(]) "]"
()) ")"
(parameter_list) "(const void *)"
(() "("
(parameter_declaration) "const void *"
(type_qualifier) "const"
(const) "const"
(primitive_type) "void"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(=) "="
(initializer_list) "{\n graph_read_ushort,\n graph_read_uint,\n graph_read_ulong,\n graph_read_sz}"
({) "{"
(identifier) "graph_read_ushort"
(,) ","
(identifier) "graph_read_uint"
(,) ","
(identifier) "graph_read_ulong"
(,) ","
(identifier) "graph_read_sz"
(}) "}"
(;) ";"
(declaration) "void (* const C_WRITE[4])(void *, size_t) ={\n graph_write_ushort,\n graph_write_uint,\n graph_write_ulong,\n graph_write_sz};"
(primitive_type) "void"
(init_declarator) "(* const C_WRITE[4])(void *, size_t) ={\n graph_write_ushort,\n graph_write_uint,\n graph_write_ulong,\n graph_write_sz}"
(function_declarator) "(* const C_WRITE[4])(void *, size_t)"
(parenthesized_declarator) "(* const C_WRITE[4])"
(() "("
(pointer_declarator) "* const C_WRITE[4]"
(*) "*"
(type_qualifier) "const"
(const) "const"
(array_declarator) "C_WRITE[4]"
(identifier) "C_WRITE"
([) "["
(number_literal) "4"
(]) "]"
()) ")"
(parameter_list) "(void *, size_t)"
(() "("
(parameter_declaration) "void *"
(primitive_type) "void"
(abstract_pointer_declarator) "*"
(*) "*"
(,) ","
(parameter_declaration) "size_t"
(primitive_type) "size_t"
()) ")"
(=) "="
(initializer_list) "{\n graph_write_ushort,\n graph_write_uint,\n graph_write_ulong,\n graph_write_sz}"
({) "{"
(identifier) "graph_write_ushort"
(,) ","
(identifier) "graph_write_uint"
(,) ","
(identifier) "graph_write_ulong"
(,) ","
(identifier) "graph_write_sz"
(}) "}"
(;) ";"
(declaration) "void *(* const C_AT[4])(const void *, const void *) ={\n graph_at_ushort,\n graph_at_uint,\n graph_at_ulong,\n graph_at_sz};"
(primitive_type) "void"
(init_declarator) "*(* const C_AT[4])(const void *, const void *) ={\n graph_at_ushort,\n graph_at_uint,\n graph_at_ulong,\n graph_at_sz}"
(pointer_declarator) "*(* const C_AT[4])(const void *, const void *)"
(*) "*"
(function_declarator) "(* const C_AT[4])(const void *, const void *)"
(parenthesized_declarator) "(* const C_AT[4])"
(() "("
(pointer_declarator) "* const C_AT[4]"
(*) "*"
(type_qualifier) "const"
(const) "const"
(array_declarator) "C_AT[4]"
(identifier) "C_AT"
([) "["
(number_literal) "4"
(]) "]"
()) ")"
(parameter_list) "(const void *, const void *)"
(() "("
(parameter_declaration) "const void *"
(type_qualifier) "const"
(const) "const"
(primitive_type) "void"
(abstract_pointer_declarator) "*"
(*) "*"
(,) ","
(parameter_declaration) "const void *"
(type_qualifier) "const"
(const) "const"
(primitive_type) "void"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(=) "="
(initializer_list) "{\n graph_at_ushort,\n graph_at_uint,\n graph_at_ulong,\n graph_at_sz}"
({) "{"
(identifier) "graph_at_ushort"
(,) ","
(identifier) "graph_at_uint"
(,) ","
(identifier) "graph_at_ulong"
(,) ","
(identifier) "graph_at_sz"
(}) "}"
(;) ";"
(declaration) "int (* const C_CMPEQ[4])(const void *, const void *) ={\n graph_cmpeq_ushort,\n graph_cmpeq_uint,\n graph_cmpeq_ulong,\n graph_cmpeq_sz};"
(primitive_type) "int"
(init_declarator) "(* const C_CMPEQ[4])(const void *, const void *) ={\n graph_cmpeq_ushort,\n graph_cmpeq_uint,\n graph_cmpeq_ulong,\n graph_cmpeq_sz}"
(function_declarator) "(* const C_CMPEQ[4])(const void *, const void *)"
(parenthesized_declarator) "(* const C_CMPEQ[4])"
(() "("
(pointer_declarator) "* const C_CMPEQ[4]"
(*) "*"
(type_qualifier) "const"
(const) "const"
(array_declarator) "C_CMPEQ[4]"
(identifier) "C_CMPEQ"
([) "["
(number_literal) "4"
(]) "]"
()) ")"
(parameter_list) "(const void *, const void *)"
(() "("
(parameter_declaration) "const void *"
(type_qualifier) "const"
(const) "const"
(primitive_type) "void"
(abstract_pointer_declarator) "*"
(*) "*"
(,) ","
(parameter_declaration) "const void *"
(type_qualifier) "const"
(const) "const"
(primitive_type) "void"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(=) "="
(initializer_list) "{\n graph_cmpeq_ushort,\n graph_cmpeq_uint,\n graph_cmpeq_ulong,\n graph_cmpeq_sz}"
({) "{"
(identifier) "graph_cmpeq_ushort"
(,) ","
(identifier) "graph_cmpeq_uint"
(,) ","
(identifier) "graph_cmpeq_ulong"
(,) ","
(identifier) "graph_cmpeq_sz"
(}) "}"
(;) ";"
(declaration) "void (* const C_INCR[4])(void *) ={\n graph_incr_ushort,\n graph_incr_uint,\n graph_incr_ulong,\n graph_incr_sz};"
(primitive_type) "void"
(init_declarator) "(* const C_INCR[4])(void *) ={\n graph_incr_ushort,\n graph_incr_uint,\n graph_incr_ulong,\n graph_incr_sz}"
(function_declarator) "(* const C_INCR[4])(void *)"
(parenthesized_declarator) "(* const C_INCR[4])"
(() "("
(pointer_declarator) "* const C_INCR[4]"
(*) "*"
(type_qualifier) "const"
(const) "const"
(array_declarator) "C_INCR[4]"
(identifier) "C_INCR"
([) "["
(number_literal) "4"
(]) "]"
()) ")"
(parameter_list) "(void *)"
(() "("
(parameter_declaration) "void *"
(primitive_type) "void"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(=) "="
(initializer_list) "{\n graph_incr_ushort,\n graph_incr_uint,\n graph_incr_ulong,\n graph_incr_sz}"
({) "{"
(identifier) "graph_incr_ushort"
(,) ","
(identifier) "graph_incr_uint"
(,) ","
(identifier) "graph_incr_ulong"
(,) ","
(identifier) "graph_incr_sz"
(}) "}"
(;) ";"
(declaration) "const size_t C_VT_SIZES[4] = {\n sizeof(unsigned short),\n sizeof(unsigned int),\n sizeof(unsigned long),\n sizeof(size_t)};"
(type_qualifier) "const"
(const) "const"
(primitive_type) "size_t"
(init_declarator) "C_VT_SIZES[4] = {\n sizeof(unsigned short),\n sizeof(unsigned int),\n sizeof(unsigned long),\n sizeof(size_t)}"
(array_declarator) "C_VT_SIZES[4]"
(identifier) "C_VT_SIZES"
([) "["
(number_literal) "4"
(]) "]"
(=) "="
(initializer_list) "{\n sizeof(unsigned short),\n sizeof(unsigned int),\n sizeof(unsigned long),\n sizeof(size_t)}"
({) "{"
(sizeof_expression) "sizeof(unsigned short)"
(sizeof) "sizeof"
(() "("
(type_descriptor) "unsigned short"
(sized_type_specifier) "unsigned short"
(unsigned) "unsigned"
(short) "short"
()) ")"
(,) ","
(sizeof_expression) "sizeof(unsigned int)"
(sizeof) "sizeof"
(() "("
(type_descriptor) "unsigned int"
(sized_type_specifier) "unsigned int"
(unsigned) "unsigned"
(primitive_type) "int"
()) ")"
(,) ","
(sizeof_expression) "sizeof(unsigned long)"
(sizeof) "sizeof"
(() "("
(type_descriptor) "unsigned long"
(sized_type_specifier) "unsigned long"
(unsigned) "unsigned"
(long) "long"
()) ")"
(,) ","
(sizeof_expression) "sizeof(size_t)"
(sizeof) "sizeof"
(() "("
(type_descriptor) "size_t"
(primitive_type) "size_t"
()) ")"
(}) "}"
(;) ";"
(declaration) "const char *C_VT_TYPES[4] = {"ushort", "uint ", "ulong ", "sz "};"
(type_qualifier) "const"
(const) "const"
(primitive_type) "char"
(init_declarator) "*C_VT_TYPES[4] = {"ushort", "uint ", "ulong ", "sz "}"
(pointer_declarator) "*C_VT_TYPES[4]"
(*) "*"
(array_declarator) "C_VT_TYPES[4]"
(identifier) "C_VT_TYPES"
([) "["
(number_literal) "4"
(]) "]"
(=) "="
(initializer_list) "{"ushort", "uint ", "ulong ", "sz "}"
({) "{"
(string_literal) ""ushort""
(") """
(string_content) "ushort"
(") """
(,) ","
(string_literal) ""uint ""
(") """
(string_content) "uint "
(") """
(,) ","
(string_literal) ""ulong ""
(") """
(string_content) "ulong "
(") """
(,) ","
(string_literal) ""sz ""
(") """
(string_content) "sz "
(") """
(}) "}"
(;) ";"
(declaration) "const size_t C_ITER = 10u;"
(type_qualifier) "const"
(const) "const"
(primitive_type) "size_t"
(init_declarator) "C_ITER = 10u"
(identifier) "C_ITER"
(=) "="
(number_literal) "10u"
(;) ";"
(declaration) "const size_t C_PROBS_COUNT = 5u;"
(type_qualifier) "const"
(const) "const"
(primitive_type) "size_t"
(init_declarator) "C_PROBS_COUNT = 5u"
(identifier) "C_PROBS_COUNT"
(=) "="
(number_literal) "5u"
(;) ";"
(declaration) "const double C_PROBS[5] = {1.00, 0.75, 0.50, 0.25, 0.00};"
(type_qualifier) "const"
(const) "const"
(primitive_type) "double"
(init_declarator) "C_PROBS[5] = {1.00, 0.75, 0.50, 0.25, 0.00}"
(array_declarator) "C_PROBS[5]"
(identifier) "C_PROBS"
([) "["
(number_literal) "5"
(]) "]"
(=) "="
(initializer_list) "{1.00, 0.75, 0.50, 0.25, 0.00}"
({) "{"
(number_literal) "1.00"
(,) ","
(number_literal) "0.75"
(,) ","
(number_literal) "0.50"
(,) ","
(number_literal) "0.25"
(,) ","
(number_literal) "0.00"
(}) "}"
(;) ";"
(declaration) "const double C_PROB_ONE = 1.0;"
(type_qualifier) "const"
(const) "const"
(primitive_type) "double"
(init_declarator) "C_PROB_ONE = 1.0"
(identifier) "C_PROB_ONE"
(=) "="
(number_literal) "1.0"
(;) ";"
(declaration) "const double C_PROB_ZERO = 0.0;"
(type_qualifier) "const"
(const) "const"
(primitive_type) "double"
(init_declarator) "C_PROB_ZERO = 0.0"
(identifier) "C_PROB_ZERO"
(=) "="
(number_literal) "0.0"
(;) ";"
(comment) "/* additional operations */"
(declaration) "void *ptr(const void *block, size_t i, size_t size);"
(primitive_type) "void"
(pointer_declarator) "*ptr(const void *block, size_t i, size_t size)"
(*) "*"
(function_declarator) "ptr(const void *block, size_t i, size_t size)"
(identifier) "ptr"
(parameter_list) "(const void *block, size_t i, size_t size)"
(() "("
(parameter_declaration) "const void *block"
(type_qualifier) "const"
(const) "const"
(primitive_type) "void"
(pointer_declarator) "*block"
(*) "*"
(identifier) "block"
(,) ","
(parameter_declaration) "size_t i"
(primitive_type) "size_t"
(identifier) "i"
(,) ","
(parameter_declaration) "size_t size"
(primitive_type) "size_t"
(identifier) "size"
()) ")"
(;) ";"
(comment) "/**\n Run a bfs test on random directed graphs.\n*/"
(struct_specifier) "struct bern_arg{\n double p;\n}"
(struct) "struct"
(type_identifier) "bern_arg"
(field_declaration_list) "{\n double p;\n}"
({) "{"
(field_declaration) "double p;"
(primitive_type) "double"
(field_identifier) "p"
(;) ";"
(}) "}"
(;) ";"
(function_definition) "int bern(void *arg){\n struct bern_arg *b = arg;\n if (b->p >= C_PROB_ONE) return 1;\n if (b->p <= C_PROB_ZERO) return 0;\n if (b->p > DRAND()) return 1;\n return 0;\n}"
(primitive_type) "int"
(function_declarator) "bern(void *arg)"
(identifier) "bern"
(parameter_list) "(void *arg)"
(() "("
(parameter_declaration) "void *arg"
(primitive_type) "void"
(pointer_declarator) "*arg"
(*) "*"
(identifier) "arg"
()) ")"
(compound_statement) "{\n struct bern_arg *b = arg;\n if (b->p >= C_PROB_ONE) return 1;\n if (b->p <= C_PROB_ZERO) return 0;\n if (b->p > DRAND()) return 1;\n return 0;\n}"
({) "{"
(declaration) "struct bern_arg *b = arg;"
(struct_specifier) "struct bern_arg"
(struct) "struct"
(type_identifier) "bern_arg"
(init_declarator) "*b = arg"
(pointer_declarator) "*b"
(*) "*"
(identifier) "b"
(=) "="
(identifier) "arg"
(;) ";"
(if_statement) "if (b->p >= C_PROB_ONE) return 1;"
(if) "if"
(parenthesized_expression) "(b->p >= C_PROB_ONE)"
(() "("
(binary_expression) "b->p >= C_PROB_ONE"
(field_expression) "b->p"
(identifier) "b"
(->) "->"
(field_identifier) "p"
(>=) ">="
(identifier) "C_PROB_ONE"
()) ")"
(return_statement) "return 1;"
(return) "return"
(number_literal) "1"
(;) ";"
(if_statement) "if (b->p <= C_PROB_ZERO) return 0;"
(if) "if"
(parenthesized_expression) "(b->p <= C_PROB_ZERO)"
(() "("
(binary_expression) "b->p <= C_PROB_ZERO"
(field_expression) "b->p"
(identifier) "b"
(->) "->"
(field_identifier) "p"
(<=) "<="
(identifier) "C_PROB_ZERO"
()) ")"
(return_statement) "return 0;"
(return) "return"
(number_literal) "0"
(;) ";"
(if_statement) "if (b->p > DRAND()) return 1;"
(if) "if"
(parenthesized_expression) "(b->p > DRAND())"
(() "("
(binary_expression) "b->p > DRAND()"
(field_expression) "b->p"
(identifier) "b"
(->) "->"
(field_identifier) "p"
(>) ">"
(call_expression) "DRAND()"
(identifier) "DRAND"
(argument_list) "()"
(() "("
()) ")"
()) ")"
(return_statement) "return 1;"
(return) "return"
(number_literal) "1"
(;) ";"
(return_statement) "return 0;"
(return) "return"
(number_literal) "0"
(;) ";"
(}) "}"
(declaration) "void run_random_dir_graph_helper(size_t num_vts,\n size_t vt_size,\n const char *type_string,\n size_t (*read_vt)(const void *),\n void (*write_vt)(void *, size_t),\n void *(*at_vt)(const void *, const void *),\n int (*cmp_vt)(const void *, const void *),\n void (*incr_vt)(void *),\n int bern(void *),\n struct bern_arg *b);"
(primitive_type) "void"
(function_declarator) "run_random_dir_graph_helper(size_t num_vts,\n size_t vt_size,\n const char *type_string,\n size_t (*read_vt)(const void *),\n void (*write_vt)(void *, size_t),\n void *(*at_vt)(const void *, const void *),\n int (*cmp_vt)(const void *, const void *),\n void (*incr_vt)(void *),\n int bern(void *),\n struct bern_arg *b)"
(identifier) "run_random_dir_graph_helper"
(parameter_list) "(size_t num_vts,\n size_t vt_size,\n const char *type_string,\n size_t (*read_vt)(const void *),\n void (*write_vt)(void *, size_t),\n void *(*at_vt)(const void *, const void *),\n int (*cmp_vt)(const void *, const void *),\n void (*incr_vt)(void *),\n int bern(void *),\n struct bern_arg *b)"
(() "("
(parameter_declaration) "size_t num_vts"
(primitive_type) "size_t"
(identifier) "num_vts"
(,) ","
(parameter_declaration) "size_t vt_size"
(primitive_type) "size_t"
(identifier) "vt_size"
(,) ","
(parameter_declaration) "const char *type_string"
(type_qualifier) "const"
(const) "const"
(primitive_type) "char"
(pointer_declarator) "*type_string"
(*) "*"
(identifier) "type_string"
(,) ","
(parameter_declaration) "size_t (*read_vt)(const void *)"
(primitive_type) "size_t"
(function_declarator) "(*read_vt)(const void *)"
(parenthesized_declarator) "(*read_vt)"
(() "("
(pointer_declarator) "*read_vt"
(*) "*"
(identifier) "read_vt"
()) ")"
(parameter_list) "(const void *)"
(() "("
(parameter_declaration) "const void *"
(type_qualifier) "const"
(const) "const"
(primitive_type) "void"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(,) ","
(parameter_declaration) "void (*write_vt)(void *, size_t)"
(primitive_type) "void"
(function_declarator) "(*write_vt)(void *, size_t)"
(parenthesized_declarator) "(*write_vt)"
(() "("
(pointer_declarator) "*write_vt"
(*) "*"
(identifier) "write_vt"
()) ")"
(parameter_list) "(void *, size_t)"
(() "("
(parameter_declaration) "void *"
(primitive_type) "void"
(abstract_pointer_declarator) "*"
(*) "*"
(,) ","
(parameter_declaration) "size_t"
(primitive_type) "size_t"
()) ")"
(,) ","
(parameter_declaration) "void *(*at_vt)(const void *, const void *)"
(primitive_type) "void"
(pointer_declarator) "*(*at_vt)(const void *, const void *)"
(*) "*"
(function_declarator) "(*at_vt)(const void *, const void *)"
(parenthesized_declarator) "(*at_vt)"
(() "("
(pointer_declarator) "*at_vt"
(*) "*"
(identifier) "at_vt"
()) ")"
(parameter_list) "(const void *, const void *)"
(() "("
(parameter_declaration) "const void *"
(type_qualifier) "const"
(const) "const"
(primitive_type) "void"
(abstract_pointer_declarator) "*"
(*) "*"
(,) ","
(parameter_declaration) "const void *"
(type_qualifier) "const"
(const) "const"
(primitive_type) "void"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(,) ","
(parameter_declaration) "int (*cmp_vt)(const void *, const void *)"
(primitive_type) "int"
(function_declarator) "(*cmp_vt)(const void *, const void *)"
(parenthesized_declarator) "(*cmp_vt)"
(() "("
(pointer_declarator) "*cmp_vt"
(*) "*"
(identifier) "cmp_vt"
()) ")"
(parameter_list) "(const void *, const void *)"
(() "("
(parameter_declaration) "const void *"
(type_qualifier) "const"
(const) "const"
(primitive_type) "void"
(abstract_pointer_declarator) "*"
(*) "*"
(,) ","
(parameter_declaration) "const void *"
(type_qualifier) "const"
(const) "const"
(primitive_type) "void"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(,) ","
(parameter_declaration) "void (*incr_vt)(void *)"
(primitive_type) "void"
(function_declarator) "(*incr_vt)(void *)"
(parenthesized_declarator) "(*incr_vt)"
(() "("
(pointer_declarator) "*incr_vt"
(*) "*"
(identifier) "incr_vt"
()) ")"
(parameter_list) "(void *)"
(() "("
(parameter_declaration) "void *"
(primitive_type) "void"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(,) ","
(parameter_declaration) "int bern(void *)"
(primitive_type) "int"
(function_declarator) "bern(void *)"
(identifier) "bern"
(parameter_list) "(void *)"
(() "("
(parameter_declaration) "void *"
(primitive_type) "void"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(,) ","
(parameter_declaration) "struct bern_arg *b"
(struct_specifier) "struct bern_arg"
(struct) "struct"
(type_identifier) "bern_arg"
(pointer_declarator) "*b"
(*) "*"
(identifier) "b"
()) ")"
(;) ";"
(function_definition) "void run_random_dir_graph_test(size_t log_start, size_t log_end){\n size_t i, j;\n size_t num_vts;\n struct bern_arg b;\n printf("Run a bfs test on random directed graphs from %lu random "\n "start vertices in each graph\n", TOLU(C_ITER));\n for (i = 0; i < C_PROBS_COUNT; i++){\n b.p = C_PROBS[i];\n printf("\tP[an edge is in a graph] = %.2f\n", b.p);\n for (j = log_start; j <= log_end; j++){\n num_vts = pow_two_perror(j);\n printf("\t\tvertices: %lu, E[# of directed edges]: %.1f\n",\n TOLU(num_vts), b.p * num_vts * (num_vts - 1));\n run_random_dir_graph_helper(num_vts,\n C_VT_SIZES[1],\n C_VT_TYPES[1],\n C_READ[1],\n C_WRITE[1],\n C_AT[1],\n C_CMPEQ[1],\n C_INCR[1],\n bern,\n &b);\n }\n }\n}"
(primitive_type) "void"
(function_declarator) "run_random_dir_graph_test(size_t log_start, size_t log_end)"
(identifier) "run_random_dir_graph_test"
(parameter_list) "(size_t log_start, size_t log_end)"
(() "("
(parameter_declaration) "size_t log_start"
(primitive_type) "size_t"
(identifier) "log_start"
(,) ","
(parameter_declaration) "size_t log_end"
(primitive_type) "size_t"
(identifier) "log_end"
()) ")"
(compound_statement) "{\n size_t i, j;\n size_t num_vts;\n struct bern_arg b;\n printf("Run a bfs test on random directed graphs from %lu random "\n "start vertices in each graph\n", TOLU(C_ITER));\n for (i = 0; i < C_PROBS_COUNT; i++){\n b.p = C_PROBS[i];\n printf("\tP[an edge is in a graph] = %.2f\n", b.p);\n for (j = log_start; j <= log_end; j++){\n num_vts = pow_two_perror(j);\n printf("\t\tvertices: %lu, E[# of directed edges]: %.1f\n",\n TOLU(num_vts), b.p * num_vts * (num_vts - 1));\n run_random_dir_graph_helper(num_vts,\n C_VT_SIZES[1],\n C_VT_TYPES[1],\n C_READ[1],\n C_WRITE[1],\n C_AT[1],\n C_CMPEQ[1],\n C_INCR[1],\n bern,\n &b);\n }\n }\n}"
({) "{"
(declaration) "size_t i, j;"
(primitive_type) "size_t"
(identifier) "i"
(,) ","
(identifier) "j"
(;) ";"
(declaration) "size_t num_vts;"
(primitive_type) "size_t"
(identifier) "num_vts"
(;) ";"
(declaration) "struct bern_arg b;"
(struct_specifier) "struct bern_arg"
(struct) "struct"
(type_identifier) "bern_arg"
(identifier) "b"
(;) ";"
(expression_statement) "printf("Run a bfs test on random directed graphs from %lu random "\n "start vertices in each graph\n", TOLU(C_ITER));"
(call_expression) "printf("Run a bfs test on random directed graphs from %lu random "\n "start vertices in each graph\n", TOLU(C_ITER))"
(identifier) "printf"
(argument_list) "("Run a bfs test on random directed graphs from %lu random "\n "start vertices in each graph\n", TOLU(C_ITER))"
(() "("
(concatenated_string) ""Run a bfs test on random directed graphs from %lu random "\n "start vertices in each graph\n""
(string_literal) ""Run a bfs test on random directed graphs from %lu random ""
(") """
(string_content) "Run a bfs test on random directed graphs from %lu random "
(") """
(string_literal) ""start vertices in each graph\n""
(") """
(string_content) "start vertices in each graph"
(escape_sequence) "\n"
(") """
(,) ","
(call_expression) "TOLU(C_ITER)"
(identifier) "TOLU"
(argument_list) "(C_ITER)"
(() "("
(identifier) "C_ITER"
()) ")"
()) ")"
(;) ";"
(for_statement) "for (i = 0; i < C_PROBS_COUNT; i++){\n b.p = C_PROBS[i];\n printf("\tP[an edge is in a graph] = %.2f\n", b.p);\n for (j = log_start; j <= log_end; j++){\n num_vts = pow_two_perror(j);\n printf("\t\tvertices: %lu, E[# of directed edges]: %.1f\n",\n TOLU(num_vts), b.p * num_vts * (num_vts - 1));\n run_random_dir_graph_helper(num_vts,\n C_VT_SIZES[1],\n C_VT_TYPES[1],\n C_READ[1],\n C_WRITE[1],\n C_AT[1],\n C_CMPEQ[1],\n C_INCR[1],\n bern,\n &b);\n }\n }"
(for) "for"
(() "("
(assignment_expression) "i = 0"
(identifier) "i"
(=) "="
(number_literal) "0"
(;) ";"
(binary_expression) "i < C_PROBS_COUNT"
(identifier) "i"
(<) "<"
(identifier) "C_PROBS_COUNT"
(;) ";"
(update_expression) "i++"
(identifier) "i"
(++) "++"
()) ")"
(compound_statement) "{\n b.p = C_PROBS[i];\n printf("\tP[an edge is in a graph] = %.2f\n", b.p);\n for (j = log_start; j <= log_end; j++){\n num_vts = pow_two_perror(j);\n printf("\t\tvertices: %lu, E[# of directed edges]: %.1f\n",\n TOLU(num_vts), b.p * num_vts * (num_vts - 1));\n run_random_dir_graph_helper(num_vts,\n C_VT_SIZES[1],\n C_VT_TYPES[1],\n C_READ[1],\n C_WRITE[1],\n C_AT[1],\n C_CMPEQ[1],\n C_INCR[1],\n bern,\n &b);\n }\n }"
({) "{"
(expression_statement) "b.p = C_PROBS[i];"
(assignment_expression) "b.p = C_PROBS[i]"
(field_expression) "b.p"
(identifier) "b"
(.) "."
(field_identifier) "p"
(=) "="
(subscript_expression) "C_PROBS[i]"
(identifier) "C_PROBS"
([) "["
(identifier) "i"
(]) "]"
(;) ";"
(expression_statement) "printf("\tP[an edge is in a graph] = %.2f\n", b.p);"
(call_expression) "printf("\tP[an edge is in a graph] = %.2f\n", b.p)"
(identifier) "printf"
(argument_list) "("\tP[an edge is in a graph] = %.2f\n", b.p)"
(() "("
(string_literal) ""\tP[an edge is in a graph] = %.2f\n""
(") """
(escape_sequence) "\t"
(string_content) "P[an edge is in a graph] = %.2f"
(escape_sequence) "\n"
(") """
(,) ","
(field_expression) "b.p"
(identifier) "b"
(.) "."
(field_identifier) "p"
()) ")"
(;) ";"
(for_statement) "for (j = log_start; j <= log_end; j++){\n num_vts = pow_two_perror(j);\n printf("\t\tvertices: %lu, E[# of directed edges]: %.1f\n",\n TOLU(num_vts), b.p * num_vts * (num_vts - 1));\n run_random_dir_graph_helper(num_vts,\n C_VT_SIZES[1],\n C_VT_TYPES[1],\n C_READ[1],\n C_WRITE[1],\n C_AT[1],\n C_CMPEQ[1],\n C_INCR[1],\n bern,\n &b);\n }"
(for) "for"
(() "("
(assignment_expression) "j = log_start"
(identifier) "j"
(=) "="
(identifier) "log_start"
(;) ";"
(binary_expression) "j <= log_end"
(identifier) "j"
(<=) "<="
(identifier) "log_end"
(;) ";"
(update_expression) "j++"
(identifier) "j"
(++) "++"
()) ")"
(compound_statement) "{\n num_vts = pow_two_perror(j);\n printf("\t\tvertices: %lu, E[# of directed edges]: %.1f\n",\n TOLU(num_vts), b.p * num_vts * (num_vts - 1));\n run_random_dir_graph_helper(num_vts,\n C_VT_SIZES[1],\n C_VT_TYPES[1],\n C_READ[1],\n C_WRITE[1],\n C_AT[1],\n C_CMPEQ[1],\n C_INCR[1],\n bern,\n &b);\n }"
({) "{"
(expression_statement) "num_vts = pow_two_perror(j);"
(assignment_expression) "num_vts = pow_two_perror(j)"
(identifier) "num_vts"
(=) "="
(call_expression) "pow_two_perror(j)"
(identifier) "pow_two_perror"
(argument_list) "(j)"
(() "("
(identifier) "j"
()) ")"
(;) ";"
(expression_statement) "printf("\t\tvertices: %lu, E[# of directed edges]: %.1f\n",\n TOLU(num_vts), b.p * num_vts * (num_vts - 1));"
(call_expression) "printf("\t\tvertices: %lu, E[# of directed edges]: %.1f\n",\n TOLU(num_vts), b.p * num_vts * (num_vts - 1))"
(identifier) "printf"
(argument_list) "("\t\tvertices: %lu, E[# of directed edges]: %.1f\n",\n TOLU(num_vts), b.p * num_vts * (num_vts - 1))"
(() "("
(string_literal) ""\t\tvertices: %lu, E[# of directed edges]: %.1f\n""
(") """
(escape_sequence) "\t"
(escape_sequence) "\t"
(string_content) "vertices: %lu, E[# of directed edges]: %.1f"
(escape_sequence) "\n"
(") """
(,) ","
(call_expression) "TOLU(num_vts)"
(identifier) "TOLU"
(argument_list) "(num_vts)"
(() "("
(identifier) "num_vts"
()) ")"
(,) ","
(binary_expression) "b.p * num_vts * (num_vts - 1)"
(binary_expression) "b.p * num_vts"
(field_expression) "b.p"
(identifier) "b"
(.) "."
(field_identifier) "p"
(*) "*"
(identifier) "num_vts"
(*) "*"
(parenthesized_expression) "(num_vts - 1)"
(() "("
(binary_expression) "num_vts - 1"
(identifier) "num_vts"
(-) "-"
(number_literal) "1"
()) ")"
()) ")"
(;) ";"
(expression_statement) "run_random_dir_graph_helper(num_vts,\n C_VT_SIZES[1],\n C_VT_TYPES[1],\n C_READ[1],\n C_WRITE[1],\n C_AT[1],\n C_CMPEQ[1],\n C_INCR[1],\n bern,\n &b);"
(call_expression) "run_random_dir_graph_helper(num_vts,\n C_VT_SIZES[1],\n C_VT_TYPES[1],\n C_READ[1],\n C_WRITE[1],\n C_AT[1],\n C_CMPEQ[1],\n C_INCR[1],\n bern,\n &b)"
(identifier) "run_random_dir_graph_helper"
(argument_list) "(num_vts,\n C_VT_SIZES[1],\n C_VT_TYPES[1],\n C_READ[1],\n C_WRITE[1],\n C_AT[1],\n C_CMPEQ[1],\n C_INCR[1],\n bern,\n &b)"
(() "("
(identifier) "num_vts"
(,) ","
(subscript_expression) "C_VT_SIZES[1]"
(identifier) "C_VT_SIZES"
([) "["
(number_literal) "1"
(]) "]"
(,) ","
(subscript_expression) "C_VT_TYPES[1]"
(identifier) "C_VT_TYPES"
([) "["
(number_literal) "1"
(]) "]"
(,) ","
(subscript_expression) "C_READ[1]"
(identifier) "C_READ"
([) "["
(number_literal) "1"
(]) "]"
(,) ","
(subscript_expression) "C_WRITE[1]"
(identifier) "C_WRITE"
([) "["
(number_literal) "1"
(]) "]"
(,) ","
(subscript_expression) "C_AT[1]"
(identifier) "C_AT"
([) "["
(number_literal) "1"
(]) "]"
(,) ","
(subscript_expression) "C_CMPEQ[1]"
(identifier) "C_CMPEQ"
([) "["
(number_literal) "1"
(]) "]"
(,) ","
(subscript_expression) "C_INCR[1]"
(identifier) "C_INCR"
([) "["
(number_literal) "1"
(]) "]"
(,) ","
(identifier) "bern"
(,) ","
(pointer_expression) "&b"
(&) "&"
(identifier) "b"
()) ")"
(;) ";"
(}) "}"
(}) "}"
(}) "}"
(function_definition) "void run_random_dir_graph_helper(size_t num_vts,\n size_t vt_size,\n const char *type_string,\n size_t (*read_vt)(const void *),\n void (*write_vt)(void *, size_t),\n void *(*at_vt)(const void *, const void *),\n int (*cmp_vt)(const void *, const void *),\n void (*incr_vt)(void *),\n int bern(void *),\n struct bern_arg *b){\n size_t i;\n size_t *start = NULL;\n void *dist = NULL, *prev = NULL;\n struct graph g;\n struct adj_lst a;\n clock_t t;\n /* no declared type after malloc; effective type is set by bfs */\n start = malloc_perror(C_ITER, sizeof(size_t));\n dist = malloc_perror(num_vts, vt_size);\n prev = malloc_perror(num_vts, vt_size);\n for (i = 0; i < num_vts; i++){\n /* avoid trap representations in tests */\n write_vt(ptr(dist, i, vt_size), 0);\n } \n graph_base_init(&g, num_vts, vt_size, 0);\n adj_lst_base_init(&a, &g);\n adj_lst_rand_dir(&a, write_vt, bern, b);\n for (i = 0; i < C_ITER; i++){\n start[i] = RANDOM() % num_vts;\n }\n t = clock();\n for (i = 0; i < C_ITER; i++){\n bfs(&a, start[i], dist, prev, read_vt, write_vt, at_vt, cmp_vt, incr_vt);\n }\n t = clock() - t;\n printf("\t\t\t%s ave runtime: %.6f seconds\n",\n type_string, (double)t / C_ITER / CLOCKS_PER_SEC);\n adj_lst_free(&a); /* deallocates blocks with effective vertex type */\n free(start);\n free(dist);\n free(prev);\n start = NULL;\n dist = NULL;\n prev = NULL;\n}"
(primitive_type) "void"
(function_declarator) "run_random_dir_graph_helper(size_t num_vts,\n size_t vt_size,\n const char *type_string,\n size_t (*read_vt)(const void *),\n void (*write_vt)(void *, size_t),\n void *(*at_vt)(const void *, const void *),\n int (*cmp_vt)(const void *, const void *),\n void (*incr_vt)(void *),\n int bern(void *),\n struct bern_arg *b)"
(identifier) "run_random_dir_graph_helper"
(parameter_list) "(size_t num_vts,\n size_t vt_size,\n const char *type_string,\n size_t (*read_vt)(const void *),\n void (*write_vt)(void *, size_t),\n void *(*at_vt)(const void *, const void *),\n int (*cmp_vt)(const void *, const void *),\n void (*incr_vt)(void *),\n int bern(void *),\n struct bern_arg *b)"
(() "("
(parameter_declaration) "size_t num_vts"
(primitive_type) "size_t"
(identifier) "num_vts"
(,) ","
(parameter_declaration) "size_t vt_size"
(primitive_type) "size_t"
(identifier) "vt_size"
(,) ","
(parameter_declaration) "const char *type_string"
(type_qualifier) "const"
(const) "const"
(primitive_type) "char"
(pointer_declarator) "*type_string"
(*) "*"
(identifier) "type_string"
(,) ","
(parameter_declaration) "size_t (*read_vt)(const void *)"
(primitive_type) "size_t"
(function_declarator) "(*read_vt)(const void *)"
(parenthesized_declarator) "(*read_vt)"
(() "("
(pointer_declarator) "*read_vt"
(*) "*"
(identifier) "read_vt"
()) ")"
(parameter_list) "(const void *)"
(() "("
(parameter_declaration) "const void *"
(type_qualifier) "const"
(const) "const"
(primitive_type) "void"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(,) ","
(parameter_declaration) "void (*write_vt)(void *, size_t)"
(primitive_type) "void"
(function_declarator) "(*write_vt)(void *, size_t)"
(parenthesized_declarator) "(*write_vt)"
(() "("
(pointer_declarator) "*write_vt"
(*) "*"
(identifier) "write_vt"
()) ")"
(parameter_list) "(void *, size_t)"
(() "("
(parameter_declaration) "void *"
(primitive_type) "void"
(abstract_pointer_declarator) "*"
(*) "*"
(,) ","
(parameter_declaration) "size_t"
(primitive_type) "size_t"
()) ")"
(,) ","
(parameter_declaration) "void *(*at_vt)(const void *, const void *)"
(primitive_type) "void"
(pointer_declarator) "*(*at_vt)(const void *, const void *)"
(*) "*"
(function_declarator) "(*at_vt)(const void *, const void *)"
(parenthesized_declarator) "(*at_vt)"
(() "("
(pointer_declarator) "*at_vt"
(*) "*"
(identifier) "at_vt"
()) ")"
(parameter_list) "(const void *, const void *)"
(() "("
(parameter_declaration) "const void *"
(type_qualifier) "const"
(const) "const"
(primitive_type) "void"
(abstract_pointer_declarator) "*"
(*) "*"
(,) ","
(parameter_declaration) "const void *"
(type_qualifier) "const"
(const) "const"
(primitive_type) "void"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(,) ","
(parameter_declaration) "int (*cmp_vt)(const void *, const void *)"
(primitive_type) "int"
(function_declarator) "(*cmp_vt)(const void *, const void *)"
(parenthesized_declarator) "(*cmp_vt)"
(() "("
(pointer_declarator) "*cmp_vt"
(*) "*"
(identifier) "cmp_vt"
()) ")"
(parameter_list) "(const void *, const void *)"
(() "("
(parameter_declaration) "const void *"
(type_qualifier) "const"
(const) "const"
(primitive_type) "void"
(abstract_pointer_declarator) "*"
(*) "*"
(,) ","
(parameter_declaration) "const void *"
(type_qualifier) "const"
(const) "const"
(primitive_type) "void"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(,) ","
(parameter_declaration) "void (*incr_vt)(void *)"
(primitive_type) "void"
(function_declarator) "(*incr_vt)(void *)"
(parenthesized_declarator) "(*incr_vt)"
(() "("
(pointer_declarator) "*incr_vt"
(*) "*"
(identifier) "incr_vt"
()) ")"
(parameter_list) "(void *)"
(() "("
(parameter_declaration) "void *"
(primitive_type) "void"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(,) ","
(parameter_declaration) "int bern(void *)"
(primitive_type) "int"
(function_declarator) "bern(void *)"
(identifier) "bern"
(parameter_list) "(void *)"
(() "("
(parameter_declaration) "void *"
(primitive_type) "void"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(,) ","
(parameter_declaration) "struct bern_arg *b"
(struct_specifier) "struct bern_arg"
(struct) "struct"
(type_identifier) "bern_arg"
(pointer_declarator) "*b"
(*) "*"
(identifier) "b"
()) ")"
(compound_statement) "{\n size_t i;\n size_t *start = NULL;\n void *dist = NULL, *prev = NULL;\n struct graph g;\n struct adj_lst a;\n clock_t t;\n /* no declared type after malloc; effective type is set by bfs */\n start = malloc_perror(C_ITER, sizeof(size_t));\n dist = malloc_perror(num_vts, vt_size);\n prev = malloc_perror(num_vts, vt_size);\n for (i = 0; i < num_vts; i++){\n /* avoid trap representations in tests */\n write_vt(ptr(dist, i, vt_size), 0);\n } \n graph_base_init(&g, num_vts, vt_size, 0);\n adj_lst_base_init(&a, &g);\n adj_lst_rand_dir(&a, write_vt, bern, b);\n for (i = 0; i < C_ITER; i++){\n start[i] = RANDOM() % num_vts;\n }\n t = clock();\n for (i = 0; i < C_ITER; i++){\n bfs(&a, start[i], dist, prev, read_vt, write_vt, at_vt, cmp_vt, incr_vt);\n }\n t = clock() - t;\n printf("\t\t\t%s ave runtime: %.6f seconds\n",\n type_string, (double)t / C_ITER / CLOCKS_PER_SEC);\n adj_lst_free(&a); /* deallocates blocks with effective vertex type */\n free(start);\n free(dist);\n free(prev);\n start = NULL;\n dist = NULL;\n prev = NULL;\n}"
({) "{"
(declaration) "size_t i;"
(primitive_type) "size_t"
(identifier) "i"
(;) ";"
(declaration) "size_t *start = NULL;"
(primitive_type) "size_t"
(init_declarator) "*start = NULL"
(pointer_declarator) "*start"
(*) "*"
(identifier) "start"
(=) "="
(null) "NULL"
(NULL) "NULL"
(;) ";"
(declaration) "void *dist = NULL, *prev = NULL;"
(primitive_type) "void"
(init_declarator) "*dist = NULL"
(pointer_declarator) "*dist"
(*) "*"
(identifier) "dist"
(=) "="
(null) "NULL"
(NULL) "NULL"
(,) ","
(init_declarator) "*prev = NULL"
(pointer_declarator) "*prev"
(*) "*"
(identifier) "prev"
(=) "="
(null) "NULL"
(NULL) "NULL"
(;) ";"
(declaration) "struct graph g;"
(struct_specifier) "struct graph"
(struct) "struct"
(type_identifier) "graph"
(identifier) "g"
(;) ";"
(declaration) "struct adj_lst a;"
(struct_specifier) "struct adj_lst"
(struct) "struct"
(type_identifier) "adj_lst"
(identifier) "a"
(;) ";"
(declaration) "clock_t t;"
(type_identifier) "clock_t"
(identifier) "t"
(;) ";"
(comment) "/* no declared type after malloc; effective type is set by bfs */"
(expression_statement) "start = malloc_perror(C_ITER, sizeof(size_t));"
(assignment_expression) "start = malloc_perror(C_ITER, sizeof(size_t))"
(identifier) "start"
(=) "="
(call_expression) "malloc_perror(C_ITER, sizeof(size_t))"
(identifier) "malloc_perror"
(argument_list) "(C_ITER, sizeof(size_t))"
(() "("
(identifier) "C_ITER"
(,) ","
(sizeof_expression) "sizeof(size_t)"
(sizeof) "sizeof"
(() "("
(type_descriptor) "size_t"
(primitive_type) "size_t"
()) ")"
()) ")"
(;) ";"
(expression_statement) "dist = malloc_perror(num_vts, vt_size);"
(assignment_expression) "dist = malloc_perror(num_vts, vt_size)"
(identifier) "dist"
(=) "="
(call_expression) "malloc_perror(num_vts, vt_size)"
(identifier) "malloc_perror"
(argument_list) "(num_vts, vt_size)"
(() "("
(identifier) "num_vts"
(,) ","
(identifier) "vt_size"
()) ")"
(;) ";"
(expression_statement) "prev = malloc_perror(num_vts, vt_size);"
(assignment_expression) "prev = malloc_perror(num_vts, vt_size)"
(identifier) "prev"
(=) "="
(call_expression) "malloc_perror(num_vts, vt_size)"
(identifier) "malloc_perror"
(argument_list) "(num_vts, vt_size)"
(() "("
(identifier) "num_vts"
(,) ","
(identifier) "vt_size"
()) ")"
(;) ";"
(for_statement) "for (i = 0; i < num_vts; i++){\n /* avoid trap representations in tests */\n write_vt(ptr(dist, i, vt_size), 0);\n }"
(for) "for"
(() "("
(assignment_expression) "i = 0"
(identifier) "i"
(=) "="
(number_literal) "0"
(;) ";"
(binary_expression) "i < num_vts"
(identifier) "i"
(<) "<"
(identifier) "num_vts"
(;) ";"
(update_expression) "i++"
(identifier) "i"
(++) "++"
()) ")"
(compound_statement) "{\n /* avoid trap representations in tests */\n write_vt(ptr(dist, i, vt_size), 0);\n }"
({) "{"
(comment) "/* avoid trap representations in tests */"
(expression_statement) "write_vt(ptr(dist, i, vt_size), 0);"
(call_expression) "write_vt(ptr(dist, i, vt_size), 0)"
(identifier) "write_vt"
(argument_list) "(ptr(dist, i, vt_size), 0)"
(() "("
(call_expression) "ptr(dist, i, vt_size)"
(identifier) "ptr"
(argument_list) "(dist, i, vt_size)"
(() "("
(identifier) "dist"
(,) ","
(identifier) "i"
(,) ","
(identifier) "vt_size"
()) ")"
(,) ","
(number_literal) "0"
()) ")"
(;) ";"
(}) "}"
(expression_statement) "graph_base_init(&g, num_vts, vt_size, 0);"
(call_expression) "graph_base_init(&g, num_vts, vt_size, 0)"
(identifier) "graph_base_init"
(argument_list) "(&g, num_vts, vt_size, 0)"
(() "("
(pointer_expression) "&g"
(&) "&"
(identifier) "g"
(,) ","
(identifier) "num_vts"
(,) ","
(identifier) "vt_size"
(,) ","
(number_literal) "0"
()) ")"
(;) ";"
(expression_statement) "adj_lst_base_init(&a, &g);"
(call_expression) "adj_lst_base_init(&a, &g)"
(identifier) "adj_lst_base_init"
(argument_list) "(&a, &g)"
(() "("
(pointer_expression) "&a"
(&) "&"
(identifier) "a"
(,) ","
(pointer_expression) "&g"
(&) "&"
(identifier) "g"
()) ")"
(;) ";"
(expression_statement) "adj_lst_rand_dir(&a, write_vt, bern, b);"
(call_expression) "adj_lst_rand_dir(&a, write_vt, bern, b)"
(identifier) "adj_lst_rand_dir"
(argument_list) "(&a, write_vt, bern, b)"
(() "("
(pointer_expression) "&a"
(&) "&"
(identifier) "a"
(,) ","
(identifier) "write_vt"
(,) ","
(identifier) "bern"
(,) ","
(identifier) "b"
()) ")"
(;) ";"
(for_statement) "for (i = 0; i < C_ITER; i++){\n start[i] = RANDOM() % num_vts;\n }"
(for) "for"
(() "("
(assignment_expression) "i = 0"
(identifier) "i"
(=) "="
(number_literal) "0"
(;) ";"
(binary_expression) "i < C_ITER"
(identifier) "i"
(<) "<"
(identifier) "C_ITER"
(;) ";"
(update_expression) "i++"
(identifier) "i"
(++) "++"
()) ")"
(compound_statement) "{\n start[i] = RANDOM() % num_vts;\n }"
({) "{"
(expression_statement) "start[i] = RANDOM() % num_vts;"
(assignment_expression) "start[i] = RANDOM() % num_vts"
(subscript_expression) "start[i]"
(identifier) "start"
([) "["
(identifier) "i"
(]) "]"
(=) "="
(binary_expression) "RANDOM() % num_vts"
(call_expression) "RANDOM()"
(identifier) "RANDOM"
(argument_list) "()"
(() "("
()) ")"
(%) "%"
(identifier) "num_vts"
(;) ";"
(}) "}"
(expression_statement) "t = clock();"
(assignment_expression) "t = clock()"
(identifier) "t"
(=) "="
(call_expression) "clock()"
(identifier) "clock"
(argument_list) "()"
(() "("
()) ")"
(;) ";"
(for_statement) "for (i = 0; i < C_ITER; i++){\n bfs(&a, start[i], dist, prev, read_vt, write_vt, at_vt, cmp_vt, incr_vt);\n }"
(for) "for"
(() "("
(assignment_expression) "i = 0"
(identifier) "i"
(=) "="
(number_literal) "0"
(;) ";"
(binary_expression) "i < C_ITER"
(identifier) "i"
(<) "<"
(identifier) "C_ITER"
(;) ";"
(update_expression) "i++"
(identifier) "i"
(++) "++"
()) ")"
(compound_statement) "{\n bfs(&a, start[i], dist, prev, read_vt, write_vt, at_vt, cmp_vt, incr_vt);\n }"
({) "{"
(expression_statement) "bfs(&a, start[i], dist, prev, read_vt, write_vt, at_vt, cmp_vt, incr_vt);"
(call_expression) "bfs(&a, start[i], dist, prev, read_vt, write_vt, at_vt, cmp_vt, incr_vt)"
(identifier) "bfs"
(argument_list) "(&a, start[i], dist, prev, read_vt, write_vt, at_vt, cmp_vt, incr_vt)"
(() "("
(pointer_expression) "&a"
(&) "&"
(identifier) "a"
(,) ","
(subscript_expression) "start[i]"
(identifier) "start"
([) "["
(identifier) "i"
(]) "]"
(,) ","
(identifier) "dist"
(,) ","
(identifier) "prev"
(,) ","
(identifier) "read_vt"
(,) ","
(identifier) "write_vt"
(,) ","
(identifier) "at_vt"
(,) ","
(identifier) "cmp_vt"
(,) ","
(identifier) "incr_vt"
()) ")"
(;) ";"
(}) "}"
(expression_statement) "t = clock() - t;"
(assignment_expression) "t = clock() - t"
(identifier) "t"
(=) "="
(binary_expression) "clock() - t"
(call_expression) "clock()"
(identifier) "clock"
(argument_list) "()"
(() "("
()) ")"
(-) "-"
(identifier) "t"
(;) ";"
(expression_statement) "printf("\t\t\t%s ave runtime: %.6f seconds\n",\n type_string, (double)t / C_ITER / CLOCKS_PER_SEC);"
(call_expression) "printf("\t\t\t%s ave runtime: %.6f seconds\n",\n type_string, (double)t / C_ITER / CLOCKS_PER_SEC)"
(identifier) "printf"
(argument_list) "("\t\t\t%s ave runtime: %.6f seconds\n",\n type_string, (double)t / C_ITER / CLOCKS_PER_SEC)"
(() "("
(string_literal) ""\t\t\t%s ave runtime: %.6f seconds\n""
(") """
(escape_sequence) "\t"
(escape_sequence) "\t"
(escape_sequence) "\t"
(string_content) "%s ave runtime: %.6f seconds"
(escape_sequence) "\n"
(") """
(,) ","
(identifier) "type_string"
(,) ","
(binary_expression) "(double)t / C_ITER / CLOCKS_PER_SEC"
(binary_expression) "(double)t / C_ITER"
(cast_expression) "(double)t"
(() "("
(type_descriptor) "double"
(primitive_type) "double"
()) ")"
(identifier) "t"
(/) "/"
(identifier) "C_ITER"
(/) "/"
(identifier) "CLOCKS_PER_SEC"
()) ")"
(;) ";"
(expression_statement) "adj_lst_free(&a);"
(call_expression) "adj_lst_free(&a)"
(identifier) "adj_lst_free"
(argument_list) "(&a)"
(() "("
(pointer_expression) "&a"
(&) "&"
(identifier) "a"
()) ")"
(;) ";"
(comment) "/* deallocates blocks with effective vertex type */"
(expression_statement) "free(start);"
(call_expression) "free(start)"
(identifier) "free"
(argument_list) "(start)"
(() "("
(identifier) "start"
()) ")"
(;) ";"
(expression_statement) "free(dist);"
(call_expression) "free(dist)"
(identifier) "free"
(argument_list) "(dist)"
(() "("
(identifier) "dist"
()) ")"
(;) ";"
(expression_statement) "free(prev);"
(call_expression) "free(prev)"
(identifier) "free"
(argument_list) "(prev)"
(() "("
(identifier) "prev"
()) ")"
(;) ";"
(expression_statement) "start = NULL;"
(assignment_expression) "start = NULL"
(identifier) "start"
(=) "="
(null) "NULL"
(NULL) "NULL"
(;) ";"
(expression_statement) "dist = NULL;"
(assignment_expression) "dist = NULL"
(identifier) "dist"
(=) "="
(null) "NULL"
(NULL) "NULL"
(;) ";"
(expression_statement) "prev = NULL;"
(assignment_expression) "prev = NULL"
(identifier) "prev"
(=) "="
(null) "NULL"
(NULL) "NULL"
(;) ";"
(}) "}"
(comment) "/**\n Computes a pointer to the ith element in the block of elements.\n*/"
(function_definition) "void *ptr(const void *block, size_t i, size_t size){\n return (void *)((char *)block + i * size);\n}"
(primitive_type) "void"
(pointer_declarator) "*ptr(const void *block, size_t i, size_t size)"
(*) "*"
(function_declarator) "ptr(const void *block, size_t i, size_t size)"
(identifier) "ptr"
(parameter_list) "(const void *block, size_t i, size_t size)"
(() "("
(parameter_declaration) "const void *block"
(type_qualifier) "const"
(const) "const"
(primitive_type) "void"
(pointer_declarator) "*block"
(*) "*"
(identifier) "block"
(,) ","
(parameter_declaration) "size_t i"
(primitive_type) "size_t"
(identifier) "i"
(,) ","
(parameter_declaration) "size_t size"
(primitive_type) "size_t"
(identifier) "size"
()) ")"
(compound_statement) "{\n return (void *)((char *)block + i * size);\n}"
({) "{"
(return_statement) "return (void *)((char *)block + i * size);"
(return) "return"
(cast_expression) "(void *)((char *)block + i * size)"
(() "("
(type_descriptor) "void *"
(primitive_type) "void"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(parenthesized_expression) "((char *)block + i * size)"
(() "("
(binary_expression) "(char *)block + i * size"
(cast_expression) "(char *)block"
(() "("
(type_descriptor) "char *"
(primitive_type) "char"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(identifier) "block"
(+) "+"
(binary_expression) "i * size"
(identifier) "i"
(*) "*"
(identifier) "size"
()) ")"
(;) ";"
(}) "}"
(function_definition) "int main(int argc, char *argv[]){\n int i;\n size_t *args = NULL;\n RGENS_SEED();\n if (argc > C_ARGC_ULIMIT){\n printf("USAGE:\n%s", C_USAGE);\n exit(EXIT_FAILURE);\n }\n args = malloc_perror(C_ARGC_ULIMIT - 1, sizeof(size_t));\n memcpy(args, C_ARGS_DEF, (C_ARGC_ULIMIT - 1) * sizeof(size_t));\n for (i = 1; i < argc; i++){\n args[i - 1] = atoi(argv[i]);\n }\n if (args[0] > C_UINT_BIT - 1 ||\n args[1] > C_UINT_BIT - 1 ||\n args[1] < args[0]){\n printf("USAGE:\n%s", C_USAGE);\n exit(EXIT_FAILURE);\n }\n run_random_dir_graph_test(args[0], args[1]);\n free(args);\n args = NULL;\n return 0;\n}"
(primitive_type) "int"
(function_declarator) "main(int argc, char *argv[])"
(identifier) "main"
(parameter_list) "(int argc, char *argv[])"
(() "("
(parameter_declaration) "int argc"
(primitive_type) "int"
(identifier) "argc"
(,) ","
(parameter_declaration) "char *argv[]"
(primitive_type) "char"
(pointer_declarator) "*argv[]"
(*) "*"
(array_declarator) "argv[]"
(identifier) "argv"
([) "["
(]) "]"
()) ")"
(compound_statement) "{\n int i;\n size_t *args = NULL;\n RGENS_SEED();\n if (argc > C_ARGC_ULIMIT){\n printf("USAGE:\n%s", C_USAGE);\n exit(EXIT_FAILURE);\n }\n args = malloc_perror(C_ARGC_ULIMIT - 1, sizeof(size_t));\n memcpy(args, C_ARGS_DEF, (C_ARGC_ULIMIT - 1) * sizeof(size_t));\n for (i = 1; i < argc; i++){\n args[i - 1] = atoi(argv[i]);\n }\n if (args[0] > C_UINT_BIT - 1 ||\n args[1] > C_UINT_BIT - 1 ||\n args[1] < args[0]){\n printf("USAGE:\n%s", C_USAGE);\n exit(EXIT_FAILURE);\n }\n run_random_dir_graph_test(args[0], args[1]);\n free(args);\n args = NULL;\n return 0;\n}"
({) "{"
(declaration) "int i;"
(primitive_type) "int"
(identifier) "i"
(;) ";"
(declaration) "size_t *args = NULL;"
(primitive_type) "size_t"
(init_declarator) "*args = NULL"
(pointer_declarator) "*args"
(*) "*"
(identifier) "args"
(=) "="
(null) "NULL"
(NULL) "NULL"
(;) ";"
(expression_statement) "RGENS_SEED();"
(call_expression) "RGENS_SEED()"
(identifier) "RGENS_SEED"
(argument_list) "()"
(() "("
()) ")"
(;) ";"
(if_statement) "if (argc > C_ARGC_ULIMIT){\n printf("USAGE:\n%s", C_USAGE);\n exit(EXIT_FAILURE);\n }"
(if) "if"
(parenthesized_expression) "(argc > C_ARGC_ULIMIT)"
(() "("
(binary_expression) "argc > C_ARGC_ULIMIT"
(identifier) "argc"
(>) ">"
(identifier) "C_ARGC_ULIMIT"
()) ")"
(compound_statement) "{\n printf("USAGE:\n%s", C_USAGE);\n exit(EXIT_FAILURE);\n }"
({) "{"
(expression_statement) "printf("USAGE:\n%s", C_USAGE);"
(call_expression) "printf("USAGE:\n%s", C_USAGE)"
(identifier) "printf"
(argument_list) "("USAGE:\n%s", C_USAGE)"
(() "("
(string_literal) ""USAGE:\n%s""
(") """
(string_content) "USAGE:"
(escape_sequence) "\n"
(string_content) "%s"
(") """
(,) ","
(identifier) "C_USAGE"
()) ")"
(;) ";"
(expression_statement) "exit(EXIT_FAILURE);"
(call_expression) "exit(EXIT_FAILURE)"
(identifier) "exit"
(argument_list) "(EXIT_FAILURE)"
(() "("
(identifier) "EXIT_FAILURE"
()) ")"
(;) ";"
(}) "}"
(expression_statement) "args = malloc_perror(C_ARGC_ULIMIT - 1, sizeof(size_t));"
(assignment_expression) "args = malloc_perror(C_ARGC_ULIMIT - 1, sizeof(size_t))"
(identifier) "args"
(=) "="
(call_expression) "malloc_perror(C_ARGC_ULIMIT - 1, sizeof(size_t))"
(identifier) "malloc_perror"
(argument_list) "(C_ARGC_ULIMIT - 1, sizeof(size_t))"
(() "("
(binary_expression) "C_ARGC_ULIMIT - 1"
(identifier) "C_ARGC_ULIMIT"
(-) "-"
(number_literal) "1"
(,) ","
(sizeof_expression) "sizeof(size_t)"
(sizeof) "sizeof"
(() "("
(type_descriptor) "size_t"
(primitive_type) "size_t"
()) ")"
()) ")"
(;) ";"
(expression_statement) "memcpy(args, C_ARGS_DEF, (C_ARGC_ULIMIT - 1) * sizeof(size_t));"
(call_expression) "memcpy(args, C_ARGS_DEF, (C_ARGC_ULIMIT - 1) * sizeof(size_t))"
(identifier) "memcpy"
(argument_list) "(args, C_ARGS_DEF, (C_ARGC_ULIMIT - 1) * sizeof(size_t))"
(() "("
(identifier) "args"
(,) ","
(identifier) "C_ARGS_DEF"
(,) ","
(binary_expression) "(C_ARGC_ULIMIT - 1) * sizeof(size_t)"
(parenthesized_expression) "(C_ARGC_ULIMIT - 1)"
(() "("
(binary_expression) "C_ARGC_ULIMIT - 1"
(identifier) "C_ARGC_ULIMIT"
(-) "-"
(number_literal) "1"
()) ")"
(*) "*"
(sizeof_expression) "sizeof(size_t)"
(sizeof) "sizeof"
(() "("
(type_descriptor) "size_t"
(primitive_type) "size_t"
()) ")"
()) ")"
(;) ";"
(for_statement) "for (i = 1; i < argc; i++){\n args[i - 1] = atoi(argv[i]);\n }"
(for) "for"
(() "("
(assignment_expression) "i = 1"
(identifier) "i"
(=) "="
(number_literal) "1"
(;) ";"
(binary_expression) "i < argc"
(identifier) "i"
(<) "<"
(identifier) "argc"
(;) ";"
(update_expression) "i++"
(identifier) "i"
(++) "++"
()) ")"
(compound_statement) "{\n args[i - 1] = atoi(argv[i]);\n }"
({) "{"
(expression_statement) "args[i - 1] = atoi(argv[i]);"
(assignment_expression) "args[i - 1] = atoi(argv[i])"
(subscript_expression) "args[i - 1]"
(identifier) "args"
([) "["
(binary_expression) "i - 1"
(identifier) "i"
(-) "-"
(number_literal) "1"
(]) "]"
(=) "="
(call_expression) "atoi(argv[i])"
(identifier) "atoi"
(argument_list) "(argv[i])"
(() "("
(subscript_expression) "argv[i]"
(identifier) "argv"
([) "["
(identifier) "i"
(]) "]"
()) ")"
(;) ";"
(}) "}"
(if_statement) "if (args[0] > C_UINT_BIT - 1 ||\n args[1] > C_UINT_BIT - 1 ||\n args[1] < args[0]){\n printf("USAGE:\n%s", C_USAGE);\n exit(EXIT_FAILURE);\n }"
(if) "if"
(parenthesized_expression) "(args[0] > C_UINT_BIT - 1 ||\n args[1] > C_UINT_BIT - 1 ||\n args[1] < args[0])"
(() "("
(binary_expression) "args[0] > C_UINT_BIT - 1 ||\n args[1] > C_UINT_BIT - 1 ||\n args[1] < args[0]"
(binary_expression) "args[0] > C_UINT_BIT - 1 ||\n args[1] > C_UINT_BIT - 1"
(binary_expression) "args[0] > C_UINT_BIT - 1"
(subscript_expression) "args[0]"
(identifier) "args"
([) "["
(number_literal) "0"
(]) "]"
(>) ">"
(binary_expression) "C_UINT_BIT - 1"
(identifier) "C_UINT_BIT"
(-) "-"
(number_literal) "1"
(||) "||"
(binary_expression) "args[1] > C_UINT_BIT - 1"
(subscript_expression) "args[1]"
(identifier) "args"
([) "["
(number_literal) "1"
(]) "]"
(>) ">"
(binary_expression) "C_UINT_BIT - 1"
(identifier) "C_UINT_BIT"
(-) "-"
(number_literal) "1"
(||) "||"
(binary_expression) "args[1] < args[0]"
(subscript_expression) "args[1]"
(identifier) "args"
([) "["
(number_literal) "1"
(]) "]"
(<) "<"
(subscript_expression) "args[0]"
(identifier) "args"
([) "["
(number_literal) "0"
(]) "]"
()) ")"
(compound_statement) "{\n printf("USAGE:\n%s", C_USAGE);\n exit(EXIT_FAILURE);\n }"
({) "{"
(expression_statement) "printf("USAGE:\n%s", C_USAGE);"
(call_expression) "printf("USAGE:\n%s", C_USAGE)"
(identifier) "printf"
(argument_list) "("USAGE:\n%s", C_USAGE)"
(() "("
(string_literal) ""USAGE:\n%s""
(") """
(string_content) "USAGE:"
(escape_sequence) "\n"
(string_content) "%s"
(") """
(,) ","
(identifier) "C_USAGE"
()) ")"
(;) ";"
(expression_statement) "exit(EXIT_FAILURE);"
(call_expression) "exit(EXIT_FAILURE)"
(identifier) "exit"
(argument_list) "(EXIT_FAILURE)"
(() "("
(identifier) "EXIT_FAILURE"
()) ")"
(;) ";"
(}) "}"
(expression_statement) "run_random_dir_graph_test(args[0], args[1]);"
(call_expression) "run_random_dir_graph_test(args[0], args[1])"
(identifier) "run_random_dir_graph_test"
(argument_list) "(args[0], args[1])"
(() "("
(subscript_expression) "args[0]"
(identifier) "args"
([) "["
(number_literal) "0"
(]) "]"
(,) ","
(subscript_expression) "args[1]"
(identifier) "args"
([) "["
(number_literal) "1"
(]) "]"
()) ")"
(;) ";"
(expression_statement) "free(args);"
(call_expression) "free(args)"
(identifier) "free"
(argument_list) "(args)"
(() "("
(identifier) "args"
()) ")"
(;) ";"
(expression_statement) "args = NULL;"
(assignment_expression) "args = NULL"
(identifier) "args"
(=) "="
(null) "NULL"
(NULL) "NULL"
(;) ";"
(return_statement) "return 0;"
(return) "return"
(number_literal) "0"
(;) ";"
(}) "}"
| 1,879
| 0
|
{"language": "c", "success": true, "metadata": {"lines": 216, "avg_line_length": 30.54, "nodes": 1144, "errors": 0, "source_hash": "bc5da16eec41d97c719cffe40900455ea856b51e1489b179a0a520d03724c5b1", "categorized_nodes": 674}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 31, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 18}}, {"id": 3, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 3, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 19}}, {"id": 6, "type": "preproc_include", "text": "#include <string.h>\n", "parent": null, "children": [7, 8], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<string.h>", "parent": 6, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include <limits.h>\n", "parent": null, "children": [10, 11], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 34, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<limits.h>", "parent": 9, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 19}}, {"id": 12, "type": "preproc_include", "text": "#include <time.h>\n", "parent": null, "children": [13, 14], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 35, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<time.h>", "parent": 12, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 17}}, {"id": 15, "type": "preproc_include", "text": "#include \"bfs.h\"\n", "parent": null, "children": [16, 17], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"bfs.h\"", "parent": 15, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 16}}, {"id": 18, "type": "preproc_include", "text": "#include \"graph.h\"\n", "parent": null, "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": "\"graph.h\"", "parent": 18, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 18}}, {"id": 21, "type": "preproc_include", "text": "#include \"stack.h\"\n", "parent": null, "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": "\"stack.h\"", "parent": 21, "children": [], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 18}}, {"id": 24, "type": "preproc_include", "text": "#include \"utilities-mem.h\"\n", "parent": null, "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": "\"utilities-mem.h\"", "parent": 24, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 26}}, {"id": 27, "type": "preproc_include", "text": "#include \"utilities-mod.h\"\n", "parent": null, "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": "\"utilities-mod.h\"", "parent": 27, "children": [], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 26}}, {"id": 30, "type": "preproc_include", "text": "#include \"utilities-lim.h\"\n", "parent": null, "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": "\"utilities-lim.h\"", "parent": 30, "children": [], "start_point": {"row": 40, "column": 9}, "end_point": {"row": 40, "column": 26}}, {"id": 33, "type": "preproc_function_def", "text": "#define RGENS_SEED() do{srand(time(NULL));}while (0)\n", "parent": null, "children": [34, 35, 36, 37], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 49, "column": 0}}, {"id": 34, "type": "#define", "text": "#define", "parent": 33, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 7}}, {"id": 35, "type": "identifier", "text": "RGENS_SEED", "parent": 33, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 18}}, {"id": 36, "type": "preproc_params", "text": "()", "parent": 33, "children": [], "start_point": {"row": 48, "column": 18}, "end_point": {"row": 48, "column": 20}}, {"id": 37, "type": "preproc_arg", "text": "do{srand(time(NULL));}while (0)", "parent": 33, "children": [], "start_point": {"row": 48, "column": 21}, "end_point": {"row": 48, "column": 52}}, {"id": 38, "type": "preproc_function_def", "text": "#define RANDOM() (rand()) /* [0, RAND_MAX] */\n", "parent": null, "children": [39, 40, 41, 42], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 50, "column": 0}}, {"id": 39, "type": "#define", "text": "#define", "parent": 38, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 7}}, {"id": 40, "type": "identifier", "text": "RANDOM", "parent": 38, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 14}}, {"id": 41, "type": "preproc_params", "text": "()", "parent": 38, "children": [], "start_point": {"row": 49, "column": 14}, "end_point": {"row": 49, "column": 16}}, {"id": 42, "type": "preproc_arg", "text": "(rand()) ", "parent": 38, "children": [], "start_point": {"row": 49, "column": 17}, "end_point": {"row": 49, "column": 26}}, {"id": 43, "type": "preproc_function_def", "text": "#define DRAND() ((double)rand() / RAND_MAX) /* [0.0, 1.0] */\n", "parent": null, "children": [44, 45, 46, 47], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 51, "column": 0}}, {"id": 44, "type": "#define", "text": "#define", "parent": 43, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 7}}, {"id": 45, "type": "identifier", "text": "DRAND", "parent": 43, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 13}}, {"id": 46, "type": "preproc_params", "text": "()", "parent": 43, "children": [], "start_point": {"row": 50, "column": 13}, "end_point": {"row": 50, "column": 15}}, {"id": 47, "type": "preproc_arg", "text": "((double)rand() / RAND_MAX) ", "parent": 43, "children": [], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 44}}, {"id": 48, "type": "preproc_function_def", "text": "#define TOLU(i) ((unsigned long int)(i)) /* printing size_t under C89/C90 */\n", "parent": null, "children": [49, 50, 51, 53], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 53, "column": 0}}, {"id": 49, "type": "#define", "text": "#define", "parent": 48, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 7}}, {"id": 50, "type": "identifier", "text": "TOLU", "parent": 48, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 12}}, {"id": 51, "type": "preproc_params", "text": "(i)", "parent": 48, "children": [52], "start_point": {"row": 52, "column": 12}, "end_point": {"row": 52, "column": 15}}, {"id": 52, "type": "identifier", "text": "i", "parent": 51, "children": [], "start_point": {"row": 52, "column": 13}, "end_point": {"row": 52, "column": 14}}, {"id": 53, "type": "preproc_arg", "text": "((unsigned long int)(i)) ", "parent": 48, "children": [], "start_point": {"row": 52, "column": 16}, "end_point": {"row": 52, "column": 41}}, {"id": 54, "type": "declaration", "text": "const char *C_USAGE =\n \"bfs-test-perf-uint\\n\"\n \"[0, uint width - 1] : a\\n\"\n \"[0, uint width - 1] : b s.t. 2**a <= V <= 2**b for rand graph test\\n\";", "parent": null, "children": [55, 56], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 58, "column": 73}}, {"id": 55, "type": "primitive_type", "text": "char", "parent": 54, "children": [], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 10}}, {"id": 56, "type": "init_declarator", "text": "*C_USAGE =\n \"bfs-test-perf-uint\\n\"\n \"[0, uint width - 1] : a\\n\"\n \"[0, uint width - 1] : b s.t. 2**a <= V <= 2**b for rand graph test\\n\"", "parent": 54, "children": [57, 60, 61], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 58, "column": 72}}, {"id": 57, "type": "pointer_declarator", "text": "*C_USAGE", "parent": 56, "children": [58, 59], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 19}}, {"id": 58, "type": "*", "text": "*", "parent": 57, "children": [], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 12}}, {"id": 59, "type": "identifier", "text": "C_USAGE", "parent": 57, "children": [], "start_point": {"row": 55, "column": 12}, "end_point": {"row": 55, "column": 19}}, {"id": 60, "type": "=", "text": "=", "parent": 56, "children": [], "start_point": {"row": 55, "column": 20}, "end_point": {"row": 55, "column": 21}}, {"id": 61, "type": "concatenated_string", "text": "\"bfs-test-perf-uint\\n\"\n \"[0, uint width - 1] : a\\n\"\n \"[0, uint width - 1] : b s.t. 2**a <= V <= 2**b for rand graph test\\n\"", "parent": 56, "children": [62, 64, 66], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 58, "column": 72}}, {"id": 62, "type": "string_literal", "text": "\"bfs-test-perf-uint\\n\"", "parent": 61, "children": [63], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 56, "column": 24}}, {"id": 63, "type": "escape_sequence", "text": "\\n", "parent": 62, "children": [], "start_point": {"row": 56, "column": 21}, "end_point": {"row": 56, "column": 23}}, {"id": 64, "type": "string_literal", "text": "\"[0, uint width - 1] : a\\n\"", "parent": 61, "children": [65], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 57, "column": 29}}, {"id": 65, "type": "escape_sequence", "text": "\\n", "parent": 64, "children": [], "start_point": {"row": 57, "column": 26}, "end_point": {"row": 57, "column": 28}}, {"id": 66, "type": "string_literal", "text": "\"[0, uint width - 1] : b s.t. 2**a <= V <= 2**b for rand graph test\\n\"", "parent": 61, "children": [67], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 72}}, {"id": 67, "type": "escape_sequence", "text": "\\n", "parent": 66, "children": [], "start_point": {"row": 58, "column": 69}, "end_point": {"row": 58, "column": 71}}, {"id": 68, "type": "declaration", "text": "const int C_ARGC_ULIMIT = 3;", "parent": null, "children": [69, 70], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 28}}, {"id": 69, "type": "primitive_type", "text": "int", "parent": 68, "children": [], "start_point": {"row": 59, "column": 6}, "end_point": {"row": 59, "column": 9}}, {"id": 70, "type": "init_declarator", "text": "C_ARGC_ULIMIT = 3", "parent": 68, "children": [71, 72, 73], "start_point": {"row": 59, "column": 10}, "end_point": {"row": 59, "column": 27}}, {"id": 71, "type": "identifier", "text": "C_ARGC_ULIMIT", "parent": 70, "children": [], "start_point": {"row": 59, "column": 10}, "end_point": {"row": 59, "column": 23}}, {"id": 72, "type": "=", "text": "=", "parent": 70, "children": [], "start_point": {"row": 59, "column": 24}, "end_point": {"row": 59, "column": 25}}, {"id": 73, "type": "number_literal", "text": "3", "parent": 70, "children": [], "start_point": {"row": 59, "column": 26}, "end_point": {"row": 59, "column": 27}}, {"id": 74, "type": "declaration", "text": "const size_t C_ARGS_DEF[2] = {14u, 14u};", "parent": null, "children": [75, 76], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 40}}, {"id": 75, "type": "primitive_type", "text": "size_t", "parent": 74, "children": [], "start_point": {"row": 60, "column": 6}, "end_point": {"row": 60, "column": 12}}, {"id": 76, "type": "init_declarator", "text": "C_ARGS_DEF[2] = {14u, 14u}", "parent": 74, "children": [77, 80, 81], "start_point": {"row": 60, "column": 13}, "end_point": {"row": 60, "column": 39}}, {"id": 77, "type": "array_declarator", "text": "C_ARGS_DEF[2]", "parent": 76, "children": [78, 79], "start_point": {"row": 60, "column": 13}, "end_point": {"row": 60, "column": 26}}, {"id": 78, "type": "identifier", "text": "C_ARGS_DEF", "parent": 77, "children": [], "start_point": {"row": 60, "column": 13}, "end_point": {"row": 60, "column": 23}}, {"id": 79, "type": "number_literal", "text": "2", "parent": 77, "children": [], "start_point": {"row": 60, "column": 24}, "end_point": {"row": 60, "column": 25}}, {"id": 80, "type": "=", "text": "=", "parent": 76, "children": [], "start_point": {"row": 60, "column": 27}, "end_point": {"row": 60, "column": 28}}, {"id": 81, "type": "initializer_list", "text": "{14u, 14u}", "parent": 76, "children": [82, 83], "start_point": {"row": 60, "column": 29}, "end_point": {"row": 60, "column": 39}}, {"id": 82, "type": "number_literal", "text": "14u", "parent": 81, "children": [], "start_point": {"row": 60, "column": 30}, "end_point": {"row": 60, "column": 33}}, {"id": 83, "type": "number_literal", "text": "14u", "parent": 81, "children": [], "start_point": {"row": 60, "column": 35}, "end_point": {"row": 60, "column": 38}}, {"id": 84, "type": "declaration", "text": "const size_t C_UINT_BIT = PRECISION_FROM_ULIMIT((unsigned int)-1);", "parent": null, "children": [85, 86], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 66}}, {"id": 85, "type": "primitive_type", "text": "size_t", "parent": 84, "children": [], "start_point": {"row": 61, "column": 6}, "end_point": {"row": 61, "column": 12}}, {"id": 86, "type": "init_declarator", "text": "C_UINT_BIT = PRECISION_FROM_ULIMIT((unsigned int)-1)", "parent": 84, "children": [87, 88, 89], "start_point": {"row": 61, "column": 13}, "end_point": {"row": 61, "column": 65}}, {"id": 87, "type": "identifier", "text": "C_UINT_BIT", "parent": 86, "children": [], "start_point": {"row": 61, "column": 13}, "end_point": {"row": 61, "column": 23}}, {"id": 88, "type": "=", "text": "=", "parent": 86, "children": [], "start_point": {"row": 61, "column": 24}, "end_point": {"row": 61, "column": 25}}, {"id": 89, "type": "call_expression", "text": "PRECISION_FROM_ULIMIT((unsigned int)-1)", "parent": 86, "children": [90, 91], "start_point": {"row": 61, "column": 26}, "end_point": {"row": 61, "column": 65}}, {"id": 90, "type": "identifier", "text": "PRECISION_FROM_ULIMIT", "parent": 89, "children": [], "start_point": {"row": 61, "column": 26}, "end_point": {"row": 61, "column": 47}}, {"id": 91, "type": "argument_list", "text": "((unsigned int)-1)", "parent": 89, "children": [92], "start_point": {"row": 61, "column": 47}, "end_point": {"row": 61, "column": 65}}, {"id": 92, "type": "cast_expression", "text": "(unsigned int)-1", "parent": 91, "children": [93, 97], "start_point": {"row": 61, "column": 48}, "end_point": {"row": 61, "column": 64}}, {"id": 93, "type": "type_descriptor", "text": "unsigned int", "parent": 92, "children": [94], "start_point": {"row": 61, "column": 49}, "end_point": {"row": 61, "column": 61}}, {"id": 94, "type": "sized_type_specifier", "text": "unsigned int", "parent": 93, "children": [95, 96], "start_point": {"row": 61, "column": 49}, "end_point": {"row": 61, "column": 61}}, {"id": 95, "type": "unsigned", "text": "unsigned", "parent": 94, "children": [], "start_point": {"row": 61, "column": 49}, "end_point": {"row": 61, "column": 57}}, {"id": 96, "type": "primitive_type", "text": "int", "parent": 94, "children": [], "start_point": {"row": 61, "column": 58}, "end_point": {"row": 61, "column": 61}}, {"id": 97, "type": "number_literal", "text": "-1", "parent": 92, "children": [], "start_point": {"row": 61, "column": 62}, "end_point": {"row": 61, "column": 64}}, {"id": 98, "type": "declaration", "text": "const size_t C_FN_COUNT = 4;", "parent": null, "children": [99, 100], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 28}}, {"id": 99, "type": "primitive_type", "text": "size_t", "parent": 98, "children": [], "start_point": {"row": 64, "column": 6}, "end_point": {"row": 64, "column": 12}}, {"id": 100, "type": "init_declarator", "text": "C_FN_COUNT = 4", "parent": 98, "children": [101, 102, 103], "start_point": {"row": 64, "column": 13}, "end_point": {"row": 64, "column": 27}}, {"id": 101, "type": "identifier", "text": "C_FN_COUNT", "parent": 100, "children": [], "start_point": {"row": 64, "column": 13}, "end_point": {"row": 64, "column": 23}}, {"id": 102, "type": "=", "text": "=", "parent": 100, "children": [], "start_point": {"row": 64, "column": 24}, "end_point": {"row": 64, "column": 25}}, {"id": 103, "type": "number_literal", "text": "4", "parent": 100, "children": [], "start_point": {"row": 64, "column": 26}, "end_point": {"row": 64, "column": 27}}, {"id": 104, "type": "declaration", "text": "size_t (* const C_READ[4])(const void *) ={\n graph_read_ushort,\n graph_read_uint,\n graph_read_ulong,\n graph_read_sz};", "parent": null, "children": [105, 106], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 69, "column": 17}}, {"id": 105, "type": "primitive_type", "text": "size_t", "parent": 104, "children": [], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 6}}, {"id": 106, "type": "init_declarator", "text": "(* const C_READ[4])(const void *) ={\n graph_read_ushort,\n graph_read_uint,\n graph_read_ulong,\n graph_read_sz}", "parent": 104, "children": [107, 119, 120], "start_point": {"row": 65, "column": 7}, "end_point": {"row": 69, "column": 16}}, {"id": 107, "type": "function_declarator", "text": "(* const C_READ[4])(const void *)", "parent": 106, "children": [108, 114], "start_point": {"row": 65, "column": 7}, "end_point": {"row": 65, "column": 40}}, {"id": 108, "type": "parenthesized_declarator", "text": "(* const C_READ[4])", "parent": 107, "children": [109], "start_point": {"row": 65, "column": 7}, "end_point": {"row": 65, "column": 26}}, {"id": 109, "type": "pointer_declarator", "text": "* const C_READ[4]", "parent": 108, "children": [110, 111], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 25}}, {"id": 110, "type": "*", "text": "*", "parent": 109, "children": [], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 9}}, {"id": 111, "type": "array_declarator", "text": "C_READ[4]", "parent": 109, "children": [112, 113], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 25}}, {"id": 112, "type": "identifier", "text": "C_READ", "parent": 111, "children": [], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 22}}, {"id": 113, "type": "number_literal", "text": "4", "parent": 111, "children": [], "start_point": {"row": 65, "column": 23}, "end_point": {"row": 65, "column": 24}}, {"id": 114, "type": "parameter_list", "text": "(const void *)", "parent": 107, "children": [115], "start_point": {"row": 65, "column": 26}, "end_point": {"row": 65, "column": 40}}, {"id": 115, "type": "parameter_declaration", "text": "const void *", "parent": 114, "children": [116, 117], "start_point": {"row": 65, "column": 27}, "end_point": {"row": 65, "column": 39}}, {"id": 116, "type": "primitive_type", "text": "void", "parent": 115, "children": [], "start_point": {"row": 65, "column": 33}, "end_point": {"row": 65, "column": 37}}, {"id": 117, "type": "abstract_pointer_declarator", "text": "*", "parent": 115, "children": [118], "start_point": {"row": 65, "column": 38}, "end_point": {"row": 65, "column": 39}}, {"id": 118, "type": "*", "text": "*", "parent": 117, "children": [], "start_point": {"row": 65, "column": 38}, "end_point": {"row": 65, "column": 39}}, {"id": 119, "type": "=", "text": "=", "parent": 106, "children": [], "start_point": {"row": 65, "column": 41}, "end_point": {"row": 65, "column": 42}}, {"id": 120, "type": "initializer_list", "text": "{\n graph_read_ushort,\n graph_read_uint,\n graph_read_ulong,\n graph_read_sz}", "parent": 106, "children": [121, 122, 123, 124], "start_point": {"row": 65, "column": 42}, "end_point": {"row": 69, "column": 16}}, {"id": 121, "type": "identifier", "text": "graph_read_ushort", "parent": 120, "children": [], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 19}}, {"id": 122, "type": "identifier", "text": "graph_read_uint", "parent": 120, "children": [], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 17}}, {"id": 123, "type": "identifier", "text": "graph_read_ulong", "parent": 120, "children": [], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 18}}, {"id": 124, "type": "identifier", "text": "graph_read_sz", "parent": 120, "children": [], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 15}}, {"id": 125, "type": "declaration", "text": "void (* const C_WRITE[4])(void *, size_t) ={\n graph_write_ushort,\n graph_write_uint,\n graph_write_ulong,\n graph_write_sz};", "parent": null, "children": [126, 127], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 74, "column": 18}}, {"id": 126, "type": "primitive_type", "text": "void", "parent": 125, "children": [], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 70, "column": 4}}, {"id": 127, "type": "init_declarator", "text": "(* const C_WRITE[4])(void *, size_t) ={\n graph_write_ushort,\n graph_write_uint,\n graph_write_ulong,\n graph_write_sz}", "parent": 125, "children": [128, 142, 143], "start_point": {"row": 70, "column": 5}, "end_point": {"row": 74, "column": 17}}, {"id": 128, "type": "function_declarator", "text": "(* const C_WRITE[4])(void *, size_t)", "parent": 127, "children": [129, 135], "start_point": {"row": 70, "column": 5}, "end_point": {"row": 70, "column": 41}}, {"id": 129, "type": "parenthesized_declarator", "text": "(* const C_WRITE[4])", "parent": 128, "children": [130], "start_point": {"row": 70, "column": 5}, "end_point": {"row": 70, "column": 25}}, {"id": 130, "type": "pointer_declarator", "text": "* const C_WRITE[4]", "parent": 129, "children": [131, 132], "start_point": {"row": 70, "column": 6}, "end_point": {"row": 70, "column": 24}}, {"id": 131, "type": "*", "text": "*", "parent": 130, "children": [], "start_point": {"row": 70, "column": 6}, "end_point": {"row": 70, "column": 7}}, {"id": 132, "type": "array_declarator", "text": "C_WRITE[4]", "parent": 130, "children": [133, 134], "start_point": {"row": 70, "column": 14}, "end_point": {"row": 70, "column": 24}}, {"id": 133, "type": "identifier", "text": "C_WRITE", "parent": 132, "children": [], "start_point": {"row": 70, "column": 14}, "end_point": {"row": 70, "column": 21}}, {"id": 134, "type": "number_literal", "text": "4", "parent": 132, "children": [], "start_point": {"row": 70, "column": 22}, "end_point": {"row": 70, "column": 23}}, {"id": 135, "type": "parameter_list", "text": "(void *, size_t)", "parent": 128, "children": [136, 140], "start_point": {"row": 70, "column": 25}, "end_point": {"row": 70, "column": 41}}, {"id": 136, "type": "parameter_declaration", "text": "void *", "parent": 135, "children": [137, 138], "start_point": {"row": 70, "column": 26}, "end_point": {"row": 70, "column": 32}}, {"id": 137, "type": "primitive_type", "text": "void", "parent": 136, "children": [], "start_point": {"row": 70, "column": 26}, "end_point": {"row": 70, "column": 30}}, {"id": 138, "type": "abstract_pointer_declarator", "text": "*", "parent": 136, "children": [139], "start_point": {"row": 70, "column": 31}, "end_point": {"row": 70, "column": 32}}, {"id": 139, "type": "*", "text": "*", "parent": 138, "children": [], "start_point": {"row": 70, "column": 31}, "end_point": {"row": 70, "column": 32}}, {"id": 140, "type": "parameter_declaration", "text": "size_t", "parent": 135, "children": [141], "start_point": {"row": 70, "column": 34}, "end_point": {"row": 70, "column": 40}}, {"id": 141, "type": "primitive_type", "text": "size_t", "parent": 140, "children": [], "start_point": {"row": 70, "column": 34}, "end_point": {"row": 70, "column": 40}}, {"id": 142, "type": "=", "text": "=", "parent": 127, "children": [], "start_point": {"row": 70, "column": 42}, "end_point": {"row": 70, "column": 43}}, {"id": 143, "type": "initializer_list", "text": "{\n graph_write_ushort,\n graph_write_uint,\n graph_write_ulong,\n graph_write_sz}", "parent": 127, "children": [144, 145, 146, 147], "start_point": {"row": 70, "column": 43}, "end_point": {"row": 74, "column": 17}}, {"id": 144, "type": "identifier", "text": "graph_write_ushort", "parent": 143, "children": [], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 20}}, {"id": 145, "type": "identifier", "text": "graph_write_uint", "parent": 143, "children": [], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 72, "column": 18}}, {"id": 146, "type": "identifier", "text": "graph_write_ulong", "parent": 143, "children": [], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 73, "column": 19}}, {"id": 147, "type": "identifier", "text": "graph_write_sz", "parent": 143, "children": [], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 16}}, {"id": 148, "type": "declaration", "text": "void *(* const C_AT[4])(const void *, const void *) ={\n graph_at_ushort,\n graph_at_uint,\n graph_at_ulong,\n graph_at_sz};", "parent": null, "children": [149, 150], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 79, "column": 15}}, {"id": 149, "type": "primitive_type", "text": "void", "parent": 148, "children": [], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 4}}, {"id": 150, "type": "init_declarator", "text": "*(* const C_AT[4])(const void *, const void *) ={\n graph_at_ushort,\n graph_at_uint,\n graph_at_ulong,\n graph_at_sz}", "parent": 148, "children": [151, 169, 170], "start_point": {"row": 75, "column": 5}, "end_point": {"row": 79, "column": 14}}, {"id": 151, "type": "pointer_declarator", "text": "*(* const C_AT[4])(const void *, const void *)", "parent": 150, "children": [152, 153], "start_point": {"row": 75, "column": 5}, "end_point": {"row": 75, "column": 51}}, {"id": 152, "type": "*", "text": "*", "parent": 151, "children": [], "start_point": {"row": 75, "column": 5}, "end_point": {"row": 75, "column": 6}}, {"id": 153, "type": "function_declarator", "text": "(* const C_AT[4])(const void *, const void *)", "parent": 151, "children": [154, 160], "start_point": {"row": 75, "column": 6}, "end_point": {"row": 75, "column": 51}}, {"id": 154, "type": "parenthesized_declarator", "text": "(* const C_AT[4])", "parent": 153, "children": [155], "start_point": {"row": 75, "column": 6}, "end_point": {"row": 75, "column": 23}}, {"id": 155, "type": "pointer_declarator", "text": "* const C_AT[4]", "parent": 154, "children": [156, 157], "start_point": {"row": 75, "column": 7}, "end_point": {"row": 75, "column": 22}}, {"id": 156, "type": "*", "text": "*", "parent": 155, "children": [], "start_point": {"row": 75, "column": 7}, "end_point": {"row": 75, "column": 8}}, {"id": 157, "type": "array_declarator", "text": "C_AT[4]", "parent": 155, "children": [158, 159], "start_point": {"row": 75, "column": 15}, "end_point": {"row": 75, "column": 22}}, {"id": 158, "type": "identifier", "text": "C_AT", "parent": 157, "children": [], "start_point": {"row": 75, "column": 15}, "end_point": {"row": 75, "column": 19}}, {"id": 159, "type": "number_literal", "text": "4", "parent": 157, "children": [], "start_point": {"row": 75, "column": 20}, "end_point": {"row": 75, "column": 21}}, {"id": 160, "type": "parameter_list", "text": "(const void *, const void *)", "parent": 153, "children": [161, 165], "start_point": {"row": 75, "column": 23}, "end_point": {"row": 75, "column": 51}}, {"id": 161, "type": "parameter_declaration", "text": "const void *", "parent": 160, "children": [162, 163], "start_point": {"row": 75, "column": 24}, "end_point": {"row": 75, "column": 36}}, {"id": 162, "type": "primitive_type", "text": "void", "parent": 161, "children": [], "start_point": {"row": 75, "column": 30}, "end_point": {"row": 75, "column": 34}}, {"id": 163, "type": "abstract_pointer_declarator", "text": "*", "parent": 161, "children": [164], "start_point": {"row": 75, "column": 35}, "end_point": {"row": 75, "column": 36}}, {"id": 164, "type": "*", "text": "*", "parent": 163, "children": [], "start_point": {"row": 75, "column": 35}, "end_point": {"row": 75, "column": 36}}, {"id": 165, "type": "parameter_declaration", "text": "const void *", "parent": 160, "children": [166, 167], "start_point": {"row": 75, "column": 38}, "end_point": {"row": 75, "column": 50}}, {"id": 166, "type": "primitive_type", "text": "void", "parent": 165, "children": [], "start_point": {"row": 75, "column": 44}, "end_point": {"row": 75, "column": 48}}, {"id": 167, "type": "abstract_pointer_declarator", "text": "*", "parent": 165, "children": [168], "start_point": {"row": 75, "column": 49}, "end_point": {"row": 75, "column": 50}}, {"id": 168, "type": "*", "text": "*", "parent": 167, "children": [], "start_point": {"row": 75, "column": 49}, "end_point": {"row": 75, "column": 50}}, {"id": 169, "type": "=", "text": "=", "parent": 150, "children": [], "start_point": {"row": 75, "column": 52}, "end_point": {"row": 75, "column": 53}}, {"id": 170, "type": "initializer_list", "text": "{\n graph_at_ushort,\n graph_at_uint,\n graph_at_ulong,\n graph_at_sz}", "parent": 150, "children": [171, 172, 173, 174], "start_point": {"row": 75, "column": 53}, "end_point": {"row": 79, "column": 14}}, {"id": 171, "type": "identifier", "text": "graph_at_ushort", "parent": 170, "children": [], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 76, "column": 17}}, {"id": 172, "type": "identifier", "text": "graph_at_uint", "parent": 170, "children": [], "start_point": {"row": 77, "column": 2}, "end_point": {"row": 77, "column": 15}}, {"id": 173, "type": "identifier", "text": "graph_at_ulong", "parent": 170, "children": [], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 78, "column": 16}}, {"id": 174, "type": "identifier", "text": "graph_at_sz", "parent": 170, "children": [], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 13}}, {"id": 175, "type": "declaration", "text": "int (* const C_CMPEQ[4])(const void *, const void *) ={\n graph_cmpeq_ushort,\n graph_cmpeq_uint,\n graph_cmpeq_ulong,\n graph_cmpeq_sz};", "parent": null, "children": [176, 177], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 84, "column": 18}}, {"id": 176, "type": "primitive_type", "text": "int", "parent": 175, "children": [], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 3}}, {"id": 177, "type": "init_declarator", "text": "(* const C_CMPEQ[4])(const void *, const void *) ={\n graph_cmpeq_ushort,\n graph_cmpeq_uint,\n graph_cmpeq_ulong,\n graph_cmpeq_sz}", "parent": 175, "children": [178, 194, 195], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 84, "column": 17}}, {"id": 178, "type": "function_declarator", "text": "(* const C_CMPEQ[4])(const void *, const void *)", "parent": 177, "children": [179, 185], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 52}}, {"id": 179, "type": "parenthesized_declarator", "text": "(* const C_CMPEQ[4])", "parent": 178, "children": [180], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 24}}, {"id": 180, "type": "pointer_declarator", "text": "* const C_CMPEQ[4]", "parent": 179, "children": [181, 182], "start_point": {"row": 80, "column": 5}, "end_point": {"row": 80, "column": 23}}, {"id": 181, "type": "*", "text": "*", "parent": 180, "children": [], "start_point": {"row": 80, "column": 5}, "end_point": {"row": 80, "column": 6}}, {"id": 182, "type": "array_declarator", "text": "C_CMPEQ[4]", "parent": 180, "children": [183, 184], "start_point": {"row": 80, "column": 13}, "end_point": {"row": 80, "column": 23}}, {"id": 183, "type": "identifier", "text": "C_CMPEQ", "parent": 182, "children": [], "start_point": {"row": 80, "column": 13}, "end_point": {"row": 80, "column": 20}}, {"id": 184, "type": "number_literal", "text": "4", "parent": 182, "children": [], "start_point": {"row": 80, "column": 21}, "end_point": {"row": 80, "column": 22}}, {"id": 185, "type": "parameter_list", "text": "(const void *, const void *)", "parent": 178, "children": [186, 190], "start_point": {"row": 80, "column": 24}, "end_point": {"row": 80, "column": 52}}, {"id": 186, "type": "parameter_declaration", "text": "const void *", "parent": 185, "children": [187, 188], "start_point": {"row": 80, "column": 25}, "end_point": {"row": 80, "column": 37}}, {"id": 187, "type": "primitive_type", "text": "void", "parent": 186, "children": [], "start_point": {"row": 80, "column": 31}, "end_point": {"row": 80, "column": 35}}, {"id": 188, "type": "abstract_pointer_declarator", "text": "*", "parent": 186, "children": [189], "start_point": {"row": 80, "column": 36}, "end_point": {"row": 80, "column": 37}}, {"id": 189, "type": "*", "text": "*", "parent": 188, "children": [], "start_point": {"row": 80, "column": 36}, "end_point": {"row": 80, "column": 37}}, {"id": 190, "type": "parameter_declaration", "text": "const void *", "parent": 185, "children": [191, 192], "start_point": {"row": 80, "column": 39}, "end_point": {"row": 80, "column": 51}}, {"id": 191, "type": "primitive_type", "text": "void", "parent": 190, "children": [], "start_point": {"row": 80, "column": 45}, "end_point": {"row": 80, "column": 49}}, {"id": 192, "type": "abstract_pointer_declarator", "text": "*", "parent": 190, "children": [193], "start_point": {"row": 80, "column": 50}, "end_point": {"row": 80, "column": 51}}, {"id": 193, "type": "*", "text": "*", "parent": 192, "children": [], "start_point": {"row": 80, "column": 50}, "end_point": {"row": 80, "column": 51}}, {"id": 194, "type": "=", "text": "=", "parent": 177, "children": [], "start_point": {"row": 80, "column": 53}, "end_point": {"row": 80, "column": 54}}, {"id": 195, "type": "initializer_list", "text": "{\n graph_cmpeq_ushort,\n graph_cmpeq_uint,\n graph_cmpeq_ulong,\n graph_cmpeq_sz}", "parent": 177, "children": [196, 197, 198, 199], "start_point": {"row": 80, "column": 54}, "end_point": {"row": 84, "column": 17}}, {"id": 196, "type": "identifier", "text": "graph_cmpeq_ushort", "parent": 195, "children": [], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 20}}, {"id": 197, "type": "identifier", "text": "graph_cmpeq_uint", "parent": 195, "children": [], "start_point": {"row": 82, "column": 2}, "end_point": {"row": 82, "column": 18}}, {"id": 198, "type": "identifier", "text": "graph_cmpeq_ulong", "parent": 195, "children": [], "start_point": {"row": 83, "column": 2}, "end_point": {"row": 83, "column": 19}}, {"id": 199, "type": "identifier", "text": "graph_cmpeq_sz", "parent": 195, "children": [], "start_point": {"row": 84, "column": 2}, "end_point": {"row": 84, "column": 16}}, {"id": 200, "type": "declaration", "text": "void (* const C_INCR[4])(void *) ={\n graph_incr_ushort,\n graph_incr_uint,\n graph_incr_ulong,\n graph_incr_sz};", "parent": null, "children": [201, 202], "start_point": {"row": 85, "column": 0}, "end_point": {"row": 89, "column": 17}}, {"id": 201, "type": "primitive_type", "text": "void", "parent": 200, "children": [], "start_point": {"row": 85, "column": 0}, "end_point": {"row": 85, "column": 4}}, {"id": 202, "type": "init_declarator", "text": "(* const C_INCR[4])(void *) ={\n graph_incr_ushort,\n graph_incr_uint,\n graph_incr_ulong,\n graph_incr_sz}", "parent": 200, "children": [203, 215, 216], "start_point": {"row": 85, "column": 5}, "end_point": {"row": 89, "column": 16}}, {"id": 203, "type": "function_declarator", "text": "(* const C_INCR[4])(void *)", "parent": 202, "children": [204, 210], "start_point": {"row": 85, "column": 5}, "end_point": {"row": 85, "column": 32}}, {"id": 204, "type": "parenthesized_declarator", "text": "(* const C_INCR[4])", "parent": 203, "children": [205], "start_point": {"row": 85, "column": 5}, "end_point": {"row": 85, "column": 24}}, {"id": 205, "type": "pointer_declarator", "text": "* const C_INCR[4]", "parent": 204, "children": [206, 207], "start_point": {"row": 85, "column": 6}, "end_point": {"row": 85, "column": 23}}, {"id": 206, "type": "*", "text": "*", "parent": 205, "children": [], "start_point": {"row": 85, "column": 6}, "end_point": {"row": 85, "column": 7}}, {"id": 207, "type": "array_declarator", "text": "C_INCR[4]", "parent": 205, "children": [208, 209], "start_point": {"row": 85, "column": 14}, "end_point": {"row": 85, "column": 23}}, {"id": 208, "type": "identifier", "text": "C_INCR", "parent": 207, "children": [], "start_point": {"row": 85, "column": 14}, "end_point": {"row": 85, "column": 20}}, {"id": 209, "type": "number_literal", "text": "4", "parent": 207, "children": [], "start_point": {"row": 85, "column": 21}, "end_point": {"row": 85, "column": 22}}, {"id": 210, "type": "parameter_list", "text": "(void *)", "parent": 203, "children": [211], "start_point": {"row": 85, "column": 24}, "end_point": {"row": 85, "column": 32}}, {"id": 211, "type": "parameter_declaration", "text": "void *", "parent": 210, "children": [212, 213], "start_point": {"row": 85, "column": 25}, "end_point": {"row": 85, "column": 31}}, {"id": 212, "type": "primitive_type", "text": "void", "parent": 211, "children": [], "start_point": {"row": 85, "column": 25}, "end_point": {"row": 85, "column": 29}}, {"id": 213, "type": "abstract_pointer_declarator", "text": "*", "parent": 211, "children": [214], "start_point": {"row": 85, "column": 30}, "end_point": {"row": 85, "column": 31}}, {"id": 214, "type": "*", "text": "*", "parent": 213, "children": [], "start_point": {"row": 85, "column": 30}, "end_point": {"row": 85, "column": 31}}, {"id": 215, "type": "=", "text": "=", "parent": 202, "children": [], "start_point": {"row": 85, "column": 33}, "end_point": {"row": 85, "column": 34}}, {"id": 216, "type": "initializer_list", "text": "{\n graph_incr_ushort,\n graph_incr_uint,\n graph_incr_ulong,\n graph_incr_sz}", "parent": 202, "children": [217, 218, 219, 220], "start_point": {"row": 85, "column": 34}, "end_point": {"row": 89, "column": 16}}, {"id": 217, "type": "identifier", "text": "graph_incr_ushort", "parent": 216, "children": [], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 19}}, {"id": 218, "type": "identifier", "text": "graph_incr_uint", "parent": 216, "children": [], "start_point": {"row": 87, "column": 2}, "end_point": {"row": 87, "column": 17}}, {"id": 219, "type": "identifier", "text": "graph_incr_ulong", "parent": 216, "children": [], "start_point": {"row": 88, "column": 2}, "end_point": {"row": 88, "column": 18}}, {"id": 220, "type": "identifier", "text": "graph_incr_sz", "parent": 216, "children": [], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 15}}, {"id": 221, "type": "declaration", "text": "const size_t C_VT_SIZES[4] = {\n sizeof(unsigned short),\n sizeof(unsigned int),\n sizeof(unsigned long),\n sizeof(size_t)};", "parent": null, "children": [222, 223], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 94, "column": 18}}, {"id": 222, "type": "primitive_type", "text": "size_t", "parent": 221, "children": [], "start_point": {"row": 90, "column": 6}, "end_point": {"row": 90, "column": 12}}, {"id": 223, "type": "init_declarator", "text": "C_VT_SIZES[4] = {\n sizeof(unsigned short),\n sizeof(unsigned int),\n sizeof(unsigned long),\n sizeof(size_t)}", "parent": 221, "children": [224, 227, 228], "start_point": {"row": 90, "column": 13}, "end_point": {"row": 94, "column": 17}}, {"id": 224, "type": "array_declarator", "text": "C_VT_SIZES[4]", "parent": 223, "children": [225, 226], "start_point": {"row": 90, "column": 13}, "end_point": {"row": 90, "column": 26}}, {"id": 225, "type": "identifier", "text": "C_VT_SIZES", "parent": 224, "children": [], "start_point": {"row": 90, "column": 13}, "end_point": {"row": 90, "column": 23}}, {"id": 226, "type": "number_literal", "text": "4", "parent": 224, "children": [], "start_point": {"row": 90, "column": 24}, "end_point": {"row": 90, "column": 25}}, {"id": 227, "type": "=", "text": "=", "parent": 223, "children": [], "start_point": {"row": 90, "column": 27}, "end_point": {"row": 90, "column": 28}}, {"id": 228, "type": "initializer_list", "text": "{\n sizeof(unsigned short),\n sizeof(unsigned int),\n sizeof(unsigned long),\n sizeof(size_t)}", "parent": 223, "children": [229, 234, 239, 244], "start_point": {"row": 90, "column": 29}, "end_point": {"row": 94, "column": 17}}, {"id": 229, "type": "sizeof_expression", "text": "sizeof(unsigned short)", "parent": 228, "children": [230], "start_point": {"row": 91, "column": 2}, "end_point": {"row": 91, "column": 24}}, {"id": 230, "type": "type_descriptor", "text": "unsigned short", "parent": 229, "children": [231], "start_point": {"row": 91, "column": 9}, "end_point": {"row": 91, "column": 23}}, {"id": 231, "type": "sized_type_specifier", "text": "unsigned short", "parent": 230, "children": [232, 233], "start_point": {"row": 91, "column": 9}, "end_point": {"row": 91, "column": 23}}, {"id": 232, "type": "unsigned", "text": "unsigned", "parent": 231, "children": [], "start_point": {"row": 91, "column": 9}, "end_point": {"row": 91, "column": 17}}, {"id": 233, "type": "short", "text": "short", "parent": 231, "children": [], "start_point": {"row": 91, "column": 18}, "end_point": {"row": 91, "column": 23}}, {"id": 234, "type": "sizeof_expression", "text": "sizeof(unsigned int)", "parent": 228, "children": [235], "start_point": {"row": 92, "column": 2}, "end_point": {"row": 92, "column": 22}}, {"id": 235, "type": "type_descriptor", "text": "unsigned int", "parent": 234, "children": [236], "start_point": {"row": 92, "column": 9}, "end_point": {"row": 92, "column": 21}}, {"id": 236, "type": "sized_type_specifier", "text": "unsigned int", "parent": 235, "children": [237, 238], "start_point": {"row": 92, "column": 9}, "end_point": {"row": 92, "column": 21}}, {"id": 237, "type": "unsigned", "text": "unsigned", "parent": 236, "children": [], "start_point": {"row": 92, "column": 9}, "end_point": {"row": 92, "column": 17}}, {"id": 238, "type": "primitive_type", "text": "int", "parent": 236, "children": [], "start_point": {"row": 92, "column": 18}, "end_point": {"row": 92, "column": 21}}, {"id": 239, "type": "sizeof_expression", "text": "sizeof(unsigned long)", "parent": 228, "children": [240], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 23}}, {"id": 240, "type": "type_descriptor", "text": "unsigned long", "parent": 239, "children": [241], "start_point": {"row": 93, "column": 9}, "end_point": {"row": 93, "column": 22}}, {"id": 241, "type": "sized_type_specifier", "text": "unsigned long", "parent": 240, "children": [242, 243], "start_point": {"row": 93, "column": 9}, "end_point": {"row": 93, "column": 22}}, {"id": 242, "type": "unsigned", "text": "unsigned", "parent": 241, "children": [], "start_point": {"row": 93, "column": 9}, "end_point": {"row": 93, "column": 17}}, {"id": 243, "type": "long", "text": "long", "parent": 241, "children": [], "start_point": {"row": 93, "column": 18}, "end_point": {"row": 93, "column": 22}}, {"id": 244, "type": "sizeof_expression", "text": "sizeof(size_t)", "parent": 228, "children": [245], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 16}}, {"id": 245, "type": "type_descriptor", "text": "size_t", "parent": 244, "children": [246], "start_point": {"row": 94, "column": 9}, "end_point": {"row": 94, "column": 15}}, {"id": 246, "type": "primitive_type", "text": "size_t", "parent": 245, "children": [], "start_point": {"row": 94, "column": 9}, "end_point": {"row": 94, "column": 15}}, {"id": 247, "type": "declaration", "text": "const char *C_VT_TYPES[4] = {\"ushort\", \"uint \", \"ulong \", \"sz \"};", "parent": null, "children": [248, 249], "start_point": {"row": 95, "column": 0}, "end_point": {"row": 95, "column": 69}}, {"id": 248, "type": "primitive_type", "text": "char", "parent": 247, "children": [], "start_point": {"row": 95, "column": 6}, "end_point": {"row": 95, "column": 10}}, {"id": 249, "type": "init_declarator", "text": "*C_VT_TYPES[4] = {\"ushort\", \"uint \", \"ulong \", \"sz \"}", "parent": 247, "children": [250, 255, 256], "start_point": {"row": 95, "column": 11}, "end_point": {"row": 95, "column": 68}}, {"id": 250, "type": "pointer_declarator", "text": "*C_VT_TYPES[4]", "parent": 249, "children": [251, 252], "start_point": {"row": 95, "column": 11}, "end_point": {"row": 95, "column": 25}}, {"id": 251, "type": "*", "text": "*", "parent": 250, "children": [], "start_point": {"row": 95, "column": 11}, "end_point": {"row": 95, "column": 12}}, {"id": 252, "type": "array_declarator", "text": "C_VT_TYPES[4]", "parent": 250, "children": [253, 254], "start_point": {"row": 95, "column": 12}, "end_point": {"row": 95, "column": 25}}, {"id": 253, "type": "identifier", "text": "C_VT_TYPES", "parent": 252, "children": [], "start_point": {"row": 95, "column": 12}, "end_point": {"row": 95, "column": 22}}, {"id": 254, "type": "number_literal", "text": "4", "parent": 252, "children": [], "start_point": {"row": 95, "column": 23}, "end_point": {"row": 95, "column": 24}}, {"id": 255, "type": "=", "text": "=", "parent": 249, "children": [], "start_point": {"row": 95, "column": 26}, "end_point": {"row": 95, "column": 27}}, {"id": 256, "type": "initializer_list", "text": "{\"ushort\", \"uint \", \"ulong \", \"sz \"}", "parent": 249, "children": [257, 258, 259, 260], "start_point": {"row": 95, "column": 28}, "end_point": {"row": 95, "column": 68}}, {"id": 257, "type": "string_literal", "text": "\"ushort\"", "parent": 256, "children": [], "start_point": {"row": 95, "column": 29}, "end_point": {"row": 95, "column": 37}}, {"id": 258, "type": "string_literal", "text": "\"uint \"", "parent": 256, "children": [], "start_point": {"row": 95, "column": 39}, "end_point": {"row": 95, "column": 47}}, {"id": 259, "type": "string_literal", "text": "\"ulong \"", "parent": 256, "children": [], "start_point": {"row": 95, "column": 49}, "end_point": {"row": 95, "column": 57}}, {"id": 260, "type": "string_literal", "text": "\"sz \"", "parent": 256, "children": [], "start_point": {"row": 95, "column": 59}, "end_point": {"row": 95, "column": 67}}, {"id": 261, "type": "declaration", "text": "const size_t C_ITER = 10u;", "parent": null, "children": [262, 263], "start_point": {"row": 96, "column": 0}, "end_point": {"row": 96, "column": 26}}, {"id": 262, "type": "primitive_type", "text": "size_t", "parent": 261, "children": [], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 12}}, {"id": 263, "type": "init_declarator", "text": "C_ITER = 10u", "parent": 261, "children": [264, 265, 266], "start_point": {"row": 96, "column": 13}, "end_point": {"row": 96, "column": 25}}, {"id": 264, "type": "identifier", "text": "C_ITER", "parent": 263, "children": [], "start_point": {"row": 96, "column": 13}, "end_point": {"row": 96, "column": 19}}, {"id": 265, "type": "=", "text": "=", "parent": 263, "children": [], "start_point": {"row": 96, "column": 20}, "end_point": {"row": 96, "column": 21}}, {"id": 266, "type": "number_literal", "text": "10u", "parent": 263, "children": [], "start_point": {"row": 96, "column": 22}, "end_point": {"row": 96, "column": 25}}, {"id": 267, "type": "declaration", "text": "const size_t C_PROBS_COUNT = 5u;", "parent": null, "children": [268, 269], "start_point": {"row": 97, "column": 0}, "end_point": {"row": 97, "column": 32}}, {"id": 268, "type": "primitive_type", "text": "size_t", "parent": 267, "children": [], "start_point": {"row": 97, "column": 6}, "end_point": {"row": 97, "column": 12}}, {"id": 269, "type": "init_declarator", "text": "C_PROBS_COUNT = 5u", "parent": 267, "children": [270, 271, 272], "start_point": {"row": 97, "column": 13}, "end_point": {"row": 97, "column": 31}}, {"id": 270, "type": "identifier", "text": "C_PROBS_COUNT", "parent": 269, "children": [], "start_point": {"row": 97, "column": 13}, "end_point": {"row": 97, "column": 26}}, {"id": 271, "type": "=", "text": "=", "parent": 269, "children": [], "start_point": {"row": 97, "column": 27}, "end_point": {"row": 97, "column": 28}}, {"id": 272, "type": "number_literal", "text": "5u", "parent": 269, "children": [], "start_point": {"row": 97, "column": 29}, "end_point": {"row": 97, "column": 31}}, {"id": 273, "type": "declaration", "text": "const double C_PROBS[5] = {1.00, 0.75, 0.50, 0.25, 0.00};", "parent": null, "children": [274, 275], "start_point": {"row": 98, "column": 0}, "end_point": {"row": 98, "column": 57}}, {"id": 274, "type": "primitive_type", "text": "double", "parent": 273, "children": [], "start_point": {"row": 98, "column": 6}, "end_point": {"row": 98, "column": 12}}, {"id": 275, "type": "init_declarator", "text": "C_PROBS[5] = {1.00, 0.75, 0.50, 0.25, 0.00}", "parent": 273, "children": [276, 279, 280], "start_point": {"row": 98, "column": 13}, "end_point": {"row": 98, "column": 56}}, {"id": 276, "type": "array_declarator", "text": "C_PROBS[5]", "parent": 275, "children": [277, 278], "start_point": {"row": 98, "column": 13}, "end_point": {"row": 98, "column": 23}}, {"id": 277, "type": "identifier", "text": "C_PROBS", "parent": 276, "children": [], "start_point": {"row": 98, "column": 13}, "end_point": {"row": 98, "column": 20}}, {"id": 278, "type": "number_literal", "text": "5", "parent": 276, "children": [], "start_point": {"row": 98, "column": 21}, "end_point": {"row": 98, "column": 22}}, {"id": 279, "type": "=", "text": "=", "parent": 275, "children": [], "start_point": {"row": 98, "column": 24}, "end_point": {"row": 98, "column": 25}}, {"id": 280, "type": "initializer_list", "text": "{1.00, 0.75, 0.50, 0.25, 0.00}", "parent": 275, "children": [281, 282, 283, 284, 285], "start_point": {"row": 98, "column": 26}, "end_point": {"row": 98, "column": 56}}, {"id": 281, "type": "number_literal", "text": "1.00", "parent": 280, "children": [], "start_point": {"row": 98, "column": 27}, "end_point": {"row": 98, "column": 31}}, {"id": 282, "type": "number_literal", "text": "0.75", "parent": 280, "children": [], "start_point": {"row": 98, "column": 33}, "end_point": {"row": 98, "column": 37}}, {"id": 283, "type": "number_literal", "text": "0.50", "parent": 280, "children": [], "start_point": {"row": 98, "column": 39}, "end_point": {"row": 98, "column": 43}}, {"id": 284, "type": "number_literal", "text": "0.25", "parent": 280, "children": [], "start_point": {"row": 98, "column": 45}, "end_point": {"row": 98, "column": 49}}, {"id": 285, "type": "number_literal", "text": "0.00", "parent": 280, "children": [], "start_point": {"row": 98, "column": 51}, "end_point": {"row": 98, "column": 55}}, {"id": 286, "type": "declaration", "text": "const double C_PROB_ONE = 1.0;", "parent": null, "children": [287, 288], "start_point": {"row": 99, "column": 0}, "end_point": {"row": 99, "column": 30}}, {"id": 287, "type": "primitive_type", "text": "double", "parent": 286, "children": [], "start_point": {"row": 99, "column": 6}, "end_point": {"row": 99, "column": 12}}, {"id": 288, "type": "init_declarator", "text": "C_PROB_ONE = 1.0", "parent": 286, "children": [289, 290, 291], "start_point": {"row": 99, "column": 13}, "end_point": {"row": 99, "column": 29}}, {"id": 289, "type": "identifier", "text": "C_PROB_ONE", "parent": 288, "children": [], "start_point": {"row": 99, "column": 13}, "end_point": {"row": 99, "column": 23}}, {"id": 290, "type": "=", "text": "=", "parent": 288, "children": [], "start_point": {"row": 99, "column": 24}, "end_point": {"row": 99, "column": 25}}, {"id": 291, "type": "number_literal", "text": "1.0", "parent": 288, "children": [], "start_point": {"row": 99, "column": 26}, "end_point": {"row": 99, "column": 29}}, {"id": 292, "type": "declaration", "text": "const double C_PROB_ZERO = 0.0;", "parent": null, "children": [293, 294], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 100, "column": 31}}, {"id": 293, "type": "primitive_type", "text": "double", "parent": 292, "children": [], "start_point": {"row": 100, "column": 6}, "end_point": {"row": 100, "column": 12}}, {"id": 294, "type": "init_declarator", "text": "C_PROB_ZERO = 0.0", "parent": 292, "children": [295, 296, 297], "start_point": {"row": 100, "column": 13}, "end_point": {"row": 100, "column": 30}}, {"id": 295, "type": "identifier", "text": "C_PROB_ZERO", "parent": 294, "children": [], "start_point": {"row": 100, "column": 13}, "end_point": {"row": 100, "column": 24}}, {"id": 296, "type": "=", "text": "=", "parent": 294, "children": [], "start_point": {"row": 100, "column": 25}, "end_point": {"row": 100, "column": 26}}, {"id": 297, "type": "number_literal", "text": "0.0", "parent": 294, "children": [], "start_point": {"row": 100, "column": 27}, "end_point": {"row": 100, "column": 30}}, {"id": 298, "type": "declaration", "text": "void *ptr(const void *block, size_t i, size_t size);", "parent": null, "children": [299, 300], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 103, "column": 52}}, {"id": 299, "type": "primitive_type", "text": "void", "parent": 298, "children": [], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 103, "column": 4}}, {"id": 300, "type": "pointer_declarator", "text": "*ptr(const void *block, size_t i, size_t size)", "parent": 298, "children": [301, 302], "start_point": {"row": 103, "column": 5}, "end_point": {"row": 103, "column": 51}}, {"id": 301, "type": "*", "text": "*", "parent": 300, "children": [], "start_point": {"row": 103, "column": 5}, "end_point": {"row": 103, "column": 6}}, {"id": 302, "type": "function_declarator", "text": "ptr(const void *block, size_t i, size_t size)", "parent": 300, "children": [303, 304], "start_point": {"row": 103, "column": 6}, "end_point": {"row": 103, "column": 51}}, {"id": 303, "type": "identifier", "text": "ptr", "parent": 302, "children": [], "start_point": {"row": 103, "column": 6}, "end_point": {"row": 103, "column": 9}}, {"id": 304, "type": "parameter_list", "text": "(const void *block, size_t i, size_t size)", "parent": 302, "children": [305, 310, 313], "start_point": {"row": 103, "column": 9}, "end_point": {"row": 103, "column": 51}}, {"id": 305, "type": "parameter_declaration", "text": "const void *block", "parent": 304, "children": [306, 307], "start_point": {"row": 103, "column": 10}, "end_point": {"row": 103, "column": 27}}, {"id": 306, "type": "primitive_type", "text": "void", "parent": 305, "children": [], "start_point": {"row": 103, "column": 16}, "end_point": {"row": 103, "column": 20}}, {"id": 307, "type": "pointer_declarator", "text": "*block", "parent": 305, "children": [308, 309], "start_point": {"row": 103, "column": 21}, "end_point": {"row": 103, "column": 27}}, {"id": 308, "type": "*", "text": "*", "parent": 307, "children": [], "start_point": {"row": 103, "column": 21}, "end_point": {"row": 103, "column": 22}}, {"id": 309, "type": "identifier", "text": "block", "parent": 307, "children": [], "start_point": {"row": 103, "column": 22}, "end_point": {"row": 103, "column": 27}}, {"id": 310, "type": "parameter_declaration", "text": "size_t i", "parent": 304, "children": [311, 312], "start_point": {"row": 103, "column": 29}, "end_point": {"row": 103, "column": 37}}, {"id": 311, "type": "primitive_type", "text": "size_t", "parent": 310, "children": [], "start_point": {"row": 103, "column": 29}, "end_point": {"row": 103, "column": 35}}, {"id": 312, "type": "identifier", "text": "i", "parent": 310, "children": [], "start_point": {"row": 103, "column": 36}, "end_point": {"row": 103, "column": 37}}, {"id": 313, "type": "parameter_declaration", "text": "size_t size", "parent": 304, "children": [314, 315], "start_point": {"row": 103, "column": 39}, "end_point": {"row": 103, "column": 50}}, {"id": 314, "type": "primitive_type", "text": "size_t", "parent": 313, "children": [], "start_point": {"row": 103, "column": 39}, "end_point": {"row": 103, "column": 45}}, {"id": 315, "type": "identifier", "text": "size", "parent": 313, "children": [], "start_point": {"row": 103, "column": 46}, "end_point": {"row": 103, "column": 50}}, {"id": 316, "type": "struct_specifier", "text": "struct bern_arg{\n double p;\n}", "parent": null, "children": [317, 318], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 111, "column": 1}}, {"id": 317, "type": "struct", "text": "struct", "parent": 316, "children": [], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 109, "column": 6}}, {"id": 318, "type": "type_identifier", "text": "bern_arg", "parent": 316, "children": [], "start_point": {"row": 109, "column": 7}, "end_point": {"row": 109, "column": 15}}, {"id": 319, "type": "field_declaration", "text": "double p;", "parent": 316, "children": [320, 321], "start_point": {"row": 110, "column": 2}, "end_point": {"row": 110, "column": 11}}, {"id": 320, "type": "primitive_type", "text": "double", "parent": 319, "children": [], "start_point": {"row": 110, "column": 2}, "end_point": {"row": 110, "column": 8}}, {"id": 321, "type": "field_identifier", "text": "p", "parent": 319, "children": [], "start_point": {"row": 110, "column": 9}, "end_point": {"row": 110, "column": 10}}, {"id": 322, "type": "function_definition", "text": "int bern(void *arg){\n struct bern_arg *b = arg;\n if (b->p >= C_PROB_ONE) return 1;\n if (b->p <= C_PROB_ZERO) return 0;\n if (b->p > DRAND()) return 1;\n return 0;\n}", "parent": null, "children": [323, 324], "start_point": {"row": 113, "column": 0}, "end_point": {"row": 119, "column": 1}}, {"id": 323, "type": "primitive_type", "text": "int", "parent": 322, "children": [], "start_point": {"row": 113, "column": 0}, "end_point": {"row": 113, "column": 3}}, {"id": 324, "type": "function_declarator", "text": "bern(void *arg)", "parent": 322, "children": [325, 326], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 113, "column": 19}}, {"id": 325, "type": "identifier", "text": "bern", "parent": 324, "children": [], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 113, "column": 8}}, {"id": 326, "type": "parameter_list", "text": "(void *arg)", "parent": 324, "children": [327], "start_point": {"row": 113, "column": 8}, "end_point": {"row": 113, "column": 19}}, {"id": 327, "type": "parameter_declaration", "text": "void *arg", "parent": 326, "children": [328, 329], "start_point": {"row": 113, "column": 9}, "end_point": {"row": 113, "column": 18}}, {"id": 328, "type": "primitive_type", "text": "void", "parent": 327, "children": [], "start_point": {"row": 113, "column": 9}, "end_point": {"row": 113, "column": 13}}, {"id": 329, "type": "pointer_declarator", "text": "*arg", "parent": 327, "children": [330, 331], "start_point": {"row": 113, "column": 14}, "end_point": {"row": 113, "column": 18}}, {"id": 330, "type": "*", "text": "*", "parent": 329, "children": [], "start_point": {"row": 113, "column": 14}, "end_point": {"row": 113, "column": 15}}, {"id": 331, "type": "identifier", "text": "arg", "parent": 329, "children": [], "start_point": {"row": 113, "column": 15}, "end_point": {"row": 113, "column": 18}}, {"id": 332, "type": "declaration", "text": "struct bern_arg *b = arg;", "parent": 322, "children": [333, 336], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 114, "column": 27}}, {"id": 333, "type": "struct_specifier", "text": "struct bern_arg", "parent": 332, "children": [334, 335], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 114, "column": 17}}, {"id": 334, "type": "struct", "text": "struct", "parent": 333, "children": [], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 114, "column": 8}}, {"id": 335, "type": "type_identifier", "text": "bern_arg", "parent": 333, "children": [], "start_point": {"row": 114, "column": 9}, "end_point": {"row": 114, "column": 17}}, {"id": 336, "type": "init_declarator", "text": "*b = arg", "parent": 332, "children": [337, 340, 341], "start_point": {"row": 114, "column": 18}, "end_point": {"row": 114, "column": 26}}, {"id": 337, "type": "pointer_declarator", "text": "*b", "parent": 336, "children": [338, 339], "start_point": {"row": 114, "column": 18}, "end_point": {"row": 114, "column": 20}}, {"id": 338, "type": "*", "text": "*", "parent": 337, "children": [], "start_point": {"row": 114, "column": 18}, "end_point": {"row": 114, "column": 19}}, {"id": 339, "type": "identifier", "text": "b", "parent": 337, "children": [], "start_point": {"row": 114, "column": 19}, "end_point": {"row": 114, "column": 20}}, {"id": 340, "type": "=", "text": "=", "parent": 336, "children": [], "start_point": {"row": 114, "column": 21}, "end_point": {"row": 114, "column": 22}}, {"id": 341, "type": "identifier", "text": "arg", "parent": 336, "children": [], "start_point": {"row": 114, "column": 23}, "end_point": {"row": 114, "column": 26}}, {"id": 342, "type": "if_statement", "text": "if (b->p >= C_PROB_ONE) return 1;", "parent": 322, "children": [343, 350], "start_point": {"row": 115, "column": 2}, "end_point": {"row": 115, "column": 35}}, {"id": 343, "type": "parenthesized_expression", "text": "(b->p >= C_PROB_ONE)", "parent": 342, "children": [344], "start_point": {"row": 115, "column": 5}, "end_point": {"row": 115, "column": 25}}, {"id": 344, "type": "binary_expression", "text": "b->p >= C_PROB_ONE", "parent": 343, "children": [345, 348, 349], "start_point": {"row": 115, "column": 6}, "end_point": {"row": 115, "column": 24}}, {"id": 345, "type": "field_expression", "text": "b->p", "parent": 344, "children": [346, 347], "start_point": {"row": 115, "column": 6}, "end_point": {"row": 115, "column": 10}}, {"id": 346, "type": "identifier", "text": "b", "parent": 345, "children": [], "start_point": {"row": 115, "column": 6}, "end_point": {"row": 115, "column": 7}}, {"id": 347, "type": "field_identifier", "text": "p", "parent": 345, "children": [], "start_point": {"row": 115, "column": 9}, "end_point": {"row": 115, "column": 10}}, {"id": 348, "type": ">=", "text": ">=", "parent": 344, "children": [], "start_point": {"row": 115, "column": 11}, "end_point": {"row": 115, "column": 13}}, {"id": 349, "type": "identifier", "text": "C_PROB_ONE", "parent": 344, "children": [], "start_point": {"row": 115, "column": 14}, "end_point": {"row": 115, "column": 24}}, {"id": 350, "type": "return_statement", "text": "return 1;", "parent": 342, "children": [351], "start_point": {"row": 115, "column": 26}, "end_point": {"row": 115, "column": 35}}, {"id": 351, "type": "number_literal", "text": "1", "parent": 350, "children": [], "start_point": {"row": 115, "column": 33}, "end_point": {"row": 115, "column": 34}}, {"id": 352, "type": "if_statement", "text": "if (b->p <= C_PROB_ZERO) return 0;", "parent": 322, "children": [353, 360], "start_point": {"row": 116, "column": 2}, "end_point": {"row": 116, "column": 36}}, {"id": 353, "type": "parenthesized_expression", "text": "(b->p <= C_PROB_ZERO)", "parent": 352, "children": [354], "start_point": {"row": 116, "column": 5}, "end_point": {"row": 116, "column": 26}}, {"id": 354, "type": "binary_expression", "text": "b->p <= C_PROB_ZERO", "parent": 353, "children": [355, 358, 359], "start_point": {"row": 116, "column": 6}, "end_point": {"row": 116, "column": 25}}, {"id": 355, "type": "field_expression", "text": "b->p", "parent": 354, "children": [356, 357], "start_point": {"row": 116, "column": 6}, "end_point": {"row": 116, "column": 10}}, {"id": 356, "type": "identifier", "text": "b", "parent": 355, "children": [], "start_point": {"row": 116, "column": 6}, "end_point": {"row": 116, "column": 7}}, {"id": 357, "type": "field_identifier", "text": "p", "parent": 355, "children": [], "start_point": {"row": 116, "column": 9}, "end_point": {"row": 116, "column": 10}}, {"id": 358, "type": "<=", "text": "<=", "parent": 354, "children": [], "start_point": {"row": 116, "column": 11}, "end_point": {"row": 116, "column": 13}}, {"id": 359, "type": "identifier", "text": "C_PROB_ZERO", "parent": 354, "children": [], "start_point": {"row": 116, "column": 14}, "end_point": {"row": 116, "column": 25}}, {"id": 360, "type": "return_statement", "text": "return 0;", "parent": 352, "children": [361], "start_point": {"row": 116, "column": 27}, "end_point": {"row": 116, "column": 36}}, {"id": 361, "type": "number_literal", "text": "0", "parent": 360, "children": [], "start_point": {"row": 116, "column": 34}, "end_point": {"row": 116, "column": 35}}, {"id": 362, "type": "if_statement", "text": "if (b->p > DRAND()) return 1;", "parent": 322, "children": [363, 372], "start_point": {"row": 117, "column": 2}, "end_point": {"row": 117, "column": 31}}, {"id": 363, "type": "parenthesized_expression", "text": "(b->p > DRAND())", "parent": 362, "children": [364], "start_point": {"row": 117, "column": 5}, "end_point": {"row": 117, "column": 21}}, {"id": 364, "type": "binary_expression", "text": "b->p > DRAND()", "parent": 363, "children": [365, 368, 369], "start_point": {"row": 117, "column": 6}, "end_point": {"row": 117, "column": 20}}, {"id": 365, "type": "field_expression", "text": "b->p", "parent": 364, "children": [366, 367], "start_point": {"row": 117, "column": 6}, "end_point": {"row": 117, "column": 10}}, {"id": 366, "type": "identifier", "text": "b", "parent": 365, "children": [], "start_point": {"row": 117, "column": 6}, "end_point": {"row": 117, "column": 7}}, {"id": 367, "type": "field_identifier", "text": "p", "parent": 365, "children": [], "start_point": {"row": 117, "column": 9}, "end_point": {"row": 117, "column": 10}}, {"id": 368, "type": ">", "text": ">", "parent": 364, "children": [], "start_point": {"row": 117, "column": 11}, "end_point": {"row": 117, "column": 12}}, {"id": 369, "type": "call_expression", "text": "DRAND()", "parent": 364, "children": [370, 371], "start_point": {"row": 117, "column": 13}, "end_point": {"row": 117, "column": 20}}, {"id": 370, "type": "identifier", "text": "DRAND", "parent": 369, "children": [], "start_point": {"row": 117, "column": 13}, "end_point": {"row": 117, "column": 18}}, {"id": 371, "type": "argument_list", "text": "()", "parent": 369, "children": [], "start_point": {"row": 117, "column": 18}, "end_point": {"row": 117, "column": 20}}, {"id": 372, "type": "return_statement", "text": "return 1;", "parent": 362, "children": [373], "start_point": {"row": 117, "column": 22}, "end_point": {"row": 117, "column": 31}}, {"id": 373, "type": "number_literal", "text": "1", "parent": 372, "children": [], "start_point": {"row": 117, "column": 29}, "end_point": {"row": 117, "column": 30}}, {"id": 374, "type": "return_statement", "text": "return 0;", "parent": 322, "children": [375], "start_point": {"row": 118, "column": 2}, "end_point": {"row": 118, "column": 11}}, {"id": 375, "type": "number_literal", "text": "0", "parent": 374, "children": [], "start_point": {"row": 118, "column": 9}, "end_point": {"row": 118, "column": 10}}, {"id": 376, "type": "declaration", "text": "void run_random_dir_graph_helper(size_t num_vts,\n\t\t\t\t size_t vt_size,\n\t\t\t\t const char *type_string,\n\t\t\t\t size_t (*read_vt)(const void *),\n\t\t\t\t void (*write_vt)(void *, size_t),\n\t\t\t\t void *(*at_vt)(const void *, const void *),\n\t\t\t\t int (*cmp_vt)(const void *, const void *),\n\t\t\t\t void (*incr_vt)(void *),\n\t\t\t\t int bern(void *),\n\t\t\t\t struct bern_arg *b);", "parent": null, "children": [377, 378], "start_point": {"row": 121, "column": 0}, "end_point": {"row": 130, "column": 25}}, {"id": 377, "type": "primitive_type", "text": "void", "parent": 376, "children": [], "start_point": {"row": 121, "column": 0}, "end_point": {"row": 121, "column": 4}}, {"id": 378, "type": "function_declarator", "text": "run_random_dir_graph_helper(size_t num_vts,\n\t\t\t\t size_t vt_size,\n\t\t\t\t const char *type_string,\n\t\t\t\t size_t (*read_vt)(const void *),\n\t\t\t\t void (*write_vt)(void *, size_t),\n\t\t\t\t void *(*at_vt)(const void *, const void *),\n\t\t\t\t int (*cmp_vt)(const void *, const void *),\n\t\t\t\t void (*incr_vt)(void *),\n\t\t\t\t int bern(void *),\n\t\t\t\t struct bern_arg *b)", "parent": 376, "children": [379, 380], "start_point": {"row": 121, "column": 5}, "end_point": {"row": 130, "column": 24}}, {"id": 379, "type": "identifier", "text": "run_random_dir_graph_helper", "parent": 378, "children": [], "start_point": {"row": 121, "column": 5}, "end_point": {"row": 121, "column": 32}}, {"id": 380, "type": "parameter_list", "text": "(size_t num_vts,\n\t\t\t\t size_t vt_size,\n\t\t\t\t const char *type_string,\n\t\t\t\t size_t (*read_vt)(const void *),\n\t\t\t\t void (*write_vt)(void *, size_t),\n\t\t\t\t void *(*at_vt)(const void *, const void *),\n\t\t\t\t int (*cmp_vt)(const void *, const void *),\n\t\t\t\t void (*incr_vt)(void *),\n\t\t\t\t int bern(void *),\n\t\t\t\t struct bern_arg *b)", "parent": 378, "children": [381, 384, 387, 392, 404, 418, 436, 452, 464, 473], "start_point": {"row": 121, "column": 32}, "end_point": {"row": 130, "column": 24}}, {"id": 381, "type": "parameter_declaration", "text": "size_t num_vts", "parent": 380, "children": [382, 383], "start_point": {"row": 121, "column": 33}, "end_point": {"row": 121, "column": 47}}, {"id": 382, "type": "primitive_type", "text": "size_t", "parent": 381, "children": [], "start_point": {"row": 121, "column": 33}, "end_point": {"row": 121, "column": 39}}, {"id": 383, "type": "identifier", "text": "num_vts", "parent": 381, "children": [], "start_point": {"row": 121, "column": 40}, "end_point": {"row": 121, "column": 47}}, {"id": 384, "type": "parameter_declaration", "text": "size_t vt_size", "parent": 380, "children": [385, 386], "start_point": {"row": 122, "column": 5}, "end_point": {"row": 122, "column": 19}}, {"id": 385, "type": "primitive_type", "text": "size_t", "parent": 384, "children": [], "start_point": {"row": 122, "column": 5}, "end_point": {"row": 122, "column": 11}}, {"id": 386, "type": "identifier", "text": "vt_size", "parent": 384, "children": [], "start_point": {"row": 122, "column": 12}, "end_point": {"row": 122, "column": 19}}, {"id": 387, "type": "parameter_declaration", "text": "const char *type_string", "parent": 380, "children": [388, 389], "start_point": {"row": 123, "column": 5}, "end_point": {"row": 123, "column": 28}}, {"id": 388, "type": "primitive_type", "text": "char", "parent": 387, "children": [], "start_point": {"row": 123, "column": 11}, "end_point": {"row": 123, "column": 15}}, {"id": 389, "type": "pointer_declarator", "text": "*type_string", "parent": 387, "children": [390, 391], "start_point": {"row": 123, "column": 16}, "end_point": {"row": 123, "column": 28}}, {"id": 390, "type": "*", "text": "*", "parent": 389, "children": [], "start_point": {"row": 123, "column": 16}, "end_point": {"row": 123, "column": 17}}, {"id": 391, "type": "identifier", "text": "type_string", "parent": 389, "children": [], "start_point": {"row": 123, "column": 17}, "end_point": {"row": 123, "column": 28}}, {"id": 392, "type": "parameter_declaration", "text": "size_t (*read_vt)(const void *)", "parent": 380, "children": [393, 394], "start_point": {"row": 124, "column": 5}, "end_point": {"row": 124, "column": 36}}, {"id": 393, "type": "primitive_type", "text": "size_t", "parent": 392, "children": [], "start_point": {"row": 124, "column": 5}, "end_point": {"row": 124, "column": 11}}, {"id": 394, "type": "function_declarator", "text": "(*read_vt)(const void *)", "parent": 392, "children": [395, 399], "start_point": {"row": 124, "column": 12}, "end_point": {"row": 124, "column": 36}}, {"id": 395, "type": "parenthesized_declarator", "text": "(*read_vt)", "parent": 394, "children": [396], "start_point": {"row": 124, "column": 12}, "end_point": {"row": 124, "column": 22}}, {"id": 396, "type": "pointer_declarator", "text": "*read_vt", "parent": 395, "children": [397, 398], "start_point": {"row": 124, "column": 13}, "end_point": {"row": 124, "column": 21}}, {"id": 397, "type": "*", "text": "*", "parent": 396, "children": [], "start_point": {"row": 124, "column": 13}, "end_point": {"row": 124, "column": 14}}, {"id": 398, "type": "identifier", "text": "read_vt", "parent": 396, "children": [], "start_point": {"row": 124, "column": 14}, "end_point": {"row": 124, "column": 21}}, {"id": 399, "type": "parameter_list", "text": "(const void *)", "parent": 394, "children": [400], "start_point": {"row": 124, "column": 22}, "end_point": {"row": 124, "column": 36}}, {"id": 400, "type": "parameter_declaration", "text": "const void *", "parent": 399, "children": [401, 402], "start_point": {"row": 124, "column": 23}, "end_point": {"row": 124, "column": 35}}, {"id": 401, "type": "primitive_type", "text": "void", "parent": 400, "children": [], "start_point": {"row": 124, "column": 29}, "end_point": {"row": 124, "column": 33}}, {"id": 402, "type": "abstract_pointer_declarator", "text": "*", "parent": 400, "children": [403], "start_point": {"row": 124, "column": 34}, "end_point": {"row": 124, "column": 35}}, {"id": 403, "type": "*", "text": "*", "parent": 402, "children": [], "start_point": {"row": 124, "column": 34}, "end_point": {"row": 124, "column": 35}}, {"id": 404, "type": "parameter_declaration", "text": "void (*write_vt)(void *, size_t)", "parent": 380, "children": [405, 406], "start_point": {"row": 125, "column": 5}, "end_point": {"row": 125, "column": 37}}, {"id": 405, "type": "primitive_type", "text": "void", "parent": 404, "children": [], "start_point": {"row": 125, "column": 5}, "end_point": {"row": 125, "column": 9}}, {"id": 406, "type": "function_declarator", "text": "(*write_vt)(void *, size_t)", "parent": 404, "children": [407, 411], "start_point": {"row": 125, "column": 10}, "end_point": {"row": 125, "column": 37}}, {"id": 407, "type": "parenthesized_declarator", "text": "(*write_vt)", "parent": 406, "children": [408], "start_point": {"row": 125, "column": 10}, "end_point": {"row": 125, "column": 21}}, {"id": 408, "type": "pointer_declarator", "text": "*write_vt", "parent": 407, "children": [409, 410], "start_point": {"row": 125, "column": 11}, "end_point": {"row": 125, "column": 20}}, {"id": 409, "type": "*", "text": "*", "parent": 408, "children": [], "start_point": {"row": 125, "column": 11}, "end_point": {"row": 125, "column": 12}}, {"id": 410, "type": "identifier", "text": "write_vt", "parent": 408, "children": [], "start_point": {"row": 125, "column": 12}, "end_point": {"row": 125, "column": 20}}, {"id": 411, "type": "parameter_list", "text": "(void *, size_t)", "parent": 406, "children": [412, 416], "start_point": {"row": 125, "column": 21}, "end_point": {"row": 125, "column": 37}}, {"id": 412, "type": "parameter_declaration", "text": "void *", "parent": 411, "children": [413, 414], "start_point": {"row": 125, "column": 22}, "end_point": {"row": 125, "column": 28}}, {"id": 413, "type": "primitive_type", "text": "void", "parent": 412, "children": [], "start_point": {"row": 125, "column": 22}, "end_point": {"row": 125, "column": 26}}, {"id": 414, "type": "abstract_pointer_declarator", "text": "*", "parent": 412, "children": [415], "start_point": {"row": 125, "column": 27}, "end_point": {"row": 125, "column": 28}}, {"id": 415, "type": "*", "text": "*", "parent": 414, "children": [], "start_point": {"row": 125, "column": 27}, "end_point": {"row": 125, "column": 28}}, {"id": 416, "type": "parameter_declaration", "text": "size_t", "parent": 411, "children": [417], "start_point": {"row": 125, "column": 30}, "end_point": {"row": 125, "column": 36}}, {"id": 417, "type": "primitive_type", "text": "size_t", "parent": 416, "children": [], "start_point": {"row": 125, "column": 30}, "end_point": {"row": 125, "column": 36}}, {"id": 418, "type": "parameter_declaration", "text": "void *(*at_vt)(const void *, const void *)", "parent": 380, "children": [419, 420], "start_point": {"row": 126, "column": 5}, "end_point": {"row": 126, "column": 47}}, {"id": 419, "type": "primitive_type", "text": "void", "parent": 418, "children": [], "start_point": {"row": 126, "column": 5}, "end_point": {"row": 126, "column": 9}}, {"id": 420, "type": "pointer_declarator", "text": "*(*at_vt)(const void *, const void *)", "parent": 418, "children": [421, 422], "start_point": {"row": 126, "column": 10}, "end_point": {"row": 126, "column": 47}}, {"id": 421, "type": "*", "text": "*", "parent": 420, "children": [], "start_point": {"row": 126, "column": 10}, "end_point": {"row": 126, "column": 11}}, {"id": 422, "type": "function_declarator", "text": "(*at_vt)(const void *, const void *)", "parent": 420, "children": [423, 427], "start_point": {"row": 126, "column": 11}, "end_point": {"row": 126, "column": 47}}, {"id": 423, "type": "parenthesized_declarator", "text": "(*at_vt)", "parent": 422, "children": [424], "start_point": {"row": 126, "column": 11}, "end_point": {"row": 126, "column": 19}}, {"id": 424, "type": "pointer_declarator", "text": "*at_vt", "parent": 423, "children": [425, 426], "start_point": {"row": 126, "column": 12}, "end_point": {"row": 126, "column": 18}}, {"id": 425, "type": "*", "text": "*", "parent": 424, "children": [], "start_point": {"row": 126, "column": 12}, "end_point": {"row": 126, "column": 13}}, {"id": 426, "type": "identifier", "text": "at_vt", "parent": 424, "children": [], "start_point": {"row": 126, "column": 13}, "end_point": {"row": 126, "column": 18}}, {"id": 427, "type": "parameter_list", "text": "(const void *, const void *)", "parent": 422, "children": [428, 432], "start_point": {"row": 126, "column": 19}, "end_point": {"row": 126, "column": 47}}, {"id": 428, "type": "parameter_declaration", "text": "const void *", "parent": 427, "children": [429, 430], "start_point": {"row": 126, "column": 20}, "end_point": {"row": 126, "column": 32}}, {"id": 429, "type": "primitive_type", "text": "void", "parent": 428, "children": [], "start_point": {"row": 126, "column": 26}, "end_point": {"row": 126, "column": 30}}, {"id": 430, "type": "abstract_pointer_declarator", "text": "*", "parent": 428, "children": [431], "start_point": {"row": 126, "column": 31}, "end_point": {"row": 126, "column": 32}}, {"id": 431, "type": "*", "text": "*", "parent": 430, "children": [], "start_point": {"row": 126, "column": 31}, "end_point": {"row": 126, "column": 32}}, {"id": 432, "type": "parameter_declaration", "text": "const void *", "parent": 427, "children": [433, 434], "start_point": {"row": 126, "column": 34}, "end_point": {"row": 126, "column": 46}}, {"id": 433, "type": "primitive_type", "text": "void", "parent": 432, "children": [], "start_point": {"row": 126, "column": 40}, "end_point": {"row": 126, "column": 44}}, {"id": 434, "type": "abstract_pointer_declarator", "text": "*", "parent": 432, "children": [435], "start_point": {"row": 126, "column": 45}, "end_point": {"row": 126, "column": 46}}, {"id": 435, "type": "*", "text": "*", "parent": 434, "children": [], "start_point": {"row": 126, "column": 45}, "end_point": {"row": 126, "column": 46}}, {"id": 436, "type": "parameter_declaration", "text": "int (*cmp_vt)(const void *, const void *)", "parent": 380, "children": [437, 438], "start_point": {"row": 127, "column": 5}, "end_point": {"row": 127, "column": 46}}, {"id": 437, "type": "primitive_type", "text": "int", "parent": 436, "children": [], "start_point": {"row": 127, "column": 5}, "end_point": {"row": 127, "column": 8}}, {"id": 438, "type": "function_declarator", "text": "(*cmp_vt)(const void *, const void *)", "parent": 436, "children": [439, 443], "start_point": {"row": 127, "column": 9}, "end_point": {"row": 127, "column": 46}}, {"id": 439, "type": "parenthesized_declarator", "text": "(*cmp_vt)", "parent": 438, "children": [440], "start_point": {"row": 127, "column": 9}, "end_point": {"row": 127, "column": 18}}, {"id": 440, "type": "pointer_declarator", "text": "*cmp_vt", "parent": 439, "children": [441, 442], "start_point": {"row": 127, "column": 10}, "end_point": {"row": 127, "column": 17}}, {"id": 441, "type": "*", "text": "*", "parent": 440, "children": [], "start_point": {"row": 127, "column": 10}, "end_point": {"row": 127, "column": 11}}, {"id": 442, "type": "identifier", "text": "cmp_vt", "parent": 440, "children": [], "start_point": {"row": 127, "column": 11}, "end_point": {"row": 127, "column": 17}}, {"id": 443, "type": "parameter_list", "text": "(const void *, const void *)", "parent": 438, "children": [444, 448], "start_point": {"row": 127, "column": 18}, "end_point": {"row": 127, "column": 46}}, {"id": 444, "type": "parameter_declaration", "text": "const void *", "parent": 443, "children": [445, 446], "start_point": {"row": 127, "column": 19}, "end_point": {"row": 127, "column": 31}}, {"id": 445, "type": "primitive_type", "text": "void", "parent": 444, "children": [], "start_point": {"row": 127, "column": 25}, "end_point": {"row": 127, "column": 29}}, {"id": 446, "type": "abstract_pointer_declarator", "text": "*", "parent": 444, "children": [447], "start_point": {"row": 127, "column": 30}, "end_point": {"row": 127, "column": 31}}, {"id": 447, "type": "*", "text": "*", "parent": 446, "children": [], "start_point": {"row": 127, "column": 30}, "end_point": {"row": 127, "column": 31}}, {"id": 448, "type": "parameter_declaration", "text": "const void *", "parent": 443, "children": [449, 450], "start_point": {"row": 127, "column": 33}, "end_point": {"row": 127, "column": 45}}, {"id": 449, "type": "primitive_type", "text": "void", "parent": 448, "children": [], "start_point": {"row": 127, "column": 39}, "end_point": {"row": 127, "column": 43}}, {"id": 450, "type": "abstract_pointer_declarator", "text": "*", "parent": 448, "children": [451], "start_point": {"row": 127, "column": 44}, "end_point": {"row": 127, "column": 45}}, {"id": 451, "type": "*", "text": "*", "parent": 450, "children": [], "start_point": {"row": 127, "column": 44}, "end_point": {"row": 127, "column": 45}}, {"id": 452, "type": "parameter_declaration", "text": "void (*incr_vt)(void *)", "parent": 380, "children": [453, 454], "start_point": {"row": 128, "column": 5}, "end_point": {"row": 128, "column": 28}}, {"id": 453, "type": "primitive_type", "text": "void", "parent": 452, "children": [], "start_point": {"row": 128, "column": 5}, "end_point": {"row": 128, "column": 9}}, {"id": 454, "type": "function_declarator", "text": "(*incr_vt)(void *)", "parent": 452, "children": [455, 459], "start_point": {"row": 128, "column": 10}, "end_point": {"row": 128, "column": 28}}, {"id": 455, "type": "parenthesized_declarator", "text": "(*incr_vt)", "parent": 454, "children": [456], "start_point": {"row": 128, "column": 10}, "end_point": {"row": 128, "column": 20}}, {"id": 456, "type": "pointer_declarator", "text": "*incr_vt", "parent": 455, "children": [457, 458], "start_point": {"row": 128, "column": 11}, "end_point": {"row": 128, "column": 19}}, {"id": 457, "type": "*", "text": "*", "parent": 456, "children": [], "start_point": {"row": 128, "column": 11}, "end_point": {"row": 128, "column": 12}}, {"id": 458, "type": "identifier", "text": "incr_vt", "parent": 456, "children": [], "start_point": {"row": 128, "column": 12}, "end_point": {"row": 128, "column": 19}}, {"id": 459, "type": "parameter_list", "text": "(void *)", "parent": 454, "children": [460], "start_point": {"row": 128, "column": 20}, "end_point": {"row": 128, "column": 28}}, {"id": 460, "type": "parameter_declaration", "text": "void *", "parent": 459, "children": [461, 462], "start_point": {"row": 128, "column": 21}, "end_point": {"row": 128, "column": 27}}, {"id": 461, "type": "primitive_type", "text": "void", "parent": 460, "children": [], "start_point": {"row": 128, "column": 21}, "end_point": {"row": 128, "column": 25}}, {"id": 462, "type": "abstract_pointer_declarator", "text": "*", "parent": 460, "children": [463], "start_point": {"row": 128, "column": 26}, "end_point": {"row": 128, "column": 27}}, {"id": 463, "type": "*", "text": "*", "parent": 462, "children": [], "start_point": {"row": 128, "column": 26}, "end_point": {"row": 128, "column": 27}}, {"id": 464, "type": "parameter_declaration", "text": "int bern(void *)", "parent": 380, "children": [465, 466], "start_point": {"row": 129, "column": 5}, "end_point": {"row": 129, "column": 21}}, {"id": 465, "type": "primitive_type", "text": "int", "parent": 464, "children": [], "start_point": {"row": 129, "column": 5}, "end_point": {"row": 129, "column": 8}}, {"id": 466, "type": "function_declarator", "text": "bern(void *)", "parent": 464, "children": [467, 468], "start_point": {"row": 129, "column": 9}, "end_point": {"row": 129, "column": 21}}, {"id": 467, "type": "identifier", "text": "bern", "parent": 466, "children": [], "start_point": {"row": 129, "column": 9}, "end_point": {"row": 129, "column": 13}}, {"id": 468, "type": "parameter_list", "text": "(void *)", "parent": 466, "children": [469], "start_point": {"row": 129, "column": 13}, "end_point": {"row": 129, "column": 21}}, {"id": 469, "type": "parameter_declaration", "text": "void *", "parent": 468, "children": [470, 471], "start_point": {"row": 129, "column": 14}, "end_point": {"row": 129, "column": 20}}, {"id": 470, "type": "primitive_type", "text": "void", "parent": 469, "children": [], "start_point": {"row": 129, "column": 14}, "end_point": {"row": 129, "column": 18}}, {"id": 471, "type": "abstract_pointer_declarator", "text": "*", "parent": 469, "children": [472], "start_point": {"row": 129, "column": 19}, "end_point": {"row": 129, "column": 20}}, {"id": 472, "type": "*", "text": "*", "parent": 471, "children": [], "start_point": {"row": 129, "column": 19}, "end_point": {"row": 129, "column": 20}}, {"id": 473, "type": "parameter_declaration", "text": "struct bern_arg *b", "parent": 380, "children": [474, 477], "start_point": {"row": 130, "column": 5}, "end_point": {"row": 130, "column": 23}}, {"id": 474, "type": "struct_specifier", "text": "struct bern_arg", "parent": 473, "children": [475, 476], "start_point": {"row": 130, "column": 5}, "end_point": {"row": 130, "column": 20}}, {"id": 475, "type": "struct", "text": "struct", "parent": 474, "children": [], "start_point": {"row": 130, "column": 5}, "end_point": {"row": 130, "column": 11}}, {"id": 476, "type": "type_identifier", "text": "bern_arg", "parent": 474, "children": [], "start_point": {"row": 130, "column": 12}, "end_point": {"row": 130, "column": 20}}, {"id": 477, "type": "pointer_declarator", "text": "*b", "parent": 473, "children": [478, 479], "start_point": {"row": 130, "column": 21}, "end_point": {"row": 130, "column": 23}}, {"id": 478, "type": "*", "text": "*", "parent": 477, "children": [], "start_point": {"row": 130, "column": 21}, "end_point": {"row": 130, "column": 22}}, {"id": 479, "type": "identifier", "text": "b", "parent": 477, "children": [], "start_point": {"row": 130, "column": 22}, "end_point": {"row": 130, "column": 23}}, {"id": 480, "type": "function_definition", "text": "void run_random_dir_graph_test(size_t log_start, size_t log_end){\n size_t i, j;\n size_t num_vts;\n struct bern_arg b;\n printf(\"Run a bfs test on random directed graphs from %lu random \"\n\t \"start vertices in each graph\\n\", TOLU(C_ITER));\n for (i = 0; i < C_PROBS_COUNT; i++){\n b.p = C_PROBS[i];\n printf(\"\\tP[an edge is in a graph] = %.2f\\n\", b.p);\n for (j = log_start; j <= log_end; j++){\n num_vts = pow_two_perror(j);\n printf(\"\\t\\tvertices: %lu, E[# of directed edges]: %.1f\\n\",\n\t TOLU(num_vts), b.p * num_vts * (num_vts - 1));\n run_random_dir_graph_helper(num_vts,\n\t\t\t\t C_VT_SIZES[1],\n\t\t\t\t C_VT_TYPES[1],\n\t\t\t\t C_READ[1],\n\t\t\t\t C_WRITE[1],\n\t\t\t\t C_AT[1],\n\t\t\t\t C_CMPEQ[1],\n\t\t\t\t C_INCR[1],\n\t\t\t\t bern,\n\t\t\t\t &b);\n }\n }\n}", "parent": null, "children": [481, 482], "start_point": {"row": 132, "column": 0}, "end_point": {"row": 157, "column": 1}}, {"id": 481, "type": "primitive_type", "text": "void", "parent": 480, "children": [], "start_point": {"row": 132, "column": 0}, "end_point": {"row": 132, "column": 4}}, {"id": 482, "type": "function_declarator", "text": "run_random_dir_graph_test(size_t log_start, size_t log_end)", "parent": 480, "children": [483, 484], "start_point": {"row": 132, "column": 5}, "end_point": {"row": 132, "column": 64}}, {"id": 483, "type": "identifier", "text": "run_random_dir_graph_test", "parent": 482, "children": [], "start_point": {"row": 132, "column": 5}, "end_point": {"row": 132, "column": 30}}, {"id": 484, "type": "parameter_list", "text": "(size_t log_start, size_t log_end)", "parent": 482, "children": [485, 488], "start_point": {"row": 132, "column": 30}, "end_point": {"row": 132, "column": 64}}, {"id": 485, "type": "parameter_declaration", "text": "size_t log_start", "parent": 484, "children": [486, 487], "start_point": {"row": 132, "column": 31}, "end_point": {"row": 132, "column": 47}}, {"id": 486, "type": "primitive_type", "text": "size_t", "parent": 485, "children": [], "start_point": {"row": 132, "column": 31}, "end_point": {"row": 132, "column": 37}}, {"id": 487, "type": "identifier", "text": "log_start", "parent": 485, "children": [], "start_point": {"row": 132, "column": 38}, "end_point": {"row": 132, "column": 47}}, {"id": 488, "type": "parameter_declaration", "text": "size_t log_end", "parent": 484, "children": [489, 490], "start_point": {"row": 132, "column": 49}, "end_point": {"row": 132, "column": 63}}, {"id": 489, "type": "primitive_type", "text": "size_t", "parent": 488, "children": [], "start_point": {"row": 132, "column": 49}, "end_point": {"row": 132, "column": 55}}, {"id": 490, "type": "identifier", "text": "log_end", "parent": 488, "children": [], "start_point": {"row": 132, "column": 56}, "end_point": {"row": 132, "column": 63}}, {"id": 491, "type": "declaration", "text": "size_t i, j;", "parent": 480, "children": [492, 493, 494], "start_point": {"row": 133, "column": 2}, "end_point": {"row": 133, "column": 14}}, {"id": 492, "type": "primitive_type", "text": "size_t", "parent": 491, "children": [], "start_point": {"row": 133, "column": 2}, "end_point": {"row": 133, "column": 8}}, {"id": 493, "type": "identifier", "text": "i", "parent": 491, "children": [], "start_point": {"row": 133, "column": 9}, "end_point": {"row": 133, "column": 10}}, {"id": 494, "type": "identifier", "text": "j", "parent": 491, "children": [], "start_point": {"row": 133, "column": 12}, "end_point": {"row": 133, "column": 13}}, {"id": 495, "type": "declaration", "text": "size_t num_vts;", "parent": 480, "children": [496, 497], "start_point": {"row": 134, "column": 2}, "end_point": {"row": 134, "column": 17}}, {"id": 496, "type": "primitive_type", "text": "size_t", "parent": 495, "children": [], "start_point": {"row": 134, "column": 2}, "end_point": {"row": 134, "column": 8}}, {"id": 497, "type": "identifier", "text": "num_vts", "parent": 495, "children": [], "start_point": {"row": 134, "column": 9}, "end_point": {"row": 134, "column": 16}}, {"id": 498, "type": "declaration", "text": "struct bern_arg b;", "parent": 480, "children": [499, 502], "start_point": {"row": 135, "column": 2}, "end_point": {"row": 135, "column": 20}}, {"id": 499, "type": "struct_specifier", "text": "struct bern_arg", "parent": 498, "children": [500, 501], "start_point": {"row": 135, "column": 2}, "end_point": {"row": 135, "column": 17}}, {"id": 500, "type": "struct", "text": "struct", "parent": 499, "children": [], "start_point": {"row": 135, "column": 2}, "end_point": {"row": 135, "column": 8}}, {"id": 501, "type": "type_identifier", "text": "bern_arg", "parent": 499, "children": [], "start_point": {"row": 135, "column": 9}, "end_point": {"row": 135, "column": 17}}, {"id": 502, "type": "identifier", "text": "b", "parent": 498, "children": [], "start_point": {"row": 135, "column": 18}, "end_point": {"row": 135, "column": 19}}, {"id": 503, "type": "call_expression", "text": "printf(\"Run a bfs test on random directed graphs from %lu random \"\n\t \"start vertices in each graph\\n\", TOLU(C_ITER))", "parent": 480, "children": [504, 505], "start_point": {"row": 136, "column": 2}, "end_point": {"row": 137, "column": 49}}, {"id": 504, "type": "identifier", "text": "printf", "parent": 503, "children": [], "start_point": {"row": 136, "column": 2}, "end_point": {"row": 136, "column": 8}}, {"id": 505, "type": "argument_list", "text": "(\"Run a bfs test on random directed graphs from %lu random \"\n\t \"start vertices in each graph\\n\", TOLU(C_ITER))", "parent": 503, "children": [506, 510], "start_point": {"row": 136, "column": 8}, "end_point": {"row": 137, "column": 49}}, {"id": 506, "type": "concatenated_string", "text": "\"Run a bfs test on random directed graphs from %lu random \"\n\t \"start vertices in each graph\\n\"", "parent": 505, "children": [507, 508], "start_point": {"row": 136, "column": 9}, "end_point": {"row": 137, "column": 34}}, {"id": 507, "type": "string_literal", "text": "\"Run a bfs test on random directed graphs from %lu random \"", "parent": 506, "children": [], "start_point": {"row": 136, "column": 9}, "end_point": {"row": 136, "column": 68}}, {"id": 508, "type": "string_literal", "text": "\"start vertices in each graph\\n\"", "parent": 506, "children": [509], "start_point": {"row": 137, "column": 2}, "end_point": {"row": 137, "column": 34}}, {"id": 509, "type": "escape_sequence", "text": "\\n", "parent": 508, "children": [], "start_point": {"row": 137, "column": 31}, "end_point": {"row": 137, "column": 33}}, {"id": 510, "type": "call_expression", "text": "TOLU(C_ITER)", "parent": 505, "children": [511, 512], "start_point": {"row": 137, "column": 36}, "end_point": {"row": 137, "column": 48}}, {"id": 511, "type": "identifier", "text": "TOLU", "parent": 510, "children": [], "start_point": {"row": 137, "column": 36}, "end_point": {"row": 137, "column": 40}}, {"id": 512, "type": "argument_list", "text": "(C_ITER)", "parent": 510, "children": [513], "start_point": {"row": 137, "column": 40}, "end_point": {"row": 137, "column": 48}}, {"id": 513, "type": "identifier", "text": "C_ITER", "parent": 512, "children": [], "start_point": {"row": 137, "column": 41}, "end_point": {"row": 137, "column": 47}}, {"id": 514, "type": "for_statement", "text": "for (i = 0; i < C_PROBS_COUNT; i++){\n b.p = C_PROBS[i];\n printf(\"\\tP[an edge is in a graph] = %.2f\\n\", b.p);\n for (j = log_start; j <= log_end; j++){\n num_vts = pow_two_perror(j);\n printf(\"\\t\\tvertices: %lu, E[# of directed edges]: %.1f\\n\",\n\t TOLU(num_vts), b.p * num_vts * (num_vts - 1));\n run_random_dir_graph_helper(num_vts,\n\t\t\t\t C_VT_SIZES[1],\n\t\t\t\t C_VT_TYPES[1],\n\t\t\t\t C_READ[1],\n\t\t\t\t C_WRITE[1],\n\t\t\t\t C_AT[1],\n\t\t\t\t C_CMPEQ[1],\n\t\t\t\t C_INCR[1],\n\t\t\t\t bern,\n\t\t\t\t &b);\n }\n }", "parent": 480, "children": [515, 519, 523], "start_point": {"row": 138, "column": 2}, "end_point": {"row": 156, "column": 3}}, {"id": 515, "type": "assignment_expression", "text": "i = 0", "parent": 514, "children": [516, 517, 518], "start_point": {"row": 138, "column": 7}, "end_point": {"row": 138, "column": 12}}, {"id": 516, "type": "identifier", "text": "i", "parent": 515, "children": [], "start_point": {"row": 138, "column": 7}, "end_point": {"row": 138, "column": 8}}, {"id": 517, "type": "=", "text": "=", "parent": 515, "children": [], "start_point": {"row": 138, "column": 9}, "end_point": {"row": 138, "column": 10}}, {"id": 518, "type": "number_literal", "text": "0", "parent": 515, "children": [], "start_point": {"row": 138, "column": 11}, "end_point": {"row": 138, "column": 12}}, {"id": 519, "type": "binary_expression", "text": "i < C_PROBS_COUNT", "parent": 514, "children": [520, 521, 522], "start_point": {"row": 138, "column": 14}, "end_point": {"row": 138, "column": 31}}, {"id": 520, "type": "identifier", "text": "i", "parent": 519, "children": [], "start_point": {"row": 138, "column": 14}, "end_point": {"row": 138, "column": 15}}, {"id": 521, "type": "<", "text": "<", "parent": 519, "children": [], "start_point": {"row": 138, "column": 16}, "end_point": {"row": 138, "column": 17}}, {"id": 522, "type": "identifier", "text": "C_PROBS_COUNT", "parent": 519, "children": [], "start_point": {"row": 138, "column": 18}, "end_point": {"row": 138, "column": 31}}, {"id": 523, "type": "update_expression", "text": "i++", "parent": 514, "children": [524, 525], "start_point": {"row": 138, "column": 33}, "end_point": {"row": 138, "column": 36}}, {"id": 524, "type": "identifier", "text": "i", "parent": 523, "children": [], "start_point": {"row": 138, "column": 33}, "end_point": {"row": 138, "column": 34}}, {"id": 525, "type": "++", "text": "++", "parent": 523, "children": [], "start_point": {"row": 138, "column": 34}, "end_point": {"row": 138, "column": 36}}, {"id": 526, "type": "assignment_expression", "text": "b.p = C_PROBS[i]", "parent": 514, "children": [527, 530, 531], "start_point": {"row": 139, "column": 4}, "end_point": {"row": 139, "column": 20}}, {"id": 527, "type": "field_expression", "text": "b.p", "parent": 526, "children": [528, 529], "start_point": {"row": 139, "column": 4}, "end_point": {"row": 139, "column": 7}}, {"id": 528, "type": "identifier", "text": "b", "parent": 527, "children": [], "start_point": {"row": 139, "column": 4}, "end_point": {"row": 139, "column": 5}}, {"id": 529, "type": "field_identifier", "text": "p", "parent": 527, "children": [], "start_point": {"row": 139, "column": 6}, "end_point": {"row": 139, "column": 7}}, {"id": 530, "type": "=", "text": "=", "parent": 526, "children": [], "start_point": {"row": 139, "column": 8}, "end_point": {"row": 139, "column": 9}}, {"id": 531, "type": "subscript_expression", "text": "C_PROBS[i]", "parent": 526, "children": [532, 533], "start_point": {"row": 139, "column": 10}, "end_point": {"row": 139, "column": 20}}, {"id": 532, "type": "identifier", "text": "C_PROBS", "parent": 531, "children": [], "start_point": {"row": 139, "column": 10}, "end_point": {"row": 139, "column": 17}}, {"id": 533, "type": "identifier", "text": "i", "parent": 531, "children": [], "start_point": {"row": 139, "column": 18}, "end_point": {"row": 139, "column": 19}}, {"id": 534, "type": "call_expression", "text": "printf(\"\\tP[an edge is in a graph] = %.2f\\n\", b.p)", "parent": 514, "children": [535, 536], "start_point": {"row": 140, "column": 4}, "end_point": {"row": 140, "column": 54}}, {"id": 535, "type": "identifier", "text": "printf", "parent": 534, "children": [], "start_point": {"row": 140, "column": 4}, "end_point": {"row": 140, "column": 10}}, {"id": 536, "type": "argument_list", "text": "(\"\\tP[an edge is in a graph] = %.2f\\n\", b.p)", "parent": 534, "children": [537, 540], "start_point": {"row": 140, "column": 10}, "end_point": {"row": 140, "column": 54}}, {"id": 537, "type": "string_literal", "text": "\"\\tP[an edge is in a graph] = %.2f\\n\"", "parent": 536, "children": [538, 539], "start_point": {"row": 140, "column": 11}, "end_point": {"row": 140, "column": 48}}, {"id": 538, "type": "escape_sequence", "text": "\\t", "parent": 537, "children": [], "start_point": {"row": 140, "column": 12}, "end_point": {"row": 140, "column": 14}}, {"id": 539, "type": "escape_sequence", "text": "\\n", "parent": 537, "children": [], "start_point": {"row": 140, "column": 45}, "end_point": {"row": 140, "column": 47}}, {"id": 540, "type": "field_expression", "text": "b.p", "parent": 536, "children": [541, 542], "start_point": {"row": 140, "column": 50}, "end_point": {"row": 140, "column": 53}}, {"id": 541, "type": "identifier", "text": "b", "parent": 540, "children": [], "start_point": {"row": 140, "column": 50}, "end_point": {"row": 140, "column": 51}}, {"id": 542, "type": "field_identifier", "text": "p", "parent": 540, "children": [], "start_point": {"row": 140, "column": 52}, "end_point": {"row": 140, "column": 53}}, {"id": 543, "type": "for_statement", "text": "for (j = log_start; j <= log_end; j++){\n num_vts = pow_two_perror(j);\n printf(\"\\t\\tvertices: %lu, E[# of directed edges]: %.1f\\n\",\n\t TOLU(num_vts), b.p * num_vts * (num_vts - 1));\n run_random_dir_graph_helper(num_vts,\n\t\t\t\t C_VT_SIZES[1],\n\t\t\t\t C_VT_TYPES[1],\n\t\t\t\t C_READ[1],\n\t\t\t\t C_WRITE[1],\n\t\t\t\t C_AT[1],\n\t\t\t\t C_CMPEQ[1],\n\t\t\t\t C_INCR[1],\n\t\t\t\t bern,\n\t\t\t\t &b);\n }", "parent": 514, "children": [544, 548, 552], "start_point": {"row": 141, "column": 4}, "end_point": {"row": 155, "column": 5}}, {"id": 544, "type": "assignment_expression", "text": "j = log_start", "parent": 543, "children": [545, 546, 547], "start_point": {"row": 141, "column": 9}, "end_point": {"row": 141, "column": 22}}, {"id": 545, "type": "identifier", "text": "j", "parent": 544, "children": [], "start_point": {"row": 141, "column": 9}, "end_point": {"row": 141, "column": 10}}, {"id": 546, "type": "=", "text": "=", "parent": 544, "children": [], "start_point": {"row": 141, "column": 11}, "end_point": {"row": 141, "column": 12}}, {"id": 547, "type": "identifier", "text": "log_start", "parent": 544, "children": [], "start_point": {"row": 141, "column": 13}, "end_point": {"row": 141, "column": 22}}, {"id": 548, "type": "binary_expression", "text": "j <= log_end", "parent": 543, "children": [549, 550, 551], "start_point": {"row": 141, "column": 24}, "end_point": {"row": 141, "column": 36}}, {"id": 549, "type": "identifier", "text": "j", "parent": 548, "children": [], "start_point": {"row": 141, "column": 24}, "end_point": {"row": 141, "column": 25}}, {"id": 550, "type": "<=", "text": "<=", "parent": 548, "children": [], "start_point": {"row": 141, "column": 26}, "end_point": {"row": 141, "column": 28}}, {"id": 551, "type": "identifier", "text": "log_end", "parent": 548, "children": [], "start_point": {"row": 141, "column": 29}, "end_point": {"row": 141, "column": 36}}, {"id": 552, "type": "update_expression", "text": "j++", "parent": 543, "children": [553, 554], "start_point": {"row": 141, "column": 38}, "end_point": {"row": 141, "column": 41}}, {"id": 553, "type": "identifier", "text": "j", "parent": 552, "children": [], "start_point": {"row": 141, "column": 38}, "end_point": {"row": 141, "column": 39}}, {"id": 554, "type": "++", "text": "++", "parent": 552, "children": [], "start_point": {"row": 141, "column": 39}, "end_point": {"row": 141, "column": 41}}, {"id": 555, "type": "assignment_expression", "text": "num_vts = pow_two_perror(j)", "parent": 543, "children": [556, 557, 558], "start_point": {"row": 142, "column": 6}, "end_point": {"row": 142, "column": 33}}, {"id": 556, "type": "identifier", "text": "num_vts", "parent": 555, "children": [], "start_point": {"row": 142, "column": 6}, "end_point": {"row": 142, "column": 13}}, {"id": 557, "type": "=", "text": "=", "parent": 555, "children": [], "start_point": {"row": 142, "column": 14}, "end_point": {"row": 142, "column": 15}}, {"id": 558, "type": "call_expression", "text": "pow_two_perror(j)", "parent": 555, "children": [559, 560], "start_point": {"row": 142, "column": 16}, "end_point": {"row": 142, "column": 33}}, {"id": 559, "type": "identifier", "text": "pow_two_perror", "parent": 558, "children": [], "start_point": {"row": 142, "column": 16}, "end_point": {"row": 142, "column": 30}}, {"id": 560, "type": "argument_list", "text": "(j)", "parent": 558, "children": [561], "start_point": {"row": 142, "column": 30}, "end_point": {"row": 142, "column": 33}}, {"id": 561, "type": "identifier", "text": "j", "parent": 560, "children": [], "start_point": {"row": 142, "column": 31}, "end_point": {"row": 142, "column": 32}}, {"id": 562, "type": "call_expression", "text": "printf(\"\\t\\tvertices: %lu, E[# of directed edges]: %.1f\\n\",\n\t TOLU(num_vts), b.p * num_vts * (num_vts - 1))", "parent": 543, "children": [563, 564], "start_point": {"row": 143, "column": 6}, "end_point": {"row": 144, "column": 51}}, {"id": 563, "type": "identifier", "text": "printf", "parent": 562, "children": [], "start_point": {"row": 143, "column": 6}, "end_point": {"row": 143, "column": 12}}, {"id": 564, "type": "argument_list", "text": "(\"\\t\\tvertices: %lu, E[# of directed edges]: %.1f\\n\",\n\t TOLU(num_vts), b.p * num_vts * (num_vts - 1))", "parent": 562, "children": [565, 569, 573], "start_point": {"row": 143, "column": 12}, "end_point": {"row": 144, "column": 51}}, {"id": 565, "type": "string_literal", "text": "\"\\t\\tvertices: %lu, E[# of directed edges]: %.1f\\n\"", "parent": 564, "children": [566, 567, 568], "start_point": {"row": 143, "column": 13}, "end_point": {"row": 143, "column": 64}}, {"id": 566, "type": "escape_sequence", "text": "\\t", "parent": 565, "children": [], "start_point": {"row": 143, "column": 14}, "end_point": {"row": 143, "column": 16}}, {"id": 567, "type": "escape_sequence", "text": "\\t", "parent": 565, "children": [], "start_point": {"row": 143, "column": 16}, "end_point": {"row": 143, "column": 18}}, {"id": 568, "type": "escape_sequence", "text": "\\n", "parent": 565, "children": [], "start_point": {"row": 143, "column": 61}, "end_point": {"row": 143, "column": 63}}, {"id": 569, "type": "call_expression", "text": "TOLU(num_vts)", "parent": 564, "children": [570, 571], "start_point": {"row": 144, "column": 6}, "end_point": {"row": 144, "column": 19}}, {"id": 570, "type": "identifier", "text": "TOLU", "parent": 569, "children": [], "start_point": {"row": 144, "column": 6}, "end_point": {"row": 144, "column": 10}}, {"id": 571, "type": "argument_list", "text": "(num_vts)", "parent": 569, "children": [572], "start_point": {"row": 144, "column": 10}, "end_point": {"row": 144, "column": 19}}, {"id": 572, "type": "identifier", "text": "num_vts", "parent": 571, "children": [], "start_point": {"row": 144, "column": 11}, "end_point": {"row": 144, "column": 18}}, {"id": 573, "type": "binary_expression", "text": "b.p * num_vts * (num_vts - 1)", "parent": 564, "children": [574, 580, 581], "start_point": {"row": 144, "column": 21}, "end_point": {"row": 144, "column": 50}}, {"id": 574, "type": "binary_expression", "text": "b.p * num_vts", "parent": 573, "children": [575, 578, 579], "start_point": {"row": 144, "column": 21}, "end_point": {"row": 144, "column": 34}}, {"id": 575, "type": "field_expression", "text": "b.p", "parent": 574, "children": [576, 577], "start_point": {"row": 144, "column": 21}, "end_point": {"row": 144, "column": 24}}, {"id": 576, "type": "identifier", "text": "b", "parent": 575, "children": [], "start_point": {"row": 144, "column": 21}, "end_point": {"row": 144, "column": 22}}, {"id": 577, "type": "field_identifier", "text": "p", "parent": 575, "children": [], "start_point": {"row": 144, "column": 23}, "end_point": {"row": 144, "column": 24}}, {"id": 578, "type": "*", "text": "*", "parent": 574, "children": [], "start_point": {"row": 144, "column": 25}, "end_point": {"row": 144, "column": 26}}, {"id": 579, "type": "identifier", "text": "num_vts", "parent": 574, "children": [], "start_point": {"row": 144, "column": 27}, "end_point": {"row": 144, "column": 34}}, {"id": 580, "type": "*", "text": "*", "parent": 573, "children": [], "start_point": {"row": 144, "column": 35}, "end_point": {"row": 144, "column": 36}}, {"id": 581, "type": "parenthesized_expression", "text": "(num_vts - 1)", "parent": 573, "children": [582], "start_point": {"row": 144, "column": 37}, "end_point": {"row": 144, "column": 50}}, {"id": 582, "type": "binary_expression", "text": "num_vts - 1", "parent": 581, "children": [583, 584, 585], "start_point": {"row": 144, "column": 38}, "end_point": {"row": 144, "column": 49}}, {"id": 583, "type": "identifier", "text": "num_vts", "parent": 582, "children": [], "start_point": {"row": 144, "column": 38}, "end_point": {"row": 144, "column": 45}}, {"id": 584, "type": "-", "text": "-", "parent": 582, "children": [], "start_point": {"row": 144, "column": 46}, "end_point": {"row": 144, "column": 47}}, {"id": 585, "type": "number_literal", "text": "1", "parent": 582, "children": [], "start_point": {"row": 144, "column": 48}, "end_point": {"row": 144, "column": 49}}, {"id": 586, "type": "call_expression", "text": "run_random_dir_graph_helper(num_vts,\n\t\t\t\t C_VT_SIZES[1],\n\t\t\t\t C_VT_TYPES[1],\n\t\t\t\t C_READ[1],\n\t\t\t\t C_WRITE[1],\n\t\t\t\t C_AT[1],\n\t\t\t\t C_CMPEQ[1],\n\t\t\t\t C_INCR[1],\n\t\t\t\t bern,\n\t\t\t\t &b)", "parent": 543, "children": [587, 588], "start_point": {"row": 145, "column": 6}, "end_point": {"row": 154, "column": 9}}, {"id": 587, "type": "identifier", "text": "run_random_dir_graph_helper", "parent": 586, "children": [], "start_point": {"row": 145, "column": 6}, "end_point": {"row": 145, "column": 33}}, {"id": 588, "type": "argument_list", "text": "(num_vts,\n\t\t\t\t C_VT_SIZES[1],\n\t\t\t\t C_VT_TYPES[1],\n\t\t\t\t C_READ[1],\n\t\t\t\t C_WRITE[1],\n\t\t\t\t C_AT[1],\n\t\t\t\t C_CMPEQ[1],\n\t\t\t\t C_INCR[1],\n\t\t\t\t bern,\n\t\t\t\t &b)", "parent": 586, "children": [589, 590, 593, 596, 599, 602, 605, 608, 611, 612], "start_point": {"row": 145, "column": 33}, "end_point": {"row": 154, "column": 9}}, {"id": 589, "type": "identifier", "text": "num_vts", "parent": 588, "children": [], "start_point": {"row": 145, "column": 34}, "end_point": {"row": 145, "column": 41}}, {"id": 590, "type": "subscript_expression", "text": "C_VT_SIZES[1]", "parent": 588, "children": [591, 592], "start_point": {"row": 146, "column": 6}, "end_point": {"row": 146, "column": 19}}, {"id": 591, "type": "identifier", "text": "C_VT_SIZES", "parent": 590, "children": [], "start_point": {"row": 146, "column": 6}, "end_point": {"row": 146, "column": 16}}, {"id": 592, "type": "number_literal", "text": "1", "parent": 590, "children": [], "start_point": {"row": 146, "column": 17}, "end_point": {"row": 146, "column": 18}}, {"id": 593, "type": "subscript_expression", "text": "C_VT_TYPES[1]", "parent": 588, "children": [594, 595], "start_point": {"row": 147, "column": 6}, "end_point": {"row": 147, "column": 19}}, {"id": 594, "type": "identifier", "text": "C_VT_TYPES", "parent": 593, "children": [], "start_point": {"row": 147, "column": 6}, "end_point": {"row": 147, "column": 16}}, {"id": 595, "type": "number_literal", "text": "1", "parent": 593, "children": [], "start_point": {"row": 147, "column": 17}, "end_point": {"row": 147, "column": 18}}, {"id": 596, "type": "subscript_expression", "text": "C_READ[1]", "parent": 588, "children": [597, 598], "start_point": {"row": 148, "column": 6}, "end_point": {"row": 148, "column": 15}}, {"id": 597, "type": "identifier", "text": "C_READ", "parent": 596, "children": [], "start_point": {"row": 148, "column": 6}, "end_point": {"row": 148, "column": 12}}, {"id": 598, "type": "number_literal", "text": "1", "parent": 596, "children": [], "start_point": {"row": 148, "column": 13}, "end_point": {"row": 148, "column": 14}}, {"id": 599, "type": "subscript_expression", "text": "C_WRITE[1]", "parent": 588, "children": [600, 601], "start_point": {"row": 149, "column": 6}, "end_point": {"row": 149, "column": 16}}, {"id": 600, "type": "identifier", "text": "C_WRITE", "parent": 599, "children": [], "start_point": {"row": 149, "column": 6}, "end_point": {"row": 149, "column": 13}}, {"id": 601, "type": "number_literal", "text": "1", "parent": 599, "children": [], "start_point": {"row": 149, "column": 14}, "end_point": {"row": 149, "column": 15}}, {"id": 602, "type": "subscript_expression", "text": "C_AT[1]", "parent": 588, "children": [603, 604], "start_point": {"row": 150, "column": 6}, "end_point": {"row": 150, "column": 13}}, {"id": 603, "type": "identifier", "text": "C_AT", "parent": 602, "children": [], "start_point": {"row": 150, "column": 6}, "end_point": {"row": 150, "column": 10}}, {"id": 604, "type": "number_literal", "text": "1", "parent": 602, "children": [], "start_point": {"row": 150, "column": 11}, "end_point": {"row": 150, "column": 12}}, {"id": 605, "type": "subscript_expression", "text": "C_CMPEQ[1]", "parent": 588, "children": [606, 607], "start_point": {"row": 151, "column": 6}, "end_point": {"row": 151, "column": 16}}, {"id": 606, "type": "identifier", "text": "C_CMPEQ", "parent": 605, "children": [], "start_point": {"row": 151, "column": 6}, "end_point": {"row": 151, "column": 13}}, {"id": 607, "type": "number_literal", "text": "1", "parent": 605, "children": [], "start_point": {"row": 151, "column": 14}, "end_point": {"row": 151, "column": 15}}, {"id": 608, "type": "subscript_expression", "text": "C_INCR[1]", "parent": 588, "children": [609, 610], "start_point": {"row": 152, "column": 6}, "end_point": {"row": 152, "column": 15}}, {"id": 609, "type": "identifier", "text": "C_INCR", "parent": 608, "children": [], "start_point": {"row": 152, "column": 6}, "end_point": {"row": 152, "column": 12}}, {"id": 610, "type": "number_literal", "text": "1", "parent": 608, "children": [], "start_point": {"row": 152, "column": 13}, "end_point": {"row": 152, "column": 14}}, {"id": 611, "type": "identifier", "text": "bern", "parent": 588, "children": [], "start_point": {"row": 153, "column": 6}, "end_point": {"row": 153, "column": 10}}, {"id": 612, "type": "pointer_expression", "text": "&b", "parent": 588, "children": [613], "start_point": {"row": 154, "column": 6}, "end_point": {"row": 154, "column": 8}}, {"id": 613, "type": "identifier", "text": "b", "parent": 612, "children": [], "start_point": {"row": 154, "column": 7}, "end_point": {"row": 154, "column": 8}}, {"id": 614, "type": "function_definition", "text": "void run_random_dir_graph_helper(size_t num_vts,\n\t\t\t\t size_t vt_size,\n\t\t\t\t const char *type_string,\n\t\t\t\t size_t (*read_vt)(const void *),\n\t\t\t\t void (*write_vt)(void *, size_t),\n\t\t\t\t void *(*at_vt)(const void *, const void *),\n\t\t\t\t int (*cmp_vt)(const void *, const void *),\n\t\t\t\t void (*incr_vt)(void *),\n\t\t\t\t int bern(void *),\n\t\t\t\t struct bern_arg *b){\n size_t i;\n size_t *start = NULL;\n void *dist = NULL, *prev = NULL;\n struct graph g;\n struct adj_lst a;\n clock_t t;\n /* no declared type after malloc; effective type is set by bfs */\n start = malloc_perror(C_ITER, sizeof(size_t));\n dist = malloc_perror(num_vts, vt_size);\n prev = malloc_perror(num_vts, vt_size);\n for (i = 0; i < num_vts; i++){\n /* avoid trap representations in tests */\n write_vt(ptr(dist, i, vt_size), 0);\n } \n graph_base_init(&g, num_vts, vt_size, 0);\n adj_lst_base_init(&a, &g);\n adj_lst_rand_dir(&a, write_vt, bern, b);\n for (i = 0; i < C_ITER; i++){\n start[i] = RANDOM() % num_vts;\n }\n t = clock();\n for (i = 0; i < C_ITER; i++){\n bfs(&a, start[i], dist, prev, read_vt, write_vt, at_vt, cmp_vt, incr_vt);\n }\n t = clock() - t;\n printf(\"\\t\\t\\t%s ave runtime: %.6f seconds\\n\",\n\t type_string, (double)t / C_ITER / CLOCKS_PER_SEC);\n adj_lst_free(&a); /* deallocates blocks with effective vertex type */\n free(start);\n free(dist);\n free(prev);\n start = NULL;\n dist = NULL;\n prev = NULL;\n}", "parent": null, "children": [615, 616], "start_point": {"row": 159, "column": 0}, "end_point": {"row": 203, "column": 1}}, {"id": 615, "type": "primitive_type", "text": "void", "parent": 614, "children": [], "start_point": {"row": 159, "column": 0}, "end_point": {"row": 159, "column": 4}}, {"id": 616, "type": "function_declarator", "text": "run_random_dir_graph_helper(size_t num_vts,\n\t\t\t\t size_t vt_size,\n\t\t\t\t const char *type_string,\n\t\t\t\t size_t (*read_vt)(const void *),\n\t\t\t\t void (*write_vt)(void *, size_t),\n\t\t\t\t void *(*at_vt)(const void *, const void *),\n\t\t\t\t int (*cmp_vt)(const void *, const void *),\n\t\t\t\t void (*incr_vt)(void *),\n\t\t\t\t int bern(void *),\n\t\t\t\t struct bern_arg *b)", "parent": 614, "children": [617, 618], "start_point": {"row": 159, "column": 5}, "end_point": {"row": 168, "column": 24}}, {"id": 617, "type": "identifier", "text": "run_random_dir_graph_helper", "parent": 616, "children": [], "start_point": {"row": 159, "column": 5}, "end_point": {"row": 159, "column": 32}}, {"id": 618, "type": "parameter_list", "text": "(size_t num_vts,\n\t\t\t\t size_t vt_size,\n\t\t\t\t const char *type_string,\n\t\t\t\t size_t (*read_vt)(const void *),\n\t\t\t\t void (*write_vt)(void *, size_t),\n\t\t\t\t void *(*at_vt)(const void *, const void *),\n\t\t\t\t int (*cmp_vt)(const void *, const void *),\n\t\t\t\t void (*incr_vt)(void *),\n\t\t\t\t int bern(void *),\n\t\t\t\t struct bern_arg *b)", "parent": 616, "children": [619, 622, 625, 630, 642, 656, 674, 690, 702, 711], "start_point": {"row": 159, "column": 32}, "end_point": {"row": 168, "column": 24}}, {"id": 619, "type": "parameter_declaration", "text": "size_t num_vts", "parent": 618, "children": [620, 621], "start_point": {"row": 159, "column": 33}, "end_point": {"row": 159, "column": 47}}, {"id": 620, "type": "primitive_type", "text": "size_t", "parent": 619, "children": [], "start_point": {"row": 159, "column": 33}, "end_point": {"row": 159, "column": 39}}, {"id": 621, "type": "identifier", "text": "num_vts", "parent": 619, "children": [], "start_point": {"row": 159, "column": 40}, "end_point": {"row": 159, "column": 47}}, {"id": 622, "type": "parameter_declaration", "text": "size_t vt_size", "parent": 618, "children": [623, 624], "start_point": {"row": 160, "column": 5}, "end_point": {"row": 160, "column": 19}}, {"id": 623, "type": "primitive_type", "text": "size_t", "parent": 622, "children": [], "start_point": {"row": 160, "column": 5}, "end_point": {"row": 160, "column": 11}}, {"id": 624, "type": "identifier", "text": "vt_size", "parent": 622, "children": [], "start_point": {"row": 160, "column": 12}, "end_point": {"row": 160, "column": 19}}, {"id": 625, "type": "parameter_declaration", "text": "const char *type_string", "parent": 618, "children": [626, 627], "start_point": {"row": 161, "column": 5}, "end_point": {"row": 161, "column": 28}}, {"id": 626, "type": "primitive_type", "text": "char", "parent": 625, "children": [], "start_point": {"row": 161, "column": 11}, "end_point": {"row": 161, "column": 15}}, {"id": 627, "type": "pointer_declarator", "text": "*type_string", "parent": 625, "children": [628, 629], "start_point": {"row": 161, "column": 16}, "end_point": {"row": 161, "column": 28}}, {"id": 628, "type": "*", "text": "*", "parent": 627, "children": [], "start_point": {"row": 161, "column": 16}, "end_point": {"row": 161, "column": 17}}, {"id": 629, "type": "identifier", "text": "type_string", "parent": 627, "children": [], "start_point": {"row": 161, "column": 17}, "end_point": {"row": 161, "column": 28}}, {"id": 630, "type": "parameter_declaration", "text": "size_t (*read_vt)(const void *)", "parent": 618, "children": [631, 632], "start_point": {"row": 162, "column": 5}, "end_point": {"row": 162, "column": 36}}, {"id": 631, "type": "primitive_type", "text": "size_t", "parent": 630, "children": [], "start_point": {"row": 162, "column": 5}, "end_point": {"row": 162, "column": 11}}, {"id": 632, "type": "function_declarator", "text": "(*read_vt)(const void *)", "parent": 630, "children": [633, 637], "start_point": {"row": 162, "column": 12}, "end_point": {"row": 162, "column": 36}}, {"id": 633, "type": "parenthesized_declarator", "text": "(*read_vt)", "parent": 632, "children": [634], "start_point": {"row": 162, "column": 12}, "end_point": {"row": 162, "column": 22}}, {"id": 634, "type": "pointer_declarator", "text": "*read_vt", "parent": 633, "children": [635, 636], "start_point": {"row": 162, "column": 13}, "end_point": {"row": 162, "column": 21}}, {"id": 635, "type": "*", "text": "*", "parent": 634, "children": [], "start_point": {"row": 162, "column": 13}, "end_point": {"row": 162, "column": 14}}, {"id": 636, "type": "identifier", "text": "read_vt", "parent": 634, "children": [], "start_point": {"row": 162, "column": 14}, "end_point": {"row": 162, "column": 21}}, {"id": 637, "type": "parameter_list", "text": "(const void *)", "parent": 632, "children": [638], "start_point": {"row": 162, "column": 22}, "end_point": {"row": 162, "column": 36}}, {"id": 638, "type": "parameter_declaration", "text": "const void *", "parent": 637, "children": [639, 640], "start_point": {"row": 162, "column": 23}, "end_point": {"row": 162, "column": 35}}, {"id": 639, "type": "primitive_type", "text": "void", "parent": 638, "children": [], "start_point": {"row": 162, "column": 29}, "end_point": {"row": 162, "column": 33}}, {"id": 640, "type": "abstract_pointer_declarator", "text": "*", "parent": 638, "children": [641], "start_point": {"row": 162, "column": 34}, "end_point": {"row": 162, "column": 35}}, {"id": 641, "type": "*", "text": "*", "parent": 640, "children": [], "start_point": {"row": 162, "column": 34}, "end_point": {"row": 162, "column": 35}}, {"id": 642, "type": "parameter_declaration", "text": "void (*write_vt)(void *, size_t)", "parent": 618, "children": [643, 644], "start_point": {"row": 163, "column": 5}, "end_point": {"row": 163, "column": 37}}, {"id": 643, "type": "primitive_type", "text": "void", "parent": 642, "children": [], "start_point": {"row": 163, "column": 5}, "end_point": {"row": 163, "column": 9}}, {"id": 644, "type": "function_declarator", "text": "(*write_vt)(void *, size_t)", "parent": 642, "children": [645, 649], "start_point": {"row": 163, "column": 10}, "end_point": {"row": 163, "column": 37}}, {"id": 645, "type": "parenthesized_declarator", "text": "(*write_vt)", "parent": 644, "children": [646], "start_point": {"row": 163, "column": 10}, "end_point": {"row": 163, "column": 21}}, {"id": 646, "type": "pointer_declarator", "text": "*write_vt", "parent": 645, "children": [647, 648], "start_point": {"row": 163, "column": 11}, "end_point": {"row": 163, "column": 20}}, {"id": 647, "type": "*", "text": "*", "parent": 646, "children": [], "start_point": {"row": 163, "column": 11}, "end_point": {"row": 163, "column": 12}}, {"id": 648, "type": "identifier", "text": "write_vt", "parent": 646, "children": [], "start_point": {"row": 163, "column": 12}, "end_point": {"row": 163, "column": 20}}, {"id": 649, "type": "parameter_list", "text": "(void *, size_t)", "parent": 644, "children": [650, 654], "start_point": {"row": 163, "column": 21}, "end_point": {"row": 163, "column": 37}}, {"id": 650, "type": "parameter_declaration", "text": "void *", "parent": 649, "children": [651, 652], "start_point": {"row": 163, "column": 22}, "end_point": {"row": 163, "column": 28}}, {"id": 651, "type": "primitive_type", "text": "void", "parent": 650, "children": [], "start_point": {"row": 163, "column": 22}, "end_point": {"row": 163, "column": 26}}, {"id": 652, "type": "abstract_pointer_declarator", "text": "*", "parent": 650, "children": [653], "start_point": {"row": 163, "column": 27}, "end_point": {"row": 163, "column": 28}}, {"id": 653, "type": "*", "text": "*", "parent": 652, "children": [], "start_point": {"row": 163, "column": 27}, "end_point": {"row": 163, "column": 28}}, {"id": 654, "type": "parameter_declaration", "text": "size_t", "parent": 649, "children": [655], "start_point": {"row": 163, "column": 30}, "end_point": {"row": 163, "column": 36}}, {"id": 655, "type": "primitive_type", "text": "size_t", "parent": 654, "children": [], "start_point": {"row": 163, "column": 30}, "end_point": {"row": 163, "column": 36}}, {"id": 656, "type": "parameter_declaration", "text": "void *(*at_vt)(const void *, const void *)", "parent": 618, "children": [657, 658], "start_point": {"row": 164, "column": 5}, "end_point": {"row": 164, "column": 47}}, {"id": 657, "type": "primitive_type", "text": "void", "parent": 656, "children": [], "start_point": {"row": 164, "column": 5}, "end_point": {"row": 164, "column": 9}}, {"id": 658, "type": "pointer_declarator", "text": "*(*at_vt)(const void *, const void *)", "parent": 656, "children": [659, 660], "start_point": {"row": 164, "column": 10}, "end_point": {"row": 164, "column": 47}}, {"id": 659, "type": "*", "text": "*", "parent": 658, "children": [], "start_point": {"row": 164, "column": 10}, "end_point": {"row": 164, "column": 11}}, {"id": 660, "type": "function_declarator", "text": "(*at_vt)(const void *, const void *)", "parent": 658, "children": [661, 665], "start_point": {"row": 164, "column": 11}, "end_point": {"row": 164, "column": 47}}, {"id": 661, "type": "parenthesized_declarator", "text": "(*at_vt)", "parent": 660, "children": [662], "start_point": {"row": 164, "column": 11}, "end_point": {"row": 164, "column": 19}}, {"id": 662, "type": "pointer_declarator", "text": "*at_vt", "parent": 661, "children": [663, 664], "start_point": {"row": 164, "column": 12}, "end_point": {"row": 164, "column": 18}}, {"id": 663, "type": "*", "text": "*", "parent": 662, "children": [], "start_point": {"row": 164, "column": 12}, "end_point": {"row": 164, "column": 13}}, {"id": 664, "type": "identifier", "text": "at_vt", "parent": 662, "children": [], "start_point": {"row": 164, "column": 13}, "end_point": {"row": 164, "column": 18}}, {"id": 665, "type": "parameter_list", "text": "(const void *, const void *)", "parent": 660, "children": [666, 670], "start_point": {"row": 164, "column": 19}, "end_point": {"row": 164, "column": 47}}, {"id": 666, "type": "parameter_declaration", "text": "const void *", "parent": 665, "children": [667, 668], "start_point": {"row": 164, "column": 20}, "end_point": {"row": 164, "column": 32}}, {"id": 667, "type": "primitive_type", "text": "void", "parent": 666, "children": [], "start_point": {"row": 164, "column": 26}, "end_point": {"row": 164, "column": 30}}, {"id": 668, "type": "abstract_pointer_declarator", "text": "*", "parent": 666, "children": [669], "start_point": {"row": 164, "column": 31}, "end_point": {"row": 164, "column": 32}}, {"id": 669, "type": "*", "text": "*", "parent": 668, "children": [], "start_point": {"row": 164, "column": 31}, "end_point": {"row": 164, "column": 32}}, {"id": 670, "type": "parameter_declaration", "text": "const void *", "parent": 665, "children": [671, 672], "start_point": {"row": 164, "column": 34}, "end_point": {"row": 164, "column": 46}}, {"id": 671, "type": "primitive_type", "text": "void", "parent": 670, "children": [], "start_point": {"row": 164, "column": 40}, "end_point": {"row": 164, "column": 44}}, {"id": 672, "type": "abstract_pointer_declarator", "text": "*", "parent": 670, "children": [673], "start_point": {"row": 164, "column": 45}, "end_point": {"row": 164, "column": 46}}, {"id": 673, "type": "*", "text": "*", "parent": 672, "children": [], "start_point": {"row": 164, "column": 45}, "end_point": {"row": 164, "column": 46}}, {"id": 674, "type": "parameter_declaration", "text": "int (*cmp_vt)(const void *, const void *)", "parent": 618, "children": [675, 676], "start_point": {"row": 165, "column": 5}, "end_point": {"row": 165, "column": 46}}, {"id": 675, "type": "primitive_type", "text": "int", "parent": 674, "children": [], "start_point": {"row": 165, "column": 5}, "end_point": {"row": 165, "column": 8}}, {"id": 676, "type": "function_declarator", "text": "(*cmp_vt)(const void *, const void *)", "parent": 674, "children": [677, 681], "start_point": {"row": 165, "column": 9}, "end_point": {"row": 165, "column": 46}}, {"id": 677, "type": "parenthesized_declarator", "text": "(*cmp_vt)", "parent": 676, "children": [678], "start_point": {"row": 165, "column": 9}, "end_point": {"row": 165, "column": 18}}, {"id": 678, "type": "pointer_declarator", "text": "*cmp_vt", "parent": 677, "children": [679, 680], "start_point": {"row": 165, "column": 10}, "end_point": {"row": 165, "column": 17}}, {"id": 679, "type": "*", "text": "*", "parent": 678, "children": [], "start_point": {"row": 165, "column": 10}, "end_point": {"row": 165, "column": 11}}, {"id": 680, "type": "identifier", "text": "cmp_vt", "parent": 678, "children": [], "start_point": {"row": 165, "column": 11}, "end_point": {"row": 165, "column": 17}}, {"id": 681, "type": "parameter_list", "text": "(const void *, const void *)", "parent": 676, "children": [682, 686], "start_point": {"row": 165, "column": 18}, "end_point": {"row": 165, "column": 46}}, {"id": 682, "type": "parameter_declaration", "text": "const void *", "parent": 681, "children": [683, 684], "start_point": {"row": 165, "column": 19}, "end_point": {"row": 165, "column": 31}}, {"id": 683, "type": "primitive_type", "text": "void", "parent": 682, "children": [], "start_point": {"row": 165, "column": 25}, "end_point": {"row": 165, "column": 29}}, {"id": 684, "type": "abstract_pointer_declarator", "text": "*", "parent": 682, "children": [685], "start_point": {"row": 165, "column": 30}, "end_point": {"row": 165, "column": 31}}, {"id": 685, "type": "*", "text": "*", "parent": 684, "children": [], "start_point": {"row": 165, "column": 30}, "end_point": {"row": 165, "column": 31}}, {"id": 686, "type": "parameter_declaration", "text": "const void *", "parent": 681, "children": [687, 688], "start_point": {"row": 165, "column": 33}, "end_point": {"row": 165, "column": 45}}, {"id": 687, "type": "primitive_type", "text": "void", "parent": 686, "children": [], "start_point": {"row": 165, "column": 39}, "end_point": {"row": 165, "column": 43}}, {"id": 688, "type": "abstract_pointer_declarator", "text": "*", "parent": 686, "children": [689], "start_point": {"row": 165, "column": 44}, "end_point": {"row": 165, "column": 45}}, {"id": 689, "type": "*", "text": "*", "parent": 688, "children": [], "start_point": {"row": 165, "column": 44}, "end_point": {"row": 165, "column": 45}}, {"id": 690, "type": "parameter_declaration", "text": "void (*incr_vt)(void *)", "parent": 618, "children": [691, 692], "start_point": {"row": 166, "column": 5}, "end_point": {"row": 166, "column": 28}}, {"id": 691, "type": "primitive_type", "text": "void", "parent": 690, "children": [], "start_point": {"row": 166, "column": 5}, "end_point": {"row": 166, "column": 9}}, {"id": 692, "type": "function_declarator", "text": "(*incr_vt)(void *)", "parent": 690, "children": [693, 697], "start_point": {"row": 166, "column": 10}, "end_point": {"row": 166, "column": 28}}, {"id": 693, "type": "parenthesized_declarator", "text": "(*incr_vt)", "parent": 692, "children": [694], "start_point": {"row": 166, "column": 10}, "end_point": {"row": 166, "column": 20}}, {"id": 694, "type": "pointer_declarator", "text": "*incr_vt", "parent": 693, "children": [695, 696], "start_point": {"row": 166, "column": 11}, "end_point": {"row": 166, "column": 19}}, {"id": 695, "type": "*", "text": "*", "parent": 694, "children": [], "start_point": {"row": 166, "column": 11}, "end_point": {"row": 166, "column": 12}}, {"id": 696, "type": "identifier", "text": "incr_vt", "parent": 694, "children": [], "start_point": {"row": 166, "column": 12}, "end_point": {"row": 166, "column": 19}}, {"id": 697, "type": "parameter_list", "text": "(void *)", "parent": 692, "children": [698], "start_point": {"row": 166, "column": 20}, "end_point": {"row": 166, "column": 28}}, {"id": 698, "type": "parameter_declaration", "text": "void *", "parent": 697, "children": [699, 700], "start_point": {"row": 166, "column": 21}, "end_point": {"row": 166, "column": 27}}, {"id": 699, "type": "primitive_type", "text": "void", "parent": 698, "children": [], "start_point": {"row": 166, "column": 21}, "end_point": {"row": 166, "column": 25}}, {"id": 700, "type": "abstract_pointer_declarator", "text": "*", "parent": 698, "children": [701], "start_point": {"row": 166, "column": 26}, "end_point": {"row": 166, "column": 27}}, {"id": 701, "type": "*", "text": "*", "parent": 700, "children": [], "start_point": {"row": 166, "column": 26}, "end_point": {"row": 166, "column": 27}}, {"id": 702, "type": "parameter_declaration", "text": "int bern(void *)", "parent": 618, "children": [703, 704], "start_point": {"row": 167, "column": 5}, "end_point": {"row": 167, "column": 21}}, {"id": 703, "type": "primitive_type", "text": "int", "parent": 702, "children": [], "start_point": {"row": 167, "column": 5}, "end_point": {"row": 167, "column": 8}}, {"id": 704, "type": "function_declarator", "text": "bern(void *)", "parent": 702, "children": [705, 706], "start_point": {"row": 167, "column": 9}, "end_point": {"row": 167, "column": 21}}, {"id": 705, "type": "identifier", "text": "bern", "parent": 704, "children": [], "start_point": {"row": 167, "column": 9}, "end_point": {"row": 167, "column": 13}}, {"id": 706, "type": "parameter_list", "text": "(void *)", "parent": 704, "children": [707], "start_point": {"row": 167, "column": 13}, "end_point": {"row": 167, "column": 21}}, {"id": 707, "type": "parameter_declaration", "text": "void *", "parent": 706, "children": [708, 709], "start_point": {"row": 167, "column": 14}, "end_point": {"row": 167, "column": 20}}, {"id": 708, "type": "primitive_type", "text": "void", "parent": 707, "children": [], "start_point": {"row": 167, "column": 14}, "end_point": {"row": 167, "column": 18}}, {"id": 709, "type": "abstract_pointer_declarator", "text": "*", "parent": 707, "children": [710], "start_point": {"row": 167, "column": 19}, "end_point": {"row": 167, "column": 20}}, {"id": 710, "type": "*", "text": "*", "parent": 709, "children": [], "start_point": {"row": 167, "column": 19}, "end_point": {"row": 167, "column": 20}}, {"id": 711, "type": "parameter_declaration", "text": "struct bern_arg *b", "parent": 618, "children": [712, 715], "start_point": {"row": 168, "column": 5}, "end_point": {"row": 168, "column": 23}}, {"id": 712, "type": "struct_specifier", "text": "struct bern_arg", "parent": 711, "children": [713, 714], "start_point": {"row": 168, "column": 5}, "end_point": {"row": 168, "column": 20}}, {"id": 713, "type": "struct", "text": "struct", "parent": 712, "children": [], "start_point": {"row": 168, "column": 5}, "end_point": {"row": 168, "column": 11}}, {"id": 714, "type": "type_identifier", "text": "bern_arg", "parent": 712, "children": [], "start_point": {"row": 168, "column": 12}, "end_point": {"row": 168, "column": 20}}, {"id": 715, "type": "pointer_declarator", "text": "*b", "parent": 711, "children": [716, 717], "start_point": {"row": 168, "column": 21}, "end_point": {"row": 168, "column": 23}}, {"id": 716, "type": "*", "text": "*", "parent": 715, "children": [], "start_point": {"row": 168, "column": 21}, "end_point": {"row": 168, "column": 22}}, {"id": 717, "type": "identifier", "text": "b", "parent": 715, "children": [], "start_point": {"row": 168, "column": 22}, "end_point": {"row": 168, "column": 23}}, {"id": 718, "type": "declaration", "text": "size_t i;", "parent": 614, "children": [719, 720], "start_point": {"row": 169, "column": 2}, "end_point": {"row": 169, "column": 11}}, {"id": 719, "type": "primitive_type", "text": "size_t", "parent": 718, "children": [], "start_point": {"row": 169, "column": 2}, "end_point": {"row": 169, "column": 8}}, {"id": 720, "type": "identifier", "text": "i", "parent": 718, "children": [], "start_point": {"row": 169, "column": 9}, "end_point": {"row": 169, "column": 10}}, {"id": 721, "type": "declaration", "text": "size_t *start = NULL;", "parent": 614, "children": [722, 723], "start_point": {"row": 170, "column": 2}, "end_point": {"row": 170, "column": 23}}, {"id": 722, "type": "primitive_type", "text": "size_t", "parent": 721, "children": [], "start_point": {"row": 170, "column": 2}, "end_point": {"row": 170, "column": 8}}, {"id": 723, "type": "init_declarator", "text": "*start = NULL", "parent": 721, "children": [724, 727, 728], "start_point": {"row": 170, "column": 9}, "end_point": {"row": 170, "column": 22}}, {"id": 724, "type": "pointer_declarator", "text": "*start", "parent": 723, "children": [725, 726], "start_point": {"row": 170, "column": 9}, "end_point": {"row": 170, "column": 15}}, {"id": 725, "type": "*", "text": "*", "parent": 724, "children": [], "start_point": {"row": 170, "column": 9}, "end_point": {"row": 170, "column": 10}}, {"id": 726, "type": "identifier", "text": "start", "parent": 724, "children": [], "start_point": {"row": 170, "column": 10}, "end_point": {"row": 170, "column": 15}}, {"id": 727, "type": "=", "text": "=", "parent": 723, "children": [], "start_point": {"row": 170, "column": 16}, "end_point": {"row": 170, "column": 17}}, {"id": 728, "type": "null", "text": "NULL", "parent": 723, "children": [729], "start_point": {"row": 170, "column": 18}, "end_point": {"row": 170, "column": 22}}, {"id": 729, "type": "NULL", "text": "NULL", "parent": 728, "children": [], "start_point": {"row": 170, "column": 18}, "end_point": {"row": 170, "column": 22}}, {"id": 730, "type": "declaration", "text": "void *dist = NULL, *prev = NULL;", "parent": 614, "children": [731, 732, 739], "start_point": {"row": 171, "column": 2}, "end_point": {"row": 171, "column": 34}}, {"id": 731, "type": "primitive_type", "text": "void", "parent": 730, "children": [], "start_point": {"row": 171, "column": 2}, "end_point": {"row": 171, "column": 6}}, {"id": 732, "type": "init_declarator", "text": "*dist = NULL", "parent": 730, "children": [733, 736, 737], "start_point": {"row": 171, "column": 7}, "end_point": {"row": 171, "column": 19}}, {"id": 733, "type": "pointer_declarator", "text": "*dist", "parent": 732, "children": [734, 735], "start_point": {"row": 171, "column": 7}, "end_point": {"row": 171, "column": 12}}, {"id": 734, "type": "*", "text": "*", "parent": 733, "children": [], "start_point": {"row": 171, "column": 7}, "end_point": {"row": 171, "column": 8}}, {"id": 735, "type": "identifier", "text": "dist", "parent": 733, "children": [], "start_point": {"row": 171, "column": 8}, "end_point": {"row": 171, "column": 12}}, {"id": 736, "type": "=", "text": "=", "parent": 732, "children": [], "start_point": {"row": 171, "column": 13}, "end_point": {"row": 171, "column": 14}}, {"id": 737, "type": "null", "text": "NULL", "parent": 732, "children": [738], "start_point": {"row": 171, "column": 15}, "end_point": {"row": 171, "column": 19}}, {"id": 738, "type": "NULL", "text": "NULL", "parent": 737, "children": [], "start_point": {"row": 171, "column": 15}, "end_point": {"row": 171, "column": 19}}, {"id": 739, "type": "init_declarator", "text": "*prev = NULL", "parent": 730, "children": [740, 743, 744], "start_point": {"row": 171, "column": 21}, "end_point": {"row": 171, "column": 33}}, {"id": 740, "type": "pointer_declarator", "text": "*prev", "parent": 739, "children": [741, 742], "start_point": {"row": 171, "column": 21}, "end_point": {"row": 171, "column": 26}}, {"id": 741, "type": "*", "text": "*", "parent": 740, "children": [], "start_point": {"row": 171, "column": 21}, "end_point": {"row": 171, "column": 22}}, {"id": 742, "type": "identifier", "text": "prev", "parent": 740, "children": [], "start_point": {"row": 171, "column": 22}, "end_point": {"row": 171, "column": 26}}, {"id": 743, "type": "=", "text": "=", "parent": 739, "children": [], "start_point": {"row": 171, "column": 27}, "end_point": {"row": 171, "column": 28}}, {"id": 744, "type": "null", "text": "NULL", "parent": 739, "children": [745], "start_point": {"row": 171, "column": 29}, "end_point": {"row": 171, "column": 33}}, {"id": 745, "type": "NULL", "text": "NULL", "parent": 744, "children": [], "start_point": {"row": 171, "column": 29}, "end_point": {"row": 171, "column": 33}}, {"id": 746, "type": "declaration", "text": "struct graph g;", "parent": 614, "children": [747, 750], "start_point": {"row": 172, "column": 2}, "end_point": {"row": 172, "column": 17}}, {"id": 747, "type": "struct_specifier", "text": "struct graph", "parent": 746, "children": [748, 749], "start_point": {"row": 172, "column": 2}, "end_point": {"row": 172, "column": 14}}, {"id": 748, "type": "struct", "text": "struct", "parent": 747, "children": [], "start_point": {"row": 172, "column": 2}, "end_point": {"row": 172, "column": 8}}, {"id": 749, "type": "type_identifier", "text": "graph", "parent": 747, "children": [], "start_point": {"row": 172, "column": 9}, "end_point": {"row": 172, "column": 14}}, {"id": 750, "type": "identifier", "text": "g", "parent": 746, "children": [], "start_point": {"row": 172, "column": 15}, "end_point": {"row": 172, "column": 16}}, {"id": 751, "type": "declaration", "text": "struct adj_lst a;", "parent": 614, "children": [752, 755], "start_point": {"row": 173, "column": 2}, "end_point": {"row": 173, "column": 19}}, {"id": 752, "type": "struct_specifier", "text": "struct adj_lst", "parent": 751, "children": [753, 754], "start_point": {"row": 173, "column": 2}, "end_point": {"row": 173, "column": 16}}, {"id": 753, "type": "struct", "text": "struct", "parent": 752, "children": [], "start_point": {"row": 173, "column": 2}, "end_point": {"row": 173, "column": 8}}, {"id": 754, "type": "type_identifier", "text": "adj_lst", "parent": 752, "children": [], "start_point": {"row": 173, "column": 9}, "end_point": {"row": 173, "column": 16}}, {"id": 755, "type": "identifier", "text": "a", "parent": 751, "children": [], "start_point": {"row": 173, "column": 17}, "end_point": {"row": 173, "column": 18}}, {"id": 756, "type": "declaration", "text": "clock_t t;", "parent": 614, "children": [757, 758], "start_point": {"row": 174, "column": 2}, "end_point": {"row": 174, "column": 12}}, {"id": 757, "type": "type_identifier", "text": "clock_t", "parent": 756, "children": [], "start_point": {"row": 174, "column": 2}, "end_point": {"row": 174, "column": 9}}, {"id": 758, "type": "identifier", "text": "t", "parent": 756, "children": [], "start_point": {"row": 174, "column": 10}, "end_point": {"row": 174, "column": 11}}, {"id": 759, "type": "assignment_expression", "text": "start = malloc_perror(C_ITER, sizeof(size_t))", "parent": 614, "children": [760, 761, 762], "start_point": {"row": 176, "column": 2}, "end_point": {"row": 176, "column": 47}}, {"id": 760, "type": "identifier", "text": "start", "parent": 759, "children": [], "start_point": {"row": 176, "column": 2}, "end_point": {"row": 176, "column": 7}}, {"id": 761, "type": "=", "text": "=", "parent": 759, "children": [], "start_point": {"row": 176, "column": 8}, "end_point": {"row": 176, "column": 9}}, {"id": 762, "type": "call_expression", "text": "malloc_perror(C_ITER, sizeof(size_t))", "parent": 759, "children": [763, 764], "start_point": {"row": 176, "column": 10}, "end_point": {"row": 176, "column": 47}}, {"id": 763, "type": "identifier", "text": "malloc_perror", "parent": 762, "children": [], "start_point": {"row": 176, "column": 10}, "end_point": {"row": 176, "column": 23}}, {"id": 764, "type": "argument_list", "text": "(C_ITER, sizeof(size_t))", "parent": 762, "children": [765, 766], "start_point": {"row": 176, "column": 23}, "end_point": {"row": 176, "column": 47}}, {"id": 765, "type": "identifier", "text": "C_ITER", "parent": 764, "children": [], "start_point": {"row": 176, "column": 24}, "end_point": {"row": 176, "column": 30}}, {"id": 766, "type": "sizeof_expression", "text": "sizeof(size_t)", "parent": 764, "children": [767], "start_point": {"row": 176, "column": 32}, "end_point": {"row": 176, "column": 46}}, {"id": 767, "type": "type_descriptor", "text": "size_t", "parent": 766, "children": [768], "start_point": {"row": 176, "column": 39}, "end_point": {"row": 176, "column": 45}}, {"id": 768, "type": "primitive_type", "text": "size_t", "parent": 767, "children": [], "start_point": {"row": 176, "column": 39}, "end_point": {"row": 176, "column": 45}}, {"id": 769, "type": "assignment_expression", "text": "dist = malloc_perror(num_vts, vt_size)", "parent": 614, "children": [770, 771, 772], "start_point": {"row": 177, "column": 2}, "end_point": {"row": 177, "column": 40}}, {"id": 770, "type": "identifier", "text": "dist", "parent": 769, "children": [], "start_point": {"row": 177, "column": 2}, "end_point": {"row": 177, "column": 6}}, {"id": 771, "type": "=", "text": "=", "parent": 769, "children": [], "start_point": {"row": 177, "column": 7}, "end_point": {"row": 177, "column": 8}}, {"id": 772, "type": "call_expression", "text": "malloc_perror(num_vts, vt_size)", "parent": 769, "children": [773, 774], "start_point": {"row": 177, "column": 9}, "end_point": {"row": 177, "column": 40}}, {"id": 773, "type": "identifier", "text": "malloc_perror", "parent": 772, "children": [], "start_point": {"row": 177, "column": 9}, "end_point": {"row": 177, "column": 22}}, {"id": 774, "type": "argument_list", "text": "(num_vts, vt_size)", "parent": 772, "children": [775, 776], "start_point": {"row": 177, "column": 22}, "end_point": {"row": 177, "column": 40}}, {"id": 775, "type": "identifier", "text": "num_vts", "parent": 774, "children": [], "start_point": {"row": 177, "column": 23}, "end_point": {"row": 177, "column": 30}}, {"id": 776, "type": "identifier", "text": "vt_size", "parent": 774, "children": [], "start_point": {"row": 177, "column": 32}, "end_point": {"row": 177, "column": 39}}, {"id": 777, "type": "assignment_expression", "text": "prev = malloc_perror(num_vts, vt_size)", "parent": 614, "children": [778, 779, 780], "start_point": {"row": 178, "column": 2}, "end_point": {"row": 178, "column": 40}}, {"id": 778, "type": "identifier", "text": "prev", "parent": 777, "children": [], "start_point": {"row": 178, "column": 2}, "end_point": {"row": 178, "column": 6}}, {"id": 779, "type": "=", "text": "=", "parent": 777, "children": [], "start_point": {"row": 178, "column": 7}, "end_point": {"row": 178, "column": 8}}, {"id": 780, "type": "call_expression", "text": "malloc_perror(num_vts, vt_size)", "parent": 777, "children": [781, 782], "start_point": {"row": 178, "column": 9}, "end_point": {"row": 178, "column": 40}}, {"id": 781, "type": "identifier", "text": "malloc_perror", "parent": 780, "children": [], "start_point": {"row": 178, "column": 9}, "end_point": {"row": 178, "column": 22}}, {"id": 782, "type": "argument_list", "text": "(num_vts, vt_size)", "parent": 780, "children": [783, 784], "start_point": {"row": 178, "column": 22}, "end_point": {"row": 178, "column": 40}}, {"id": 783, "type": "identifier", "text": "num_vts", "parent": 782, "children": [], "start_point": {"row": 178, "column": 23}, "end_point": {"row": 178, "column": 30}}, {"id": 784, "type": "identifier", "text": "vt_size", "parent": 782, "children": [], "start_point": {"row": 178, "column": 32}, "end_point": {"row": 178, "column": 39}}, {"id": 785, "type": "for_statement", "text": "for (i = 0; i < num_vts; i++){\n /* avoid trap representations in tests */\n write_vt(ptr(dist, i, vt_size), 0);\n }", "parent": 614, "children": [786, 790, 794], "start_point": {"row": 179, "column": 2}, "end_point": {"row": 182, "column": 3}}, {"id": 786, "type": "assignment_expression", "text": "i = 0", "parent": 785, "children": [787, 788, 789], "start_point": {"row": 179, "column": 7}, "end_point": {"row": 179, "column": 12}}, {"id": 787, "type": "identifier", "text": "i", "parent": 786, "children": [], "start_point": {"row": 179, "column": 7}, "end_point": {"row": 179, "column": 8}}, {"id": 788, "type": "=", "text": "=", "parent": 786, "children": [], "start_point": {"row": 179, "column": 9}, "end_point": {"row": 179, "column": 10}}, {"id": 789, "type": "number_literal", "text": "0", "parent": 786, "children": [], "start_point": {"row": 179, "column": 11}, "end_point": {"row": 179, "column": 12}}, {"id": 790, "type": "binary_expression", "text": "i < num_vts", "parent": 785, "children": [791, 792, 793], "start_point": {"row": 179, "column": 14}, "end_point": {"row": 179, "column": 25}}, {"id": 791, "type": "identifier", "text": "i", "parent": 790, "children": [], "start_point": {"row": 179, "column": 14}, "end_point": {"row": 179, "column": 15}}, {"id": 792, "type": "<", "text": "<", "parent": 790, "children": [], "start_point": {"row": 179, "column": 16}, "end_point": {"row": 179, "column": 17}}, {"id": 793, "type": "identifier", "text": "num_vts", "parent": 790, "children": [], "start_point": {"row": 179, "column": 18}, "end_point": {"row": 179, "column": 25}}, {"id": 794, "type": "update_expression", "text": "i++", "parent": 785, "children": [795, 796], "start_point": {"row": 179, "column": 27}, "end_point": {"row": 179, "column": 30}}, {"id": 795, "type": "identifier", "text": "i", "parent": 794, "children": [], "start_point": {"row": 179, "column": 27}, "end_point": {"row": 179, "column": 28}}, {"id": 796, "type": "++", "text": "++", "parent": 794, "children": [], "start_point": {"row": 179, "column": 28}, "end_point": {"row": 179, "column": 30}}, {"id": 797, "type": "call_expression", "text": "write_vt(ptr(dist, i, vt_size), 0)", "parent": 785, "children": [798, 799], "start_point": {"row": 181, "column": 4}, "end_point": {"row": 181, "column": 38}}, {"id": 798, "type": "identifier", "text": "write_vt", "parent": 797, "children": [], "start_point": {"row": 181, "column": 4}, "end_point": {"row": 181, "column": 12}}, {"id": 799, "type": "argument_list", "text": "(ptr(dist, i, vt_size), 0)", "parent": 797, "children": [800, 806], "start_point": {"row": 181, "column": 12}, "end_point": {"row": 181, "column": 38}}, {"id": 800, "type": "call_expression", "text": "ptr(dist, i, vt_size)", "parent": 799, "children": [801, 802], "start_point": {"row": 181, "column": 13}, "end_point": {"row": 181, "column": 34}}, {"id": 801, "type": "identifier", "text": "ptr", "parent": 800, "children": [], "start_point": {"row": 181, "column": 13}, "end_point": {"row": 181, "column": 16}}, {"id": 802, "type": "argument_list", "text": "(dist, i, vt_size)", "parent": 800, "children": [803, 804, 805], "start_point": {"row": 181, "column": 16}, "end_point": {"row": 181, "column": 34}}, {"id": 803, "type": "identifier", "text": "dist", "parent": 802, "children": [], "start_point": {"row": 181, "column": 17}, "end_point": {"row": 181, "column": 21}}, {"id": 804, "type": "identifier", "text": "i", "parent": 802, "children": [], "start_point": {"row": 181, "column": 23}, "end_point": {"row": 181, "column": 24}}, {"id": 805, "type": "identifier", "text": "vt_size", "parent": 802, "children": [], "start_point": {"row": 181, "column": 26}, "end_point": {"row": 181, "column": 33}}, {"id": 806, "type": "number_literal", "text": "0", "parent": 799, "children": [], "start_point": {"row": 181, "column": 36}, "end_point": {"row": 181, "column": 37}}, {"id": 807, "type": "call_expression", "text": "graph_base_init(&g, num_vts, vt_size, 0)", "parent": 614, "children": [808, 809], "start_point": {"row": 183, "column": 2}, "end_point": {"row": 183, "column": 42}}, {"id": 808, "type": "identifier", "text": "graph_base_init", "parent": 807, "children": [], "start_point": {"row": 183, "column": 2}, "end_point": {"row": 183, "column": 17}}, {"id": 809, "type": "argument_list", "text": "(&g, num_vts, vt_size, 0)", "parent": 807, "children": [810, 812, 813, 814], "start_point": {"row": 183, "column": 17}, "end_point": {"row": 183, "column": 42}}, {"id": 810, "type": "pointer_expression", "text": "&g", "parent": 809, "children": [811], "start_point": {"row": 183, "column": 18}, "end_point": {"row": 183, "column": 20}}, {"id": 811, "type": "identifier", "text": "g", "parent": 810, "children": [], "start_point": {"row": 183, "column": 19}, "end_point": {"row": 183, "column": 20}}, {"id": 812, "type": "identifier", "text": "num_vts", "parent": 809, "children": [], "start_point": {"row": 183, "column": 22}, "end_point": {"row": 183, "column": 29}}, {"id": 813, "type": "identifier", "text": "vt_size", "parent": 809, "children": [], "start_point": {"row": 183, "column": 31}, "end_point": {"row": 183, "column": 38}}, {"id": 814, "type": "number_literal", "text": "0", "parent": 809, "children": [], "start_point": {"row": 183, "column": 40}, "end_point": {"row": 183, "column": 41}}, {"id": 815, "type": "call_expression", "text": "adj_lst_base_init(&a, &g)", "parent": 614, "children": [816, 817], "start_point": {"row": 184, "column": 2}, "end_point": {"row": 184, "column": 27}}, {"id": 816, "type": "identifier", "text": "adj_lst_base_init", "parent": 815, "children": [], "start_point": {"row": 184, "column": 2}, "end_point": {"row": 184, "column": 19}}, {"id": 817, "type": "argument_list", "text": "(&a, &g)", "parent": 815, "children": [818, 820], "start_point": {"row": 184, "column": 19}, "end_point": {"row": 184, "column": 27}}, {"id": 818, "type": "pointer_expression", "text": "&a", "parent": 817, "children": [819], "start_point": {"row": 184, "column": 20}, "end_point": {"row": 184, "column": 22}}, {"id": 819, "type": "identifier", "text": "a", "parent": 818, "children": [], "start_point": {"row": 184, "column": 21}, "end_point": {"row": 184, "column": 22}}, {"id": 820, "type": "pointer_expression", "text": "&g", "parent": 817, "children": [821], "start_point": {"row": 184, "column": 24}, "end_point": {"row": 184, "column": 26}}, {"id": 821, "type": "identifier", "text": "g", "parent": 820, "children": [], "start_point": {"row": 184, "column": 25}, "end_point": {"row": 184, "column": 26}}, {"id": 822, "type": "call_expression", "text": "adj_lst_rand_dir(&a, write_vt, bern, b)", "parent": 614, "children": [823, 824], "start_point": {"row": 185, "column": 2}, "end_point": {"row": 185, "column": 41}}, {"id": 823, "type": "identifier", "text": "adj_lst_rand_dir", "parent": 822, "children": [], "start_point": {"row": 185, "column": 2}, "end_point": {"row": 185, "column": 18}}, {"id": 824, "type": "argument_list", "text": "(&a, write_vt, bern, b)", "parent": 822, "children": [825, 827, 828, 829], "start_point": {"row": 185, "column": 18}, "end_point": {"row": 185, "column": 41}}, {"id": 825, "type": "pointer_expression", "text": "&a", "parent": 824, "children": [826], "start_point": {"row": 185, "column": 19}, "end_point": {"row": 185, "column": 21}}, {"id": 826, "type": "identifier", "text": "a", "parent": 825, "children": [], "start_point": {"row": 185, "column": 20}, "end_point": {"row": 185, "column": 21}}, {"id": 827, "type": "identifier", "text": "write_vt", "parent": 824, "children": [], "start_point": {"row": 185, "column": 23}, "end_point": {"row": 185, "column": 31}}, {"id": 828, "type": "identifier", "text": "bern", "parent": 824, "children": [], "start_point": {"row": 185, "column": 33}, "end_point": {"row": 185, "column": 37}}, {"id": 829, "type": "identifier", "text": "b", "parent": 824, "children": [], "start_point": {"row": 185, "column": 39}, "end_point": {"row": 185, "column": 40}}, {"id": 830, "type": "for_statement", "text": "for (i = 0; i < C_ITER; i++){\n start[i] = RANDOM() % num_vts;\n }", "parent": 614, "children": [831, 835, 839], "start_point": {"row": 186, "column": 2}, "end_point": {"row": 188, "column": 3}}, {"id": 831, "type": "assignment_expression", "text": "i = 0", "parent": 830, "children": [832, 833, 834], "start_point": {"row": 186, "column": 7}, "end_point": {"row": 186, "column": 12}}, {"id": 832, "type": "identifier", "text": "i", "parent": 831, "children": [], "start_point": {"row": 186, "column": 7}, "end_point": {"row": 186, "column": 8}}, {"id": 833, "type": "=", "text": "=", "parent": 831, "children": [], "start_point": {"row": 186, "column": 9}, "end_point": {"row": 186, "column": 10}}, {"id": 834, "type": "number_literal", "text": "0", "parent": 831, "children": [], "start_point": {"row": 186, "column": 11}, "end_point": {"row": 186, "column": 12}}, {"id": 835, "type": "binary_expression", "text": "i < C_ITER", "parent": 830, "children": [836, 837, 838], "start_point": {"row": 186, "column": 14}, "end_point": {"row": 186, "column": 24}}, {"id": 836, "type": "identifier", "text": "i", "parent": 835, "children": [], "start_point": {"row": 186, "column": 14}, "end_point": {"row": 186, "column": 15}}, {"id": 837, "type": "<", "text": "<", "parent": 835, "children": [], "start_point": {"row": 186, "column": 16}, "end_point": {"row": 186, "column": 17}}, {"id": 838, "type": "identifier", "text": "C_ITER", "parent": 835, "children": [], "start_point": {"row": 186, "column": 18}, "end_point": {"row": 186, "column": 24}}, {"id": 839, "type": "update_expression", "text": "i++", "parent": 830, "children": [840, 841], "start_point": {"row": 186, "column": 26}, "end_point": {"row": 186, "column": 29}}, {"id": 840, "type": "identifier", "text": "i", "parent": 839, "children": [], "start_point": {"row": 186, "column": 26}, "end_point": {"row": 186, "column": 27}}, {"id": 841, "type": "++", "text": "++", "parent": 839, "children": [], "start_point": {"row": 186, "column": 27}, "end_point": {"row": 186, "column": 29}}, {"id": 842, "type": "assignment_expression", "text": "start[i] = RANDOM() % num_vts", "parent": 830, "children": [843, 846, 847], "start_point": {"row": 187, "column": 4}, "end_point": {"row": 187, "column": 33}}, {"id": 843, "type": "subscript_expression", "text": "start[i]", "parent": 842, "children": [844, 845], "start_point": {"row": 187, "column": 4}, "end_point": {"row": 187, "column": 12}}, {"id": 844, "type": "identifier", "text": "start", "parent": 843, "children": [], "start_point": {"row": 187, "column": 4}, "end_point": {"row": 187, "column": 9}}, {"id": 845, "type": "identifier", "text": "i", "parent": 843, "children": [], "start_point": {"row": 187, "column": 10}, "end_point": {"row": 187, "column": 11}}, {"id": 846, "type": "=", "text": "=", "parent": 842, "children": [], "start_point": {"row": 187, "column": 13}, "end_point": {"row": 187, "column": 14}}, {"id": 847, "type": "binary_expression", "text": "RANDOM() % num_vts", "parent": 842, "children": [848, 851, 852], "start_point": {"row": 187, "column": 15}, "end_point": {"row": 187, "column": 33}}, {"id": 848, "type": "call_expression", "text": "RANDOM()", "parent": 847, "children": [849, 850], "start_point": {"row": 187, "column": 15}, "end_point": {"row": 187, "column": 23}}, {"id": 849, "type": "identifier", "text": "RANDOM", "parent": 848, "children": [], "start_point": {"row": 187, "column": 15}, "end_point": {"row": 187, "column": 21}}, {"id": 850, "type": "argument_list", "text": "()", "parent": 848, "children": [], "start_point": {"row": 187, "column": 21}, "end_point": {"row": 187, "column": 23}}, {"id": 851, "type": "%", "text": "%", "parent": 847, "children": [], "start_point": {"row": 187, "column": 24}, "end_point": {"row": 187, "column": 25}}, {"id": 852, "type": "identifier", "text": "num_vts", "parent": 847, "children": [], "start_point": {"row": 187, "column": 26}, "end_point": {"row": 187, "column": 33}}, {"id": 853, "type": "assignment_expression", "text": "t = clock()", "parent": 614, "children": [854, 855, 856], "start_point": {"row": 189, "column": 2}, "end_point": {"row": 189, "column": 13}}, {"id": 854, "type": "identifier", "text": "t", "parent": 853, "children": [], "start_point": {"row": 189, "column": 2}, "end_point": {"row": 189, "column": 3}}, {"id": 855, "type": "=", "text": "=", "parent": 853, "children": [], "start_point": {"row": 189, "column": 4}, "end_point": {"row": 189, "column": 5}}, {"id": 856, "type": "call_expression", "text": "clock()", "parent": 853, "children": [857, 858], "start_point": {"row": 189, "column": 6}, "end_point": {"row": 189, "column": 13}}, {"id": 857, "type": "identifier", "text": "clock", "parent": 856, "children": [], "start_point": {"row": 189, "column": 6}, "end_point": {"row": 189, "column": 11}}, {"id": 858, "type": "argument_list", "text": "()", "parent": 856, "children": [], "start_point": {"row": 189, "column": 11}, "end_point": {"row": 189, "column": 13}}, {"id": 859, "type": "for_statement", "text": "for (i = 0; i < C_ITER; i++){\n bfs(&a, start[i], dist, prev, read_vt, write_vt, at_vt, cmp_vt, incr_vt);\n }", "parent": 614, "children": [860, 864, 868], "start_point": {"row": 190, "column": 2}, "end_point": {"row": 192, "column": 3}}, {"id": 860, "type": "assignment_expression", "text": "i = 0", "parent": 859, "children": [861, 862, 863], "start_point": {"row": 190, "column": 7}, "end_point": {"row": 190, "column": 12}}, {"id": 861, "type": "identifier", "text": "i", "parent": 860, "children": [], "start_point": {"row": 190, "column": 7}, "end_point": {"row": 190, "column": 8}}, {"id": 862, "type": "=", "text": "=", "parent": 860, "children": [], "start_point": {"row": 190, "column": 9}, "end_point": {"row": 190, "column": 10}}, {"id": 863, "type": "number_literal", "text": "0", "parent": 860, "children": [], "start_point": {"row": 190, "column": 11}, "end_point": {"row": 190, "column": 12}}, {"id": 864, "type": "binary_expression", "text": "i < C_ITER", "parent": 859, "children": [865, 866, 867], "start_point": {"row": 190, "column": 14}, "end_point": {"row": 190, "column": 24}}, {"id": 865, "type": "identifier", "text": "i", "parent": 864, "children": [], "start_point": {"row": 190, "column": 14}, "end_point": {"row": 190, "column": 15}}, {"id": 866, "type": "<", "text": "<", "parent": 864, "children": [], "start_point": {"row": 190, "column": 16}, "end_point": {"row": 190, "column": 17}}, {"id": 867, "type": "identifier", "text": "C_ITER", "parent": 864, "children": [], "start_point": {"row": 190, "column": 18}, "end_point": {"row": 190, "column": 24}}, {"id": 868, "type": "update_expression", "text": "i++", "parent": 859, "children": [869, 870], "start_point": {"row": 190, "column": 26}, "end_point": {"row": 190, "column": 29}}, {"id": 869, "type": "identifier", "text": "i", "parent": 868, "children": [], "start_point": {"row": 190, "column": 26}, "end_point": {"row": 190, "column": 27}}, {"id": 870, "type": "++", "text": "++", "parent": 868, "children": [], "start_point": {"row": 190, "column": 27}, "end_point": {"row": 190, "column": 29}}, {"id": 871, "type": "call_expression", "text": "bfs(&a, start[i], dist, prev, read_vt, write_vt, at_vt, cmp_vt, incr_vt)", "parent": 859, "children": [872, 873], "start_point": {"row": 191, "column": 4}, "end_point": {"row": 191, "column": 76}}, {"id": 872, "type": "identifier", "text": "bfs", "parent": 871, "children": [], "start_point": {"row": 191, "column": 4}, "end_point": {"row": 191, "column": 7}}, {"id": 873, "type": "argument_list", "text": "(&a, start[i], dist, prev, read_vt, write_vt, at_vt, cmp_vt, incr_vt)", "parent": 871, "children": [874, 876, 879, 880, 881, 882, 883, 884, 885], "start_point": {"row": 191, "column": 7}, "end_point": {"row": 191, "column": 76}}, {"id": 874, "type": "pointer_expression", "text": "&a", "parent": 873, "children": [875], "start_point": {"row": 191, "column": 8}, "end_point": {"row": 191, "column": 10}}, {"id": 875, "type": "identifier", "text": "a", "parent": 874, "children": [], "start_point": {"row": 191, "column": 9}, "end_point": {"row": 191, "column": 10}}, {"id": 876, "type": "subscript_expression", "text": "start[i]", "parent": 873, "children": [877, 878], "start_point": {"row": 191, "column": 12}, "end_point": {"row": 191, "column": 20}}, {"id": 877, "type": "identifier", "text": "start", "parent": 876, "children": [], "start_point": {"row": 191, "column": 12}, "end_point": {"row": 191, "column": 17}}, {"id": 878, "type": "identifier", "text": "i", "parent": 876, "children": [], "start_point": {"row": 191, "column": 18}, "end_point": {"row": 191, "column": 19}}, {"id": 879, "type": "identifier", "text": "dist", "parent": 873, "children": [], "start_point": {"row": 191, "column": 22}, "end_point": {"row": 191, "column": 26}}, {"id": 880, "type": "identifier", "text": "prev", "parent": 873, "children": [], "start_point": {"row": 191, "column": 28}, "end_point": {"row": 191, "column": 32}}, {"id": 881, "type": "identifier", "text": "read_vt", "parent": 873, "children": [], "start_point": {"row": 191, "column": 34}, "end_point": {"row": 191, "column": 41}}, {"id": 882, "type": "identifier", "text": "write_vt", "parent": 873, "children": [], "start_point": {"row": 191, "column": 43}, "end_point": {"row": 191, "column": 51}}, {"id": 883, "type": "identifier", "text": "at_vt", "parent": 873, "children": [], "start_point": {"row": 191, "column": 53}, "end_point": {"row": 191, "column": 58}}, {"id": 884, "type": "identifier", "text": "cmp_vt", "parent": 873, "children": [], "start_point": {"row": 191, "column": 60}, "end_point": {"row": 191, "column": 66}}, {"id": 885, "type": "identifier", "text": "incr_vt", "parent": 873, "children": [], "start_point": {"row": 191, "column": 68}, "end_point": {"row": 191, "column": 75}}, {"id": 886, "type": "assignment_expression", "text": "t = clock() - t", "parent": 614, "children": [887, 888, 889], "start_point": {"row": 193, "column": 2}, "end_point": {"row": 193, "column": 17}}, {"id": 887, "type": "identifier", "text": "t", "parent": 886, "children": [], "start_point": {"row": 193, "column": 2}, "end_point": {"row": 193, "column": 3}}, {"id": 888, "type": "=", "text": "=", "parent": 886, "children": [], "start_point": {"row": 193, "column": 4}, "end_point": {"row": 193, "column": 5}}, {"id": 889, "type": "binary_expression", "text": "clock() - t", "parent": 886, "children": [890, 893, 894], "start_point": {"row": 193, "column": 6}, "end_point": {"row": 193, "column": 17}}, {"id": 890, "type": "call_expression", "text": "clock()", "parent": 889, "children": [891, 892], "start_point": {"row": 193, "column": 6}, "end_point": {"row": 193, "column": 13}}, {"id": 891, "type": "identifier", "text": "clock", "parent": 890, "children": [], "start_point": {"row": 193, "column": 6}, "end_point": {"row": 193, "column": 11}}, {"id": 892, "type": "argument_list", "text": "()", "parent": 890, "children": [], "start_point": {"row": 193, "column": 11}, "end_point": {"row": 193, "column": 13}}, {"id": 893, "type": "-", "text": "-", "parent": 889, "children": [], "start_point": {"row": 193, "column": 14}, "end_point": {"row": 193, "column": 15}}, {"id": 894, "type": "identifier", "text": "t", "parent": 889, "children": [], "start_point": {"row": 193, "column": 16}, "end_point": {"row": 193, "column": 17}}, {"id": 895, "type": "call_expression", "text": "printf(\"\\t\\t\\t%s ave runtime: %.6f seconds\\n\",\n\t type_string, (double)t / C_ITER / CLOCKS_PER_SEC)", "parent": 614, "children": [896, 897], "start_point": {"row": 194, "column": 2}, "end_point": {"row": 195, "column": 51}}, {"id": 896, "type": "identifier", "text": "printf", "parent": 895, "children": [], "start_point": {"row": 194, "column": 2}, "end_point": {"row": 194, "column": 8}}, {"id": 897, "type": "argument_list", "text": "(\"\\t\\t\\t%s ave runtime: %.6f seconds\\n\",\n\t type_string, (double)t / C_ITER / CLOCKS_PER_SEC)", "parent": 895, "children": [898, 903, 904], "start_point": {"row": 194, "column": 8}, "end_point": {"row": 195, "column": 51}}, {"id": 898, "type": "string_literal", "text": "\"\\t\\t\\t%s ave runtime: %.6f seconds\\n\"", "parent": 897, "children": [899, 900, 901, 902], "start_point": {"row": 194, "column": 9}, "end_point": {"row": 194, "column": 51}}, {"id": 899, "type": "escape_sequence", "text": "\\t", "parent": 898, "children": [], "start_point": {"row": 194, "column": 10}, "end_point": {"row": 194, "column": 12}}, {"id": 900, "type": "escape_sequence", "text": "\\t", "parent": 898, "children": [], "start_point": {"row": 194, "column": 12}, "end_point": {"row": 194, "column": 14}}, {"id": 901, "type": "escape_sequence", "text": "\\t", "parent": 898, "children": [], "start_point": {"row": 194, "column": 14}, "end_point": {"row": 194, "column": 16}}, {"id": 902, "type": "escape_sequence", "text": "\\n", "parent": 898, "children": [], "start_point": {"row": 194, "column": 48}, "end_point": {"row": 194, "column": 50}}, {"id": 903, "type": "identifier", "text": "type_string", "parent": 897, "children": [], "start_point": {"row": 195, "column": 2}, "end_point": {"row": 195, "column": 13}}, {"id": 904, "type": "binary_expression", "text": "(double)t / C_ITER / CLOCKS_PER_SEC", "parent": 897, "children": [905, 912, 913], "start_point": {"row": 195, "column": 15}, "end_point": {"row": 195, "column": 50}}, {"id": 905, "type": "binary_expression", "text": "(double)t / C_ITER", "parent": 904, "children": [906, 910, 911], "start_point": {"row": 195, "column": 15}, "end_point": {"row": 195, "column": 33}}, {"id": 906, "type": "cast_expression", "text": "(double)t", "parent": 905, "children": [907, 909], "start_point": {"row": 195, "column": 15}, "end_point": {"row": 195, "column": 24}}, {"id": 907, "type": "type_descriptor", "text": "double", "parent": 906, "children": [908], "start_point": {"row": 195, "column": 16}, "end_point": {"row": 195, "column": 22}}, {"id": 908, "type": "primitive_type", "text": "double", "parent": 907, "children": [], "start_point": {"row": 195, "column": 16}, "end_point": {"row": 195, "column": 22}}, {"id": 909, "type": "identifier", "text": "t", "parent": 906, "children": [], "start_point": {"row": 195, "column": 23}, "end_point": {"row": 195, "column": 24}}, {"id": 910, "type": "/", "text": "/", "parent": 905, "children": [], "start_point": {"row": 195, "column": 25}, "end_point": {"row": 195, "column": 26}}, {"id": 911, "type": "identifier", "text": "C_ITER", "parent": 905, "children": [], "start_point": {"row": 195, "column": 27}, "end_point": {"row": 195, "column": 33}}, {"id": 912, "type": "/", "text": "/", "parent": 904, "children": [], "start_point": {"row": 195, "column": 34}, "end_point": {"row": 195, "column": 35}}, {"id": 913, "type": "identifier", "text": "CLOCKS_PER_SEC", "parent": 904, "children": [], "start_point": {"row": 195, "column": 36}, "end_point": {"row": 195, "column": 50}}, {"id": 914, "type": "call_expression", "text": "adj_lst_free(&a)", "parent": 614, "children": [915, 916], "start_point": {"row": 196, "column": 2}, "end_point": {"row": 196, "column": 18}}, {"id": 915, "type": "identifier", "text": "adj_lst_free", "parent": 914, "children": [], "start_point": {"row": 196, "column": 2}, "end_point": {"row": 196, "column": 14}}, {"id": 916, "type": "argument_list", "text": "(&a)", "parent": 914, "children": [917], "start_point": {"row": 196, "column": 14}, "end_point": {"row": 196, "column": 18}}, {"id": 917, "type": "pointer_expression", "text": "&a", "parent": 916, "children": [918], "start_point": {"row": 196, "column": 15}, "end_point": {"row": 196, "column": 17}}, {"id": 918, "type": "identifier", "text": "a", "parent": 917, "children": [], "start_point": {"row": 196, "column": 16}, "end_point": {"row": 196, "column": 17}}, {"id": 919, "type": "call_expression", "text": "free(start)", "parent": 614, "children": [920, 921], "start_point": {"row": 197, "column": 2}, "end_point": {"row": 197, "column": 13}}, {"id": 920, "type": "identifier", "text": "free", "parent": 919, "children": [], "start_point": {"row": 197, "column": 2}, "end_point": {"row": 197, "column": 6}}, {"id": 921, "type": "argument_list", "text": "(start)", "parent": 919, "children": [922], "start_point": {"row": 197, "column": 6}, "end_point": {"row": 197, "column": 13}}, {"id": 922, "type": "identifier", "text": "start", "parent": 921, "children": [], "start_point": {"row": 197, "column": 7}, "end_point": {"row": 197, "column": 12}}, {"id": 923, "type": "call_expression", "text": "free(dist)", "parent": 614, "children": [924, 925], "start_point": {"row": 198, "column": 2}, "end_point": {"row": 198, "column": 12}}, {"id": 924, "type": "identifier", "text": "free", "parent": 923, "children": [], "start_point": {"row": 198, "column": 2}, "end_point": {"row": 198, "column": 6}}, {"id": 925, "type": "argument_list", "text": "(dist)", "parent": 923, "children": [926], "start_point": {"row": 198, "column": 6}, "end_point": {"row": 198, "column": 12}}, {"id": 926, "type": "identifier", "text": "dist", "parent": 925, "children": [], "start_point": {"row": 198, "column": 7}, "end_point": {"row": 198, "column": 11}}, {"id": 927, "type": "call_expression", "text": "free(prev)", "parent": 614, "children": [928, 929], "start_point": {"row": 199, "column": 2}, "end_point": {"row": 199, "column": 12}}, {"id": 928, "type": "identifier", "text": "free", "parent": 927, "children": [], "start_point": {"row": 199, "column": 2}, "end_point": {"row": 199, "column": 6}}, {"id": 929, "type": "argument_list", "text": "(prev)", "parent": 927, "children": [930], "start_point": {"row": 199, "column": 6}, "end_point": {"row": 199, "column": 12}}, {"id": 930, "type": "identifier", "text": "prev", "parent": 929, "children": [], "start_point": {"row": 199, "column": 7}, "end_point": {"row": 199, "column": 11}}, {"id": 931, "type": "assignment_expression", "text": "start = NULL", "parent": 614, "children": [932, 933, 934], "start_point": {"row": 200, "column": 2}, "end_point": {"row": 200, "column": 14}}, {"id": 932, "type": "identifier", "text": "start", "parent": 931, "children": [], "start_point": {"row": 200, "column": 2}, "end_point": {"row": 200, "column": 7}}, {"id": 933, "type": "=", "text": "=", "parent": 931, "children": [], "start_point": {"row": 200, "column": 8}, "end_point": {"row": 200, "column": 9}}, {"id": 934, "type": "null", "text": "NULL", "parent": 931, "children": [935], "start_point": {"row": 200, "column": 10}, "end_point": {"row": 200, "column": 14}}, {"id": 935, "type": "NULL", "text": "NULL", "parent": 934, "children": [], "start_point": {"row": 200, "column": 10}, "end_point": {"row": 200, "column": 14}}, {"id": 936, "type": "assignment_expression", "text": "dist = NULL", "parent": 614, "children": [937, 938, 939], "start_point": {"row": 201, "column": 2}, "end_point": {"row": 201, "column": 13}}, {"id": 937, "type": "identifier", "text": "dist", "parent": 936, "children": [], "start_point": {"row": 201, "column": 2}, "end_point": {"row": 201, "column": 6}}, {"id": 938, "type": "=", "text": "=", "parent": 936, "children": [], "start_point": {"row": 201, "column": 7}, "end_point": {"row": 201, "column": 8}}, {"id": 939, "type": "null", "text": "NULL", "parent": 936, "children": [940], "start_point": {"row": 201, "column": 9}, "end_point": {"row": 201, "column": 13}}, {"id": 940, "type": "NULL", "text": "NULL", "parent": 939, "children": [], "start_point": {"row": 201, "column": 9}, "end_point": {"row": 201, "column": 13}}, {"id": 941, "type": "assignment_expression", "text": "prev = NULL", "parent": 614, "children": [942, 943, 944], "start_point": {"row": 202, "column": 2}, "end_point": {"row": 202, "column": 13}}, {"id": 942, "type": "identifier", "text": "prev", "parent": 941, "children": [], "start_point": {"row": 202, "column": 2}, "end_point": {"row": 202, "column": 6}}, {"id": 943, "type": "=", "text": "=", "parent": 941, "children": [], "start_point": {"row": 202, "column": 7}, "end_point": {"row": 202, "column": 8}}, {"id": 944, "type": "null", "text": "NULL", "parent": 941, "children": [945], "start_point": {"row": 202, "column": 9}, "end_point": {"row": 202, "column": 13}}, {"id": 945, "type": "NULL", "text": "NULL", "parent": 944, "children": [], "start_point": {"row": 202, "column": 9}, "end_point": {"row": 202, "column": 13}}, {"id": 946, "type": "function_definition", "text": "void *ptr(const void *block, size_t i, size_t size){\n return (void *)((char *)block + i * size);\n}", "parent": null, "children": [947, 948], "start_point": {"row": 208, "column": 0}, "end_point": {"row": 210, "column": 1}}, {"id": 947, "type": "primitive_type", "text": "void", "parent": 946, "children": [], "start_point": {"row": 208, "column": 0}, "end_point": {"row": 208, "column": 4}}, {"id": 948, "type": "pointer_declarator", "text": "*ptr(const void *block, size_t i, size_t size)", "parent": 946, "children": [949, 950], "start_point": {"row": 208, "column": 5}, "end_point": {"row": 208, "column": 51}}, {"id": 949, "type": "*", "text": "*", "parent": 948, "children": [], "start_point": {"row": 208, "column": 5}, "end_point": {"row": 208, "column": 6}}, {"id": 950, "type": "function_declarator", "text": "ptr(const void *block, size_t i, size_t size)", "parent": 948, "children": [951, 952], "start_point": {"row": 208, "column": 6}, "end_point": {"row": 208, "column": 51}}, {"id": 951, "type": "identifier", "text": "ptr", "parent": 950, "children": [], "start_point": {"row": 208, "column": 6}, "end_point": {"row": 208, "column": 9}}, {"id": 952, "type": "parameter_list", "text": "(const void *block, size_t i, size_t size)", "parent": 950, "children": [953, 958, 961], "start_point": {"row": 208, "column": 9}, "end_point": {"row": 208, "column": 51}}, {"id": 953, "type": "parameter_declaration", "text": "const void *block", "parent": 952, "children": [954, 955], "start_point": {"row": 208, "column": 10}, "end_point": {"row": 208, "column": 27}}, {"id": 954, "type": "primitive_type", "text": "void", "parent": 953, "children": [], "start_point": {"row": 208, "column": 16}, "end_point": {"row": 208, "column": 20}}, {"id": 955, "type": "pointer_declarator", "text": "*block", "parent": 953, "children": [956, 957], "start_point": {"row": 208, "column": 21}, "end_point": {"row": 208, "column": 27}}, {"id": 956, "type": "*", "text": "*", "parent": 955, "children": [], "start_point": {"row": 208, "column": 21}, "end_point": {"row": 208, "column": 22}}, {"id": 957, "type": "identifier", "text": "block", "parent": 955, "children": [], "start_point": {"row": 208, "column": 22}, "end_point": {"row": 208, "column": 27}}, {"id": 958, "type": "parameter_declaration", "text": "size_t i", "parent": 952, "children": [959, 960], "start_point": {"row": 208, "column": 29}, "end_point": {"row": 208, "column": 37}}, {"id": 959, "type": "primitive_type", "text": "size_t", "parent": 958, "children": [], "start_point": {"row": 208, "column": 29}, "end_point": {"row": 208, "column": 35}}, {"id": 960, "type": "identifier", "text": "i", "parent": 958, "children": [], "start_point": {"row": 208, "column": 36}, "end_point": {"row": 208, "column": 37}}, {"id": 961, "type": "parameter_declaration", "text": "size_t size", "parent": 952, "children": [962, 963], "start_point": {"row": 208, "column": 39}, "end_point": {"row": 208, "column": 50}}, {"id": 962, "type": "primitive_type", "text": "size_t", "parent": 961, "children": [], "start_point": {"row": 208, "column": 39}, "end_point": {"row": 208, "column": 45}}, {"id": 963, "type": "identifier", "text": "size", "parent": 961, "children": [], "start_point": {"row": 208, "column": 46}, "end_point": {"row": 208, "column": 50}}, {"id": 964, "type": "return_statement", "text": "return (void *)((char *)block + i * size);", "parent": 946, "children": [965], "start_point": {"row": 209, "column": 2}, "end_point": {"row": 209, "column": 44}}, {"id": 965, "type": "cast_expression", "text": "(void *)((char *)block + i * size)", "parent": 964, "children": [966, 970], "start_point": {"row": 209, "column": 9}, "end_point": {"row": 209, "column": 43}}, {"id": 966, "type": "type_descriptor", "text": "void *", "parent": 965, "children": [967, 968], "start_point": {"row": 209, "column": 10}, "end_point": {"row": 209, "column": 16}}, {"id": 967, "type": "primitive_type", "text": "void", "parent": 966, "children": [], "start_point": {"row": 209, "column": 10}, "end_point": {"row": 209, "column": 14}}, {"id": 968, "type": "abstract_pointer_declarator", "text": "*", "parent": 966, "children": [969], "start_point": {"row": 209, "column": 15}, "end_point": {"row": 209, "column": 16}}, {"id": 969, "type": "*", "text": "*", "parent": 968, "children": [], "start_point": {"row": 209, "column": 15}, "end_point": {"row": 209, "column": 16}}, {"id": 970, "type": "parenthesized_expression", "text": "((char *)block + i * size)", "parent": 965, "children": [971], "start_point": {"row": 209, "column": 17}, "end_point": {"row": 209, "column": 43}}, {"id": 971, "type": "binary_expression", "text": "(char *)block + i * size", "parent": 970, "children": [972, 978, 979], "start_point": {"row": 209, "column": 18}, "end_point": {"row": 209, "column": 42}}, {"id": 972, "type": "cast_expression", "text": "(char *)block", "parent": 971, "children": [973, 977], "start_point": {"row": 209, "column": 18}, "end_point": {"row": 209, "column": 31}}, {"id": 973, "type": "type_descriptor", "text": "char *", "parent": 972, "children": [974, 975], "start_point": {"row": 209, "column": 19}, "end_point": {"row": 209, "column": 25}}, {"id": 974, "type": "primitive_type", "text": "char", "parent": 973, "children": [], "start_point": {"row": 209, "column": 19}, "end_point": {"row": 209, "column": 23}}, {"id": 975, "type": "abstract_pointer_declarator", "text": "*", "parent": 973, "children": [976], "start_point": {"row": 209, "column": 24}, "end_point": {"row": 209, "column": 25}}, {"id": 976, "type": "*", "text": "*", "parent": 975, "children": [], "start_point": {"row": 209, "column": 24}, "end_point": {"row": 209, "column": 25}}, {"id": 977, "type": "identifier", "text": "block", "parent": 972, "children": [], "start_point": {"row": 209, "column": 26}, "end_point": {"row": 209, "column": 31}}, {"id": 978, "type": "+", "text": "+", "parent": 971, "children": [], "start_point": {"row": 209, "column": 32}, "end_point": {"row": 209, "column": 33}}, {"id": 979, "type": "binary_expression", "text": "i * size", "parent": 971, "children": [980, 981, 982], "start_point": {"row": 209, "column": 34}, "end_point": {"row": 209, "column": 42}}, {"id": 980, "type": "identifier", "text": "i", "parent": 979, "children": [], "start_point": {"row": 209, "column": 34}, "end_point": {"row": 209, "column": 35}}, {"id": 981, "type": "*", "text": "*", "parent": 979, "children": [], "start_point": {"row": 209, "column": 36}, "end_point": {"row": 209, "column": 37}}, {"id": 982, "type": "identifier", "text": "size", "parent": 979, "children": [], "start_point": {"row": 209, "column": 38}, "end_point": {"row": 209, "column": 42}}, {"id": 983, "type": "function_definition", "text": "int main(int argc, char *argv[]){\n int i;\n size_t *args = NULL;\n RGENS_SEED();\n if (argc > C_ARGC_ULIMIT){\n printf(\"USAGE:\\n%s\", C_USAGE);\n exit(EXIT_FAILURE);\n }\n args = malloc_perror(C_ARGC_ULIMIT - 1, sizeof(size_t));\n memcpy(args, C_ARGS_DEF, (C_ARGC_ULIMIT - 1) * sizeof(size_t));\n for (i = 1; i < argc; i++){\n args[i - 1] = atoi(argv[i]);\n }\n if (args[0] > C_UINT_BIT - 1 ||\n args[1] > C_UINT_BIT - 1 ||\n args[1] < args[0]){\n printf(\"USAGE:\\n%s\", C_USAGE);\n exit(EXIT_FAILURE);\n }\n run_random_dir_graph_test(args[0], args[1]);\n free(args);\n args = NULL;\n return 0;\n}", "parent": null, "children": [984, 985], "start_point": {"row": 212, "column": 0}, "end_point": {"row": 235, "column": 1}}, {"id": 984, "type": "primitive_type", "text": "int", "parent": 983, "children": [], "start_point": {"row": 212, "column": 0}, "end_point": {"row": 212, "column": 3}}, {"id": 985, "type": "function_declarator", "text": "main(int argc, char *argv[])", "parent": 983, "children": [986, 987], "start_point": {"row": 212, "column": 4}, "end_point": {"row": 212, "column": 32}}, {"id": 986, "type": "identifier", "text": "main", "parent": 985, "children": [], "start_point": {"row": 212, "column": 4}, "end_point": {"row": 212, "column": 8}}, {"id": 987, "type": "parameter_list", "text": "(int argc, char *argv[])", "parent": 985, "children": [988, 991], "start_point": {"row": 212, "column": 8}, "end_point": {"row": 212, "column": 32}}, {"id": 988, "type": "parameter_declaration", "text": "int argc", "parent": 987, "children": [989, 990], "start_point": {"row": 212, "column": 9}, "end_point": {"row": 212, "column": 17}}, {"id": 989, "type": "primitive_type", "text": "int", "parent": 988, "children": [], "start_point": {"row": 212, "column": 9}, "end_point": {"row": 212, "column": 12}}, {"id": 990, "type": "identifier", "text": "argc", "parent": 988, "children": [], "start_point": {"row": 212, "column": 13}, "end_point": {"row": 212, "column": 17}}, {"id": 991, "type": "parameter_declaration", "text": "char *argv[]", "parent": 987, "children": [992, 993], "start_point": {"row": 212, "column": 19}, "end_point": {"row": 212, "column": 31}}, {"id": 992, "type": "primitive_type", "text": "char", "parent": 991, "children": [], "start_point": {"row": 212, "column": 19}, "end_point": {"row": 212, "column": 23}}, {"id": 993, "type": "pointer_declarator", "text": "*argv[]", "parent": 991, "children": [994, 995], "start_point": {"row": 212, "column": 24}, "end_point": {"row": 212, "column": 31}}, {"id": 994, "type": "*", "text": "*", "parent": 993, "children": [], "start_point": {"row": 212, "column": 24}, "end_point": {"row": 212, "column": 25}}, {"id": 995, "type": "array_declarator", "text": "argv[]", "parent": 993, "children": [996], "start_point": {"row": 212, "column": 25}, "end_point": {"row": 212, "column": 31}}, {"id": 996, "type": "identifier", "text": "argv", "parent": 995, "children": [], "start_point": {"row": 212, "column": 25}, "end_point": {"row": 212, "column": 29}}, {"id": 997, "type": "declaration", "text": "int i;", "parent": 983, "children": [998, 999], "start_point": {"row": 213, "column": 2}, "end_point": {"row": 213, "column": 8}}, {"id": 998, "type": "primitive_type", "text": "int", "parent": 997, "children": [], "start_point": {"row": 213, "column": 2}, "end_point": {"row": 213, "column": 5}}, {"id": 999, "type": "identifier", "text": "i", "parent": 997, "children": [], "start_point": {"row": 213, "column": 6}, "end_point": {"row": 213, "column": 7}}, {"id": 1000, "type": "declaration", "text": "size_t *args = NULL;", "parent": 983, "children": [1001, 1002], "start_point": {"row": 214, "column": 2}, "end_point": {"row": 214, "column": 22}}, {"id": 1001, "type": "primitive_type", "text": "size_t", "parent": 1000, "children": [], "start_point": {"row": 214, "column": 2}, "end_point": {"row": 214, "column": 8}}, {"id": 1002, "type": "init_declarator", "text": "*args = NULL", "parent": 1000, "children": [1003, 1006, 1007], "start_point": {"row": 214, "column": 9}, "end_point": {"row": 214, "column": 21}}, {"id": 1003, "type": "pointer_declarator", "text": "*args", "parent": 1002, "children": [1004, 1005], "start_point": {"row": 214, "column": 9}, "end_point": {"row": 214, "column": 14}}, {"id": 1004, "type": "*", "text": "*", "parent": 1003, "children": [], "start_point": {"row": 214, "column": 9}, "end_point": {"row": 214, "column": 10}}, {"id": 1005, "type": "identifier", "text": "args", "parent": 1003, "children": [], "start_point": {"row": 214, "column": 10}, "end_point": {"row": 214, "column": 14}}, {"id": 1006, "type": "=", "text": "=", "parent": 1002, "children": [], "start_point": {"row": 214, "column": 15}, "end_point": {"row": 214, "column": 16}}, {"id": 1007, "type": "null", "text": "NULL", "parent": 1002, "children": [1008], "start_point": {"row": 214, "column": 17}, "end_point": {"row": 214, "column": 21}}, {"id": 1008, "type": "NULL", "text": "NULL", "parent": 1007, "children": [], "start_point": {"row": 214, "column": 17}, "end_point": {"row": 214, "column": 21}}, {"id": 1009, "type": "call_expression", "text": "RGENS_SEED()", "parent": 983, "children": [1010, 1011], "start_point": {"row": 215, "column": 2}, "end_point": {"row": 215, "column": 14}}, {"id": 1010, "type": "identifier", "text": "RGENS_SEED", "parent": 1009, "children": [], "start_point": {"row": 215, "column": 2}, "end_point": {"row": 215, "column": 12}}, {"id": 1011, "type": "argument_list", "text": "()", "parent": 1009, "children": [], "start_point": {"row": 215, "column": 12}, "end_point": {"row": 215, "column": 14}}, {"id": 1012, "type": "if_statement", "text": "if (argc > C_ARGC_ULIMIT){\n printf(\"USAGE:\\n%s\", C_USAGE);\n exit(EXIT_FAILURE);\n }", "parent": 983, "children": [1013], "start_point": {"row": 216, "column": 2}, "end_point": {"row": 219, "column": 3}}, {"id": 1013, "type": "parenthesized_expression", "text": "(argc > C_ARGC_ULIMIT)", "parent": 1012, "children": [1014], "start_point": {"row": 216, "column": 5}, "end_point": {"row": 216, "column": 27}}, {"id": 1014, "type": "binary_expression", "text": "argc > C_ARGC_ULIMIT", "parent": 1013, "children": [1015, 1016, 1017], "start_point": {"row": 216, "column": 6}, "end_point": {"row": 216, "column": 26}}, {"id": 1015, "type": "identifier", "text": "argc", "parent": 1014, "children": [], "start_point": {"row": 216, "column": 6}, "end_point": {"row": 216, "column": 10}}, {"id": 1016, "type": ">", "text": ">", "parent": 1014, "children": [], "start_point": {"row": 216, "column": 11}, "end_point": {"row": 216, "column": 12}}, {"id": 1017, "type": "identifier", "text": "C_ARGC_ULIMIT", "parent": 1014, "children": [], "start_point": {"row": 216, "column": 13}, "end_point": {"row": 216, "column": 26}}, {"id": 1018, "type": "call_expression", "text": "printf(\"USAGE:\\n%s\", C_USAGE)", "parent": 1012, "children": [1019, 1020], "start_point": {"row": 217, "column": 4}, "end_point": {"row": 217, "column": 33}}, {"id": 1019, "type": "identifier", "text": "printf", "parent": 1018, "children": [], "start_point": {"row": 217, "column": 4}, "end_point": {"row": 217, "column": 10}}, {"id": 1020, "type": "argument_list", "text": "(\"USAGE:\\n%s\", C_USAGE)", "parent": 1018, "children": [1021, 1023], "start_point": {"row": 217, "column": 10}, "end_point": {"row": 217, "column": 33}}, {"id": 1021, "type": "string_literal", "text": "\"USAGE:\\n%s\"", "parent": 1020, "children": [1022], "start_point": {"row": 217, "column": 11}, "end_point": {"row": 217, "column": 23}}, {"id": 1022, "type": "escape_sequence", "text": "\\n", "parent": 1021, "children": [], "start_point": {"row": 217, "column": 18}, "end_point": {"row": 217, "column": 20}}, {"id": 1023, "type": "identifier", "text": "C_USAGE", "parent": 1020, "children": [], "start_point": {"row": 217, "column": 25}, "end_point": {"row": 217, "column": 32}}, {"id": 1024, "type": "call_expression", "text": "exit(EXIT_FAILURE)", "parent": 1012, "children": [1025, 1026], "start_point": {"row": 218, "column": 4}, "end_point": {"row": 218, "column": 22}}, {"id": 1025, "type": "identifier", "text": "exit", "parent": 1024, "children": [], "start_point": {"row": 218, "column": 4}, "end_point": {"row": 218, "column": 8}}, {"id": 1026, "type": "argument_list", "text": "(EXIT_FAILURE)", "parent": 1024, "children": [1027], "start_point": {"row": 218, "column": 8}, "end_point": {"row": 218, "column": 22}}, {"id": 1027, "type": "identifier", "text": "EXIT_FAILURE", "parent": 1026, "children": [], "start_point": {"row": 218, "column": 9}, "end_point": {"row": 218, "column": 21}}, {"id": 1028, "type": "assignment_expression", "text": "args = malloc_perror(C_ARGC_ULIMIT - 1, sizeof(size_t))", "parent": 983, "children": [1029, 1030, 1031], "start_point": {"row": 220, "column": 2}, "end_point": {"row": 220, "column": 57}}, {"id": 1029, "type": "identifier", "text": "args", "parent": 1028, "children": [], "start_point": {"row": 220, "column": 2}, "end_point": {"row": 220, "column": 6}}, {"id": 1030, "type": "=", "text": "=", "parent": 1028, "children": [], "start_point": {"row": 220, "column": 7}, "end_point": {"row": 220, "column": 8}}, {"id": 1031, "type": "call_expression", "text": "malloc_perror(C_ARGC_ULIMIT - 1, sizeof(size_t))", "parent": 1028, "children": [1032, 1033], "start_point": {"row": 220, "column": 9}, "end_point": {"row": 220, "column": 57}}, {"id": 1032, "type": "identifier", "text": "malloc_perror", "parent": 1031, "children": [], "start_point": {"row": 220, "column": 9}, "end_point": {"row": 220, "column": 22}}, {"id": 1033, "type": "argument_list", "text": "(C_ARGC_ULIMIT - 1, sizeof(size_t))", "parent": 1031, "children": [1034, 1038], "start_point": {"row": 220, "column": 22}, "end_point": {"row": 220, "column": 57}}, {"id": 1034, "type": "binary_expression", "text": "C_ARGC_ULIMIT - 1", "parent": 1033, "children": [1035, 1036, 1037], "start_point": {"row": 220, "column": 23}, "end_point": {"row": 220, "column": 40}}, {"id": 1035, "type": "identifier", "text": "C_ARGC_ULIMIT", "parent": 1034, "children": [], "start_point": {"row": 220, "column": 23}, "end_point": {"row": 220, "column": 36}}, {"id": 1036, "type": "-", "text": "-", "parent": 1034, "children": [], "start_point": {"row": 220, "column": 37}, "end_point": {"row": 220, "column": 38}}, {"id": 1037, "type": "number_literal", "text": "1", "parent": 1034, "children": [], "start_point": {"row": 220, "column": 39}, "end_point": {"row": 220, "column": 40}}, {"id": 1038, "type": "sizeof_expression", "text": "sizeof(size_t)", "parent": 1033, "children": [1039], "start_point": {"row": 220, "column": 42}, "end_point": {"row": 220, "column": 56}}, {"id": 1039, "type": "type_descriptor", "text": "size_t", "parent": 1038, "children": [1040], "start_point": {"row": 220, "column": 49}, "end_point": {"row": 220, "column": 55}}, {"id": 1040, "type": "primitive_type", "text": "size_t", "parent": 1039, "children": [], "start_point": {"row": 220, "column": 49}, "end_point": {"row": 220, "column": 55}}, {"id": 1041, "type": "call_expression", "text": "memcpy(args, C_ARGS_DEF, (C_ARGC_ULIMIT - 1) * sizeof(size_t))", "parent": 983, "children": [1042, 1043], "start_point": {"row": 221, "column": 2}, "end_point": {"row": 221, "column": 64}}, {"id": 1042, "type": "identifier", "text": "memcpy", "parent": 1041, "children": [], "start_point": {"row": 221, "column": 2}, "end_point": {"row": 221, "column": 8}}, {"id": 1043, "type": "argument_list", "text": "(args, C_ARGS_DEF, (C_ARGC_ULIMIT - 1) * sizeof(size_t))", "parent": 1041, "children": [1044, 1045, 1046], "start_point": {"row": 221, "column": 8}, "end_point": {"row": 221, "column": 64}}, {"id": 1044, "type": "identifier", "text": "args", "parent": 1043, "children": [], "start_point": {"row": 221, "column": 9}, "end_point": {"row": 221, "column": 13}}, {"id": 1045, "type": "identifier", "text": "C_ARGS_DEF", "parent": 1043, "children": [], "start_point": {"row": 221, "column": 15}, "end_point": {"row": 221, "column": 25}}, {"id": 1046, "type": "binary_expression", "text": "(C_ARGC_ULIMIT - 1) * sizeof(size_t)", "parent": 1043, "children": [1047, 1052, 1053], "start_point": {"row": 221, "column": 27}, "end_point": {"row": 221, "column": 63}}, {"id": 1047, "type": "parenthesized_expression", "text": "(C_ARGC_ULIMIT - 1)", "parent": 1046, "children": [1048], "start_point": {"row": 221, "column": 27}, "end_point": {"row": 221, "column": 46}}, {"id": 1048, "type": "binary_expression", "text": "C_ARGC_ULIMIT - 1", "parent": 1047, "children": [1049, 1050, 1051], "start_point": {"row": 221, "column": 28}, "end_point": {"row": 221, "column": 45}}, {"id": 1049, "type": "identifier", "text": "C_ARGC_ULIMIT", "parent": 1048, "children": [], "start_point": {"row": 221, "column": 28}, "end_point": {"row": 221, "column": 41}}, {"id": 1050, "type": "-", "text": "-", "parent": 1048, "children": [], "start_point": {"row": 221, "column": 42}, "end_point": {"row": 221, "column": 43}}, {"id": 1051, "type": "number_literal", "text": "1", "parent": 1048, "children": [], "start_point": {"row": 221, "column": 44}, "end_point": {"row": 221, "column": 45}}, {"id": 1052, "type": "*", "text": "*", "parent": 1046, "children": [], "start_point": {"row": 221, "column": 47}, "end_point": {"row": 221, "column": 48}}, {"id": 1053, "type": "sizeof_expression", "text": "sizeof(size_t)", "parent": 1046, "children": [1054], "start_point": {"row": 221, "column": 49}, "end_point": {"row": 221, "column": 63}}, {"id": 1054, "type": "type_descriptor", "text": "size_t", "parent": 1053, "children": [1055], "start_point": {"row": 221, "column": 56}, "end_point": {"row": 221, "column": 62}}, {"id": 1055, "type": "primitive_type", "text": "size_t", "parent": 1054, "children": [], "start_point": {"row": 221, "column": 56}, "end_point": {"row": 221, "column": 62}}, {"id": 1056, "type": "for_statement", "text": "for (i = 1; i < argc; i++){\n args[i - 1] = atoi(argv[i]);\n }", "parent": 983, "children": [1057, 1061, 1065], "start_point": {"row": 222, "column": 2}, "end_point": {"row": 224, "column": 3}}, {"id": 1057, "type": "assignment_expression", "text": "i = 1", "parent": 1056, "children": [1058, 1059, 1060], "start_point": {"row": 222, "column": 7}, "end_point": {"row": 222, "column": 12}}, {"id": 1058, "type": "identifier", "text": "i", "parent": 1057, "children": [], "start_point": {"row": 222, "column": 7}, "end_point": {"row": 222, "column": 8}}, {"id": 1059, "type": "=", "text": "=", "parent": 1057, "children": [], "start_point": {"row": 222, "column": 9}, "end_point": {"row": 222, "column": 10}}, {"id": 1060, "type": "number_literal", "text": "1", "parent": 1057, "children": [], "start_point": {"row": 222, "column": 11}, "end_point": {"row": 222, "column": 12}}, {"id": 1061, "type": "binary_expression", "text": "i < argc", "parent": 1056, "children": [1062, 1063, 1064], "start_point": {"row": 222, "column": 14}, "end_point": {"row": 222, "column": 22}}, {"id": 1062, "type": "identifier", "text": "i", "parent": 1061, "children": [], "start_point": {"row": 222, "column": 14}, "end_point": {"row": 222, "column": 15}}, {"id": 1063, "type": "<", "text": "<", "parent": 1061, "children": [], "start_point": {"row": 222, "column": 16}, "end_point": {"row": 222, "column": 17}}, {"id": 1064, "type": "identifier", "text": "argc", "parent": 1061, "children": [], "start_point": {"row": 222, "column": 18}, "end_point": {"row": 222, "column": 22}}, {"id": 1065, "type": "update_expression", "text": "i++", "parent": 1056, "children": [1066, 1067], "start_point": {"row": 222, "column": 24}, "end_point": {"row": 222, "column": 27}}, {"id": 1066, "type": "identifier", "text": "i", "parent": 1065, "children": [], "start_point": {"row": 222, "column": 24}, "end_point": {"row": 222, "column": 25}}, {"id": 1067, "type": "++", "text": "++", "parent": 1065, "children": [], "start_point": {"row": 222, "column": 25}, "end_point": {"row": 222, "column": 27}}, {"id": 1068, "type": "assignment_expression", "text": "args[i - 1] = atoi(argv[i])", "parent": 1056, "children": [1069, 1075, 1076], "start_point": {"row": 223, "column": 4}, "end_point": {"row": 223, "column": 31}}, {"id": 1069, "type": "subscript_expression", "text": "args[i - 1]", "parent": 1068, "children": [1070, 1071], "start_point": {"row": 223, "column": 4}, "end_point": {"row": 223, "column": 15}}, {"id": 1070, "type": "identifier", "text": "args", "parent": 1069, "children": [], "start_point": {"row": 223, "column": 4}, "end_point": {"row": 223, "column": 8}}, {"id": 1071, "type": "binary_expression", "text": "i - 1", "parent": 1069, "children": [1072, 1073, 1074], "start_point": {"row": 223, "column": 9}, "end_point": {"row": 223, "column": 14}}, {"id": 1072, "type": "identifier", "text": "i", "parent": 1071, "children": [], "start_point": {"row": 223, "column": 9}, "end_point": {"row": 223, "column": 10}}, {"id": 1073, "type": "-", "text": "-", "parent": 1071, "children": [], "start_point": {"row": 223, "column": 11}, "end_point": {"row": 223, "column": 12}}, {"id": 1074, "type": "number_literal", "text": "1", "parent": 1071, "children": [], "start_point": {"row": 223, "column": 13}, "end_point": {"row": 223, "column": 14}}, {"id": 1075, "type": "=", "text": "=", "parent": 1068, "children": [], "start_point": {"row": 223, "column": 16}, "end_point": {"row": 223, "column": 17}}, {"id": 1076, "type": "call_expression", "text": "atoi(argv[i])", "parent": 1068, "children": [1077, 1078], "start_point": {"row": 223, "column": 18}, "end_point": {"row": 223, "column": 31}}, {"id": 1077, "type": "identifier", "text": "atoi", "parent": 1076, "children": [], "start_point": {"row": 223, "column": 18}, "end_point": {"row": 223, "column": 22}}, {"id": 1078, "type": "argument_list", "text": "(argv[i])", "parent": 1076, "children": [1079], "start_point": {"row": 223, "column": 22}, "end_point": {"row": 223, "column": 31}}, {"id": 1079, "type": "subscript_expression", "text": "argv[i]", "parent": 1078, "children": [1080, 1081], "start_point": {"row": 223, "column": 23}, "end_point": {"row": 223, "column": 30}}, {"id": 1080, "type": "identifier", "text": "argv", "parent": 1079, "children": [], "start_point": {"row": 223, "column": 23}, "end_point": {"row": 223, "column": 27}}, {"id": 1081, "type": "identifier", "text": "i", "parent": 1079, "children": [], "start_point": {"row": 223, "column": 28}, "end_point": {"row": 223, "column": 29}}, {"id": 1082, "type": "if_statement", "text": "if (args[0] > C_UINT_BIT - 1 ||\n args[1] > C_UINT_BIT - 1 ||\n args[1] < args[0]){\n printf(\"USAGE:\\n%s\", C_USAGE);\n exit(EXIT_FAILURE);\n }", "parent": 983, "children": [1083], "start_point": {"row": 225, "column": 2}, "end_point": {"row": 230, "column": 3}}, {"id": 1083, "type": "parenthesized_expression", "text": "(args[0] > C_UINT_BIT - 1 ||\n args[1] > C_UINT_BIT - 1 ||\n args[1] < args[0])", "parent": 1082, "children": [1084], "start_point": {"row": 225, "column": 5}, "end_point": {"row": 227, "column": 24}}, {"id": 1084, "type": "binary_expression", "text": "args[0] > C_UINT_BIT - 1 ||\n args[1] > C_UINT_BIT - 1 ||\n args[1] < args[0]", "parent": 1083, "children": [1085, 1105, 1106], "start_point": {"row": 225, "column": 6}, "end_point": {"row": 227, "column": 23}}, {"id": 1085, "type": "binary_expression", "text": "args[0] > C_UINT_BIT - 1 ||\n args[1] > C_UINT_BIT - 1", "parent": 1084, "children": [1086, 1095, 1096], "start_point": {"row": 225, "column": 6}, "end_point": {"row": 226, "column": 30}}, {"id": 1086, "type": "binary_expression", "text": "args[0] > C_UINT_BIT - 1", "parent": 1085, "children": [1087, 1090, 1091], "start_point": {"row": 225, "column": 6}, "end_point": {"row": 225, "column": 30}}, {"id": 1087, "type": "subscript_expression", "text": "args[0]", "parent": 1086, "children": [1088, 1089], "start_point": {"row": 225, "column": 6}, "end_point": {"row": 225, "column": 13}}, {"id": 1088, "type": "identifier", "text": "args", "parent": 1087, "children": [], "start_point": {"row": 225, "column": 6}, "end_point": {"row": 225, "column": 10}}, {"id": 1089, "type": "number_literal", "text": "0", "parent": 1087, "children": [], "start_point": {"row": 225, "column": 11}, "end_point": {"row": 225, "column": 12}}, {"id": 1090, "type": ">", "text": ">", "parent": 1086, "children": [], "start_point": {"row": 225, "column": 14}, "end_point": {"row": 225, "column": 15}}, {"id": 1091, "type": "binary_expression", "text": "C_UINT_BIT - 1", "parent": 1086, "children": [1092, 1093, 1094], "start_point": {"row": 225, "column": 16}, "end_point": {"row": 225, "column": 30}}, {"id": 1092, "type": "identifier", "text": "C_UINT_BIT", "parent": 1091, "children": [], "start_point": {"row": 225, "column": 16}, "end_point": {"row": 225, "column": 26}}, {"id": 1093, "type": "-", "text": "-", "parent": 1091, "children": [], "start_point": {"row": 225, "column": 27}, "end_point": {"row": 225, "column": 28}}, {"id": 1094, "type": "number_literal", "text": "1", "parent": 1091, "children": [], "start_point": {"row": 225, "column": 29}, "end_point": {"row": 225, "column": 30}}, {"id": 1095, "type": "||", "text": "||", "parent": 1085, "children": [], "start_point": {"row": 225, "column": 31}, "end_point": {"row": 225, "column": 33}}, {"id": 1096, "type": "binary_expression", "text": "args[1] > C_UINT_BIT - 1", "parent": 1085, "children": [1097, 1100, 1101], "start_point": {"row": 226, "column": 6}, "end_point": {"row": 226, "column": 30}}, {"id": 1097, "type": "subscript_expression", "text": "args[1]", "parent": 1096, "children": [1098, 1099], "start_point": {"row": 226, "column": 6}, "end_point": {"row": 226, "column": 13}}, {"id": 1098, "type": "identifier", "text": "args", "parent": 1097, "children": [], "start_point": {"row": 226, "column": 6}, "end_point": {"row": 226, "column": 10}}, {"id": 1099, "type": "number_literal", "text": "1", "parent": 1097, "children": [], "start_point": {"row": 226, "column": 11}, "end_point": {"row": 226, "column": 12}}, {"id": 1100, "type": ">", "text": ">", "parent": 1096, "children": [], "start_point": {"row": 226, "column": 14}, "end_point": {"row": 226, "column": 15}}, {"id": 1101, "type": "binary_expression", "text": "C_UINT_BIT - 1", "parent": 1096, "children": [1102, 1103, 1104], "start_point": {"row": 226, "column": 16}, "end_point": {"row": 226, "column": 30}}, {"id": 1102, "type": "identifier", "text": "C_UINT_BIT", "parent": 1101, "children": [], "start_point": {"row": 226, "column": 16}, "end_point": {"row": 226, "column": 26}}, {"id": 1103, "type": "-", "text": "-", "parent": 1101, "children": [], "start_point": {"row": 226, "column": 27}, "end_point": {"row": 226, "column": 28}}, {"id": 1104, "type": "number_literal", "text": "1", "parent": 1101, "children": [], "start_point": {"row": 226, "column": 29}, "end_point": {"row": 226, "column": 30}}, {"id": 1105, "type": "||", "text": "||", "parent": 1084, "children": [], "start_point": {"row": 226, "column": 31}, "end_point": {"row": 226, "column": 33}}, {"id": 1106, "type": "binary_expression", "text": "args[1] < args[0]", "parent": 1084, "children": [1107, 1110, 1111], "start_point": {"row": 227, "column": 6}, "end_point": {"row": 227, "column": 23}}, {"id": 1107, "type": "subscript_expression", "text": "args[1]", "parent": 1106, "children": [1108, 1109], "start_point": {"row": 227, "column": 6}, "end_point": {"row": 227, "column": 13}}, {"id": 1108, "type": "identifier", "text": "args", "parent": 1107, "children": [], "start_point": {"row": 227, "column": 6}, "end_point": {"row": 227, "column": 10}}, {"id": 1109, "type": "number_literal", "text": "1", "parent": 1107, "children": [], "start_point": {"row": 227, "column": 11}, "end_point": {"row": 227, "column": 12}}, {"id": 1110, "type": "<", "text": "<", "parent": 1106, "children": [], "start_point": {"row": 227, "column": 14}, "end_point": {"row": 227, "column": 15}}, {"id": 1111, "type": "subscript_expression", "text": "args[0]", "parent": 1106, "children": [1112, 1113], "start_point": {"row": 227, "column": 16}, "end_point": {"row": 227, "column": 23}}, {"id": 1112, "type": "identifier", "text": "args", "parent": 1111, "children": [], "start_point": {"row": 227, "column": 16}, "end_point": {"row": 227, "column": 20}}, {"id": 1113, "type": "number_literal", "text": "0", "parent": 1111, "children": [], "start_point": {"row": 227, "column": 21}, "end_point": {"row": 227, "column": 22}}, {"id": 1114, "type": "call_expression", "text": "printf(\"USAGE:\\n%s\", C_USAGE)", "parent": 1082, "children": [1115, 1116], "start_point": {"row": 228, "column": 4}, "end_point": {"row": 228, "column": 33}}, {"id": 1115, "type": "identifier", "text": "printf", "parent": 1114, "children": [], "start_point": {"row": 228, "column": 4}, "end_point": {"row": 228, "column": 10}}, {"id": 1116, "type": "argument_list", "text": "(\"USAGE:\\n%s\", C_USAGE)", "parent": 1114, "children": [1117, 1119], "start_point": {"row": 228, "column": 10}, "end_point": {"row": 228, "column": 33}}, {"id": 1117, "type": "string_literal", "text": "\"USAGE:\\n%s\"", "parent": 1116, "children": [1118], "start_point": {"row": 228, "column": 11}, "end_point": {"row": 228, "column": 23}}, {"id": 1118, "type": "escape_sequence", "text": "\\n", "parent": 1117, "children": [], "start_point": {"row": 228, "column": 18}, "end_point": {"row": 228, "column": 20}}, {"id": 1119, "type": "identifier", "text": "C_USAGE", "parent": 1116, "children": [], "start_point": {"row": 228, "column": 25}, "end_point": {"row": 228, "column": 32}}, {"id": 1120, "type": "call_expression", "text": "exit(EXIT_FAILURE)", "parent": 1082, "children": [1121, 1122], "start_point": {"row": 229, "column": 4}, "end_point": {"row": 229, "column": 22}}, {"id": 1121, "type": "identifier", "text": "exit", "parent": 1120, "children": [], "start_point": {"row": 229, "column": 4}, "end_point": {"row": 229, "column": 8}}, {"id": 1122, "type": "argument_list", "text": "(EXIT_FAILURE)", "parent": 1120, "children": [1123], "start_point": {"row": 229, "column": 8}, "end_point": {"row": 229, "column": 22}}, {"id": 1123, "type": "identifier", "text": "EXIT_FAILURE", "parent": 1122, "children": [], "start_point": {"row": 229, "column": 9}, "end_point": {"row": 229, "column": 21}}, {"id": 1124, "type": "call_expression", "text": "run_random_dir_graph_test(args[0], args[1])", "parent": 983, "children": [1125, 1126], "start_point": {"row": 231, "column": 2}, "end_point": {"row": 231, "column": 45}}, {"id": 1125, "type": "identifier", "text": "run_random_dir_graph_test", "parent": 1124, "children": [], "start_point": {"row": 231, "column": 2}, "end_point": {"row": 231, "column": 27}}, {"id": 1126, "type": "argument_list", "text": "(args[0], args[1])", "parent": 1124, "children": [1127, 1130], "start_point": {"row": 231, "column": 27}, "end_point": {"row": 231, "column": 45}}, {"id": 1127, "type": "subscript_expression", "text": "args[0]", "parent": 1126, "children": [1128, 1129], "start_point": {"row": 231, "column": 28}, "end_point": {"row": 231, "column": 35}}, {"id": 1128, "type": "identifier", "text": "args", "parent": 1127, "children": [], "start_point": {"row": 231, "column": 28}, "end_point": {"row": 231, "column": 32}}, {"id": 1129, "type": "number_literal", "text": "0", "parent": 1127, "children": [], "start_point": {"row": 231, "column": 33}, "end_point": {"row": 231, "column": 34}}, {"id": 1130, "type": "subscript_expression", "text": "args[1]", "parent": 1126, "children": [1131, 1132], "start_point": {"row": 231, "column": 37}, "end_point": {"row": 231, "column": 44}}, {"id": 1131, "type": "identifier", "text": "args", "parent": 1130, "children": [], "start_point": {"row": 231, "column": 37}, "end_point": {"row": 231, "column": 41}}, {"id": 1132, "type": "number_literal", "text": "1", "parent": 1130, "children": [], "start_point": {"row": 231, "column": 42}, "end_point": {"row": 231, "column": 43}}, {"id": 1133, "type": "call_expression", "text": "free(args)", "parent": 983, "children": [1134, 1135], "start_point": {"row": 232, "column": 2}, "end_point": {"row": 232, "column": 12}}, {"id": 1134, "type": "identifier", "text": "free", "parent": 1133, "children": [], "start_point": {"row": 232, "column": 2}, "end_point": {"row": 232, "column": 6}}, {"id": 1135, "type": "argument_list", "text": "(args)", "parent": 1133, "children": [1136], "start_point": {"row": 232, "column": 6}, "end_point": {"row": 232, "column": 12}}, {"id": 1136, "type": "identifier", "text": "args", "parent": 1135, "children": [], "start_point": {"row": 232, "column": 7}, "end_point": {"row": 232, "column": 11}}, {"id": 1137, "type": "assignment_expression", "text": "args = NULL", "parent": 983, "children": [1138, 1139, 1140], "start_point": {"row": 233, "column": 2}, "end_point": {"row": 233, "column": 13}}, {"id": 1138, "type": "identifier", "text": "args", "parent": 1137, "children": [], "start_point": {"row": 233, "column": 2}, "end_point": {"row": 233, "column": 6}}, {"id": 1139, "type": "=", "text": "=", "parent": 1137, "children": [], "start_point": {"row": 233, "column": 7}, "end_point": {"row": 233, "column": 8}}, {"id": 1140, "type": "null", "text": "NULL", "parent": 1137, "children": [1141], "start_point": {"row": 233, "column": 9}, "end_point": {"row": 233, "column": 13}}, {"id": 1141, "type": "NULL", "text": "NULL", "parent": 1140, "children": [], "start_point": {"row": 233, "column": 9}, "end_point": {"row": 233, "column": 13}}, {"id": 1142, "type": "return_statement", "text": "return 0;", "parent": 983, "children": [1143], "start_point": {"row": 234, "column": 2}, "end_point": {"row": 234, "column": 11}}, {"id": 1143, "type": "number_literal", "text": "0", "parent": 1142, "children": [], "start_point": {"row": 234, "column": 9}, "end_point": {"row": 234, "column": 10}}]}, "node_categories": {"declarations": {"functions": [33, 38, 43, 48, 107, 128, 153, 178, 203, 302, 322, 324, 378, 394, 406, 422, 438, 454, 466, 480, 482, 614, 616, 632, 644, 660, 676, 692, 704, 946, 950, 983, 985], "variables": [54, 68, 74, 84, 98, 104, 115, 125, 136, 140, 148, 161, 165, 175, 186, 190, 200, 211, 221, 247, 261, 267, 273, 286, 292, 298, 305, 310, 313, 319, 327, 332, 376, 381, 384, 387, 392, 400, 404, 412, 416, 418, 428, 432, 436, 444, 448, 452, 460, 464, 469, 473, 485, 488, 491, 495, 498, 619, 622, 625, 630, 638, 642, 650, 654, 656, 666, 670, 674, 682, 686, 690, 698, 702, 707, 711, 718, 721, 730, 746, 751, 756, 953, 958, 961, 988, 991, 997, 1000], "classes": [316, 317, 333, 334, 474, 475, 499, 500, 712, 713, 747, 748, 752, 753], "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": [89, 92, 229, 234, 239, 244, 343, 344, 345, 353, 354, 355, 363, 364, 365, 369, 503, 510, 519, 523, 527, 531, 534, 540, 548, 552, 558, 562, 569, 573, 574, 575, 581, 582, 586, 590, 593, 596, 599, 602, 605, 608, 612, 762, 766, 772, 780, 790, 794, 797, 800, 807, 810, 815, 818, 820, 822, 825, 835, 839, 843, 847, 848, 856, 864, 868, 871, 874, 876, 889, 890, 895, 904, 905, 906, 914, 917, 919, 923, 927, 965, 970, 971, 972, 979, 1009, 1013, 1014, 1018, 1024, 1031, 1034, 1038, 1041, 1046, 1047, 1048, 1053, 1061, 1065, 1069, 1071, 1076, 1079, 1083, 1084, 1085, 1086, 1087, 1091, 1096, 1097, 1101, 1106, 1107, 1111, 1114, 1120, 1124, 1127, 1130, 1133], "assignments": [515, 526, 544, 555, 759, 769, 777, 786, 831, 842, 853, 860, 886, 931, 936, 941, 1028, 1057, 1068, 1137], "loops": [514, 543, 785, 830, 859, 1056], "conditionals": [35, 40, 45, 50, 52, 59, 71, 78, 87, 90, 94, 101, 112, 121, 122, 123, 124, 133, 144, 145, 146, 147, 158, 171, 172, 173, 174, 183, 196, 197, 198, 199, 208, 217, 218, 219, 220, 225, 231, 236, 241, 253, 264, 270, 277, 289, 295, 303, 309, 312, 315, 318, 321, 325, 331, 335, 339, 341, 342, 346, 347, 349, 352, 356, 357, 359, 362, 366, 367, 370, 379, 383, 386, 391, 398, 410, 426, 442, 458, 467, 476, 479, 483, 487, 490, 493, 494, 497, 501, 502, 504, 511, 513, 516, 520, 522, 524, 528, 529, 532, 533, 535, 541, 542, 545, 547, 549, 551, 553, 556, 559, 561, 563, 570, 572, 576, 577, 579, 583, 587, 589, 591, 594, 597, 600, 603, 606, 609, 611, 613, 617, 621, 624, 629, 636, 648, 664, 680, 696, 705, 714, 717, 720, 726, 735, 742, 749, 750, 754, 755, 757, 758, 760, 763, 765, 770, 773, 775, 776, 778, 781, 783, 784, 787, 791, 793, 795, 798, 801, 803, 804, 805, 808, 811, 812, 813, 816, 819, 821, 823, 826, 827, 828, 829, 832, 836, 838, 840, 844, 845, 849, 852, 854, 857, 861, 865, 867, 869, 872, 875, 877, 878, 879, 880, 881, 882, 883, 884, 885, 887, 891, 894, 896, 903, 909, 911, 913, 915, 918, 920, 922, 924, 926, 928, 930, 932, 937, 942, 951, 957, 960, 963, 977, 980, 982, 986, 990, 996, 999, 1005, 1010, 1012, 1015, 1017, 1019, 1023, 1025, 1027, 1029, 1032, 1035, 1042, 1044, 1045, 1049, 1058, 1062, 1064, 1066, 1070, 1072, 1077, 1080, 1081, 1082, 1088, 1092, 1098, 1102, 1108, 1112, 1115, 1119, 1121, 1123, 1125, 1128, 1131, 1134, 1136, 1138], "returns": [350, 360, 372, 374, 964, 1142], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 61, 62, 64, 66, 73, 79, 82, 83, 97, 103, 113, 134, 159, 184, 209, 226, 254, 257, 258, 259, 260, 266, 272, 278, 281, 282, 283, 284, 285, 291, 297, 351, 361, 373, 375, 506, 507, 508, 518, 537, 565, 585, 592, 595, 598, 601, 604, 607, 610, 789, 806, 814, 834, 863, 898, 1021, 1037, 1051, 1060, 1074, 1089, 1094, 1099, 1104, 1109, 1113, 1117, 1129, 1132, 1143], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 33, "universal_type": "function", "name": "unknown", "text_snippet": "#define RGENS_SEED() do{srand(time(NULL));}while (0)\n"}, {"node_id": 38, "universal_type": "function", "name": "unknown", "text_snippet": "#define RANDOM() (rand()) /* [0, RAND_MAX] */\n"}, {"node_id": 43, "universal_type": "function", "name": "unknown", "text_snippet": "#define DRAND() ((double)rand() / RAND_MAX) /* [0.0, 1.0] */\n"}, {"node_id": 48, "universal_type": "function", "name": "unknown", "text_snippet": "#define TOLU(i) ((unsigned long int)(i)) /* printing size_t under C89/C90 */\n"}, {"node_id": 107, "universal_type": "function", "name": "*)", "text_snippet": "(* const C_READ[4])(const void *)"}, {"node_id": 128, "universal_type": "function", "name": "unknown", "text_snippet": "(* const C_WRITE[4])(void *, size_t)"}, {"node_id": 153, "universal_type": "function", "name": "*,", "text_snippet": "(* const C_AT[4])(const void *, const void *)"}, {"node_id": 178, "universal_type": "function", "name": "*,", "text_snippet": "(* const C_CMPEQ[4])(const void *, const void *)"}, {"node_id": 203, "universal_type": "function", "name": "unknown", "text_snippet": "(* const C_INCR[4])(void *)"}, {"node_id": 302, "universal_type": "function", "name": "*block,", "text_snippet": "ptr(const void *block, size_t i, size_t size)"}, {"node_id": 322, "universal_type": "function", "name": "bern", "text_snippet": "int bern(void *arg){\n struct bern_arg *b = arg;\n if (b->p >= C_PROB_ONE) return 1;\n if (b->p <= C"}, {"node_id": 324, "universal_type": "function", "name": "unknown", "text_snippet": "bern(void *arg)"}, {"node_id": 378, "universal_type": "function", "name": "*),", "text_snippet": "run_random_dir_graph_helper(size_t num_vts,\n\t\t\t\t size_t vt_size,\n\t\t\t\t const char *type_string,\n\t\t\t\t "}, {"node_id": 394, "universal_type": "function", "name": "*)", "text_snippet": "(*read_vt)(const void *)"}, {"node_id": 406, "universal_type": "function", "name": "unknown", "text_snippet": "(*write_vt)(void *, size_t)"}, {"node_id": 422, "universal_type": "function", "name": "*,", "text_snippet": "(*at_vt)(const void *, const void *)"}, {"node_id": 438, "universal_type": "function", "name": "*,", "text_snippet": "(*cmp_vt)(const void *, const void *)"}, {"node_id": 454, "universal_type": "function", "name": "unknown", "text_snippet": "(*incr_vt)(void *)"}, {"node_id": 466, "universal_type": "function", "name": "unknown", "text_snippet": "bern(void *)"}, {"node_id": 480, "universal_type": "function", "name": "run_random_dir_graph_test", "text_snippet": "void run_random_dir_graph_test(size_t log_start, size_t log_end){\n size_t i, j;\n size_t num_vts;\n "}, {"node_id": 482, "universal_type": "function", "name": "unknown", "text_snippet": "run_random_dir_graph_test(size_t log_start, size_t log_end)"}, {"node_id": 614, "universal_type": "function", "name": "run_random_dir_graph_helper", "text_snippet": "void run_random_dir_graph_helper(size_t num_vts,\n\t\t\t\t size_t vt_size,\n\t\t\t\t const char *type_string,\n"}, {"node_id": 616, "universal_type": "function", "name": "*),", "text_snippet": "run_random_dir_graph_helper(size_t num_vts,\n\t\t\t\t size_t vt_size,\n\t\t\t\t const char *type_string,\n\t\t\t\t "}, {"node_id": 632, "universal_type": "function", "name": "*)", "text_snippet": "(*read_vt)(const void *)"}, {"node_id": 644, "universal_type": "function", "name": "unknown", "text_snippet": "(*write_vt)(void *, size_t)"}, {"node_id": 660, "universal_type": "function", "name": "*,", "text_snippet": "(*at_vt)(const void *, const void *)"}, {"node_id": 676, "universal_type": "function", "name": "*,", "text_snippet": "(*cmp_vt)(const void *, const void *)"}, {"node_id": 692, "universal_type": "function", "name": "unknown", "text_snippet": "(*incr_vt)(void *)"}, {"node_id": 704, "universal_type": "function", "name": "unknown", "text_snippet": "bern(void *)"}, {"node_id": 946, "universal_type": "function", "name": "*ptr", "text_snippet": "void *ptr(const void *block, size_t i, size_t size){\n return (void *)((char *)block + i * size);\n}"}, {"node_id": 950, "universal_type": "function", "name": "*block,", "text_snippet": "ptr(const void *block, size_t i, size_t size)"}, {"node_id": 983, "universal_type": "function", "name": "main", "text_snippet": "int main(int argc, char *argv[]){\n int i;\n size_t *args = NULL;\n RGENS_SEED();\n if (argc > C_ARG"}, {"node_id": 985, "universal_type": "function", "name": "unknown", "text_snippet": "main(int argc, char *argv[])"}], "class_declarations": [{"node_id": 316, "universal_type": "class", "name": "bern_arg{", "text_snippet": "struct bern_arg{\n double p;\n}"}, {"node_id": 317, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 333, "universal_type": "class", "name": "bern_arg", "text_snippet": "struct bern_arg"}, {"node_id": 334, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 474, "universal_type": "class", "name": "bern_arg", "text_snippet": "struct bern_arg"}, {"node_id": 475, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 499, "universal_type": "class", "name": "bern_arg", "text_snippet": "struct bern_arg"}, {"node_id": 500, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 712, "universal_type": "class", "name": "bern_arg", "text_snippet": "struct bern_arg"}, {"node_id": 713, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 747, "universal_type": "class", "name": "graph", "text_snippet": "struct graph"}, {"node_id": 748, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 752, "universal_type": "class", "name": "adj_lst", "text_snippet": "struct adj_lst"}, {"node_id": 753, "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 <stdlib.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <string.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <limits.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <time.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"bfs.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"graph.h\"\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"stack.h\"\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include \"utilities-mem.h\"\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include \"utilities-mod.h\"\n"}, {"node_id": 28, "text": "#include"}, {"node_id": 30, "text": "#include \"utilities-lim.h\"\n"}, {"node_id": 31, "text": "#include"}]}, "original_source_code": "/**\n bfs-test-perf-uint.c\n\n Performance test of the BFS algorithm across graphs with only unsigned\n int vertices.\n\n The following command line arguments can be used to customize tests:\n bfs-test-perf-uint\n [0, uint width - 1] : a\n [0, uint width - 1] : b s.t. 2**a <= V <= 2**b for rand graph test\n\n usage examples: \n ./bfs-test-perf-uint\n ./bfs-test-perf-uint 10 14\n\n bfs-test-perf-uint can be run with any subset of command line arguments\n in the above-defined order. If the (i + 1)th argument is specified then\n the ith argument must be specified for i >= 0. Default values are used\n for the unspecified arguments according to the C_ARGS_DEF array.\n\n The implementation of tests does not use stdint.h and is portable under\n C89/C90 and C99. The tests require that:\n - size_t and clock_t are convertible to double,\n - size_t can represent values upto 65535 for default values, and\n upto UINT_MAX (>= 65535) otherwise,\n - the widths of the unsigned integral types are less than 2040 and even.\n\n TODO: add portable size_t printing\n*/\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <limits.h>\n#include <time.h>\n#include \"bfs.h\"\n#include \"graph.h\"\n#include \"stack.h\"\n#include \"utilities-mem.h\"\n#include \"utilities-mod.h\"\n#include \"utilities-lim.h\"\n\n/**\n Generate random numbers in a portable way for test purposes only; rand()\n in the Linux C Library uses the same generator as random(), which may not\n be the case on older rand() implementations, and on current\n implementations on different systems.\n*/\n#define RGENS_SEED() do{srand(time(NULL));}while (0)\n#define RANDOM() (rand()) /* [0, RAND_MAX] */\n#define DRAND() ((double)rand() / RAND_MAX) /* [0.0, 1.0] */\n\n#define TOLU(i) ((unsigned long int)(i)) /* printing size_t under C89/C90 */\n\n/* input handling */\nconst char *C_USAGE =\n \"bfs-test-perf-uint\\n\"\n \"[0, uint width - 1] : a\\n\"\n \"[0, uint width - 1] : b s.t. 2**a <= V <= 2**b for rand graph test\\n\";\nconst int C_ARGC_ULIMIT = 3;\nconst size_t C_ARGS_DEF[2] = {14u, 14u};\nconst size_t C_UINT_BIT = PRECISION_FROM_ULIMIT((unsigned int)-1);\n\n/* random graph tests */\nconst size_t C_FN_COUNT = 4;\nsize_t (* const C_READ[4])(const void *) ={\n graph_read_ushort,\n graph_read_uint,\n graph_read_ulong,\n graph_read_sz};\nvoid (* const C_WRITE[4])(void *, size_t) ={\n graph_write_ushort,\n graph_write_uint,\n graph_write_ulong,\n graph_write_sz};\nvoid *(* const C_AT[4])(const void *, const void *) ={\n graph_at_ushort,\n graph_at_uint,\n graph_at_ulong,\n graph_at_sz};\nint (* const C_CMPEQ[4])(const void *, const void *) ={\n graph_cmpeq_ushort,\n graph_cmpeq_uint,\n graph_cmpeq_ulong,\n graph_cmpeq_sz};\nvoid (* const C_INCR[4])(void *) ={\n graph_incr_ushort,\n graph_incr_uint,\n graph_incr_ulong,\n graph_incr_sz};\nconst size_t C_VT_SIZES[4] = {\n sizeof(unsigned short),\n sizeof(unsigned int),\n sizeof(unsigned long),\n sizeof(size_t)};\nconst char *C_VT_TYPES[4] = {\"ushort\", \"uint \", \"ulong \", \"sz \"};\nconst size_t C_ITER = 10u;\nconst size_t C_PROBS_COUNT = 5u;\nconst double C_PROBS[5] = {1.00, 0.75, 0.50, 0.25, 0.00};\nconst double C_PROB_ONE = 1.0;\nconst double C_PROB_ZERO = 0.0;\n\n/* additional operations */\nvoid *ptr(const void *block, size_t i, size_t size);\n\n/**\n Run a bfs test on random directed graphs.\n*/\n\nstruct bern_arg{\n double p;\n};\n\nint bern(void *arg){\n struct bern_arg *b = arg;\n if (b->p >= C_PROB_ONE) return 1;\n if (b->p <= C_PROB_ZERO) return 0;\n if (b->p > DRAND()) return 1;\n return 0;\n}\n\nvoid run_random_dir_graph_helper(size_t num_vts,\n\t\t\t\t size_t vt_size,\n\t\t\t\t const char *type_string,\n\t\t\t\t size_t (*read_vt)(const void *),\n\t\t\t\t void (*write_vt)(void *, size_t),\n\t\t\t\t void *(*at_vt)(const void *, const void *),\n\t\t\t\t int (*cmp_vt)(const void *, const void *),\n\t\t\t\t void (*incr_vt)(void *),\n\t\t\t\t int bern(void *),\n\t\t\t\t struct bern_arg *b);\n\nvoid run_random_dir_graph_test(size_t log_start, size_t log_end){\n size_t i, j;\n size_t num_vts;\n struct bern_arg b;\n printf(\"Run a bfs test on random directed graphs from %lu random \"\n\t \"start vertices in each graph\\n\", TOLU(C_ITER));\n for (i = 0; i < C_PROBS_COUNT; i++){\n b.p = C_PROBS[i];\n printf(\"\\tP[an edge is in a graph] = %.2f\\n\", b.p);\n for (j = log_start; j <= log_end; j++){\n num_vts = pow_two_perror(j);\n printf(\"\\t\\tvertices: %lu, E[# of directed edges]: %.1f\\n\",\n\t TOLU(num_vts), b.p * num_vts * (num_vts - 1));\n run_random_dir_graph_helper(num_vts,\n\t\t\t\t C_VT_SIZES[1],\n\t\t\t\t C_VT_TYPES[1],\n\t\t\t\t C_READ[1],\n\t\t\t\t C_WRITE[1],\n\t\t\t\t C_AT[1],\n\t\t\t\t C_CMPEQ[1],\n\t\t\t\t C_INCR[1],\n\t\t\t\t bern,\n\t\t\t\t &b);\n }\n }\n}\n\nvoid run_random_dir_graph_helper(size_t num_vts,\n\t\t\t\t size_t vt_size,\n\t\t\t\t const char *type_string,\n\t\t\t\t size_t (*read_vt)(const void *),\n\t\t\t\t void (*write_vt)(void *, size_t),\n\t\t\t\t void *(*at_vt)(const void *, const void *),\n\t\t\t\t int (*cmp_vt)(const void *, const void *),\n\t\t\t\t void (*incr_vt)(void *),\n\t\t\t\t int bern(void *),\n\t\t\t\t struct bern_arg *b){\n size_t i;\n size_t *start = NULL;\n void *dist = NULL, *prev = NULL;\n struct graph g;\n struct adj_lst a;\n clock_t t;\n /* no declared type after malloc; effective type is set by bfs */\n start = malloc_perror(C_ITER, sizeof(size_t));\n dist = malloc_perror(num_vts, vt_size);\n prev = malloc_perror(num_vts, vt_size);\n for (i = 0; i < num_vts; i++){\n /* avoid trap representations in tests */\n write_vt(ptr(dist, i, vt_size), 0);\n } \n graph_base_init(&g, num_vts, vt_size, 0);\n adj_lst_base_init(&a, &g);\n adj_lst_rand_dir(&a, write_vt, bern, b);\n for (i = 0; i < C_ITER; i++){\n start[i] = RANDOM() % num_vts;\n }\n t = clock();\n for (i = 0; i < C_ITER; i++){\n bfs(&a, start[i], dist, prev, read_vt, write_vt, at_vt, cmp_vt, incr_vt);\n }\n t = clock() - t;\n printf(\"\\t\\t\\t%s ave runtime: %.6f seconds\\n\",\n\t type_string, (double)t / C_ITER / CLOCKS_PER_SEC);\n adj_lst_free(&a); /* deallocates blocks with effective vertex type */\n free(start);\n free(dist);\n free(prev);\n start = NULL;\n dist = NULL;\n prev = NULL;\n}\n\n/**\n Computes a pointer to the ith element in the block of elements.\n*/\nvoid *ptr(const void *block, size_t i, size_t size){\n return (void *)((char *)block + i * size);\n}\n\nint main(int argc, char *argv[]){\n int i;\n size_t *args = NULL;\n RGENS_SEED();\n if (argc > C_ARGC_ULIMIT){\n printf(\"USAGE:\\n%s\", C_USAGE);\n exit(EXIT_FAILURE);\n }\n args = malloc_perror(C_ARGC_ULIMIT - 1, sizeof(size_t));\n memcpy(args, C_ARGS_DEF, (C_ARGC_ULIMIT - 1) * sizeof(size_t));\n for (i = 1; i < argc; i++){\n args[i - 1] = atoi(argv[i]);\n }\n if (args[0] > C_UINT_BIT - 1 ||\n args[1] > C_UINT_BIT - 1 ||\n args[1] < args[0]){\n printf(\"USAGE:\\n%s\", C_USAGE);\n exit(EXIT_FAILURE);\n }\n run_random_dir_graph_test(args[0], args[1]);\n free(args);\n args = NULL;\n return 0;\n}\n"}
| 81,222
|
c
|
#ifndef SOCKET_H_INCLUDED
#define SOCKET_H_INCLUDED
/*============================================================================
This is for backward compatibility. Abyss used to have a socket
concept modelled after POSIX sockets, in which a single class (TSocket)
contained two very different kinds of objects: some analogous to
a TChanSwitch and analogout to a TChannel.
Now that we have TChanSwitch and TChannel, users should use those,
but there may be old programs that use TSocket, and we want them to
continue working.
Actually, this may not be necessary. There was only one release
(1.06) that had the TSocket interface, and that release didn't
provide any incentive to upgrade an older program to use TSocket,
so there may be few or no users of TSocket.
============================================================================*/
#include "int.h"
#include "xmlrpc-c/abyss.h"
struct _TSocket {
unsigned int signature;
/* With both background and foreground use of sockets, and
background being both fork and pthread, it is very easy to
screw up socket lifetime and try to destroy twice. We use
this signature to help catch such bugs.
*/
/* Exactly one of 'chanSwitchP' and 'channelP' is non-null.
That's how you know which of the two varieties of socket this is.
*/
TChanSwitch *chanSwitchP;
TChannel *channelP;
void *channelInfoP; /* Defined only for a channel socket */
};
void
SocketCreateChannel(TChannel *const channelP,
void *const channelInfoP,
TSocket **const socketPP);
void
SocketCreateChanSwitch(TChanSwitch *const chanSwitchP,
TSocket **const socketPP);
TChanSwitch *
SocketGetChanSwitch(TSocket *const socketP);
TChannel *
SocketGetChannel(TSocket *const socketP);
void *
SocketGetChannelInfo(TSocket *const socketP);
#endif
| 42.91
| 45
|
(translation_unit) "#ifndef SOCKET_H_INCLUDED\n#define SOCKET_H_INCLUDED\n\n/*============================================================================\n This is for backward compatibility. Abyss used to have a socket\n concept modelled after POSIX sockets, in which a single class (TSocket)\n contained two very different kinds of objects: some analogous to\n a TChanSwitch and analogout to a TChannel.\n\n Now that we have TChanSwitch and TChannel, users should use those,\n but there may be old programs that use TSocket, and we want them to\n continue working.\n\n Actually, this may not be necessary. There was only one release\n (1.06) that had the TSocket interface, and that release didn't\n provide any incentive to upgrade an older program to use TSocket,\n so there may be few or no users of TSocket.\n============================================================================*/\n\n#include "int.h"\n\n#include "xmlrpc-c/abyss.h"\n\nstruct _TSocket {\n unsigned int signature;\n /* With both background and foreground use of sockets, and\n background being both fork and pthread, it is very easy to\n screw up socket lifetime and try to destroy twice. We use\n this signature to help catch such bugs.\n */\n\n /* Exactly one of 'chanSwitchP' and 'channelP' is non-null.\n That's how you know which of the two varieties of socket this is.\n */\n TChanSwitch *chanSwitchP;\n TChannel *channelP;\n\n void *channelInfoP; /* Defined only for a channel socket */\n};\n\nvoid\n SocketCreateChannel(TChannel *const channelP,\n void *const channelInfoP,\n TSocket **const socketPP);\n\nvoid\n SocketCreateChanSwitch(TChanSwitch *const chanSwitchP,\n TSocket **const socketPP);\n\nTChanSwitch *\n SocketGetChanSwitch(TSocket *const socketP);\n\nTChannel *\n SocketGetChannel(TSocket *const socketP);\n\nvoid *\n SocketGetChannelInfo(TSocket *const socketP);\n\n#endif\n\n"
(preproc_ifdef) "#ifndef SOCKET_H_INCLUDED\n#define SOCKET_H_INCLUDED\n\n/*============================================================================\n This is for backward compatibility. Abyss used to have a socket\n concept modelled after POSIX sockets, in which a single class (TSocket)\n contained two very different kinds of objects: some analogous to\n a TChanSwitch and analogout to a TChannel.\n\n Now that we have TChanSwitch and TChannel, users should use those,\n but there may be old programs that use TSocket, and we want them to\n continue working.\n\n Actually, this may not be necessary. There was only one release\n (1.06) that had the TSocket interface, and that release didn't\n provide any incentive to upgrade an older program to use TSocket,\n so there may be few or no users of TSocket.\n============================================================================*/\n\n#include "int.h"\n\n#include "xmlrpc-c/abyss.h"\n\nstruct _TSocket {\n unsigned int signature;\n /* With both background and foreground use of sockets, and\n background being both fork and pthread, it is very easy to\n screw up socket lifetime and try to destroy twice. We use\n this signature to help catch such bugs.\n */\n\n /* Exactly one of 'chanSwitchP' and 'channelP' is non-null.\n That's how you know which of the two varieties of socket this is.\n */\n TChanSwitch *chanSwitchP;\n TChannel *channelP;\n\n void *channelInfoP; /* Defined only for a channel socket */\n};\n\nvoid\n SocketCreateChannel(TChannel *const channelP,\n void *const channelInfoP,\n TSocket **const socketPP);\n\nvoid\n SocketCreateChanSwitch(TChanSwitch *const chanSwitchP,\n TSocket **const socketPP);\n\nTChanSwitch *\n SocketGetChanSwitch(TSocket *const socketP);\n\nTChannel *\n SocketGetChannel(TSocket *const socketP);\n\nvoid *\n SocketGetChannelInfo(TSocket *const socketP);\n\n#endif"
(#ifndef) "#ifndef"
(identifier) "SOCKET_H_INCLUDED"
(preproc_def) "#define SOCKET_H_INCLUDED\n"
(#define) "#define"
(identifier) "SOCKET_H_INCLUDED"
(comment) "/*============================================================================\n This is for backward compatibility. Abyss used to have a socket\n concept modelled after POSIX sockets, in which a single class (TSocket)\n contained two very different kinds of objects: some analogous to\n a TChanSwitch and analogout to a TChannel.\n\n Now that we have TChanSwitch and TChannel, users should use those,\n but there may be old programs that use TSocket, and we want them to\n continue working.\n\n Actually, this may not be necessary. There was only one release\n (1.06) that had the TSocket interface, and that release didn't\n provide any incentive to upgrade an older program to use TSocket,\n so there may be few or no users of TSocket.\n============================================================================*/"
(preproc_include) "#include "int.h"\n"
(#include) "#include"
(string_literal) ""int.h""
(") """
(string_content) "int.h"
(") """
(preproc_include) "#include "xmlrpc-c/abyss.h"\n"
(#include) "#include"
(string_literal) ""xmlrpc-c/abyss.h""
(") """
(string_content) "xmlrpc-c/abyss.h"
(") """
(struct_specifier) "struct _TSocket {\n unsigned int signature;\n /* With both background and foreground use of sockets, and\n background being both fork and pthread, it is very easy to\n screw up socket lifetime and try to destroy twice. We use\n this signature to help catch such bugs.\n */\n\n /* Exactly one of 'chanSwitchP' and 'channelP' is non-null.\n That's how you know which of the two varieties of socket this is.\n */\n TChanSwitch *chanSwitchP;\n TChannel *channelP;\n\n void *channelInfoP; /* Defined only for a channel socket */\n}"
(struct) "struct"
(type_identifier) "_TSocket"
(field_declaration_list) "{\n unsigned int signature;\n /* With both background and foreground use of sockets, and\n background being both fork and pthread, it is very easy to\n screw up socket lifetime and try to destroy twice. We use\n this signature to help catch such bugs.\n */\n\n /* Exactly one of 'chanSwitchP' and 'channelP' is non-null.\n That's how you know which of the two varieties of socket this is.\n */\n TChanSwitch *chanSwitchP;\n TChannel *channelP;\n\n void *channelInfoP; /* Defined only for a channel socket */\n}"
({) "{"
(field_declaration) "unsigned int signature;"
(sized_type_specifier) "unsigned int"
(unsigned) "unsigned"
(primitive_type) "int"
(field_identifier) "signature"
(;) ";"
(comment) "/* With both background and foreground use of sockets, and\n background being both fork and pthread, it is very easy to\n screw up socket lifetime and try to destroy twice. We use\n this signature to help catch such bugs.\n */"
(comment) "/* Exactly one of 'chanSwitchP' and 'channelP' is non-null.\n That's how you know which of the two varieties of socket this is.\n */"
(field_declaration) "TChanSwitch *chanSwitchP;"
(type_identifier) "TChanSwitch"
(pointer_declarator) "*chanSwitchP"
(*) "*"
(field_identifier) "chanSwitchP"
(;) ";"
(field_declaration) "TChannel *channelP;"
(type_identifier) "TChannel"
(pointer_declarator) "*channelP"
(*) "*"
(field_identifier) "channelP"
(;) ";"
(field_declaration) "void *channelInfoP;"
(primitive_type) "void"
(pointer_declarator) "*channelInfoP"
(*) "*"
(field_identifier) "channelInfoP"
(;) ";"
(comment) "/* Defined only for a channel socket */"
(}) "}"
(;) ";"
(declaration) "void\n SocketCreateChannel(TChannel *const channelP,\n void *const channelInfoP,\n TSocket **const socketPP);"
(primitive_type) "void"
(function_declarator) "SocketCreateChannel(TChannel *const channelP,\n void *const channelInfoP,\n TSocket **const socketPP)"
(identifier) "SocketCreateChannel"
(parameter_list) "(TChannel *const channelP,\n void *const channelInfoP,\n TSocket **const socketPP)"
(() "("
(parameter_declaration) "TChannel *const channelP"
(type_identifier) "TChannel"
(pointer_declarator) "*const channelP"
(*) "*"
(type_qualifier) "const"
(const) "const"
(identifier) "channelP"
(,) ","
(parameter_declaration) "void *const channelInfoP"
(primitive_type) "void"
(pointer_declarator) "*const channelInfoP"
(*) "*"
(type_qualifier) "const"
(const) "const"
(identifier) "channelInfoP"
(,) ","
(parameter_declaration) "TSocket **const socketPP"
(type_identifier) "TSocket"
(pointer_declarator) "**const socketPP"
(*) "*"
(pointer_declarator) "*const socketPP"
(*) "*"
(type_qualifier) "const"
(const) "const"
(identifier) "socketPP"
()) ")"
(;) ";"
(declaration) "void\n SocketCreateChanSwitch(TChanSwitch *const chanSwitchP,\n TSocket **const socketPP);"
(primitive_type) "void"
(function_declarator) "SocketCreateChanSwitch(TChanSwitch *const chanSwitchP,\n TSocket **const socketPP)"
(identifier) "SocketCreateChanSwitch"
(parameter_list) "(TChanSwitch *const chanSwitchP,\n TSocket **const socketPP)"
(() "("
(parameter_declaration) "TChanSwitch *const chanSwitchP"
(type_identifier) "TChanSwitch"
(pointer_declarator) "*const chanSwitchP"
(*) "*"
(type_qualifier) "const"
(const) "const"
(identifier) "chanSwitchP"
(,) ","
(parameter_declaration) "TSocket **const socketPP"
(type_identifier) "TSocket"
(pointer_declarator) "**const socketPP"
(*) "*"
(pointer_declarator) "*const socketPP"
(*) "*"
(type_qualifier) "const"
(const) "const"
(identifier) "socketPP"
()) ")"
(;) ";"
(declaration) "TChanSwitch *\n SocketGetChanSwitch(TSocket *const socketP);"
(type_identifier) "TChanSwitch"
(pointer_declarator) "*\n SocketGetChanSwitch(TSocket *const socketP)"
(*) "*"
(function_declarator) "SocketGetChanSwitch(TSocket *const socketP)"
(identifier) "SocketGetChanSwitch"
(parameter_list) "(TSocket *const socketP)"
(() "("
(parameter_declaration) "TSocket *const socketP"
(type_identifier) "TSocket"
(pointer_declarator) "*const socketP"
(*) "*"
(type_qualifier) "const"
(const) "const"
(identifier) "socketP"
()) ")"
(;) ";"
(declaration) "TChannel *\n SocketGetChannel(TSocket *const socketP);"
(type_identifier) "TChannel"
(pointer_declarator) "*\n SocketGetChannel(TSocket *const socketP)"
(*) "*"
(function_declarator) "SocketGetChannel(TSocket *const socketP)"
(identifier) "SocketGetChannel"
(parameter_list) "(TSocket *const socketP)"
(() "("
(parameter_declaration) "TSocket *const socketP"
(type_identifier) "TSocket"
(pointer_declarator) "*const socketP"
(*) "*"
(type_qualifier) "const"
(const) "const"
(identifier) "socketP"
()) ")"
(;) ";"
(declaration) "void *\n SocketGetChannelInfo(TSocket *const socketP);"
(primitive_type) "void"
(pointer_declarator) "*\n SocketGetChannelInfo(TSocket *const socketP)"
(*) "*"
(function_declarator) "SocketGetChannelInfo(TSocket *const socketP)"
(identifier) "SocketGetChannelInfo"
(parameter_list) "(TSocket *const socketP)"
(() "("
(parameter_declaration) "TSocket *const socketP"
(type_identifier) "TSocket"
(pointer_declarator) "*const socketP"
(*) "*"
(type_qualifier) "const"
(const) "const"
(identifier) "socketP"
()) ")"
(;) ";"
(#endif) "#endif"
| 164
| 0
|
{"language": "c", "success": true, "metadata": {"lines": 45, "avg_line_length": 42.91, "nodes": 111, "errors": 0, "source_hash": "a1d26334443ad42ab9edeb7ffd436957ac0a69790e625428d3f7cf12af3375a5", "categorized_nodes": 65}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef SOCKET_H_INCLUDED\n#define SOCKET_H_INCLUDED\n\n/*============================================================================\n This is for backward compatibility. Abyss used to have a socket\n concept modelled after POSIX sockets, in which a single class (TSocket)\n contained two very different kinds of objects: some analogous to\n a TChanSwitch and analogout to a TChannel.\n\n Now that we have TChanSwitch and TChannel, users should use those,\n but there may be old programs that use TSocket, and we want them to\n continue working.\n\n Actually, this may not be necessary. There was only one release\n (1.06) that had the TSocket interface, and that release didn't\n provide any incentive to upgrade an older program to use TSocket,\n so there may be few or no users of TSocket.\n============================================================================*/\n\n#include \"int.h\"\n\n#include \"xmlrpc-c/abyss.h\"\n\nstruct _TSocket {\n unsigned int signature;\n /* With both background and foreground use of sockets, and\n background being both fork and pthread, it is very easy to\n screw up socket lifetime and try to destroy twice. We use\n this signature to help catch such bugs.\n */\n\n /* Exactly one of 'chanSwitchP' and 'channelP' is non-null.\n That's how you know which of the two varieties of socket this is.\n */\n TChanSwitch *chanSwitchP;\n TChannel *channelP;\n\n void *channelInfoP; /* Defined only for a channel socket */\n};\n\nvoid\n SocketCreateChannel(TChannel *const channelP,\n void *const channelInfoP,\n TSocket **const socketPP);\n\nvoid\n SocketCreateChanSwitch(TChanSwitch *const chanSwitchP,\n TSocket **const socketPP);\n\nTChanSwitch *\n SocketGetChanSwitch(TSocket *const socketP);\n\nTChannel *\n SocketGetChannel(TSocket *const socketP);\n\nvoid *\n SocketGetChannelInfo(TSocket *const socketP);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 35, 57, 74, 86, 98, 110], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 58, "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": "SOCKET_H_INCLUDED", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 25}}, {"id": 3, "type": "preproc_def", "text": "#define SOCKET_H_INCLUDED\n", "parent": 0, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 7}}, {"id": 5, "type": "identifier", "text": "SOCKET_H_INCLUDED", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 25}}, {"id": 6, "type": "preproc_include", "text": "#include \"int.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"int.h\"", "parent": 6, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 16}}, {"id": 9, "type": "preproc_include", "text": "#include \"xmlrpc-c/abyss.h\"\n", "parent": 0, "children": [10, 11], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"xmlrpc-c/abyss.h\"", "parent": 9, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 27}}, {"id": 12, "type": "struct_specifier", "text": "struct _TSocket {\n unsigned int signature;\n /* With both background and foreground use of sockets, and\n background being both fork and pthread, it is very easy to\n screw up socket lifetime and try to destroy twice. We use\n this signature to help catch such bugs.\n */\n\n /* Exactly one of 'chanSwitchP' and 'channelP' is non-null.\n That's how you know which of the two varieties of socket this is.\n */\n TChanSwitch *chanSwitchP;\n TChannel *channelP;\n\n void *channelInfoP; /* Defined only for a channel socket */\n}", "parent": 0, "children": [13, 14], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 38, "column": 1}}, {"id": 13, "type": "struct", "text": "struct", "parent": 12, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 6}}, {"id": 14, "type": "type_identifier", "text": "_TSocket", "parent": 12, "children": [], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 15}}, {"id": 15, "type": "field_declaration", "text": "unsigned int signature;", "parent": 12, "children": [16, 19], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 27}}, {"id": 16, "type": "sized_type_specifier", "text": "unsigned int", "parent": 15, "children": [17, 18], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 16}}, {"id": 17, "type": "unsigned", "text": "unsigned", "parent": 16, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 12}}, {"id": 18, "type": "primitive_type", "text": "int", "parent": 16, "children": [], "start_point": {"row": 24, "column": 13}, "end_point": {"row": 24, "column": 16}}, {"id": 19, "type": "field_identifier", "text": "signature", "parent": 15, "children": [], "start_point": {"row": 24, "column": 17}, "end_point": {"row": 24, "column": 26}}, {"id": 20, "type": "field_declaration", "text": "TChanSwitch *chanSwitchP;", "parent": 12, "children": [21, 22], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 29}}, {"id": 21, "type": "type_identifier", "text": "TChanSwitch", "parent": 20, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 15}}, {"id": 22, "type": "pointer_declarator", "text": "*chanSwitchP", "parent": 20, "children": [23, 24], "start_point": {"row": 34, "column": 16}, "end_point": {"row": 34, "column": 28}}, {"id": 23, "type": "*", "text": "*", "parent": 22, "children": [], "start_point": {"row": 34, "column": 16}, "end_point": {"row": 34, "column": 17}}, {"id": 24, "type": "field_identifier", "text": "chanSwitchP", "parent": 22, "children": [], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 28}}, {"id": 25, "type": "field_declaration", "text": "TChannel *channelP;", "parent": 12, "children": [26, 27], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 23}}, {"id": 26, "type": "type_identifier", "text": "TChannel", "parent": 25, "children": [], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 12}}, {"id": 27, "type": "pointer_declarator", "text": "*channelP", "parent": 25, "children": [28, 29], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 22}}, {"id": 28, "type": "*", "text": "*", "parent": 27, "children": [], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 14}}, {"id": 29, "type": "field_identifier", "text": "channelP", "parent": 27, "children": [], "start_point": {"row": 35, "column": 14}, "end_point": {"row": 35, "column": 22}}, {"id": 30, "type": "field_declaration", "text": "void *channelInfoP;", "parent": 12, "children": [31, 32], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 23}}, {"id": 31, "type": "primitive_type", "text": "void", "parent": 30, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 8}}, {"id": 32, "type": "pointer_declarator", "text": "*channelInfoP", "parent": 30, "children": [33, 34], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 22}}, {"id": 33, "type": "*", "text": "*", "parent": 32, "children": [], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 10}}, {"id": 34, "type": "field_identifier", "text": "channelInfoP", "parent": 32, "children": [], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 22}}, {"id": 35, "type": "declaration", "text": "void\n SocketCreateChannel(TChannel *const channelP,\n void *const channelInfoP,\n TSocket **const socketPP);", "parent": 0, "children": [36, 37], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 43, "column": 54}}, {"id": 36, "type": "primitive_type", "text": "void", "parent": 35, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 4}}, {"id": 37, "type": "function_declarator", "text": "SocketCreateChannel(TChannel *const channelP,\n void *const channelInfoP,\n TSocket **const socketPP)", "parent": 35, "children": [38, 39], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 43, "column": 53}}, {"id": 38, "type": "identifier", "text": "SocketCreateChannel", "parent": 37, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 27}}, {"id": 39, "type": "parameter_list", "text": "(TChannel *const channelP,\n void *const channelInfoP,\n TSocket **const socketPP)", "parent": 37, "children": [40, 45, 50], "start_point": {"row": 41, "column": 27}, "end_point": {"row": 43, "column": 53}}, {"id": 40, "type": "parameter_declaration", "text": "TChannel *const channelP", "parent": 39, "children": [41, 42], "start_point": {"row": 41, "column": 28}, "end_point": {"row": 41, "column": 52}}, {"id": 41, "type": "type_identifier", "text": "TChannel", "parent": 40, "children": [], "start_point": {"row": 41, "column": 28}, "end_point": {"row": 41, "column": 36}}, {"id": 42, "type": "pointer_declarator", "text": "*const channelP", "parent": 40, "children": [43, 44], "start_point": {"row": 41, "column": 37}, "end_point": {"row": 41, "column": 52}}, {"id": 43, "type": "*", "text": "*", "parent": 42, "children": [], "start_point": {"row": 41, "column": 37}, "end_point": {"row": 41, "column": 38}}, {"id": 44, "type": "identifier", "text": "channelP", "parent": 42, "children": [], "start_point": {"row": 41, "column": 44}, "end_point": {"row": 41, "column": 52}}, {"id": 45, "type": "parameter_declaration", "text": "void *const channelInfoP", "parent": 39, "children": [46, 47], "start_point": {"row": 42, "column": 28}, "end_point": {"row": 42, "column": 52}}, {"id": 46, "type": "primitive_type", "text": "void", "parent": 45, "children": [], "start_point": {"row": 42, "column": 28}, "end_point": {"row": 42, "column": 32}}, {"id": 47, "type": "pointer_declarator", "text": "*const channelInfoP", "parent": 45, "children": [48, 49], "start_point": {"row": 42, "column": 33}, "end_point": {"row": 42, "column": 52}}, {"id": 48, "type": "*", "text": "*", "parent": 47, "children": [], "start_point": {"row": 42, "column": 33}, "end_point": {"row": 42, "column": 34}}, {"id": 49, "type": "identifier", "text": "channelInfoP", "parent": 47, "children": [], "start_point": {"row": 42, "column": 40}, "end_point": {"row": 42, "column": 52}}, {"id": 50, "type": "parameter_declaration", "text": "TSocket **const socketPP", "parent": 39, "children": [51, 52], "start_point": {"row": 43, "column": 28}, "end_point": {"row": 43, "column": 52}}, {"id": 51, "type": "type_identifier", "text": "TSocket", "parent": 50, "children": [], "start_point": {"row": 43, "column": 28}, "end_point": {"row": 43, "column": 35}}, {"id": 52, "type": "pointer_declarator", "text": "**const socketPP", "parent": 50, "children": [53, 54], "start_point": {"row": 43, "column": 36}, "end_point": {"row": 43, "column": 52}}, {"id": 53, "type": "*", "text": "*", "parent": 52, "children": [], "start_point": {"row": 43, "column": 36}, "end_point": {"row": 43, "column": 37}}, {"id": 54, "type": "pointer_declarator", "text": "*const socketPP", "parent": 52, "children": [55, 56], "start_point": {"row": 43, "column": 37}, "end_point": {"row": 43, "column": 52}}, {"id": 55, "type": "*", "text": "*", "parent": 54, "children": [], "start_point": {"row": 43, "column": 37}, "end_point": {"row": 43, "column": 38}}, {"id": 56, "type": "identifier", "text": "socketPP", "parent": 54, "children": [], "start_point": {"row": 43, "column": 44}, "end_point": {"row": 43, "column": 52}}, {"id": 57, "type": "declaration", "text": "void\n SocketCreateChanSwitch(TChanSwitch *const chanSwitchP,\n TSocket **const socketPP);", "parent": 0, "children": [58, 59], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 47, "column": 57}}, {"id": 58, "type": "primitive_type", "text": "void", "parent": 57, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 4}}, {"id": 59, "type": "function_declarator", "text": "SocketCreateChanSwitch(TChanSwitch *const chanSwitchP,\n TSocket **const socketPP)", "parent": 57, "children": [60, 61], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 47, "column": 56}}, {"id": 60, "type": "identifier", "text": "SocketCreateChanSwitch", "parent": 59, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 30}}, {"id": 61, "type": "parameter_list", "text": "(TChanSwitch *const chanSwitchP,\n TSocket **const socketPP)", "parent": 59, "children": [62, 67], "start_point": {"row": 46, "column": 30}, "end_point": {"row": 47, "column": 56}}, {"id": 62, "type": "parameter_declaration", "text": "TChanSwitch *const chanSwitchP", "parent": 61, "children": [63, 64], "start_point": {"row": 46, "column": 31}, "end_point": {"row": 46, "column": 61}}, {"id": 63, "type": "type_identifier", "text": "TChanSwitch", "parent": 62, "children": [], "start_point": {"row": 46, "column": 31}, "end_point": {"row": 46, "column": 42}}, {"id": 64, "type": "pointer_declarator", "text": "*const chanSwitchP", "parent": 62, "children": [65, 66], "start_point": {"row": 46, "column": 43}, "end_point": {"row": 46, "column": 61}}, {"id": 65, "type": "*", "text": "*", "parent": 64, "children": [], "start_point": {"row": 46, "column": 43}, "end_point": {"row": 46, "column": 44}}, {"id": 66, "type": "identifier", "text": "chanSwitchP", "parent": 64, "children": [], "start_point": {"row": 46, "column": 50}, "end_point": {"row": 46, "column": 61}}, {"id": 67, "type": "parameter_declaration", "text": "TSocket **const socketPP", "parent": 61, "children": [68, 69], "start_point": {"row": 47, "column": 31}, "end_point": {"row": 47, "column": 55}}, {"id": 68, "type": "type_identifier", "text": "TSocket", "parent": 67, "children": [], "start_point": {"row": 47, "column": 31}, "end_point": {"row": 47, "column": 38}}, {"id": 69, "type": "pointer_declarator", "text": "**const socketPP", "parent": 67, "children": [70, 71], "start_point": {"row": 47, "column": 39}, "end_point": {"row": 47, "column": 55}}, {"id": 70, "type": "*", "text": "*", "parent": 69, "children": [], "start_point": {"row": 47, "column": 39}, "end_point": {"row": 47, "column": 40}}, {"id": 71, "type": "pointer_declarator", "text": "*const socketPP", "parent": 69, "children": [72, 73], "start_point": {"row": 47, "column": 40}, "end_point": {"row": 47, "column": 55}}, {"id": 72, "type": "*", "text": "*", "parent": 71, "children": [], "start_point": {"row": 47, "column": 40}, "end_point": {"row": 47, "column": 41}}, {"id": 73, "type": "identifier", "text": "socketPP", "parent": 71, "children": [], "start_point": {"row": 47, "column": 47}, "end_point": {"row": 47, "column": 55}}, {"id": 74, "type": "declaration", "text": "TChanSwitch *\n SocketGetChanSwitch(TSocket *const socketP);", "parent": 0, "children": [75, 76], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 50, "column": 52}}, {"id": 75, "type": "type_identifier", "text": "TChanSwitch", "parent": 74, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 11}}, {"id": 76, "type": "pointer_declarator", "text": "*\n SocketGetChanSwitch(TSocket *const socketP)", "parent": 74, "children": [77, 78], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 50, "column": 51}}, {"id": 77, "type": "*", "text": "*", "parent": 76, "children": [], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 13}}, {"id": 78, "type": "function_declarator", "text": "SocketGetChanSwitch(TSocket *const socketP)", "parent": 76, "children": [79, 80], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 51}}, {"id": 79, "type": "identifier", "text": "SocketGetChanSwitch", "parent": 78, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 27}}, {"id": 80, "type": "parameter_list", "text": "(TSocket *const socketP)", "parent": 78, "children": [81], "start_point": {"row": 50, "column": 27}, "end_point": {"row": 50, "column": 51}}, {"id": 81, "type": "parameter_declaration", "text": "TSocket *const socketP", "parent": 80, "children": [82, 83], "start_point": {"row": 50, "column": 28}, "end_point": {"row": 50, "column": 50}}, {"id": 82, "type": "type_identifier", "text": "TSocket", "parent": 81, "children": [], "start_point": {"row": 50, "column": 28}, "end_point": {"row": 50, "column": 35}}, {"id": 83, "type": "pointer_declarator", "text": "*const socketP", "parent": 81, "children": [84, 85], "start_point": {"row": 50, "column": 36}, "end_point": {"row": 50, "column": 50}}, {"id": 84, "type": "*", "text": "*", "parent": 83, "children": [], "start_point": {"row": 50, "column": 36}, "end_point": {"row": 50, "column": 37}}, {"id": 85, "type": "identifier", "text": "socketP", "parent": 83, "children": [], "start_point": {"row": 50, "column": 43}, "end_point": {"row": 50, "column": 50}}, {"id": 86, "type": "declaration", "text": "TChannel *\n SocketGetChannel(TSocket *const socketP);", "parent": 0, "children": [87, 88], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 53, "column": 49}}, {"id": 87, "type": "type_identifier", "text": "TChannel", "parent": 86, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 8}}, {"id": 88, "type": "pointer_declarator", "text": "*\n SocketGetChannel(TSocket *const socketP)", "parent": 86, "children": [89, 90], "start_point": {"row": 52, "column": 9}, "end_point": {"row": 53, "column": 48}}, {"id": 89, "type": "*", "text": "*", "parent": 88, "children": [], "start_point": {"row": 52, "column": 9}, "end_point": {"row": 52, "column": 10}}, {"id": 90, "type": "function_declarator", "text": "SocketGetChannel(TSocket *const socketP)", "parent": 88, "children": [91, 92], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 48}}, {"id": 91, "type": "identifier", "text": "SocketGetChannel", "parent": 90, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 24}}, {"id": 92, "type": "parameter_list", "text": "(TSocket *const socketP)", "parent": 90, "children": [93], "start_point": {"row": 53, "column": 24}, "end_point": {"row": 53, "column": 48}}, {"id": 93, "type": "parameter_declaration", "text": "TSocket *const socketP", "parent": 92, "children": [94, 95], "start_point": {"row": 53, "column": 25}, "end_point": {"row": 53, "column": 47}}, {"id": 94, "type": "type_identifier", "text": "TSocket", "parent": 93, "children": [], "start_point": {"row": 53, "column": 25}, "end_point": {"row": 53, "column": 32}}, {"id": 95, "type": "pointer_declarator", "text": "*const socketP", "parent": 93, "children": [96, 97], "start_point": {"row": 53, "column": 33}, "end_point": {"row": 53, "column": 47}}, {"id": 96, "type": "*", "text": "*", "parent": 95, "children": [], "start_point": {"row": 53, "column": 33}, "end_point": {"row": 53, "column": 34}}, {"id": 97, "type": "identifier", "text": "socketP", "parent": 95, "children": [], "start_point": {"row": 53, "column": 40}, "end_point": {"row": 53, "column": 47}}, {"id": 98, "type": "declaration", "text": "void *\n SocketGetChannelInfo(TSocket *const socketP);", "parent": 0, "children": [99, 100], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 56, "column": 53}}, {"id": 99, "type": "primitive_type", "text": "void", "parent": 98, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 4}}, {"id": 100, "type": "pointer_declarator", "text": "*\n SocketGetChannelInfo(TSocket *const socketP)", "parent": 98, "children": [101, 102], "start_point": {"row": 55, "column": 5}, "end_point": {"row": 56, "column": 52}}, {"id": 101, "type": "*", "text": "*", "parent": 100, "children": [], "start_point": {"row": 55, "column": 5}, "end_point": {"row": 55, "column": 6}}, {"id": 102, "type": "function_declarator", "text": "SocketGetChannelInfo(TSocket *const socketP)", "parent": 100, "children": [103, 104], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 52}}, {"id": 103, "type": "identifier", "text": "SocketGetChannelInfo", "parent": 102, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 28}}, {"id": 104, "type": "parameter_list", "text": "(TSocket *const socketP)", "parent": 102, "children": [105], "start_point": {"row": 56, "column": 28}, "end_point": {"row": 56, "column": 52}}, {"id": 105, "type": "parameter_declaration", "text": "TSocket *const socketP", "parent": 104, "children": [106, 107], "start_point": {"row": 56, "column": 29}, "end_point": {"row": 56, "column": 51}}, {"id": 106, "type": "type_identifier", "text": "TSocket", "parent": 105, "children": [], "start_point": {"row": 56, "column": 29}, "end_point": {"row": 56, "column": 36}}, {"id": 107, "type": "pointer_declarator", "text": "*const socketP", "parent": 105, "children": [108, 109], "start_point": {"row": 56, "column": 37}, "end_point": {"row": 56, "column": 51}}, {"id": 108, "type": "*", "text": "*", "parent": 107, "children": [], "start_point": {"row": 56, "column": 37}, "end_point": {"row": 56, "column": 38}}, {"id": 109, "type": "identifier", "text": "socketP", "parent": 107, "children": [], "start_point": {"row": 56, "column": 44}, "end_point": {"row": 56, "column": 51}}, {"id": 110, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 6}}]}, "node_categories": {"declarations": {"functions": [37, 59, 78, 90, 102], "variables": [15, 20, 25, 30, 35, 40, 45, 50, 57, 62, 67, 74, 81, 86, 93, 98, 105], "classes": [12, 13], "imports": [6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 14, 16, 19, 21, 24, 26, 29, 34, 38, 41, 44, 49, 51, 56, 60, 63, 66, 68, 73, 75, 79, 82, 85, 87, 91, 94, 97, 103, 106, 109, 110], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 37, "universal_type": "function", "name": "*const", "text_snippet": "SocketCreateChannel(TChannel *const channelP,\n void *const channelInfoP,\n"}, {"node_id": 59, "universal_type": "function", "name": "unknown", "text_snippet": "SocketCreateChanSwitch(TChanSwitch *const chanSwitchP,\n TSocket **cons"}, {"node_id": 78, "universal_type": "function", "name": "unknown", "text_snippet": "SocketGetChanSwitch(TSocket *const socketP)"}, {"node_id": 90, "universal_type": "function", "name": "unknown", "text_snippet": "SocketGetChannel(TSocket *const socketP)"}, {"node_id": 102, "universal_type": "function", "name": "unknown", "text_snippet": "SocketGetChannelInfo(TSocket *const socketP)"}], "class_declarations": [{"node_id": 12, "universal_type": "class", "name": "_TSocket", "text_snippet": "struct _TSocket {\n unsigned int signature;\n /* With both background and foreground use of sock"}, {"node_id": 13, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include \"int.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"xmlrpc-c/abyss.h\"\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "#ifndef SOCKET_H_INCLUDED\n#define SOCKET_H_INCLUDED\n\n/*============================================================================\n This is for backward compatibility. Abyss used to have a socket\n concept modelled after POSIX sockets, in which a single class (TSocket)\n contained two very different kinds of objects: some analogous to\n a TChanSwitch and analogout to a TChannel.\n\n Now that we have TChanSwitch and TChannel, users should use those,\n but there may be old programs that use TSocket, and we want them to\n continue working.\n\n Actually, this may not be necessary. There was only one release\n (1.06) that had the TSocket interface, and that release didn't\n provide any incentive to upgrade an older program to use TSocket,\n so there may be few or no users of TSocket.\n============================================================================*/\n\n#include \"int.h\"\n\n#include \"xmlrpc-c/abyss.h\"\n\nstruct _TSocket {\n unsigned int signature;\n /* With both background and foreground use of sockets, and\n background being both fork and pthread, it is very easy to\n screw up socket lifetime and try to destroy twice. We use\n this signature to help catch such bugs.\n */\n\n /* Exactly one of 'chanSwitchP' and 'channelP' is non-null.\n That's how you know which of the two varieties of socket this is.\n */\n TChanSwitch *chanSwitchP;\n TChannel *channelP;\n\n void *channelInfoP; /* Defined only for a channel socket */\n};\n\nvoid\n SocketCreateChannel(TChannel *const channelP,\n void *const channelInfoP,\n TSocket **const socketPP);\n\nvoid\n SocketCreateChanSwitch(TChanSwitch *const chanSwitchP,\n TSocket **const socketPP);\n\nTChanSwitch *\n SocketGetChanSwitch(TSocket *const socketP);\n\nTChannel *\n SocketGetChannel(TSocket *const socketP);\n\nvoid *\n SocketGetChannelInfo(TSocket *const socketP);\n\n#endif\n\n"}
| 81,223
|
c
|
#include "gutil.h"
#include <stdlib.h>
static GLuint mk_shd(const char *src, GLenum type);
static GLuint rm_shd(GLuint shd);
void init_glfw(void)
{
glfwInit();
}
void exit_glfw(void)
{
glfwTerminate();
}
GLFWwindow *mk_win(int w, int h, const char *title, bool rsz, bool fscr)
{
glfwWindowHint(GLFW_RESIZABLE, rsz);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, GUTIL_CONTEXT_VERSION_MAJOR);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, GUTIL_CONTEXT_VERSION_MINOR);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GUTIL_OPENGL_FORWARD_COMPAT);
glfwWindowHint(GLFW_OPENGL_PROFILE, GUTIL_OPENGL_PROFILE);
glewExperimental = GUTIL_GLEW_EXPERIMENTAL;
GLFWmonitor *mon = fscr ? glfwGetPrimaryMonitor() : NULL;
GLFWwindow *win = glfwCreateWindow(w, h, title, mon, NULL);
glfwMakeContextCurrent(win);
glewInit();
return win;
}
GLFWwindow *rm_win(GLFWwindow *win)
{
glfwDestroyWindow(win);
return NULL;
}
GLuint mk_vao(void)
{
GLuint vao;
glGenVertexArrays(1, &vao);
glBindVertexArray(vao);
return vao;
}
GLuint rm_vao(GLuint vao)
{
glDeleteVertexArrays(1, &vao);
return 0;
}
GLuint mk_prg(int n_shds, const char **srcs, const GLenum *types,
int n_vars, const char **names, GLint *locs)
{
GLuint prg = glCreateProgram();
GLuint *shds = malloc(n_shds * sizeof(*shds));
for (int i = 0; i < n_shds; ++i) shds[i] = mk_shd(srcs[i], types[i]);
for (int i = 0; i < n_shds; ++i) glAttachShader(prg, shds[i]);
glLinkProgram(prg);
for (int i = 0; i < n_shds; ++i) glDetachShader(prg, shds[i]);
glValidateProgram(prg);
glUseProgram(prg);
for (int i = 0; i < n_vars; ++i)locs[i]=glGetUniformLocation(prg,names[i]);
for (int i = 0; i < n_shds; ++i) shds[i] = rm_shd(shds[i]);
free(shds);
return prg;
}
GLuint rm_prg(GLuint prg)
{
glDeleteProgram(prg);
return 0;
}
static GLuint mk_shd(const char *src, GLenum type)
{
GLuint shd = glCreateShader(type);
glShaderSource(shd, 1, &src, NULL);
glCompileShader(shd);
return shd;
}
static GLuint rm_shd(GLuint shd)
{
glDeleteShader(shd);
return 0;
}
GLuint mk_vbo(GLenum type, size_t sz, void *data, GLenum usage)
{
GLuint vbo;
glGenBuffers(1, &vbo);
glBindBuffer(type, vbo);
glBufferData(type, sz, data, usage);
return vbo;
}
GLuint rm_vbo(GLuint vbo)
{
glDeleteBuffers(1, &vbo);
return 0;
}
| 26.45
| 89
|
(translation_unit) "#include "gutil.h"\n\n#include <stdlib.h>\n\nstatic GLuint mk_shd(const char *src, GLenum type);\nstatic GLuint rm_shd(GLuint shd);\n\nvoid init_glfw(void)\n{\n glfwInit();\n}\n\nvoid exit_glfw(void)\n{\n glfwTerminate();\n}\n\nGLFWwindow *mk_win(int w, int h, const char *title, bool rsz, bool fscr)\n{\n glfwWindowHint(GLFW_RESIZABLE, rsz);\n glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, GUTIL_CONTEXT_VERSION_MAJOR);\n glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, GUTIL_CONTEXT_VERSION_MINOR);\n glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GUTIL_OPENGL_FORWARD_COMPAT);\n glfwWindowHint(GLFW_OPENGL_PROFILE, GUTIL_OPENGL_PROFILE);\n glewExperimental = GUTIL_GLEW_EXPERIMENTAL;\n GLFWmonitor *mon = fscr ? glfwGetPrimaryMonitor() : NULL;\n GLFWwindow *win = glfwCreateWindow(w, h, title, mon, NULL);\n glfwMakeContextCurrent(win);\n glewInit();\n return win;\n}\n\nGLFWwindow *rm_win(GLFWwindow *win)\n{\n glfwDestroyWindow(win);\n return NULL;\n}\n\nGLuint mk_vao(void)\n{\n GLuint vao;\n glGenVertexArrays(1, &vao);\n glBindVertexArray(vao);\n return vao;\n}\n\nGLuint rm_vao(GLuint vao)\n{\n glDeleteVertexArrays(1, &vao);\n return 0;\n}\n\nGLuint mk_prg(int n_shds, const char **srcs, const GLenum *types,\n int n_vars, const char **names, GLint *locs)\n{\n GLuint prg = glCreateProgram();\n GLuint *shds = malloc(n_shds * sizeof(*shds));\n for (int i = 0; i < n_shds; ++i) shds[i] = mk_shd(srcs[i], types[i]);\n\n for (int i = 0; i < n_shds; ++i) glAttachShader(prg, shds[i]);\n glLinkProgram(prg);\n for (int i = 0; i < n_shds; ++i) glDetachShader(prg, shds[i]);\n\n glValidateProgram(prg);\n glUseProgram(prg);\n for (int i = 0; i < n_vars; ++i)locs[i]=glGetUniformLocation(prg,names[i]);\n\n for (int i = 0; i < n_shds; ++i) shds[i] = rm_shd(shds[i]);\n free(shds);\n return prg;\n}\n\nGLuint rm_prg(GLuint prg)\n{\n glDeleteProgram(prg);\n return 0;\n}\n\nstatic GLuint mk_shd(const char *src, GLenum type)\n{\n GLuint shd = glCreateShader(type);\n glShaderSource(shd, 1, &src, NULL);\n glCompileShader(shd);\n return shd;\n}\n\nstatic GLuint rm_shd(GLuint shd)\n{\n glDeleteShader(shd);\n return 0;\n}\n\nGLuint mk_vbo(GLenum type, size_t sz, void *data, GLenum usage)\n{\n GLuint vbo;\n glGenBuffers(1, &vbo);\n glBindBuffer(type, vbo);\n glBufferData(type, sz, data, usage);\n return vbo;\n}\n\nGLuint rm_vbo(GLuint vbo)\n{\n glDeleteBuffers(1, &vbo);\n return 0;\n}\n"
(preproc_include) "#include "gutil.h"\n"
(#include) "#include"
(string_literal) ""gutil.h""
(") """
(string_content) "gutil.h"
(") """
(preproc_include) "#include <stdlib.h>\n"
(#include) "#include"
(system_lib_string) "<stdlib.h>"
(declaration) "static GLuint mk_shd(const char *src, GLenum type);"
(storage_class_specifier) "static"
(static) "static"
(type_identifier) "GLuint"
(function_declarator) "mk_shd(const char *src, GLenum type)"
(identifier) "mk_shd"
(parameter_list) "(const char *src, GLenum type)"
(() "("
(parameter_declaration) "const char *src"
(type_qualifier) "const"
(const) "const"
(primitive_type) "char"
(pointer_declarator) "*src"
(*) "*"
(identifier) "src"
(,) ","
(parameter_declaration) "GLenum type"
(type_identifier) "GLenum"
(identifier) "type"
()) ")"
(;) ";"
(declaration) "static GLuint rm_shd(GLuint shd);"
(storage_class_specifier) "static"
(static) "static"
(type_identifier) "GLuint"
(function_declarator) "rm_shd(GLuint shd)"
(identifier) "rm_shd"
(parameter_list) "(GLuint shd)"
(() "("
(parameter_declaration) "GLuint shd"
(type_identifier) "GLuint"
(identifier) "shd"
()) ")"
(;) ";"
(function_definition) "void init_glfw(void)\n{\n glfwInit();\n}"
(primitive_type) "void"
(function_declarator) "init_glfw(void)"
(identifier) "init_glfw"
(parameter_list) "(void)"
(() "("
(parameter_declaration) "void"
(primitive_type) "void"
()) ")"
(compound_statement) "{\n glfwInit();\n}"
({) "{"
(expression_statement) "glfwInit();"
(call_expression) "glfwInit()"
(identifier) "glfwInit"
(argument_list) "()"
(() "("
()) ")"
(;) ";"
(}) "}"
(function_definition) "void exit_glfw(void)\n{\n glfwTerminate();\n}"
(primitive_type) "void"
(function_declarator) "exit_glfw(void)"
(identifier) "exit_glfw"
(parameter_list) "(void)"
(() "("
(parameter_declaration) "void"
(primitive_type) "void"
()) ")"
(compound_statement) "{\n glfwTerminate();\n}"
({) "{"
(expression_statement) "glfwTerminate();"
(call_expression) "glfwTerminate()"
(identifier) "glfwTerminate"
(argument_list) "()"
(() "("
()) ")"
(;) ";"
(}) "}"
(function_definition) "GLFWwindow *mk_win(int w, int h, const char *title, bool rsz, bool fscr)\n{\n glfwWindowHint(GLFW_RESIZABLE, rsz);\n glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, GUTIL_CONTEXT_VERSION_MAJOR);\n glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, GUTIL_CONTEXT_VERSION_MINOR);\n glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GUTIL_OPENGL_FORWARD_COMPAT);\n glfwWindowHint(GLFW_OPENGL_PROFILE, GUTIL_OPENGL_PROFILE);\n glewExperimental = GUTIL_GLEW_EXPERIMENTAL;\n GLFWmonitor *mon = fscr ? glfwGetPrimaryMonitor() : NULL;\n GLFWwindow *win = glfwCreateWindow(w, h, title, mon, NULL);\n glfwMakeContextCurrent(win);\n glewInit();\n return win;\n}"
(type_identifier) "GLFWwindow"
(pointer_declarator) "*mk_win(int w, int h, const char *title, bool rsz, bool fscr)"
(*) "*"
(function_declarator) "mk_win(int w, int h, const char *title, bool rsz, bool fscr)"
(identifier) "mk_win"
(parameter_list) "(int w, int h, const char *title, bool rsz, bool fscr)"
(() "("
(parameter_declaration) "int w"
(primitive_type) "int"
(identifier) "w"
(,) ","
(parameter_declaration) "int h"
(primitive_type) "int"
(identifier) "h"
(,) ","
(parameter_declaration) "const char *title"
(type_qualifier) "const"
(const) "const"
(primitive_type) "char"
(pointer_declarator) "*title"
(*) "*"
(identifier) "title"
(,) ","
(parameter_declaration) "bool rsz"
(primitive_type) "bool"
(identifier) "rsz"
(,) ","
(parameter_declaration) "bool fscr"
(primitive_type) "bool"
(identifier) "fscr"
()) ")"
(compound_statement) "{\n glfwWindowHint(GLFW_RESIZABLE, rsz);\n glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, GUTIL_CONTEXT_VERSION_MAJOR);\n glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, GUTIL_CONTEXT_VERSION_MINOR);\n glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GUTIL_OPENGL_FORWARD_COMPAT);\n glfwWindowHint(GLFW_OPENGL_PROFILE, GUTIL_OPENGL_PROFILE);\n glewExperimental = GUTIL_GLEW_EXPERIMENTAL;\n GLFWmonitor *mon = fscr ? glfwGetPrimaryMonitor() : NULL;\n GLFWwindow *win = glfwCreateWindow(w, h, title, mon, NULL);\n glfwMakeContextCurrent(win);\n glewInit();\n return win;\n}"
({) "{"
(expression_statement) "glfwWindowHint(GLFW_RESIZABLE, rsz);"
(call_expression) "glfwWindowHint(GLFW_RESIZABLE, rsz)"
(identifier) "glfwWindowHint"
(argument_list) "(GLFW_RESIZABLE, rsz)"
(() "("
(identifier) "GLFW_RESIZABLE"
(,) ","
(identifier) "rsz"
()) ")"
(;) ";"
(expression_statement) "glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, GUTIL_CONTEXT_VERSION_MAJOR);"
(call_expression) "glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, GUTIL_CONTEXT_VERSION_MAJOR)"
(identifier) "glfwWindowHint"
(argument_list) "(GLFW_CONTEXT_VERSION_MAJOR, GUTIL_CONTEXT_VERSION_MAJOR)"
(() "("
(identifier) "GLFW_CONTEXT_VERSION_MAJOR"
(,) ","
(identifier) "GUTIL_CONTEXT_VERSION_MAJOR"
()) ")"
(;) ";"
(expression_statement) "glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, GUTIL_CONTEXT_VERSION_MINOR);"
(call_expression) "glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, GUTIL_CONTEXT_VERSION_MINOR)"
(identifier) "glfwWindowHint"
(argument_list) "(GLFW_CONTEXT_VERSION_MINOR, GUTIL_CONTEXT_VERSION_MINOR)"
(() "("
(identifier) "GLFW_CONTEXT_VERSION_MINOR"
(,) ","
(identifier) "GUTIL_CONTEXT_VERSION_MINOR"
()) ")"
(;) ";"
(expression_statement) "glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GUTIL_OPENGL_FORWARD_COMPAT);"
(call_expression) "glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GUTIL_OPENGL_FORWARD_COMPAT)"
(identifier) "glfwWindowHint"
(argument_list) "(GLFW_OPENGL_FORWARD_COMPAT, GUTIL_OPENGL_FORWARD_COMPAT)"
(() "("
(identifier) "GLFW_OPENGL_FORWARD_COMPAT"
(,) ","
(identifier) "GUTIL_OPENGL_FORWARD_COMPAT"
()) ")"
(;) ";"
(expression_statement) "glfwWindowHint(GLFW_OPENGL_PROFILE, GUTIL_OPENGL_PROFILE);"
(call_expression) "glfwWindowHint(GLFW_OPENGL_PROFILE, GUTIL_OPENGL_PROFILE)"
(identifier) "glfwWindowHint"
(argument_list) "(GLFW_OPENGL_PROFILE, GUTIL_OPENGL_PROFILE)"
(() "("
(identifier) "GLFW_OPENGL_PROFILE"
(,) ","
(identifier) "GUTIL_OPENGL_PROFILE"
()) ")"
(;) ";"
(expression_statement) "glewExperimental = GUTIL_GLEW_EXPERIMENTAL;"
(assignment_expression) "glewExperimental = GUTIL_GLEW_EXPERIMENTAL"
(identifier) "glewExperimental"
(=) "="
(identifier) "GUTIL_GLEW_EXPERIMENTAL"
(;) ";"
(declaration) "GLFWmonitor *mon = fscr ? glfwGetPrimaryMonitor() : NULL;"
(type_identifier) "GLFWmonitor"
(init_declarator) "*mon = fscr ? glfwGetPrimaryMonitor() : NULL"
(pointer_declarator) "*mon"
(*) "*"
(identifier) "mon"
(=) "="
(conditional_expression) "fscr ? glfwGetPrimaryMonitor() : NULL"
(identifier) "fscr"
(?) "?"
(call_expression) "glfwGetPrimaryMonitor()"
(identifier) "glfwGetPrimaryMonitor"
(argument_list) "()"
(() "("
()) ")"
(:) ":"
(null) "NULL"
(NULL) "NULL"
(;) ";"
(declaration) "GLFWwindow *win = glfwCreateWindow(w, h, title, mon, NULL);"
(type_identifier) "GLFWwindow"
(init_declarator) "*win = glfwCreateWindow(w, h, title, mon, NULL)"
(pointer_declarator) "*win"
(*) "*"
(identifier) "win"
(=) "="
(call_expression) "glfwCreateWindow(w, h, title, mon, NULL)"
(identifier) "glfwCreateWindow"
(argument_list) "(w, h, title, mon, NULL)"
(() "("
(identifier) "w"
(,) ","
(identifier) "h"
(,) ","
(identifier) "title"
(,) ","
(identifier) "mon"
(,) ","
(null) "NULL"
(NULL) "NULL"
()) ")"
(;) ";"
(expression_statement) "glfwMakeContextCurrent(win);"
(call_expression) "glfwMakeContextCurrent(win)"
(identifier) "glfwMakeContextCurrent"
(argument_list) "(win)"
(() "("
(identifier) "win"
()) ")"
(;) ";"
(expression_statement) "glewInit();"
(call_expression) "glewInit()"
(identifier) "glewInit"
(argument_list) "()"
(() "("
()) ")"
(;) ";"
(return_statement) "return win;"
(return) "return"
(identifier) "win"
(;) ";"
(}) "}"
(function_definition) "GLFWwindow *rm_win(GLFWwindow *win)\n{\n glfwDestroyWindow(win);\n return NULL;\n}"
(type_identifier) "GLFWwindow"
(pointer_declarator) "*rm_win(GLFWwindow *win)"
(*) "*"
(function_declarator) "rm_win(GLFWwindow *win)"
(identifier) "rm_win"
(parameter_list) "(GLFWwindow *win)"
(() "("
(parameter_declaration) "GLFWwindow *win"
(type_identifier) "GLFWwindow"
(pointer_declarator) "*win"
(*) "*"
(identifier) "win"
()) ")"
(compound_statement) "{\n glfwDestroyWindow(win);\n return NULL;\n}"
({) "{"
(expression_statement) "glfwDestroyWindow(win);"
(call_expression) "glfwDestroyWindow(win)"
(identifier) "glfwDestroyWindow"
(argument_list) "(win)"
(() "("
(identifier) "win"
()) ")"
(;) ";"
(return_statement) "return NULL;"
(return) "return"
(null) "NULL"
(NULL) "NULL"
(;) ";"
(}) "}"
(function_definition) "GLuint mk_vao(void)\n{\n GLuint vao;\n glGenVertexArrays(1, &vao);\n glBindVertexArray(vao);\n return vao;\n}"
(type_identifier) "GLuint"
(function_declarator) "mk_vao(void)"
(identifier) "mk_vao"
(parameter_list) "(void)"
(() "("
(parameter_declaration) "void"
(primitive_type) "void"
()) ")"
(compound_statement) "{\n GLuint vao;\n glGenVertexArrays(1, &vao);\n glBindVertexArray(vao);\n return vao;\n}"
({) "{"
(declaration) "GLuint vao;"
(type_identifier) "GLuint"
(identifier) "vao"
(;) ";"
(expression_statement) "glGenVertexArrays(1, &vao);"
(call_expression) "glGenVertexArrays(1, &vao)"
(identifier) "glGenVertexArrays"
(argument_list) "(1, &vao)"
(() "("
(number_literal) "1"
(,) ","
(pointer_expression) "&vao"
(&) "&"
(identifier) "vao"
()) ")"
(;) ";"
(expression_statement) "glBindVertexArray(vao);"
(call_expression) "glBindVertexArray(vao)"
(identifier) "glBindVertexArray"
(argument_list) "(vao)"
(() "("
(identifier) "vao"
()) ")"
(;) ";"
(return_statement) "return vao;"
(return) "return"
(identifier) "vao"
(;) ";"
(}) "}"
(function_definition) "GLuint rm_vao(GLuint vao)\n{\n glDeleteVertexArrays(1, &vao);\n return 0;\n}"
(type_identifier) "GLuint"
(function_declarator) "rm_vao(GLuint vao)"
(identifier) "rm_vao"
(parameter_list) "(GLuint vao)"
(() "("
(parameter_declaration) "GLuint vao"
(type_identifier) "GLuint"
(identifier) "vao"
()) ")"
(compound_statement) "{\n glDeleteVertexArrays(1, &vao);\n return 0;\n}"
({) "{"
(expression_statement) "glDeleteVertexArrays(1, &vao);"
(call_expression) "glDeleteVertexArrays(1, &vao)"
(identifier) "glDeleteVertexArrays"
(argument_list) "(1, &vao)"
(() "("
(number_literal) "1"
(,) ","
(pointer_expression) "&vao"
(&) "&"
(identifier) "vao"
()) ")"
(;) ";"
(return_statement) "return 0;"
(return) "return"
(number_literal) "0"
(;) ";"
(}) "}"
(function_definition) "GLuint mk_prg(int n_shds, const char **srcs, const GLenum *types,\n int n_vars, const char **names, GLint *locs)\n{\n GLuint prg = glCreateProgram();\n GLuint *shds = malloc(n_shds * sizeof(*shds));\n for (int i = 0; i < n_shds; ++i) shds[i] = mk_shd(srcs[i], types[i]);\n\n for (int i = 0; i < n_shds; ++i) glAttachShader(prg, shds[i]);\n glLinkProgram(prg);\n for (int i = 0; i < n_shds; ++i) glDetachShader(prg, shds[i]);\n\n glValidateProgram(prg);\n glUseProgram(prg);\n for (int i = 0; i < n_vars; ++i)locs[i]=glGetUniformLocation(prg,names[i]);\n\n for (int i = 0; i < n_shds; ++i) shds[i] = rm_shd(shds[i]);\n free(shds);\n return prg;\n}"
(type_identifier) "GLuint"
(function_declarator) "mk_prg(int n_shds, const char **srcs, const GLenum *types,\n int n_vars, const char **names, GLint *locs)"
(identifier) "mk_prg"
(parameter_list) "(int n_shds, const char **srcs, const GLenum *types,\n int n_vars, const char **names, GLint *locs)"
(() "("
(parameter_declaration) "int n_shds"
(primitive_type) "int"
(identifier) "n_shds"
(,) ","
(parameter_declaration) "const char **srcs"
(type_qualifier) "const"
(const) "const"
(primitive_type) "char"
(pointer_declarator) "**srcs"
(*) "*"
(pointer_declarator) "*srcs"
(*) "*"
(identifier) "srcs"
(,) ","
(parameter_declaration) "const GLenum *types"
(type_qualifier) "const"
(const) "const"
(type_identifier) "GLenum"
(pointer_declarator) "*types"
(*) "*"
(identifier) "types"
(,) ","
(parameter_declaration) "int n_vars"
(primitive_type) "int"
(identifier) "n_vars"
(,) ","
(parameter_declaration) "const char **names"
(type_qualifier) "const"
(const) "const"
(primitive_type) "char"
(pointer_declarator) "**names"
(*) "*"
(pointer_declarator) "*names"
(*) "*"
(identifier) "names"
(,) ","
(parameter_declaration) "GLint *locs"
(type_identifier) "GLint"
(pointer_declarator) "*locs"
(*) "*"
(identifier) "locs"
()) ")"
(compound_statement) "{\n GLuint prg = glCreateProgram();\n GLuint *shds = malloc(n_shds * sizeof(*shds));\n for (int i = 0; i < n_shds; ++i) shds[i] = mk_shd(srcs[i], types[i]);\n\n for (int i = 0; i < n_shds; ++i) glAttachShader(prg, shds[i]);\n glLinkProgram(prg);\n for (int i = 0; i < n_shds; ++i) glDetachShader(prg, shds[i]);\n\n glValidateProgram(prg);\n glUseProgram(prg);\n for (int i = 0; i < n_vars; ++i)locs[i]=glGetUniformLocation(prg,names[i]);\n\n for (int i = 0; i < n_shds; ++i) shds[i] = rm_shd(shds[i]);\n free(shds);\n return prg;\n}"
({) "{"
(declaration) "GLuint prg = glCreateProgram();"
(type_identifier) "GLuint"
(init_declarator) "prg = glCreateProgram()"
(identifier) "prg"
(=) "="
(call_expression) "glCreateProgram()"
(identifier) "glCreateProgram"
(argument_list) "()"
(() "("
()) ")"
(;) ";"
(declaration) "GLuint *shds = malloc(n_shds * sizeof(*shds));"
(type_identifier) "GLuint"
(init_declarator) "*shds = malloc(n_shds * sizeof(*shds))"
(pointer_declarator) "*shds"
(*) "*"
(identifier) "shds"
(=) "="
(call_expression) "malloc(n_shds * sizeof(*shds))"
(identifier) "malloc"
(argument_list) "(n_shds * sizeof(*shds))"
(() "("
(binary_expression) "n_shds * sizeof(*shds)"
(identifier) "n_shds"
(*) "*"
(sizeof_expression) "sizeof(*shds)"
(sizeof) "sizeof"
(parenthesized_expression) "(*shds)"
(() "("
(pointer_expression) "*shds"
(*) "*"
(identifier) "shds"
()) ")"
()) ")"
(;) ";"
(for_statement) "for (int i = 0; i < n_shds; ++i) shds[i] = mk_shd(srcs[i], types[i]);"
(for) "for"
(() "("
(declaration) "int i = 0;"
(primitive_type) "int"
(init_declarator) "i = 0"
(identifier) "i"
(=) "="
(number_literal) "0"
(;) ";"
(binary_expression) "i < n_shds"
(identifier) "i"
(<) "<"
(identifier) "n_shds"
(;) ";"
(update_expression) "++i"
(++) "++"
(identifier) "i"
()) ")"
(expression_statement) "shds[i] = mk_shd(srcs[i], types[i]);"
(assignment_expression) "shds[i] = mk_shd(srcs[i], types[i])"
(subscript_expression) "shds[i]"
(identifier) "shds"
([) "["
(identifier) "i"
(]) "]"
(=) "="
(call_expression) "mk_shd(srcs[i], types[i])"
(identifier) "mk_shd"
(argument_list) "(srcs[i], types[i])"
(() "("
(subscript_expression) "srcs[i]"
(identifier) "srcs"
([) "["
(identifier) "i"
(]) "]"
(,) ","
(subscript_expression) "types[i]"
(identifier) "types"
([) "["
(identifier) "i"
(]) "]"
()) ")"
(;) ";"
(for_statement) "for (int i = 0; i < n_shds; ++i) glAttachShader(prg, shds[i]);"
(for) "for"
(() "("
(declaration) "int i = 0;"
(primitive_type) "int"
(init_declarator) "i = 0"
(identifier) "i"
(=) "="
(number_literal) "0"
(;) ";"
(binary_expression) "i < n_shds"
(identifier) "i"
(<) "<"
(identifier) "n_shds"
(;) ";"
(update_expression) "++i"
(++) "++"
(identifier) "i"
()) ")"
(expression_statement) "glAttachShader(prg, shds[i]);"
(call_expression) "glAttachShader(prg, shds[i])"
(identifier) "glAttachShader"
(argument_list) "(prg, shds[i])"
(() "("
(identifier) "prg"
(,) ","
(subscript_expression) "shds[i]"
(identifier) "shds"
([) "["
(identifier) "i"
(]) "]"
()) ")"
(;) ";"
(expression_statement) "glLinkProgram(prg);"
(call_expression) "glLinkProgram(prg)"
(identifier) "glLinkProgram"
(argument_list) "(prg)"
(() "("
(identifier) "prg"
()) ")"
(;) ";"
(for_statement) "for (int i = 0; i < n_shds; ++i) glDetachShader(prg, shds[i]);"
(for) "for"
(() "("
(declaration) "int i = 0;"
(primitive_type) "int"
(init_declarator) "i = 0"
(identifier) "i"
(=) "="
(number_literal) "0"
(;) ";"
(binary_expression) "i < n_shds"
(identifier) "i"
(<) "<"
(identifier) "n_shds"
(;) ";"
(update_expression) "++i"
(++) "++"
(identifier) "i"
()) ")"
(expression_statement) "glDetachShader(prg, shds[i]);"
(call_expression) "glDetachShader(prg, shds[i])"
(identifier) "glDetachShader"
(argument_list) "(prg, shds[i])"
(() "("
(identifier) "prg"
(,) ","
(subscript_expression) "shds[i]"
(identifier) "shds"
([) "["
(identifier) "i"
(]) "]"
()) ")"
(;) ";"
(expression_statement) "glValidateProgram(prg);"
(call_expression) "glValidateProgram(prg)"
(identifier) "glValidateProgram"
(argument_list) "(prg)"
(() "("
(identifier) "prg"
()) ")"
(;) ";"
(expression_statement) "glUseProgram(prg);"
(call_expression) "glUseProgram(prg)"
(identifier) "glUseProgram"
(argument_list) "(prg)"
(() "("
(identifier) "prg"
()) ")"
(;) ";"
(for_statement) "for (int i = 0; i < n_vars; ++i)locs[i]=glGetUniformLocation(prg,names[i]);"
(for) "for"
(() "("
(declaration) "int i = 0;"
(primitive_type) "int"
(init_declarator) "i = 0"
(identifier) "i"
(=) "="
(number_literal) "0"
(;) ";"
(binary_expression) "i < n_vars"
(identifier) "i"
(<) "<"
(identifier) "n_vars"
(;) ";"
(update_expression) "++i"
(++) "++"
(identifier) "i"
()) ")"
(expression_statement) "locs[i]=glGetUniformLocation(prg,names[i]);"
(assignment_expression) "locs[i]=glGetUniformLocation(prg,names[i])"
(subscript_expression) "locs[i]"
(identifier) "locs"
([) "["
(identifier) "i"
(]) "]"
(=) "="
(call_expression) "glGetUniformLocation(prg,names[i])"
(identifier) "glGetUniformLocation"
(argument_list) "(prg,names[i])"
(() "("
(identifier) "prg"
(,) ","
(subscript_expression) "names[i]"
(identifier) "names"
([) "["
(identifier) "i"
(]) "]"
()) ")"
(;) ";"
(for_statement) "for (int i = 0; i < n_shds; ++i) shds[i] = rm_shd(shds[i]);"
(for) "for"
(() "("
(declaration) "int i = 0;"
(primitive_type) "int"
(init_declarator) "i = 0"
(identifier) "i"
(=) "="
(number_literal) "0"
(;) ";"
(binary_expression) "i < n_shds"
(identifier) "i"
(<) "<"
(identifier) "n_shds"
(;) ";"
(update_expression) "++i"
(++) "++"
(identifier) "i"
()) ")"
(expression_statement) "shds[i] = rm_shd(shds[i]);"
(assignment_expression) "shds[i] = rm_shd(shds[i])"
(subscript_expression) "shds[i]"
(identifier) "shds"
([) "["
(identifier) "i"
(]) "]"
(=) "="
(call_expression) "rm_shd(shds[i])"
(identifier) "rm_shd"
(argument_list) "(shds[i])"
(() "("
(subscript_expression) "shds[i]"
(identifier) "shds"
([) "["
(identifier) "i"
(]) "]"
()) ")"
(;) ";"
(expression_statement) "free(shds);"
(call_expression) "free(shds)"
(identifier) "free"
(argument_list) "(shds)"
(() "("
(identifier) "shds"
()) ")"
(;) ";"
(return_statement) "return prg;"
(return) "return"
(identifier) "prg"
(;) ";"
(}) "}"
(function_definition) "GLuint rm_prg(GLuint prg)\n{\n glDeleteProgram(prg);\n return 0;\n}"
(type_identifier) "GLuint"
(function_declarator) "rm_prg(GLuint prg)"
(identifier) "rm_prg"
(parameter_list) "(GLuint prg)"
(() "("
(parameter_declaration) "GLuint prg"
(type_identifier) "GLuint"
(identifier) "prg"
()) ")"
(compound_statement) "{\n glDeleteProgram(prg);\n return 0;\n}"
({) "{"
(expression_statement) "glDeleteProgram(prg);"
(call_expression) "glDeleteProgram(prg)"
(identifier) "glDeleteProgram"
(argument_list) "(prg)"
(() "("
(identifier) "prg"
()) ")"
(;) ";"
(return_statement) "return 0;"
(return) "return"
(number_literal) "0"
(;) ";"
(}) "}"
(function_definition) "static GLuint mk_shd(const char *src, GLenum type)\n{\n GLuint shd = glCreateShader(type);\n glShaderSource(shd, 1, &src, NULL);\n glCompileShader(shd);\n return shd;\n}"
(storage_class_specifier) "static"
(static) "static"
(type_identifier) "GLuint"
(function_declarator) "mk_shd(const char *src, GLenum type)"
(identifier) "mk_shd"
(parameter_list) "(const char *src, GLenum type)"
(() "("
(parameter_declaration) "const char *src"
(type_qualifier) "const"
(const) "const"
(primitive_type) "char"
(pointer_declarator) "*src"
(*) "*"
(identifier) "src"
(,) ","
(parameter_declaration) "GLenum type"
(type_identifier) "GLenum"
(identifier) "type"
()) ")"
(compound_statement) "{\n GLuint shd = glCreateShader(type);\n glShaderSource(shd, 1, &src, NULL);\n glCompileShader(shd);\n return shd;\n}"
({) "{"
(declaration) "GLuint shd = glCreateShader(type);"
(type_identifier) "GLuint"
(init_declarator) "shd = glCreateShader(type)"
(identifier) "shd"
(=) "="
(call_expression) "glCreateShader(type)"
(identifier) "glCreateShader"
(argument_list) "(type)"
(() "("
(identifier) "type"
()) ")"
(;) ";"
(expression_statement) "glShaderSource(shd, 1, &src, NULL);"
(call_expression) "glShaderSource(shd, 1, &src, NULL)"
(identifier) "glShaderSource"
(argument_list) "(shd, 1, &src, NULL)"
(() "("
(identifier) "shd"
(,) ","
(number_literal) "1"
(,) ","
(pointer_expression) "&src"
(&) "&"
(identifier) "src"
(,) ","
(null) "NULL"
(NULL) "NULL"
()) ")"
(;) ";"
(expression_statement) "glCompileShader(shd);"
(call_expression) "glCompileShader(shd)"
(identifier) "glCompileShader"
(argument_list) "(shd)"
(() "("
(identifier) "shd"
()) ")"
(;) ";"
(return_statement) "return shd;"
(return) "return"
(identifier) "shd"
(;) ";"
(}) "}"
(function_definition) "static GLuint rm_shd(GLuint shd)\n{\n glDeleteShader(shd);\n return 0;\n}"
(storage_class_specifier) "static"
(static) "static"
(type_identifier) "GLuint"
(function_declarator) "rm_shd(GLuint shd)"
(identifier) "rm_shd"
(parameter_list) "(GLuint shd)"
(() "("
(parameter_declaration) "GLuint shd"
(type_identifier) "GLuint"
(identifier) "shd"
()) ")"
(compound_statement) "{\n glDeleteShader(shd);\n return 0;\n}"
({) "{"
(expression_statement) "glDeleteShader(shd);"
(call_expression) "glDeleteShader(shd)"
(identifier) "glDeleteShader"
(argument_list) "(shd)"
(() "("
(identifier) "shd"
()) ")"
(;) ";"
(return_statement) "return 0;"
(return) "return"
(number_literal) "0"
(;) ";"
(}) "}"
(function_definition) "GLuint mk_vbo(GLenum type, size_t sz, void *data, GLenum usage)\n{\n GLuint vbo;\n glGenBuffers(1, &vbo);\n glBindBuffer(type, vbo);\n glBufferData(type, sz, data, usage);\n return vbo;\n}"
(type_identifier) "GLuint"
(function_declarator) "mk_vbo(GLenum type, size_t sz, void *data, GLenum usage)"
(identifier) "mk_vbo"
(parameter_list) "(GLenum type, size_t sz, void *data, GLenum usage)"
(() "("
(parameter_declaration) "GLenum type"
(type_identifier) "GLenum"
(identifier) "type"
(,) ","
(parameter_declaration) "size_t sz"
(primitive_type) "size_t"
(identifier) "sz"
(,) ","
(parameter_declaration) "void *data"
(primitive_type) "void"
(pointer_declarator) "*data"
(*) "*"
(identifier) "data"
(,) ","
(parameter_declaration) "GLenum usage"
(type_identifier) "GLenum"
(identifier) "usage"
()) ")"
(compound_statement) "{\n GLuint vbo;\n glGenBuffers(1, &vbo);\n glBindBuffer(type, vbo);\n glBufferData(type, sz, data, usage);\n return vbo;\n}"
({) "{"
(declaration) "GLuint vbo;"
(type_identifier) "GLuint"
(identifier) "vbo"
(;) ";"
(expression_statement) "glGenBuffers(1, &vbo);"
(call_expression) "glGenBuffers(1, &vbo)"
(identifier) "glGenBuffers"
(argument_list) "(1, &vbo)"
(() "("
(number_literal) "1"
(,) ","
(pointer_expression) "&vbo"
(&) "&"
(identifier) "vbo"
()) ")"
(;) ";"
(expression_statement) "glBindBuffer(type, vbo);"
(call_expression) "glBindBuffer(type, vbo)"
(identifier) "glBindBuffer"
(argument_list) "(type, vbo)"
(() "("
(identifier) "type"
(,) ","
(identifier) "vbo"
()) ")"
(;) ";"
(expression_statement) "glBufferData(type, sz, data, usage);"
(call_expression) "glBufferData(type, sz, data, usage)"
(identifier) "glBufferData"
(argument_list) "(type, sz, data, usage)"
(() "("
(identifier) "type"
(,) ","
(identifier) "sz"
(,) ","
(identifier) "data"
(,) ","
(identifier) "usage"
()) ")"
(;) ";"
(return_statement) "return vbo;"
(return) "return"
(identifier) "vbo"
(;) ";"
(}) "}"
(function_definition) "GLuint rm_vbo(GLuint vbo)\n{\n glDeleteBuffers(1, &vbo);\n return 0;\n}"
(type_identifier) "GLuint"
(function_declarator) "rm_vbo(GLuint vbo)"
(identifier) "rm_vbo"
(parameter_list) "(GLuint vbo)"
(() "("
(parameter_declaration) "GLuint vbo"
(type_identifier) "GLuint"
(identifier) "vbo"
()) ")"
(compound_statement) "{\n glDeleteBuffers(1, &vbo);\n return 0;\n}"
({) "{"
(expression_statement) "glDeleteBuffers(1, &vbo);"
(call_expression) "glDeleteBuffers(1, &vbo)"
(identifier) "glDeleteBuffers"
(argument_list) "(1, &vbo)"
(() "("
(number_literal) "1"
(,) ","
(pointer_expression) "&vbo"
(&) "&"
(identifier) "vbo"
()) ")"
(;) ";"
(return_statement) "return 0;"
(return) "return"
(number_literal) "0"
(;) ";"
(}) "}"
| 859
| 0
|
{"language": "c", "success": true, "metadata": {"lines": 89, "avg_line_length": 26.45, "nodes": 520, "errors": 0, "source_hash": "b8604c7fd2846fcdde25b3d2386bac05da37245a1c1b8a8b26d05a453f5c881f", "categorized_nodes": 371}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"gutil.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": "\"gutil.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": "declaration", "text": "static GLuint mk_shd(const char *src, GLenum type);", "parent": null, "children": [7, 8], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 51}}, {"id": 7, "type": "type_identifier", "text": "GLuint", "parent": 6, "children": [], "start_point": {"row": 4, "column": 7}, "end_point": {"row": 4, "column": 13}}, {"id": 8, "type": "function_declarator", "text": "mk_shd(const char *src, GLenum type)", "parent": 6, "children": [9, 10], "start_point": {"row": 4, "column": 14}, "end_point": {"row": 4, "column": 50}}, {"id": 9, "type": "identifier", "text": "mk_shd", "parent": 8, "children": [], "start_point": {"row": 4, "column": 14}, "end_point": {"row": 4, "column": 20}}, {"id": 10, "type": "parameter_list", "text": "(const char *src, GLenum type)", "parent": 8, "children": [11, 16], "start_point": {"row": 4, "column": 20}, "end_point": {"row": 4, "column": 50}}, {"id": 11, "type": "parameter_declaration", "text": "const char *src", "parent": 10, "children": [12, 13], "start_point": {"row": 4, "column": 21}, "end_point": {"row": 4, "column": 36}}, {"id": 12, "type": "primitive_type", "text": "char", "parent": 11, "children": [], "start_point": {"row": 4, "column": 27}, "end_point": {"row": 4, "column": 31}}, {"id": 13, "type": "pointer_declarator", "text": "*src", "parent": 11, "children": [14, 15], "start_point": {"row": 4, "column": 32}, "end_point": {"row": 4, "column": 36}}, {"id": 14, "type": "*", "text": "*", "parent": 13, "children": [], "start_point": {"row": 4, "column": 32}, "end_point": {"row": 4, "column": 33}}, {"id": 15, "type": "identifier", "text": "src", "parent": 13, "children": [], "start_point": {"row": 4, "column": 33}, "end_point": {"row": 4, "column": 36}}, {"id": 16, "type": "parameter_declaration", "text": "GLenum type", "parent": 10, "children": [17, 18], "start_point": {"row": 4, "column": 38}, "end_point": {"row": 4, "column": 49}}, {"id": 17, "type": "type_identifier", "text": "GLenum", "parent": 16, "children": [], "start_point": {"row": 4, "column": 38}, "end_point": {"row": 4, "column": 44}}, {"id": 18, "type": "identifier", "text": "type", "parent": 16, "children": [], "start_point": {"row": 4, "column": 45}, "end_point": {"row": 4, "column": 49}}, {"id": 19, "type": "declaration", "text": "static GLuint rm_shd(GLuint shd);", "parent": null, "children": [20, 21], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 33}}, {"id": 20, "type": "type_identifier", "text": "GLuint", "parent": 19, "children": [], "start_point": {"row": 5, "column": 7}, "end_point": {"row": 5, "column": 13}}, {"id": 21, "type": "function_declarator", "text": "rm_shd(GLuint shd)", "parent": 19, "children": [22, 23], "start_point": {"row": 5, "column": 14}, "end_point": {"row": 5, "column": 32}}, {"id": 22, "type": "identifier", "text": "rm_shd", "parent": 21, "children": [], "start_point": {"row": 5, "column": 14}, "end_point": {"row": 5, "column": 20}}, {"id": 23, "type": "parameter_list", "text": "(GLuint shd)", "parent": 21, "children": [24], "start_point": {"row": 5, "column": 20}, "end_point": {"row": 5, "column": 32}}, {"id": 24, "type": "parameter_declaration", "text": "GLuint shd", "parent": 23, "children": [25, 26], "start_point": {"row": 5, "column": 21}, "end_point": {"row": 5, "column": 31}}, {"id": 25, "type": "type_identifier", "text": "GLuint", "parent": 24, "children": [], "start_point": {"row": 5, "column": 21}, "end_point": {"row": 5, "column": 27}}, {"id": 26, "type": "identifier", "text": "shd", "parent": 24, "children": [], "start_point": {"row": 5, "column": 28}, "end_point": {"row": 5, "column": 31}}, {"id": 27, "type": "function_definition", "text": "void init_glfw(void)\n{\n glfwInit();\n}", "parent": null, "children": [28, 29], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 28, "type": "primitive_type", "text": "void", "parent": 27, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 4}}, {"id": 29, "type": "function_declarator", "text": "init_glfw(void)", "parent": 27, "children": [30, 31], "start_point": {"row": 7, "column": 5}, "end_point": {"row": 7, "column": 20}}, {"id": 30, "type": "identifier", "text": "init_glfw", "parent": 29, "children": [], "start_point": {"row": 7, "column": 5}, "end_point": {"row": 7, "column": 14}}, {"id": 31, "type": "parameter_list", "text": "(void)", "parent": 29, "children": [32], "start_point": {"row": 7, "column": 14}, "end_point": {"row": 7, "column": 20}}, {"id": 32, "type": "parameter_declaration", "text": "void", "parent": 31, "children": [33], "start_point": {"row": 7, "column": 15}, "end_point": {"row": 7, "column": 19}}, {"id": 33, "type": "primitive_type", "text": "void", "parent": 32, "children": [], "start_point": {"row": 7, "column": 15}, "end_point": {"row": 7, "column": 19}}, {"id": 34, "type": "call_expression", "text": "glfwInit()", "parent": 27, "children": [35, 36], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 14}}, {"id": 35, "type": "identifier", "text": "glfwInit", "parent": 34, "children": [], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 12}}, {"id": 36, "type": "argument_list", "text": "()", "parent": 34, "children": [], "start_point": {"row": 9, "column": 12}, "end_point": {"row": 9, "column": 14}}, {"id": 37, "type": "function_definition", "text": "void exit_glfw(void)\n{\n glfwTerminate();\n}", "parent": null, "children": [38, 39], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 38, "type": "primitive_type", "text": "void", "parent": 37, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 4}}, {"id": 39, "type": "function_declarator", "text": "exit_glfw(void)", "parent": 37, "children": [40, 41], "start_point": {"row": 12, "column": 5}, "end_point": {"row": 12, "column": 20}}, {"id": 40, "type": "identifier", "text": "exit_glfw", "parent": 39, "children": [], "start_point": {"row": 12, "column": 5}, "end_point": {"row": 12, "column": 14}}, {"id": 41, "type": "parameter_list", "text": "(void)", "parent": 39, "children": [42], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 20}}, {"id": 42, "type": "parameter_declaration", "text": "void", "parent": 41, "children": [43], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 19}}, {"id": 43, "type": "primitive_type", "text": "void", "parent": 42, "children": [], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 19}}, {"id": 44, "type": "call_expression", "text": "glfwTerminate()", "parent": 37, "children": [45, 46], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 19}}, {"id": 45, "type": "identifier", "text": "glfwTerminate", "parent": 44, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 17}}, {"id": 46, "type": "argument_list", "text": "()", "parent": 44, "children": [], "start_point": {"row": 14, "column": 17}, "end_point": {"row": 14, "column": 19}}, {"id": 47, "type": "function_definition", "text": "GLFWwindow *mk_win(int w, int h, const char *title, bool rsz, bool fscr)\n{\n glfwWindowHint(GLFW_RESIZABLE, rsz);\n glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, GUTIL_CONTEXT_VERSION_MAJOR);\n glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, GUTIL_CONTEXT_VERSION_MINOR);\n glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GUTIL_OPENGL_FORWARD_COMPAT);\n glfwWindowHint(GLFW_OPENGL_PROFILE, GUTIL_OPENGL_PROFILE);\n glewExperimental = GUTIL_GLEW_EXPERIMENTAL;\n GLFWmonitor *mon = fscr ? glfwGetPrimaryMonitor() : NULL;\n GLFWwindow *win = glfwCreateWindow(w, h, title, mon, NULL);\n glfwMakeContextCurrent(win);\n glewInit();\n return win;\n}", "parent": null, "children": [48, 49], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 30, "column": 1}}, {"id": 48, "type": "type_identifier", "text": "GLFWwindow", "parent": 47, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 10}}, {"id": 49, "type": "pointer_declarator", "text": "*mk_win(int w, int h, const char *title, bool rsz, bool fscr)", "parent": 47, "children": [50, 51], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 72}}, {"id": 50, "type": "*", "text": "*", "parent": 49, "children": [], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 12}}, {"id": 51, "type": "function_declarator", "text": "mk_win(int w, int h, const char *title, bool rsz, bool fscr)", "parent": 49, "children": [52, 53], "start_point": {"row": 17, "column": 12}, "end_point": {"row": 17, "column": 72}}, {"id": 52, "type": "identifier", "text": "mk_win", "parent": 51, "children": [], "start_point": {"row": 17, "column": 12}, "end_point": {"row": 17, "column": 18}}, {"id": 53, "type": "parameter_list", "text": "(int w, int h, const char *title, bool rsz, bool fscr)", "parent": 51, "children": [54, 57, 60, 65, 68], "start_point": {"row": 17, "column": 18}, "end_point": {"row": 17, "column": 72}}, {"id": 54, "type": "parameter_declaration", "text": "int w", "parent": 53, "children": [55, 56], "start_point": {"row": 17, "column": 19}, "end_point": {"row": 17, "column": 24}}, {"id": 55, "type": "primitive_type", "text": "int", "parent": 54, "children": [], "start_point": {"row": 17, "column": 19}, "end_point": {"row": 17, "column": 22}}, {"id": 56, "type": "identifier", "text": "w", "parent": 54, "children": [], "start_point": {"row": 17, "column": 23}, "end_point": {"row": 17, "column": 24}}, {"id": 57, "type": "parameter_declaration", "text": "int h", "parent": 53, "children": [58, 59], "start_point": {"row": 17, "column": 26}, "end_point": {"row": 17, "column": 31}}, {"id": 58, "type": "primitive_type", "text": "int", "parent": 57, "children": [], "start_point": {"row": 17, "column": 26}, "end_point": {"row": 17, "column": 29}}, {"id": 59, "type": "identifier", "text": "h", "parent": 57, "children": [], "start_point": {"row": 17, "column": 30}, "end_point": {"row": 17, "column": 31}}, {"id": 60, "type": "parameter_declaration", "text": "const char *title", "parent": 53, "children": [61, 62], "start_point": {"row": 17, "column": 33}, "end_point": {"row": 17, "column": 50}}, {"id": 61, "type": "primitive_type", "text": "char", "parent": 60, "children": [], "start_point": {"row": 17, "column": 39}, "end_point": {"row": 17, "column": 43}}, {"id": 62, "type": "pointer_declarator", "text": "*title", "parent": 60, "children": [63, 64], "start_point": {"row": 17, "column": 44}, "end_point": {"row": 17, "column": 50}}, {"id": 63, "type": "*", "text": "*", "parent": 62, "children": [], "start_point": {"row": 17, "column": 44}, "end_point": {"row": 17, "column": 45}}, {"id": 64, "type": "identifier", "text": "title", "parent": 62, "children": [], "start_point": {"row": 17, "column": 45}, "end_point": {"row": 17, "column": 50}}, {"id": 65, "type": "parameter_declaration", "text": "bool rsz", "parent": 53, "children": [66, 67], "start_point": {"row": 17, "column": 52}, "end_point": {"row": 17, "column": 60}}, {"id": 66, "type": "primitive_type", "text": "bool", "parent": 65, "children": [], "start_point": {"row": 17, "column": 52}, "end_point": {"row": 17, "column": 56}}, {"id": 67, "type": "identifier", "text": "rsz", "parent": 65, "children": [], "start_point": {"row": 17, "column": 57}, "end_point": {"row": 17, "column": 60}}, {"id": 68, "type": "parameter_declaration", "text": "bool fscr", "parent": 53, "children": [69, 70], "start_point": {"row": 17, "column": 62}, "end_point": {"row": 17, "column": 71}}, {"id": 69, "type": "primitive_type", "text": "bool", "parent": 68, "children": [], "start_point": {"row": 17, "column": 62}, "end_point": {"row": 17, "column": 66}}, {"id": 70, "type": "identifier", "text": "fscr", "parent": 68, "children": [], "start_point": {"row": 17, "column": 67}, "end_point": {"row": 17, "column": 71}}, {"id": 71, "type": "call_expression", "text": "glfwWindowHint(GLFW_RESIZABLE, rsz)", "parent": 47, "children": [72, 73], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 39}}, {"id": 72, "type": "identifier", "text": "glfwWindowHint", "parent": 71, "children": [], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 18}}, {"id": 73, "type": "argument_list", "text": "(GLFW_RESIZABLE, rsz)", "parent": 71, "children": [74, 75], "start_point": {"row": 19, "column": 18}, "end_point": {"row": 19, "column": 39}}, {"id": 74, "type": "identifier", "text": "GLFW_RESIZABLE", "parent": 73, "children": [], "start_point": {"row": 19, "column": 19}, "end_point": {"row": 19, "column": 33}}, {"id": 75, "type": "identifier", "text": "rsz", "parent": 73, "children": [], "start_point": {"row": 19, "column": 35}, "end_point": {"row": 19, "column": 38}}, {"id": 76, "type": "call_expression", "text": "glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, GUTIL_CONTEXT_VERSION_MAJOR)", "parent": 47, "children": [77, 78], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 75}}, {"id": 77, "type": "identifier", "text": "glfwWindowHint", "parent": 76, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 18}}, {"id": 78, "type": "argument_list", "text": "(GLFW_CONTEXT_VERSION_MAJOR, GUTIL_CONTEXT_VERSION_MAJOR)", "parent": 76, "children": [79, 80], "start_point": {"row": 20, "column": 18}, "end_point": {"row": 20, "column": 75}}, {"id": 79, "type": "identifier", "text": "GLFW_CONTEXT_VERSION_MAJOR", "parent": 78, "children": [], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 45}}, {"id": 80, "type": "identifier", "text": "GUTIL_CONTEXT_VERSION_MAJOR", "parent": 78, "children": [], "start_point": {"row": 20, "column": 47}, "end_point": {"row": 20, "column": 74}}, {"id": 81, "type": "call_expression", "text": "glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, GUTIL_CONTEXT_VERSION_MINOR)", "parent": 47, "children": [82, 83], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 75}}, {"id": 82, "type": "identifier", "text": "glfwWindowHint", "parent": 81, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 18}}, {"id": 83, "type": "argument_list", "text": "(GLFW_CONTEXT_VERSION_MINOR, GUTIL_CONTEXT_VERSION_MINOR)", "parent": 81, "children": [84, 85], "start_point": {"row": 21, "column": 18}, "end_point": {"row": 21, "column": 75}}, {"id": 84, "type": "identifier", "text": "GLFW_CONTEXT_VERSION_MINOR", "parent": 83, "children": [], "start_point": {"row": 21, "column": 19}, "end_point": {"row": 21, "column": 45}}, {"id": 85, "type": "identifier", "text": "GUTIL_CONTEXT_VERSION_MINOR", "parent": 83, "children": [], "start_point": {"row": 21, "column": 47}, "end_point": {"row": 21, "column": 74}}, {"id": 86, "type": "call_expression", "text": "glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GUTIL_OPENGL_FORWARD_COMPAT)", "parent": 47, "children": [87, 88], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 75}}, {"id": 87, "type": "identifier", "text": "glfwWindowHint", "parent": 86, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 18}}, {"id": 88, "type": "argument_list", "text": "(GLFW_OPENGL_FORWARD_COMPAT, GUTIL_OPENGL_FORWARD_COMPAT)", "parent": 86, "children": [89, 90], "start_point": {"row": 22, "column": 18}, "end_point": {"row": 22, "column": 75}}, {"id": 89, "type": "identifier", "text": "GLFW_OPENGL_FORWARD_COMPAT", "parent": 88, "children": [], "start_point": {"row": 22, "column": 19}, "end_point": {"row": 22, "column": 45}}, {"id": 90, "type": "identifier", "text": "GUTIL_OPENGL_FORWARD_COMPAT", "parent": 88, "children": [], "start_point": {"row": 22, "column": 47}, "end_point": {"row": 22, "column": 74}}, {"id": 91, "type": "call_expression", "text": "glfwWindowHint(GLFW_OPENGL_PROFILE, GUTIL_OPENGL_PROFILE)", "parent": 47, "children": [92, 93], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 68}}, {"id": 92, "type": "identifier", "text": "glfwWindowHint", "parent": 91, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 18}}, {"id": 93, "type": "argument_list", "text": "(GLFW_OPENGL_PROFILE, GUTIL_OPENGL_PROFILE)", "parent": 91, "children": [94, 95], "start_point": {"row": 23, "column": 18}, "end_point": {"row": 23, "column": 68}}, {"id": 94, "type": "identifier", "text": "GLFW_OPENGL_PROFILE", "parent": 93, "children": [], "start_point": {"row": 23, "column": 19}, "end_point": {"row": 23, "column": 38}}, {"id": 95, "type": "identifier", "text": "GUTIL_OPENGL_PROFILE", "parent": 93, "children": [], "start_point": {"row": 23, "column": 47}, "end_point": {"row": 23, "column": 67}}, {"id": 96, "type": "assignment_expression", "text": "glewExperimental = GUTIL_GLEW_EXPERIMENTAL", "parent": 47, "children": [97, 98, 99], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 70}}, {"id": 97, "type": "identifier", "text": "glewExperimental", "parent": 96, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 20}}, {"id": 98, "type": "=", "text": "=", "parent": 96, "children": [], "start_point": {"row": 24, "column": 21}, "end_point": {"row": 24, "column": 22}}, {"id": 99, "type": "identifier", "text": "GUTIL_GLEW_EXPERIMENTAL", "parent": 96, "children": [], "start_point": {"row": 24, "column": 47}, "end_point": {"row": 24, "column": 70}}, {"id": 100, "type": "declaration", "text": "GLFWmonitor *mon = fscr ? glfwGetPrimaryMonitor() : NULL;", "parent": 47, "children": [101, 102], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 61}}, {"id": 101, "type": "type_identifier", "text": "GLFWmonitor", "parent": 100, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 15}}, {"id": 102, "type": "init_declarator", "text": "*mon = fscr ? glfwGetPrimaryMonitor() : NULL", "parent": 100, "children": [103, 106, 107], "start_point": {"row": 25, "column": 16}, "end_point": {"row": 25, "column": 60}}, {"id": 103, "type": "pointer_declarator", "text": "*mon", "parent": 102, "children": [104, 105], "start_point": {"row": 25, "column": 16}, "end_point": {"row": 25, "column": 20}}, {"id": 104, "type": "*", "text": "*", "parent": 103, "children": [], "start_point": {"row": 25, "column": 16}, "end_point": {"row": 25, "column": 17}}, {"id": 105, "type": "identifier", "text": "mon", "parent": 103, "children": [], "start_point": {"row": 25, "column": 17}, "end_point": {"row": 25, "column": 20}}, {"id": 106, "type": "=", "text": "=", "parent": 102, "children": [], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 22}}, {"id": 107, "type": "conditional_expression", "text": "fscr ? glfwGetPrimaryMonitor() : NULL", "parent": 102, "children": [108, 109, 110, 113], "start_point": {"row": 25, "column": 23}, "end_point": {"row": 25, "column": 60}}, {"id": 108, "type": "identifier", "text": "fscr", "parent": 107, "children": [], "start_point": {"row": 25, "column": 23}, "end_point": {"row": 25, "column": 27}}, {"id": 109, "type": "?", "text": "?", "parent": 107, "children": [], "start_point": {"row": 25, "column": 28}, "end_point": {"row": 25, "column": 29}}, {"id": 110, "type": "call_expression", "text": "glfwGetPrimaryMonitor()", "parent": 107, "children": [111, 112], "start_point": {"row": 25, "column": 30}, "end_point": {"row": 25, "column": 53}}, {"id": 111, "type": "identifier", "text": "glfwGetPrimaryMonitor", "parent": 110, "children": [], "start_point": {"row": 25, "column": 30}, "end_point": {"row": 25, "column": 51}}, {"id": 112, "type": "argument_list", "text": "()", "parent": 110, "children": [], "start_point": {"row": 25, "column": 51}, "end_point": {"row": 25, "column": 53}}, {"id": 113, "type": "null", "text": "NULL", "parent": 107, "children": [114], "start_point": {"row": 25, "column": 56}, "end_point": {"row": 25, "column": 60}}, {"id": 114, "type": "NULL", "text": "NULL", "parent": 113, "children": [], "start_point": {"row": 25, "column": 56}, "end_point": {"row": 25, "column": 60}}, {"id": 115, "type": "declaration", "text": "GLFWwindow *win = glfwCreateWindow(w, h, title, mon, NULL);", "parent": 47, "children": [116, 117], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 64}}, {"id": 116, "type": "type_identifier", "text": "GLFWwindow", "parent": 115, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 14}}, {"id": 117, "type": "init_declarator", "text": "*win = glfwCreateWindow(w, h, title, mon, NULL)", "parent": 115, "children": [118, 121, 122], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 63}}, {"id": 118, "type": "pointer_declarator", "text": "*win", "parent": 117, "children": [119, 120], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 20}}, {"id": 119, "type": "*", "text": "*", "parent": 118, "children": [], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 17}}, {"id": 120, "type": "identifier", "text": "win", "parent": 118, "children": [], "start_point": {"row": 26, "column": 17}, "end_point": {"row": 26, "column": 20}}, {"id": 121, "type": "=", "text": "=", "parent": 117, "children": [], "start_point": {"row": 26, "column": 21}, "end_point": {"row": 26, "column": 22}}, {"id": 122, "type": "call_expression", "text": "glfwCreateWindow(w, h, title, mon, NULL)", "parent": 117, "children": [123, 124], "start_point": {"row": 26, "column": 23}, "end_point": {"row": 26, "column": 63}}, {"id": 123, "type": "identifier", "text": "glfwCreateWindow", "parent": 122, "children": [], "start_point": {"row": 26, "column": 23}, "end_point": {"row": 26, "column": 39}}, {"id": 124, "type": "argument_list", "text": "(w, h, title, mon, NULL)", "parent": 122, "children": [125, 126, 127, 128, 129], "start_point": {"row": 26, "column": 39}, "end_point": {"row": 26, "column": 63}}, {"id": 125, "type": "identifier", "text": "w", "parent": 124, "children": [], "start_point": {"row": 26, "column": 40}, "end_point": {"row": 26, "column": 41}}, {"id": 126, "type": "identifier", "text": "h", "parent": 124, "children": [], "start_point": {"row": 26, "column": 43}, "end_point": {"row": 26, "column": 44}}, {"id": 127, "type": "identifier", "text": "title", "parent": 124, "children": [], "start_point": {"row": 26, "column": 46}, "end_point": {"row": 26, "column": 51}}, {"id": 128, "type": "identifier", "text": "mon", "parent": 124, "children": [], "start_point": {"row": 26, "column": 53}, "end_point": {"row": 26, "column": 56}}, {"id": 129, "type": "null", "text": "NULL", "parent": 124, "children": [130], "start_point": {"row": 26, "column": 58}, "end_point": {"row": 26, "column": 62}}, {"id": 130, "type": "NULL", "text": "NULL", "parent": 129, "children": [], "start_point": {"row": 26, "column": 58}, "end_point": {"row": 26, "column": 62}}, {"id": 131, "type": "call_expression", "text": "glfwMakeContextCurrent(win)", "parent": 47, "children": [132, 133], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 31}}, {"id": 132, "type": "identifier", "text": "glfwMakeContextCurrent", "parent": 131, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 26}}, {"id": 133, "type": "argument_list", "text": "(win)", "parent": 131, "children": [134], "start_point": {"row": 27, "column": 26}, "end_point": {"row": 27, "column": 31}}, {"id": 134, "type": "identifier", "text": "win", "parent": 133, "children": [], "start_point": {"row": 27, "column": 27}, "end_point": {"row": 27, "column": 30}}, {"id": 135, "type": "call_expression", "text": "glewInit()", "parent": 47, "children": [136, 137], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 14}}, {"id": 136, "type": "identifier", "text": "glewInit", "parent": 135, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 12}}, {"id": 137, "type": "argument_list", "text": "()", "parent": 135, "children": [], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 14}}, {"id": 138, "type": "return_statement", "text": "return win;", "parent": 47, "children": [139], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 15}}, {"id": 139, "type": "identifier", "text": "win", "parent": 138, "children": [], "start_point": {"row": 29, "column": 11}, "end_point": {"row": 29, "column": 14}}, {"id": 140, "type": "function_definition", "text": "GLFWwindow *rm_win(GLFWwindow *win)\n{\n glfwDestroyWindow(win);\n return NULL;\n}", "parent": null, "children": [141, 142], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 36, "column": 1}}, {"id": 141, "type": "type_identifier", "text": "GLFWwindow", "parent": 140, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 10}}, {"id": 142, "type": "pointer_declarator", "text": "*rm_win(GLFWwindow *win)", "parent": 140, "children": [143, 144], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 35}}, {"id": 143, "type": "*", "text": "*", "parent": 142, "children": [], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 12}}, {"id": 144, "type": "function_declarator", "text": "rm_win(GLFWwindow *win)", "parent": 142, "children": [145, 146], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 35}}, {"id": 145, "type": "identifier", "text": "rm_win", "parent": 144, "children": [], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 18}}, {"id": 146, "type": "parameter_list", "text": "(GLFWwindow *win)", "parent": 144, "children": [147], "start_point": {"row": 32, "column": 18}, "end_point": {"row": 32, "column": 35}}, {"id": 147, "type": "parameter_declaration", "text": "GLFWwindow *win", "parent": 146, "children": [148, 149], "start_point": {"row": 32, "column": 19}, "end_point": {"row": 32, "column": 34}}, {"id": 148, "type": "type_identifier", "text": "GLFWwindow", "parent": 147, "children": [], "start_point": {"row": 32, "column": 19}, "end_point": {"row": 32, "column": 29}}, {"id": 149, "type": "pointer_declarator", "text": "*win", "parent": 147, "children": [150, 151], "start_point": {"row": 32, "column": 30}, "end_point": {"row": 32, "column": 34}}, {"id": 150, "type": "*", "text": "*", "parent": 149, "children": [], "start_point": {"row": 32, "column": 30}, "end_point": {"row": 32, "column": 31}}, {"id": 151, "type": "identifier", "text": "win", "parent": 149, "children": [], "start_point": {"row": 32, "column": 31}, "end_point": {"row": 32, "column": 34}}, {"id": 152, "type": "call_expression", "text": "glfwDestroyWindow(win)", "parent": 140, "children": [153, 154], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 26}}, {"id": 153, "type": "identifier", "text": "glfwDestroyWindow", "parent": 152, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 21}}, {"id": 154, "type": "argument_list", "text": "(win)", "parent": 152, "children": [155], "start_point": {"row": 34, "column": 21}, "end_point": {"row": 34, "column": 26}}, {"id": 155, "type": "identifier", "text": "win", "parent": 154, "children": [], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 34, "column": 25}}, {"id": 156, "type": "return_statement", "text": "return NULL;", "parent": 140, "children": [157], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 16}}, {"id": 157, "type": "null", "text": "NULL", "parent": 156, "children": [158], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 15}}, {"id": 158, "type": "NULL", "text": "NULL", "parent": 157, "children": [], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 15}}, {"id": 159, "type": "function_definition", "text": "GLuint mk_vao(void)\n{\n GLuint vao;\n glGenVertexArrays(1, &vao);\n glBindVertexArray(vao);\n return vao;\n}", "parent": null, "children": [160, 161], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 44, "column": 1}}, {"id": 160, "type": "type_identifier", "text": "GLuint", "parent": 159, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 6}}, {"id": 161, "type": "function_declarator", "text": "mk_vao(void)", "parent": 159, "children": [162, 163], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 19}}, {"id": 162, "type": "identifier", "text": "mk_vao", "parent": 161, "children": [], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 13}}, {"id": 163, "type": "parameter_list", "text": "(void)", "parent": 161, "children": [164], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 19}}, {"id": 164, "type": "parameter_declaration", "text": "void", "parent": 163, "children": [165], "start_point": {"row": 38, "column": 14}, "end_point": {"row": 38, "column": 18}}, {"id": 165, "type": "primitive_type", "text": "void", "parent": 164, "children": [], "start_point": {"row": 38, "column": 14}, "end_point": {"row": 38, "column": 18}}, {"id": 166, "type": "declaration", "text": "GLuint vao;", "parent": 159, "children": [167, 168], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 15}}, {"id": 167, "type": "type_identifier", "text": "GLuint", "parent": 166, "children": [], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 10}}, {"id": 168, "type": "identifier", "text": "vao", "parent": 166, "children": [], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 14}}, {"id": 169, "type": "call_expression", "text": "glGenVertexArrays(1, &vao)", "parent": 159, "children": [170, 171], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 30}}, {"id": 170, "type": "identifier", "text": "glGenVertexArrays", "parent": 169, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 21}}, {"id": 171, "type": "argument_list", "text": "(1, &vao)", "parent": 169, "children": [172, 173], "start_point": {"row": 41, "column": 21}, "end_point": {"row": 41, "column": 30}}, {"id": 172, "type": "number_literal", "text": "1", "parent": 171, "children": [], "start_point": {"row": 41, "column": 22}, "end_point": {"row": 41, "column": 23}}, {"id": 173, "type": "pointer_expression", "text": "&vao", "parent": 171, "children": [174], "start_point": {"row": 41, "column": 25}, "end_point": {"row": 41, "column": 29}}, {"id": 174, "type": "identifier", "text": "vao", "parent": 173, "children": [], "start_point": {"row": 41, "column": 26}, "end_point": {"row": 41, "column": 29}}, {"id": 175, "type": "call_expression", "text": "glBindVertexArray(vao)", "parent": 159, "children": [176, 177], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 26}}, {"id": 176, "type": "identifier", "text": "glBindVertexArray", "parent": 175, "children": [], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 21}}, {"id": 177, "type": "argument_list", "text": "(vao)", "parent": 175, "children": [178], "start_point": {"row": 42, "column": 21}, "end_point": {"row": 42, "column": 26}}, {"id": 178, "type": "identifier", "text": "vao", "parent": 177, "children": [], "start_point": {"row": 42, "column": 22}, "end_point": {"row": 42, "column": 25}}, {"id": 179, "type": "return_statement", "text": "return vao;", "parent": 159, "children": [180], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 15}}, {"id": 180, "type": "identifier", "text": "vao", "parent": 179, "children": [], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 14}}, {"id": 181, "type": "function_definition", "text": "GLuint rm_vao(GLuint vao)\n{\n glDeleteVertexArrays(1, &vao);\n return 0;\n}", "parent": null, "children": [182, 183], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 50, "column": 1}}, {"id": 182, "type": "type_identifier", "text": "GLuint", "parent": 181, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 6}}, {"id": 183, "type": "function_declarator", "text": "rm_vao(GLuint vao)", "parent": 181, "children": [184, 185], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 25}}, {"id": 184, "type": "identifier", "text": "rm_vao", "parent": 183, "children": [], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 13}}, {"id": 185, "type": "parameter_list", "text": "(GLuint vao)", "parent": 183, "children": [186], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 25}}, {"id": 186, "type": "parameter_declaration", "text": "GLuint vao", "parent": 185, "children": [187, 188], "start_point": {"row": 46, "column": 14}, "end_point": {"row": 46, "column": 24}}, {"id": 187, "type": "type_identifier", "text": "GLuint", "parent": 186, "children": [], "start_point": {"row": 46, "column": 14}, "end_point": {"row": 46, "column": 20}}, {"id": 188, "type": "identifier", "text": "vao", "parent": 186, "children": [], "start_point": {"row": 46, "column": 21}, "end_point": {"row": 46, "column": 24}}, {"id": 189, "type": "call_expression", "text": "glDeleteVertexArrays(1, &vao)", "parent": 181, "children": [190, 191], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 33}}, {"id": 190, "type": "identifier", "text": "glDeleteVertexArrays", "parent": 189, "children": [], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 24}}, {"id": 191, "type": "argument_list", "text": "(1, &vao)", "parent": 189, "children": [192, 193], "start_point": {"row": 48, "column": 24}, "end_point": {"row": 48, "column": 33}}, {"id": 192, "type": "number_literal", "text": "1", "parent": 191, "children": [], "start_point": {"row": 48, "column": 25}, "end_point": {"row": 48, "column": 26}}, {"id": 193, "type": "pointer_expression", "text": "&vao", "parent": 191, "children": [194], "start_point": {"row": 48, "column": 28}, "end_point": {"row": 48, "column": 32}}, {"id": 194, "type": "identifier", "text": "vao", "parent": 193, "children": [], "start_point": {"row": 48, "column": 29}, "end_point": {"row": 48, "column": 32}}, {"id": 195, "type": "return_statement", "text": "return 0;", "parent": 181, "children": [196], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 13}}, {"id": 196, "type": "number_literal", "text": "0", "parent": 195, "children": [], "start_point": {"row": 49, "column": 11}, "end_point": {"row": 49, "column": 12}}, {"id": 197, "type": "function_definition", "text": "GLuint mk_prg(int n_shds, const char **srcs, const GLenum *types,\n int n_vars, const char **names, GLint *locs)\n{\n GLuint prg = glCreateProgram();\n GLuint *shds = malloc(n_shds * sizeof(*shds));\n for (int i = 0; i < n_shds; ++i) shds[i] = mk_shd(srcs[i], types[i]);\n\n for (int i = 0; i < n_shds; ++i) glAttachShader(prg, shds[i]);\n glLinkProgram(prg);\n for (int i = 0; i < n_shds; ++i) glDetachShader(prg, shds[i]);\n\n glValidateProgram(prg);\n glUseProgram(prg);\n for (int i = 0; i < n_vars; ++i)locs[i]=glGetUniformLocation(prg,names[i]);\n\n for (int i = 0; i < n_shds; ++i) shds[i] = rm_shd(shds[i]);\n free(shds);\n return prg;\n}", "parent": null, "children": [198, 199], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 70, "column": 1}}, {"id": 198, "type": "type_identifier", "text": "GLuint", "parent": 197, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 6}}, {"id": 199, "type": "function_declarator", "text": "mk_prg(int n_shds, const char **srcs, const GLenum *types,\n int n_vars, const char **names, GLint *locs)", "parent": 197, "children": [200, 201], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 53, "column": 58}}, {"id": 200, "type": "identifier", "text": "mk_prg", "parent": 199, "children": [], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 13}}, {"id": 201, "type": "parameter_list", "text": "(int n_shds, const char **srcs, const GLenum *types,\n int n_vars, const char **names, GLint *locs)", "parent": 199, "children": [202, 205, 212, 217, 220, 227], "start_point": {"row": 52, "column": 13}, "end_point": {"row": 53, "column": 58}}, {"id": 202, "type": "parameter_declaration", "text": "int n_shds", "parent": 201, "children": [203, 204], "start_point": {"row": 52, "column": 14}, "end_point": {"row": 52, "column": 24}}, {"id": 203, "type": "primitive_type", "text": "int", "parent": 202, "children": [], "start_point": {"row": 52, "column": 14}, "end_point": {"row": 52, "column": 17}}, {"id": 204, "type": "identifier", "text": "n_shds", "parent": 202, "children": [], "start_point": {"row": 52, "column": 18}, "end_point": {"row": 52, "column": 24}}, {"id": 205, "type": "parameter_declaration", "text": "const char **srcs", "parent": 201, "children": [206, 207], "start_point": {"row": 52, "column": 26}, "end_point": {"row": 52, "column": 43}}, {"id": 206, "type": "primitive_type", "text": "char", "parent": 205, "children": [], "start_point": {"row": 52, "column": 32}, "end_point": {"row": 52, "column": 36}}, {"id": 207, "type": "pointer_declarator", "text": "**srcs", "parent": 205, "children": [208, 209], "start_point": {"row": 52, "column": 37}, "end_point": {"row": 52, "column": 43}}, {"id": 208, "type": "*", "text": "*", "parent": 207, "children": [], "start_point": {"row": 52, "column": 37}, "end_point": {"row": 52, "column": 38}}, {"id": 209, "type": "pointer_declarator", "text": "*srcs", "parent": 207, "children": [210, 211], "start_point": {"row": 52, "column": 38}, "end_point": {"row": 52, "column": 43}}, {"id": 210, "type": "*", "text": "*", "parent": 209, "children": [], "start_point": {"row": 52, "column": 38}, "end_point": {"row": 52, "column": 39}}, {"id": 211, "type": "identifier", "text": "srcs", "parent": 209, "children": [], "start_point": {"row": 52, "column": 39}, "end_point": {"row": 52, "column": 43}}, {"id": 212, "type": "parameter_declaration", "text": "const GLenum *types", "parent": 201, "children": [213, 214], "start_point": {"row": 52, "column": 45}, "end_point": {"row": 52, "column": 64}}, {"id": 213, "type": "type_identifier", "text": "GLenum", "parent": 212, "children": [], "start_point": {"row": 52, "column": 51}, "end_point": {"row": 52, "column": 57}}, {"id": 214, "type": "pointer_declarator", "text": "*types", "parent": 212, "children": [215, 216], "start_point": {"row": 52, "column": 58}, "end_point": {"row": 52, "column": 64}}, {"id": 215, "type": "*", "text": "*", "parent": 214, "children": [], "start_point": {"row": 52, "column": 58}, "end_point": {"row": 52, "column": 59}}, {"id": 216, "type": "identifier", "text": "types", "parent": 214, "children": [], "start_point": {"row": 52, "column": 59}, "end_point": {"row": 52, "column": 64}}, {"id": 217, "type": "parameter_declaration", "text": "int n_vars", "parent": 201, "children": [218, 219], "start_point": {"row": 53, "column": 14}, "end_point": {"row": 53, "column": 24}}, {"id": 218, "type": "primitive_type", "text": "int", "parent": 217, "children": [], "start_point": {"row": 53, "column": 14}, "end_point": {"row": 53, "column": 17}}, {"id": 219, "type": "identifier", "text": "n_vars", "parent": 217, "children": [], "start_point": {"row": 53, "column": 18}, "end_point": {"row": 53, "column": 24}}, {"id": 220, "type": "parameter_declaration", "text": "const char **names", "parent": 201, "children": [221, 222], "start_point": {"row": 53, "column": 26}, "end_point": {"row": 53, "column": 44}}, {"id": 221, "type": "primitive_type", "text": "char", "parent": 220, "children": [], "start_point": {"row": 53, "column": 32}, "end_point": {"row": 53, "column": 36}}, {"id": 222, "type": "pointer_declarator", "text": "**names", "parent": 220, "children": [223, 224], "start_point": {"row": 53, "column": 37}, "end_point": {"row": 53, "column": 44}}, {"id": 223, "type": "*", "text": "*", "parent": 222, "children": [], "start_point": {"row": 53, "column": 37}, "end_point": {"row": 53, "column": 38}}, {"id": 224, "type": "pointer_declarator", "text": "*names", "parent": 222, "children": [225, 226], "start_point": {"row": 53, "column": 38}, "end_point": {"row": 53, "column": 44}}, {"id": 225, "type": "*", "text": "*", "parent": 224, "children": [], "start_point": {"row": 53, "column": 38}, "end_point": {"row": 53, "column": 39}}, {"id": 226, "type": "identifier", "text": "names", "parent": 224, "children": [], "start_point": {"row": 53, "column": 39}, "end_point": {"row": 53, "column": 44}}, {"id": 227, "type": "parameter_declaration", "text": "GLint *locs", "parent": 201, "children": [228, 229], "start_point": {"row": 53, "column": 46}, "end_point": {"row": 53, "column": 57}}, {"id": 228, "type": "type_identifier", "text": "GLint", "parent": 227, "children": [], "start_point": {"row": 53, "column": 46}, "end_point": {"row": 53, "column": 51}}, {"id": 229, "type": "pointer_declarator", "text": "*locs", "parent": 227, "children": [230, 231], "start_point": {"row": 53, "column": 52}, "end_point": {"row": 53, "column": 57}}, {"id": 230, "type": "*", "text": "*", "parent": 229, "children": [], "start_point": {"row": 53, "column": 52}, "end_point": {"row": 53, "column": 53}}, {"id": 231, "type": "identifier", "text": "locs", "parent": 229, "children": [], "start_point": {"row": 53, "column": 53}, "end_point": {"row": 53, "column": 57}}, {"id": 232, "type": "declaration", "text": "GLuint prg = glCreateProgram();", "parent": 197, "children": [233, 234], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 35}}, {"id": 233, "type": "type_identifier", "text": "GLuint", "parent": 232, "children": [], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 10}}, {"id": 234, "type": "init_declarator", "text": "prg = glCreateProgram()", "parent": 232, "children": [235, 236, 237], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 34}}, {"id": 235, "type": "identifier", "text": "prg", "parent": 234, "children": [], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 14}}, {"id": 236, "type": "=", "text": "=", "parent": 234, "children": [], "start_point": {"row": 55, "column": 15}, "end_point": {"row": 55, "column": 16}}, {"id": 237, "type": "call_expression", "text": "glCreateProgram()", "parent": 234, "children": [238, 239], "start_point": {"row": 55, "column": 17}, "end_point": {"row": 55, "column": 34}}, {"id": 238, "type": "identifier", "text": "glCreateProgram", "parent": 237, "children": [], "start_point": {"row": 55, "column": 17}, "end_point": {"row": 55, "column": 32}}, {"id": 239, "type": "argument_list", "text": "()", "parent": 237, "children": [], "start_point": {"row": 55, "column": 32}, "end_point": {"row": 55, "column": 34}}, {"id": 240, "type": "declaration", "text": "GLuint *shds = malloc(n_shds * sizeof(*shds));", "parent": 197, "children": [241, 242], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 50}}, {"id": 241, "type": "type_identifier", "text": "GLuint", "parent": 240, "children": [], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 10}}, {"id": 242, "type": "init_declarator", "text": "*shds = malloc(n_shds * sizeof(*shds))", "parent": 240, "children": [243, 246, 247], "start_point": {"row": 56, "column": 11}, "end_point": {"row": 56, "column": 49}}, {"id": 243, "type": "pointer_declarator", "text": "*shds", "parent": 242, "children": [244, 245], "start_point": {"row": 56, "column": 11}, "end_point": {"row": 56, "column": 16}}, {"id": 244, "type": "*", "text": "*", "parent": 243, "children": [], "start_point": {"row": 56, "column": 11}, "end_point": {"row": 56, "column": 12}}, {"id": 245, "type": "identifier", "text": "shds", "parent": 243, "children": [], "start_point": {"row": 56, "column": 12}, "end_point": {"row": 56, "column": 16}}, {"id": 246, "type": "=", "text": "=", "parent": 242, "children": [], "start_point": {"row": 56, "column": 17}, "end_point": {"row": 56, "column": 18}}, {"id": 247, "type": "call_expression", "text": "malloc(n_shds * sizeof(*shds))", "parent": 242, "children": [248, 249], "start_point": {"row": 56, "column": 19}, "end_point": {"row": 56, "column": 49}}, {"id": 248, "type": "identifier", "text": "malloc", "parent": 247, "children": [], "start_point": {"row": 56, "column": 19}, "end_point": {"row": 56, "column": 25}}, {"id": 249, "type": "argument_list", "text": "(n_shds * sizeof(*shds))", "parent": 247, "children": [250], "start_point": {"row": 56, "column": 25}, "end_point": {"row": 56, "column": 49}}, {"id": 250, "type": "binary_expression", "text": "n_shds * sizeof(*shds)", "parent": 249, "children": [251, 252, 253], "start_point": {"row": 56, "column": 26}, "end_point": {"row": 56, "column": 48}}, {"id": 251, "type": "identifier", "text": "n_shds", "parent": 250, "children": [], "start_point": {"row": 56, "column": 26}, "end_point": {"row": 56, "column": 32}}, {"id": 252, "type": "*", "text": "*", "parent": 250, "children": [], "start_point": {"row": 56, "column": 33}, "end_point": {"row": 56, "column": 34}}, {"id": 253, "type": "sizeof_expression", "text": "sizeof(*shds)", "parent": 250, "children": [254], "start_point": {"row": 56, "column": 35}, "end_point": {"row": 56, "column": 48}}, {"id": 254, "type": "parenthesized_expression", "text": "(*shds)", "parent": 253, "children": [255], "start_point": {"row": 56, "column": 41}, "end_point": {"row": 56, "column": 48}}, {"id": 255, "type": "pointer_expression", "text": "*shds", "parent": 254, "children": [256, 257], "start_point": {"row": 56, "column": 42}, "end_point": {"row": 56, "column": 47}}, {"id": 256, "type": "*", "text": "*", "parent": 255, "children": [], "start_point": {"row": 56, "column": 42}, "end_point": {"row": 56, "column": 43}}, {"id": 257, "type": "identifier", "text": "shds", "parent": 255, "children": [], "start_point": {"row": 56, "column": 43}, "end_point": {"row": 56, "column": 47}}, {"id": 258, "type": "for_statement", "text": "for (int i = 0; i < n_shds; ++i) shds[i] = mk_shd(srcs[i], types[i]);", "parent": 197, "children": [259, 265, 269], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 73}}, {"id": 259, "type": "declaration", "text": "int i = 0;", "parent": 258, "children": [260, 261], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 19}}, {"id": 260, "type": "primitive_type", "text": "int", "parent": 259, "children": [], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 12}}, {"id": 261, "type": "init_declarator", "text": "i = 0", "parent": 259, "children": [262, 263, 264], "start_point": {"row": 57, "column": 13}, "end_point": {"row": 57, "column": 18}}, {"id": 262, "type": "identifier", "text": "i", "parent": 261, "children": [], "start_point": {"row": 57, "column": 13}, "end_point": {"row": 57, "column": 14}}, {"id": 263, "type": "=", "text": "=", "parent": 261, "children": [], "start_point": {"row": 57, "column": 15}, "end_point": {"row": 57, "column": 16}}, {"id": 264, "type": "number_literal", "text": "0", "parent": 261, "children": [], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 18}}, {"id": 265, "type": "binary_expression", "text": "i < n_shds", "parent": 258, "children": [266, 267, 268], "start_point": {"row": 57, "column": 20}, "end_point": {"row": 57, "column": 30}}, {"id": 266, "type": "identifier", "text": "i", "parent": 265, "children": [], "start_point": {"row": 57, "column": 20}, "end_point": {"row": 57, "column": 21}}, {"id": 267, "type": "<", "text": "<", "parent": 265, "children": [], "start_point": {"row": 57, "column": 22}, "end_point": {"row": 57, "column": 23}}, {"id": 268, "type": "identifier", "text": "n_shds", "parent": 265, "children": [], "start_point": {"row": 57, "column": 24}, "end_point": {"row": 57, "column": 30}}, {"id": 269, "type": "update_expression", "text": "++i", "parent": 258, "children": [270, 271], "start_point": {"row": 57, "column": 32}, "end_point": {"row": 57, "column": 35}}, {"id": 270, "type": "++", "text": "++", "parent": 269, "children": [], "start_point": {"row": 57, "column": 32}, "end_point": {"row": 57, "column": 34}}, {"id": 271, "type": "identifier", "text": "i", "parent": 269, "children": [], "start_point": {"row": 57, "column": 34}, "end_point": {"row": 57, "column": 35}}, {"id": 272, "type": "assignment_expression", "text": "shds[i] = mk_shd(srcs[i], types[i])", "parent": 258, "children": [273, 276, 277], "start_point": {"row": 57, "column": 37}, "end_point": {"row": 57, "column": 72}}, {"id": 273, "type": "subscript_expression", "text": "shds[i]", "parent": 272, "children": [274, 275], "start_point": {"row": 57, "column": 37}, "end_point": {"row": 57, "column": 44}}, {"id": 274, "type": "identifier", "text": "shds", "parent": 273, "children": [], "start_point": {"row": 57, "column": 37}, "end_point": {"row": 57, "column": 41}}, {"id": 275, "type": "identifier", "text": "i", "parent": 273, "children": [], "start_point": {"row": 57, "column": 42}, "end_point": {"row": 57, "column": 43}}, {"id": 276, "type": "=", "text": "=", "parent": 272, "children": [], "start_point": {"row": 57, "column": 45}, "end_point": {"row": 57, "column": 46}}, {"id": 277, "type": "call_expression", "text": "mk_shd(srcs[i], types[i])", "parent": 272, "children": [278, 279], "start_point": {"row": 57, "column": 47}, "end_point": {"row": 57, "column": 72}}, {"id": 278, "type": "identifier", "text": "mk_shd", "parent": 277, "children": [], "start_point": {"row": 57, "column": 47}, "end_point": {"row": 57, "column": 53}}, {"id": 279, "type": "argument_list", "text": "(srcs[i], types[i])", "parent": 277, "children": [280, 283], "start_point": {"row": 57, "column": 53}, "end_point": {"row": 57, "column": 72}}, {"id": 280, "type": "subscript_expression", "text": "srcs[i]", "parent": 279, "children": [281, 282], "start_point": {"row": 57, "column": 54}, "end_point": {"row": 57, "column": 61}}, {"id": 281, "type": "identifier", "text": "srcs", "parent": 280, "children": [], "start_point": {"row": 57, "column": 54}, "end_point": {"row": 57, "column": 58}}, {"id": 282, "type": "identifier", "text": "i", "parent": 280, "children": [], "start_point": {"row": 57, "column": 59}, "end_point": {"row": 57, "column": 60}}, {"id": 283, "type": "subscript_expression", "text": "types[i]", "parent": 279, "children": [284, 285], "start_point": {"row": 57, "column": 63}, "end_point": {"row": 57, "column": 71}}, {"id": 284, "type": "identifier", "text": "types", "parent": 283, "children": [], "start_point": {"row": 57, "column": 63}, "end_point": {"row": 57, "column": 68}}, {"id": 285, "type": "identifier", "text": "i", "parent": 283, "children": [], "start_point": {"row": 57, "column": 69}, "end_point": {"row": 57, "column": 70}}, {"id": 286, "type": "for_statement", "text": "for (int i = 0; i < n_shds; ++i) glAttachShader(prg, shds[i]);", "parent": 197, "children": [287, 293, 297], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 66}}, {"id": 287, "type": "declaration", "text": "int i = 0;", "parent": 286, "children": [288, 289], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 19}}, {"id": 288, "type": "primitive_type", "text": "int", "parent": 287, "children": [], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 12}}, {"id": 289, "type": "init_declarator", "text": "i = 0", "parent": 287, "children": [290, 291, 292], "start_point": {"row": 59, "column": 13}, "end_point": {"row": 59, "column": 18}}, {"id": 290, "type": "identifier", "text": "i", "parent": 289, "children": [], "start_point": {"row": 59, "column": 13}, "end_point": {"row": 59, "column": 14}}, {"id": 291, "type": "=", "text": "=", "parent": 289, "children": [], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 16}}, {"id": 292, "type": "number_literal", "text": "0", "parent": 289, "children": [], "start_point": {"row": 59, "column": 17}, "end_point": {"row": 59, "column": 18}}, {"id": 293, "type": "binary_expression", "text": "i < n_shds", "parent": 286, "children": [294, 295, 296], "start_point": {"row": 59, "column": 20}, "end_point": {"row": 59, "column": 30}}, {"id": 294, "type": "identifier", "text": "i", "parent": 293, "children": [], "start_point": {"row": 59, "column": 20}, "end_point": {"row": 59, "column": 21}}, {"id": 295, "type": "<", "text": "<", "parent": 293, "children": [], "start_point": {"row": 59, "column": 22}, "end_point": {"row": 59, "column": 23}}, {"id": 296, "type": "identifier", "text": "n_shds", "parent": 293, "children": [], "start_point": {"row": 59, "column": 24}, "end_point": {"row": 59, "column": 30}}, {"id": 297, "type": "update_expression", "text": "++i", "parent": 286, "children": [298, 299], "start_point": {"row": 59, "column": 32}, "end_point": {"row": 59, "column": 35}}, {"id": 298, "type": "++", "text": "++", "parent": 297, "children": [], "start_point": {"row": 59, "column": 32}, "end_point": {"row": 59, "column": 34}}, {"id": 299, "type": "identifier", "text": "i", "parent": 297, "children": [], "start_point": {"row": 59, "column": 34}, "end_point": {"row": 59, "column": 35}}, {"id": 300, "type": "call_expression", "text": "glAttachShader(prg, shds[i])", "parent": 286, "children": [301, 302], "start_point": {"row": 59, "column": 37}, "end_point": {"row": 59, "column": 65}}, {"id": 301, "type": "identifier", "text": "glAttachShader", "parent": 300, "children": [], "start_point": {"row": 59, "column": 37}, "end_point": {"row": 59, "column": 51}}, {"id": 302, "type": "argument_list", "text": "(prg, shds[i])", "parent": 300, "children": [303, 304], "start_point": {"row": 59, "column": 51}, "end_point": {"row": 59, "column": 65}}, {"id": 303, "type": "identifier", "text": "prg", "parent": 302, "children": [], "start_point": {"row": 59, "column": 52}, "end_point": {"row": 59, "column": 55}}, {"id": 304, "type": "subscript_expression", "text": "shds[i]", "parent": 302, "children": [305, 306], "start_point": {"row": 59, "column": 57}, "end_point": {"row": 59, "column": 64}}, {"id": 305, "type": "identifier", "text": "shds", "parent": 304, "children": [], "start_point": {"row": 59, "column": 57}, "end_point": {"row": 59, "column": 61}}, {"id": 306, "type": "identifier", "text": "i", "parent": 304, "children": [], "start_point": {"row": 59, "column": 62}, "end_point": {"row": 59, "column": 63}}, {"id": 307, "type": "call_expression", "text": "glLinkProgram(prg)", "parent": 197, "children": [308, 309], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 22}}, {"id": 308, "type": "identifier", "text": "glLinkProgram", "parent": 307, "children": [], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 17}}, {"id": 309, "type": "argument_list", "text": "(prg)", "parent": 307, "children": [310], "start_point": {"row": 60, "column": 17}, "end_point": {"row": 60, "column": 22}}, {"id": 310, "type": "identifier", "text": "prg", "parent": 309, "children": [], "start_point": {"row": 60, "column": 18}, "end_point": {"row": 60, "column": 21}}, {"id": 311, "type": "for_statement", "text": "for (int i = 0; i < n_shds; ++i) glDetachShader(prg, shds[i]);", "parent": 197, "children": [312, 318, 322], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 66}}, {"id": 312, "type": "declaration", "text": "int i = 0;", "parent": 311, "children": [313, 314], "start_point": {"row": 61, "column": 9}, "end_point": {"row": 61, "column": 19}}, {"id": 313, "type": "primitive_type", "text": "int", "parent": 312, "children": [], "start_point": {"row": 61, "column": 9}, "end_point": {"row": 61, "column": 12}}, {"id": 314, "type": "init_declarator", "text": "i = 0", "parent": 312, "children": [315, 316, 317], "start_point": {"row": 61, "column": 13}, "end_point": {"row": 61, "column": 18}}, {"id": 315, "type": "identifier", "text": "i", "parent": 314, "children": [], "start_point": {"row": 61, "column": 13}, "end_point": {"row": 61, "column": 14}}, {"id": 316, "type": "=", "text": "=", "parent": 314, "children": [], "start_point": {"row": 61, "column": 15}, "end_point": {"row": 61, "column": 16}}, {"id": 317, "type": "number_literal", "text": "0", "parent": 314, "children": [], "start_point": {"row": 61, "column": 17}, "end_point": {"row": 61, "column": 18}}, {"id": 318, "type": "binary_expression", "text": "i < n_shds", "parent": 311, "children": [319, 320, 321], "start_point": {"row": 61, "column": 20}, "end_point": {"row": 61, "column": 30}}, {"id": 319, "type": "identifier", "text": "i", "parent": 318, "children": [], "start_point": {"row": 61, "column": 20}, "end_point": {"row": 61, "column": 21}}, {"id": 320, "type": "<", "text": "<", "parent": 318, "children": [], "start_point": {"row": 61, "column": 22}, "end_point": {"row": 61, "column": 23}}, {"id": 321, "type": "identifier", "text": "n_shds", "parent": 318, "children": [], "start_point": {"row": 61, "column": 24}, "end_point": {"row": 61, "column": 30}}, {"id": 322, "type": "update_expression", "text": "++i", "parent": 311, "children": [323, 324], "start_point": {"row": 61, "column": 32}, "end_point": {"row": 61, "column": 35}}, {"id": 323, "type": "++", "text": "++", "parent": 322, "children": [], "start_point": {"row": 61, "column": 32}, "end_point": {"row": 61, "column": 34}}, {"id": 324, "type": "identifier", "text": "i", "parent": 322, "children": [], "start_point": {"row": 61, "column": 34}, "end_point": {"row": 61, "column": 35}}, {"id": 325, "type": "call_expression", "text": "glDetachShader(prg, shds[i])", "parent": 311, "children": [326, 327], "start_point": {"row": 61, "column": 37}, "end_point": {"row": 61, "column": 65}}, {"id": 326, "type": "identifier", "text": "glDetachShader", "parent": 325, "children": [], "start_point": {"row": 61, "column": 37}, "end_point": {"row": 61, "column": 51}}, {"id": 327, "type": "argument_list", "text": "(prg, shds[i])", "parent": 325, "children": [328, 329], "start_point": {"row": 61, "column": 51}, "end_point": {"row": 61, "column": 65}}, {"id": 328, "type": "identifier", "text": "prg", "parent": 327, "children": [], "start_point": {"row": 61, "column": 52}, "end_point": {"row": 61, "column": 55}}, {"id": 329, "type": "subscript_expression", "text": "shds[i]", "parent": 327, "children": [330, 331], "start_point": {"row": 61, "column": 57}, "end_point": {"row": 61, "column": 64}}, {"id": 330, "type": "identifier", "text": "shds", "parent": 329, "children": [], "start_point": {"row": 61, "column": 57}, "end_point": {"row": 61, "column": 61}}, {"id": 331, "type": "identifier", "text": "i", "parent": 329, "children": [], "start_point": {"row": 61, "column": 62}, "end_point": {"row": 61, "column": 63}}, {"id": 332, "type": "call_expression", "text": "glValidateProgram(prg)", "parent": 197, "children": [333, 334], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 26}}, {"id": 333, "type": "identifier", "text": "glValidateProgram", "parent": 332, "children": [], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 21}}, {"id": 334, "type": "argument_list", "text": "(prg)", "parent": 332, "children": [335], "start_point": {"row": 63, "column": 21}, "end_point": {"row": 63, "column": 26}}, {"id": 335, "type": "identifier", "text": "prg", "parent": 334, "children": [], "start_point": {"row": 63, "column": 22}, "end_point": {"row": 63, "column": 25}}, {"id": 336, "type": "call_expression", "text": "glUseProgram(prg)", "parent": 197, "children": [337, 338], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 21}}, {"id": 337, "type": "identifier", "text": "glUseProgram", "parent": 336, "children": [], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 16}}, {"id": 338, "type": "argument_list", "text": "(prg)", "parent": 336, "children": [339], "start_point": {"row": 64, "column": 16}, "end_point": {"row": 64, "column": 21}}, {"id": 339, "type": "identifier", "text": "prg", "parent": 338, "children": [], "start_point": {"row": 64, "column": 17}, "end_point": {"row": 64, "column": 20}}, {"id": 340, "type": "for_statement", "text": "for (int i = 0; i < n_vars; ++i)locs[i]=glGetUniformLocation(prg,names[i]);", "parent": 197, "children": [341, 347, 351], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 79}}, {"id": 341, "type": "declaration", "text": "int i = 0;", "parent": 340, "children": [342, 343], "start_point": {"row": 65, "column": 9}, "end_point": {"row": 65, "column": 19}}, {"id": 342, "type": "primitive_type", "text": "int", "parent": 341, "children": [], "start_point": {"row": 65, "column": 9}, "end_point": {"row": 65, "column": 12}}, {"id": 343, "type": "init_declarator", "text": "i = 0", "parent": 341, "children": [344, 345, 346], "start_point": {"row": 65, "column": 13}, "end_point": {"row": 65, "column": 18}}, {"id": 344, "type": "identifier", "text": "i", "parent": 343, "children": [], "start_point": {"row": 65, "column": 13}, "end_point": {"row": 65, "column": 14}}, {"id": 345, "type": "=", "text": "=", "parent": 343, "children": [], "start_point": {"row": 65, "column": 15}, "end_point": {"row": 65, "column": 16}}, {"id": 346, "type": "number_literal", "text": "0", "parent": 343, "children": [], "start_point": {"row": 65, "column": 17}, "end_point": {"row": 65, "column": 18}}, {"id": 347, "type": "binary_expression", "text": "i < n_vars", "parent": 340, "children": [348, 349, 350], "start_point": {"row": 65, "column": 20}, "end_point": {"row": 65, "column": 30}}, {"id": 348, "type": "identifier", "text": "i", "parent": 347, "children": [], "start_point": {"row": 65, "column": 20}, "end_point": {"row": 65, "column": 21}}, {"id": 349, "type": "<", "text": "<", "parent": 347, "children": [], "start_point": {"row": 65, "column": 22}, "end_point": {"row": 65, "column": 23}}, {"id": 350, "type": "identifier", "text": "n_vars", "parent": 347, "children": [], "start_point": {"row": 65, "column": 24}, "end_point": {"row": 65, "column": 30}}, {"id": 351, "type": "update_expression", "text": "++i", "parent": 340, "children": [352, 353], "start_point": {"row": 65, "column": 32}, "end_point": {"row": 65, "column": 35}}, {"id": 352, "type": "++", "text": "++", "parent": 351, "children": [], "start_point": {"row": 65, "column": 32}, "end_point": {"row": 65, "column": 34}}, {"id": 353, "type": "identifier", "text": "i", "parent": 351, "children": [], "start_point": {"row": 65, "column": 34}, "end_point": {"row": 65, "column": 35}}, {"id": 354, "type": "assignment_expression", "text": "locs[i]=glGetUniformLocation(prg,names[i])", "parent": 340, "children": [355, 358, 359], "start_point": {"row": 65, "column": 36}, "end_point": {"row": 65, "column": 78}}, {"id": 355, "type": "subscript_expression", "text": "locs[i]", "parent": 354, "children": [356, 357], "start_point": {"row": 65, "column": 36}, "end_point": {"row": 65, "column": 43}}, {"id": 356, "type": "identifier", "text": "locs", "parent": 355, "children": [], "start_point": {"row": 65, "column": 36}, "end_point": {"row": 65, "column": 40}}, {"id": 357, "type": "identifier", "text": "i", "parent": 355, "children": [], "start_point": {"row": 65, "column": 41}, "end_point": {"row": 65, "column": 42}}, {"id": 358, "type": "=", "text": "=", "parent": 354, "children": [], "start_point": {"row": 65, "column": 43}, "end_point": {"row": 65, "column": 44}}, {"id": 359, "type": "call_expression", "text": "glGetUniformLocation(prg,names[i])", "parent": 354, "children": [360, 361], "start_point": {"row": 65, "column": 44}, "end_point": {"row": 65, "column": 78}}, {"id": 360, "type": "identifier", "text": "glGetUniformLocation", "parent": 359, "children": [], "start_point": {"row": 65, "column": 44}, "end_point": {"row": 65, "column": 64}}, {"id": 361, "type": "argument_list", "text": "(prg,names[i])", "parent": 359, "children": [362, 363], "start_point": {"row": 65, "column": 64}, "end_point": {"row": 65, "column": 78}}, {"id": 362, "type": "identifier", "text": "prg", "parent": 361, "children": [], "start_point": {"row": 65, "column": 65}, "end_point": {"row": 65, "column": 68}}, {"id": 363, "type": "subscript_expression", "text": "names[i]", "parent": 361, "children": [364, 365], "start_point": {"row": 65, "column": 69}, "end_point": {"row": 65, "column": 77}}, {"id": 364, "type": "identifier", "text": "names", "parent": 363, "children": [], "start_point": {"row": 65, "column": 69}, "end_point": {"row": 65, "column": 74}}, {"id": 365, "type": "identifier", "text": "i", "parent": 363, "children": [], "start_point": {"row": 65, "column": 75}, "end_point": {"row": 65, "column": 76}}, {"id": 366, "type": "for_statement", "text": "for (int i = 0; i < n_shds; ++i) shds[i] = rm_shd(shds[i]);", "parent": 197, "children": [367, 373, 377], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 63}}, {"id": 367, "type": "declaration", "text": "int i = 0;", "parent": 366, "children": [368, 369], "start_point": {"row": 67, "column": 9}, "end_point": {"row": 67, "column": 19}}, {"id": 368, "type": "primitive_type", "text": "int", "parent": 367, "children": [], "start_point": {"row": 67, "column": 9}, "end_point": {"row": 67, "column": 12}}, {"id": 369, "type": "init_declarator", "text": "i = 0", "parent": 367, "children": [370, 371, 372], "start_point": {"row": 67, "column": 13}, "end_point": {"row": 67, "column": 18}}, {"id": 370, "type": "identifier", "text": "i", "parent": 369, "children": [], "start_point": {"row": 67, "column": 13}, "end_point": {"row": 67, "column": 14}}, {"id": 371, "type": "=", "text": "=", "parent": 369, "children": [], "start_point": {"row": 67, "column": 15}, "end_point": {"row": 67, "column": 16}}, {"id": 372, "type": "number_literal", "text": "0", "parent": 369, "children": [], "start_point": {"row": 67, "column": 17}, "end_point": {"row": 67, "column": 18}}, {"id": 373, "type": "binary_expression", "text": "i < n_shds", "parent": 366, "children": [374, 375, 376], "start_point": {"row": 67, "column": 20}, "end_point": {"row": 67, "column": 30}}, {"id": 374, "type": "identifier", "text": "i", "parent": 373, "children": [], "start_point": {"row": 67, "column": 20}, "end_point": {"row": 67, "column": 21}}, {"id": 375, "type": "<", "text": "<", "parent": 373, "children": [], "start_point": {"row": 67, "column": 22}, "end_point": {"row": 67, "column": 23}}, {"id": 376, "type": "identifier", "text": "n_shds", "parent": 373, "children": [], "start_point": {"row": 67, "column": 24}, "end_point": {"row": 67, "column": 30}}, {"id": 377, "type": "update_expression", "text": "++i", "parent": 366, "children": [378, 379], "start_point": {"row": 67, "column": 32}, "end_point": {"row": 67, "column": 35}}, {"id": 378, "type": "++", "text": "++", "parent": 377, "children": [], "start_point": {"row": 67, "column": 32}, "end_point": {"row": 67, "column": 34}}, {"id": 379, "type": "identifier", "text": "i", "parent": 377, "children": [], "start_point": {"row": 67, "column": 34}, "end_point": {"row": 67, "column": 35}}, {"id": 380, "type": "assignment_expression", "text": "shds[i] = rm_shd(shds[i])", "parent": 366, "children": [381, 384, 385], "start_point": {"row": 67, "column": 37}, "end_point": {"row": 67, "column": 62}}, {"id": 381, "type": "subscript_expression", "text": "shds[i]", "parent": 380, "children": [382, 383], "start_point": {"row": 67, "column": 37}, "end_point": {"row": 67, "column": 44}}, {"id": 382, "type": "identifier", "text": "shds", "parent": 381, "children": [], "start_point": {"row": 67, "column": 37}, "end_point": {"row": 67, "column": 41}}, {"id": 383, "type": "identifier", "text": "i", "parent": 381, "children": [], "start_point": {"row": 67, "column": 42}, "end_point": {"row": 67, "column": 43}}, {"id": 384, "type": "=", "text": "=", "parent": 380, "children": [], "start_point": {"row": 67, "column": 45}, "end_point": {"row": 67, "column": 46}}, {"id": 385, "type": "call_expression", "text": "rm_shd(shds[i])", "parent": 380, "children": [386, 387], "start_point": {"row": 67, "column": 47}, "end_point": {"row": 67, "column": 62}}, {"id": 386, "type": "identifier", "text": "rm_shd", "parent": 385, "children": [], "start_point": {"row": 67, "column": 47}, "end_point": {"row": 67, "column": 53}}, {"id": 387, "type": "argument_list", "text": "(shds[i])", "parent": 385, "children": [388], "start_point": {"row": 67, "column": 53}, "end_point": {"row": 67, "column": 62}}, {"id": 388, "type": "subscript_expression", "text": "shds[i]", "parent": 387, "children": [389, 390], "start_point": {"row": 67, "column": 54}, "end_point": {"row": 67, "column": 61}}, {"id": 389, "type": "identifier", "text": "shds", "parent": 388, "children": [], "start_point": {"row": 67, "column": 54}, "end_point": {"row": 67, "column": 58}}, {"id": 390, "type": "identifier", "text": "i", "parent": 388, "children": [], "start_point": {"row": 67, "column": 59}, "end_point": {"row": 67, "column": 60}}, {"id": 391, "type": "call_expression", "text": "free(shds)", "parent": 197, "children": [392, 393], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 14}}, {"id": 392, "type": "identifier", "text": "free", "parent": 391, "children": [], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 8}}, {"id": 393, "type": "argument_list", "text": "(shds)", "parent": 391, "children": [394], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 14}}, {"id": 394, "type": "identifier", "text": "shds", "parent": 393, "children": [], "start_point": {"row": 68, "column": 9}, "end_point": {"row": 68, "column": 13}}, {"id": 395, "type": "return_statement", "text": "return prg;", "parent": 197, "children": [396], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 15}}, {"id": 396, "type": "identifier", "text": "prg", "parent": 395, "children": [], "start_point": {"row": 69, "column": 11}, "end_point": {"row": 69, "column": 14}}, {"id": 397, "type": "function_definition", "text": "GLuint rm_prg(GLuint prg)\n{\n glDeleteProgram(prg);\n return 0;\n}", "parent": null, "children": [398, 399], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 76, "column": 1}}, {"id": 398, "type": "type_identifier", "text": "GLuint", "parent": 397, "children": [], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 72, "column": 6}}, {"id": 399, "type": "function_declarator", "text": "rm_prg(GLuint prg)", "parent": 397, "children": [400, 401], "start_point": {"row": 72, "column": 7}, "end_point": {"row": 72, "column": 25}}, {"id": 400, "type": "identifier", "text": "rm_prg", "parent": 399, "children": [], "start_point": {"row": 72, "column": 7}, "end_point": {"row": 72, "column": 13}}, {"id": 401, "type": "parameter_list", "text": "(GLuint prg)", "parent": 399, "children": [402], "start_point": {"row": 72, "column": 13}, "end_point": {"row": 72, "column": 25}}, {"id": 402, "type": "parameter_declaration", "text": "GLuint prg", "parent": 401, "children": [403, 404], "start_point": {"row": 72, "column": 14}, "end_point": {"row": 72, "column": 24}}, {"id": 403, "type": "type_identifier", "text": "GLuint", "parent": 402, "children": [], "start_point": {"row": 72, "column": 14}, "end_point": {"row": 72, "column": 20}}, {"id": 404, "type": "identifier", "text": "prg", "parent": 402, "children": [], "start_point": {"row": 72, "column": 21}, "end_point": {"row": 72, "column": 24}}, {"id": 405, "type": "call_expression", "text": "glDeleteProgram(prg)", "parent": 397, "children": [406, 407], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 74, "column": 24}}, {"id": 406, "type": "identifier", "text": "glDeleteProgram", "parent": 405, "children": [], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 74, "column": 19}}, {"id": 407, "type": "argument_list", "text": "(prg)", "parent": 405, "children": [408], "start_point": {"row": 74, "column": 19}, "end_point": {"row": 74, "column": 24}}, {"id": 408, "type": "identifier", "text": "prg", "parent": 407, "children": [], "start_point": {"row": 74, "column": 20}, "end_point": {"row": 74, "column": 23}}, {"id": 409, "type": "return_statement", "text": "return 0;", "parent": 397, "children": [410], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 13}}, {"id": 410, "type": "number_literal", "text": "0", "parent": 409, "children": [], "start_point": {"row": 75, "column": 11}, "end_point": {"row": 75, "column": 12}}, {"id": 411, "type": "function_definition", "text": "static GLuint mk_shd(const char *src, GLenum type)\n{\n GLuint shd = glCreateShader(type);\n glShaderSource(shd, 1, &src, NULL);\n glCompileShader(shd);\n return shd;\n}", "parent": null, "children": [412, 413], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 84, "column": 1}}, {"id": 412, "type": "type_identifier", "text": "GLuint", "parent": 411, "children": [], "start_point": {"row": 78, "column": 7}, "end_point": {"row": 78, "column": 13}}, {"id": 413, "type": "function_declarator", "text": "mk_shd(const char *src, GLenum type)", "parent": 411, "children": [414, 415], "start_point": {"row": 78, "column": 14}, "end_point": {"row": 78, "column": 50}}, {"id": 414, "type": "identifier", "text": "mk_shd", "parent": 413, "children": [], "start_point": {"row": 78, "column": 14}, "end_point": {"row": 78, "column": 20}}, {"id": 415, "type": "parameter_list", "text": "(const char *src, GLenum type)", "parent": 413, "children": [416, 421], "start_point": {"row": 78, "column": 20}, "end_point": {"row": 78, "column": 50}}, {"id": 416, "type": "parameter_declaration", "text": "const char *src", "parent": 415, "children": [417, 418], "start_point": {"row": 78, "column": 21}, "end_point": {"row": 78, "column": 36}}, {"id": 417, "type": "primitive_type", "text": "char", "parent": 416, "children": [], "start_point": {"row": 78, "column": 27}, "end_point": {"row": 78, "column": 31}}, {"id": 418, "type": "pointer_declarator", "text": "*src", "parent": 416, "children": [419, 420], "start_point": {"row": 78, "column": 32}, "end_point": {"row": 78, "column": 36}}, {"id": 419, "type": "*", "text": "*", "parent": 418, "children": [], "start_point": {"row": 78, "column": 32}, "end_point": {"row": 78, "column": 33}}, {"id": 420, "type": "identifier", "text": "src", "parent": 418, "children": [], "start_point": {"row": 78, "column": 33}, "end_point": {"row": 78, "column": 36}}, {"id": 421, "type": "parameter_declaration", "text": "GLenum type", "parent": 415, "children": [422, 423], "start_point": {"row": 78, "column": 38}, "end_point": {"row": 78, "column": 49}}, {"id": 422, "type": "type_identifier", "text": "GLenum", "parent": 421, "children": [], "start_point": {"row": 78, "column": 38}, "end_point": {"row": 78, "column": 44}}, {"id": 423, "type": "identifier", "text": "type", "parent": 421, "children": [], "start_point": {"row": 78, "column": 45}, "end_point": {"row": 78, "column": 49}}, {"id": 424, "type": "declaration", "text": "GLuint shd = glCreateShader(type);", "parent": 411, "children": [425, 426], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 38}}, {"id": 425, "type": "type_identifier", "text": "GLuint", "parent": 424, "children": [], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 10}}, {"id": 426, "type": "init_declarator", "text": "shd = glCreateShader(type)", "parent": 424, "children": [427, 428, 429], "start_point": {"row": 80, "column": 11}, "end_point": {"row": 80, "column": 37}}, {"id": 427, "type": "identifier", "text": "shd", "parent": 426, "children": [], "start_point": {"row": 80, "column": 11}, "end_point": {"row": 80, "column": 14}}, {"id": 428, "type": "=", "text": "=", "parent": 426, "children": [], "start_point": {"row": 80, "column": 15}, "end_point": {"row": 80, "column": 16}}, {"id": 429, "type": "call_expression", "text": "glCreateShader(type)", "parent": 426, "children": [430, 431], "start_point": {"row": 80, "column": 17}, "end_point": {"row": 80, "column": 37}}, {"id": 430, "type": "identifier", "text": "glCreateShader", "parent": 429, "children": [], "start_point": {"row": 80, "column": 17}, "end_point": {"row": 80, "column": 31}}, {"id": 431, "type": "argument_list", "text": "(type)", "parent": 429, "children": [432], "start_point": {"row": 80, "column": 31}, "end_point": {"row": 80, "column": 37}}, {"id": 432, "type": "identifier", "text": "type", "parent": 431, "children": [], "start_point": {"row": 80, "column": 32}, "end_point": {"row": 80, "column": 36}}, {"id": 433, "type": "call_expression", "text": "glShaderSource(shd, 1, &src, NULL)", "parent": 411, "children": [434, 435], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 38}}, {"id": 434, "type": "identifier", "text": "glShaderSource", "parent": 433, "children": [], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 18}}, {"id": 435, "type": "argument_list", "text": "(shd, 1, &src, NULL)", "parent": 433, "children": [436, 437, 438, 440], "start_point": {"row": 81, "column": 18}, "end_point": {"row": 81, "column": 38}}, {"id": 436, "type": "identifier", "text": "shd", "parent": 435, "children": [], "start_point": {"row": 81, "column": 19}, "end_point": {"row": 81, "column": 22}}, {"id": 437, "type": "number_literal", "text": "1", "parent": 435, "children": [], "start_point": {"row": 81, "column": 24}, "end_point": {"row": 81, "column": 25}}, {"id": 438, "type": "pointer_expression", "text": "&src", "parent": 435, "children": [439], "start_point": {"row": 81, "column": 27}, "end_point": {"row": 81, "column": 31}}, {"id": 439, "type": "identifier", "text": "src", "parent": 438, "children": [], "start_point": {"row": 81, "column": 28}, "end_point": {"row": 81, "column": 31}}, {"id": 440, "type": "null", "text": "NULL", "parent": 435, "children": [441], "start_point": {"row": 81, "column": 33}, "end_point": {"row": 81, "column": 37}}, {"id": 441, "type": "NULL", "text": "NULL", "parent": 440, "children": [], "start_point": {"row": 81, "column": 33}, "end_point": {"row": 81, "column": 37}}, {"id": 442, "type": "call_expression", "text": "glCompileShader(shd)", "parent": 411, "children": [443, 444], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 24}}, {"id": 443, "type": "identifier", "text": "glCompileShader", "parent": 442, "children": [], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 19}}, {"id": 444, "type": "argument_list", "text": "(shd)", "parent": 442, "children": [445], "start_point": {"row": 82, "column": 19}, "end_point": {"row": 82, "column": 24}}, {"id": 445, "type": "identifier", "text": "shd", "parent": 444, "children": [], "start_point": {"row": 82, "column": 20}, "end_point": {"row": 82, "column": 23}}, {"id": 446, "type": "return_statement", "text": "return shd;", "parent": 411, "children": [447], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 15}}, {"id": 447, "type": "identifier", "text": "shd", "parent": 446, "children": [], "start_point": {"row": 83, "column": 11}, "end_point": {"row": 83, "column": 14}}, {"id": 448, "type": "function_definition", "text": "static GLuint rm_shd(GLuint shd)\n{\n glDeleteShader(shd);\n return 0;\n}", "parent": null, "children": [449, 450], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 90, "column": 1}}, {"id": 449, "type": "type_identifier", "text": "GLuint", "parent": 448, "children": [], "start_point": {"row": 86, "column": 7}, "end_point": {"row": 86, "column": 13}}, {"id": 450, "type": "function_declarator", "text": "rm_shd(GLuint shd)", "parent": 448, "children": [451, 452], "start_point": {"row": 86, "column": 14}, "end_point": {"row": 86, "column": 32}}, {"id": 451, "type": "identifier", "text": "rm_shd", "parent": 450, "children": [], "start_point": {"row": 86, "column": 14}, "end_point": {"row": 86, "column": 20}}, {"id": 452, "type": "parameter_list", "text": "(GLuint shd)", "parent": 450, "children": [453], "start_point": {"row": 86, "column": 20}, "end_point": {"row": 86, "column": 32}}, {"id": 453, "type": "parameter_declaration", "text": "GLuint shd", "parent": 452, "children": [454, 455], "start_point": {"row": 86, "column": 21}, "end_point": {"row": 86, "column": 31}}, {"id": 454, "type": "type_identifier", "text": "GLuint", "parent": 453, "children": [], "start_point": {"row": 86, "column": 21}, "end_point": {"row": 86, "column": 27}}, {"id": 455, "type": "identifier", "text": "shd", "parent": 453, "children": [], "start_point": {"row": 86, "column": 28}, "end_point": {"row": 86, "column": 31}}, {"id": 456, "type": "call_expression", "text": "glDeleteShader(shd)", "parent": 448, "children": [457, 458], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 23}}, {"id": 457, "type": "identifier", "text": "glDeleteShader", "parent": 456, "children": [], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 18}}, {"id": 458, "type": "argument_list", "text": "(shd)", "parent": 456, "children": [459], "start_point": {"row": 88, "column": 18}, "end_point": {"row": 88, "column": 23}}, {"id": 459, "type": "identifier", "text": "shd", "parent": 458, "children": [], "start_point": {"row": 88, "column": 19}, "end_point": {"row": 88, "column": 22}}, {"id": 460, "type": "return_statement", "text": "return 0;", "parent": 448, "children": [461], "start_point": {"row": 89, "column": 4}, "end_point": {"row": 89, "column": 13}}, {"id": 461, "type": "number_literal", "text": "0", "parent": 460, "children": [], "start_point": {"row": 89, "column": 11}, "end_point": {"row": 89, "column": 12}}, {"id": 462, "type": "function_definition", "text": "GLuint mk_vbo(GLenum type, size_t sz, void *data, GLenum usage)\n{\n GLuint vbo;\n glGenBuffers(1, &vbo);\n glBindBuffer(type, vbo);\n glBufferData(type, sz, data, usage);\n return vbo;\n}", "parent": null, "children": [463, 464], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 99, "column": 1}}, {"id": 463, "type": "type_identifier", "text": "GLuint", "parent": 462, "children": [], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 92, "column": 6}}, {"id": 464, "type": "function_declarator", "text": "mk_vbo(GLenum type, size_t sz, void *data, GLenum usage)", "parent": 462, "children": [465, 466], "start_point": {"row": 92, "column": 7}, "end_point": {"row": 92, "column": 63}}, {"id": 465, "type": "identifier", "text": "mk_vbo", "parent": 464, "children": [], "start_point": {"row": 92, "column": 7}, "end_point": {"row": 92, "column": 13}}, {"id": 466, "type": "parameter_list", "text": "(GLenum type, size_t sz, void *data, GLenum usage)", "parent": 464, "children": [467, 470, 473, 478], "start_point": {"row": 92, "column": 13}, "end_point": {"row": 92, "column": 63}}, {"id": 467, "type": "parameter_declaration", "text": "GLenum type", "parent": 466, "children": [468, 469], "start_point": {"row": 92, "column": 14}, "end_point": {"row": 92, "column": 25}}, {"id": 468, "type": "type_identifier", "text": "GLenum", "parent": 467, "children": [], "start_point": {"row": 92, "column": 14}, "end_point": {"row": 92, "column": 20}}, {"id": 469, "type": "identifier", "text": "type", "parent": 467, "children": [], "start_point": {"row": 92, "column": 21}, "end_point": {"row": 92, "column": 25}}, {"id": 470, "type": "parameter_declaration", "text": "size_t sz", "parent": 466, "children": [471, 472], "start_point": {"row": 92, "column": 27}, "end_point": {"row": 92, "column": 36}}, {"id": 471, "type": "primitive_type", "text": "size_t", "parent": 470, "children": [], "start_point": {"row": 92, "column": 27}, "end_point": {"row": 92, "column": 33}}, {"id": 472, "type": "identifier", "text": "sz", "parent": 470, "children": [], "start_point": {"row": 92, "column": 34}, "end_point": {"row": 92, "column": 36}}, {"id": 473, "type": "parameter_declaration", "text": "void *data", "parent": 466, "children": [474, 475], "start_point": {"row": 92, "column": 38}, "end_point": {"row": 92, "column": 48}}, {"id": 474, "type": "primitive_type", "text": "void", "parent": 473, "children": [], "start_point": {"row": 92, "column": 38}, "end_point": {"row": 92, "column": 42}}, {"id": 475, "type": "pointer_declarator", "text": "*data", "parent": 473, "children": [476, 477], "start_point": {"row": 92, "column": 43}, "end_point": {"row": 92, "column": 48}}, {"id": 476, "type": "*", "text": "*", "parent": 475, "children": [], "start_point": {"row": 92, "column": 43}, "end_point": {"row": 92, "column": 44}}, {"id": 477, "type": "identifier", "text": "data", "parent": 475, "children": [], "start_point": {"row": 92, "column": 44}, "end_point": {"row": 92, "column": 48}}, {"id": 478, "type": "parameter_declaration", "text": "GLenum usage", "parent": 466, "children": [479, 480], "start_point": {"row": 92, "column": 50}, "end_point": {"row": 92, "column": 62}}, {"id": 479, "type": "type_identifier", "text": "GLenum", "parent": 478, "children": [], "start_point": {"row": 92, "column": 50}, "end_point": {"row": 92, "column": 56}}, {"id": 480, "type": "identifier", "text": "usage", "parent": 478, "children": [], "start_point": {"row": 92, "column": 57}, "end_point": {"row": 92, "column": 62}}, {"id": 481, "type": "declaration", "text": "GLuint vbo;", "parent": 462, "children": [482, 483], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 15}}, {"id": 482, "type": "type_identifier", "text": "GLuint", "parent": 481, "children": [], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 10}}, {"id": 483, "type": "identifier", "text": "vbo", "parent": 481, "children": [], "start_point": {"row": 94, "column": 11}, "end_point": {"row": 94, "column": 14}}, {"id": 484, "type": "call_expression", "text": "glGenBuffers(1, &vbo)", "parent": 462, "children": [485, 486], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 25}}, {"id": 485, "type": "identifier", "text": "glGenBuffers", "parent": 484, "children": [], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 16}}, {"id": 486, "type": "argument_list", "text": "(1, &vbo)", "parent": 484, "children": [487, 488], "start_point": {"row": 95, "column": 16}, "end_point": {"row": 95, "column": 25}}, {"id": 487, "type": "number_literal", "text": "1", "parent": 486, "children": [], "start_point": {"row": 95, "column": 17}, "end_point": {"row": 95, "column": 18}}, {"id": 488, "type": "pointer_expression", "text": "&vbo", "parent": 486, "children": [489], "start_point": {"row": 95, "column": 20}, "end_point": {"row": 95, "column": 24}}, {"id": 489, "type": "identifier", "text": "vbo", "parent": 488, "children": [], "start_point": {"row": 95, "column": 21}, "end_point": {"row": 95, "column": 24}}, {"id": 490, "type": "call_expression", "text": "glBindBuffer(type, vbo)", "parent": 462, "children": [491, 492], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 27}}, {"id": 491, "type": "identifier", "text": "glBindBuffer", "parent": 490, "children": [], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 16}}, {"id": 492, "type": "argument_list", "text": "(type, vbo)", "parent": 490, "children": [493, 494], "start_point": {"row": 96, "column": 16}, "end_point": {"row": 96, "column": 27}}, {"id": 493, "type": "identifier", "text": "type", "parent": 492, "children": [], "start_point": {"row": 96, "column": 17}, "end_point": {"row": 96, "column": 21}}, {"id": 494, "type": "identifier", "text": "vbo", "parent": 492, "children": [], "start_point": {"row": 96, "column": 23}, "end_point": {"row": 96, "column": 26}}, {"id": 495, "type": "call_expression", "text": "glBufferData(type, sz, data, usage)", "parent": 462, "children": [496, 497], "start_point": {"row": 97, "column": 4}, "end_point": {"row": 97, "column": 39}}, {"id": 496, "type": "identifier", "text": "glBufferData", "parent": 495, "children": [], "start_point": {"row": 97, "column": 4}, "end_point": {"row": 97, "column": 16}}, {"id": 497, "type": "argument_list", "text": "(type, sz, data, usage)", "parent": 495, "children": [498, 499, 500, 501], "start_point": {"row": 97, "column": 16}, "end_point": {"row": 97, "column": 39}}, {"id": 498, "type": "identifier", "text": "type", "parent": 497, "children": [], "start_point": {"row": 97, "column": 17}, "end_point": {"row": 97, "column": 21}}, {"id": 499, "type": "identifier", "text": "sz", "parent": 497, "children": [], "start_point": {"row": 97, "column": 23}, "end_point": {"row": 97, "column": 25}}, {"id": 500, "type": "identifier", "text": "data", "parent": 497, "children": [], "start_point": {"row": 97, "column": 27}, "end_point": {"row": 97, "column": 31}}, {"id": 501, "type": "identifier", "text": "usage", "parent": 497, "children": [], "start_point": {"row": 97, "column": 33}, "end_point": {"row": 97, "column": 38}}, {"id": 502, "type": "return_statement", "text": "return vbo;", "parent": 462, "children": [503], "start_point": {"row": 98, "column": 4}, "end_point": {"row": 98, "column": 15}}, {"id": 503, "type": "identifier", "text": "vbo", "parent": 502, "children": [], "start_point": {"row": 98, "column": 11}, "end_point": {"row": 98, "column": 14}}, {"id": 504, "type": "function_definition", "text": "GLuint rm_vbo(GLuint vbo)\n{\n glDeleteBuffers(1, &vbo);\n return 0;\n}", "parent": null, "children": [505, 506], "start_point": {"row": 101, "column": 0}, "end_point": {"row": 105, "column": 1}}, {"id": 505, "type": "type_identifier", "text": "GLuint", "parent": 504, "children": [], "start_point": {"row": 101, "column": 0}, "end_point": {"row": 101, "column": 6}}, {"id": 506, "type": "function_declarator", "text": "rm_vbo(GLuint vbo)", "parent": 504, "children": [507, 508], "start_point": {"row": 101, "column": 7}, "end_point": {"row": 101, "column": 25}}, {"id": 507, "type": "identifier", "text": "rm_vbo", "parent": 506, "children": [], "start_point": {"row": 101, "column": 7}, "end_point": {"row": 101, "column": 13}}, {"id": 508, "type": "parameter_list", "text": "(GLuint vbo)", "parent": 506, "children": [509], "start_point": {"row": 101, "column": 13}, "end_point": {"row": 101, "column": 25}}, {"id": 509, "type": "parameter_declaration", "text": "GLuint vbo", "parent": 508, "children": [510, 511], "start_point": {"row": 101, "column": 14}, "end_point": {"row": 101, "column": 24}}, {"id": 510, "type": "type_identifier", "text": "GLuint", "parent": 509, "children": [], "start_point": {"row": 101, "column": 14}, "end_point": {"row": 101, "column": 20}}, {"id": 511, "type": "identifier", "text": "vbo", "parent": 509, "children": [], "start_point": {"row": 101, "column": 21}, "end_point": {"row": 101, "column": 24}}, {"id": 512, "type": "call_expression", "text": "glDeleteBuffers(1, &vbo)", "parent": 504, "children": [513, 514], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 28}}, {"id": 513, "type": "identifier", "text": "glDeleteBuffers", "parent": 512, "children": [], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 19}}, {"id": 514, "type": "argument_list", "text": "(1, &vbo)", "parent": 512, "children": [515, 516], "start_point": {"row": 103, "column": 19}, "end_point": {"row": 103, "column": 28}}, {"id": 515, "type": "number_literal", "text": "1", "parent": 514, "children": [], "start_point": {"row": 103, "column": 20}, "end_point": {"row": 103, "column": 21}}, {"id": 516, "type": "pointer_expression", "text": "&vbo", "parent": 514, "children": [517], "start_point": {"row": 103, "column": 23}, "end_point": {"row": 103, "column": 27}}, {"id": 517, "type": "identifier", "text": "vbo", "parent": 516, "children": [], "start_point": {"row": 103, "column": 24}, "end_point": {"row": 103, "column": 27}}, {"id": 518, "type": "return_statement", "text": "return 0;", "parent": 504, "children": [519], "start_point": {"row": 104, "column": 4}, "end_point": {"row": 104, "column": 13}}, {"id": 519, "type": "number_literal", "text": "0", "parent": 518, "children": [], "start_point": {"row": 104, "column": 11}, "end_point": {"row": 104, "column": 12}}]}, "node_categories": {"declarations": {"functions": [8, 21, 27, 29, 37, 39, 47, 51, 140, 144, 159, 161, 181, 183, 197, 199, 397, 399, 411, 413, 448, 450, 462, 464, 504, 506], "variables": [6, 11, 16, 19, 24, 32, 42, 54, 57, 60, 65, 68, 100, 115, 147, 164, 166, 186, 202, 205, 212, 217, 220, 227, 232, 240, 259, 287, 312, 341, 367, 402, 416, 421, 424, 453, 467, 470, 473, 478, 481, 509], "classes": [], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [34, 44, 71, 76, 81, 86, 91, 110, 122, 131, 135, 152, 169, 173, 175, 189, 193, 237, 247, 250, 253, 254, 255, 265, 269, 273, 277, 280, 283, 293, 297, 300, 304, 307, 318, 322, 325, 329, 332, 336, 347, 351, 355, 359, 363, 373, 377, 381, 385, 388, 391, 405, 429, 433, 438, 442, 456, 484, 488, 490, 495, 512, 516], "assignments": [96, 272, 354, 380], "loops": [258, 286, 311, 340, 366], "conditionals": [7, 9, 15, 17, 18, 20, 22, 25, 26, 30, 35, 40, 45, 48, 52, 56, 59, 64, 67, 70, 72, 74, 75, 77, 79, 80, 82, 84, 85, 87, 89, 90, 92, 94, 95, 97, 99, 101, 105, 107, 108, 111, 116, 120, 123, 125, 126, 127, 128, 132, 134, 136, 139, 141, 145, 148, 151, 153, 155, 160, 162, 167, 168, 170, 174, 176, 178, 180, 182, 184, 187, 188, 190, 194, 198, 200, 204, 211, 213, 216, 219, 226, 228, 231, 233, 235, 238, 241, 245, 248, 251, 257, 262, 266, 268, 271, 274, 275, 278, 281, 282, 284, 285, 290, 294, 296, 299, 301, 303, 305, 306, 308, 310, 315, 319, 321, 324, 326, 328, 330, 331, 333, 335, 337, 339, 344, 348, 350, 353, 356, 357, 360, 362, 364, 365, 370, 374, 376, 379, 382, 383, 386, 389, 390, 392, 394, 396, 398, 400, 403, 404, 406, 408, 412, 414, 420, 422, 423, 425, 427, 430, 432, 434, 436, 439, 443, 445, 447, 449, 451, 454, 455, 457, 459, 463, 465, 468, 469, 472, 477, 479, 480, 482, 483, 485, 489, 491, 493, 494, 496, 498, 499, 500, 501, 503, 505, 507, 510, 511, 513, 517], "returns": [138, 156, 179, 195, 395, 409, 446, 460, 502, 518], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 172, 192, 196, 264, 292, 317, 346, 372, 410, 437, 461, 487, 515, 519], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 8, "universal_type": "function", "name": "unknown", "text_snippet": "mk_shd(const char *src, GLenum type)"}, {"node_id": 21, "universal_type": "function", "name": "unknown", "text_snippet": "rm_shd(GLuint shd)"}, {"node_id": 27, "universal_type": "function", "name": "init_glfw", "text_snippet": "void init_glfw(void)\n{\n glfwInit();\n}"}, {"node_id": 29, "universal_type": "function", "name": "unknown", "text_snippet": "init_glfw(void)"}, {"node_id": 37, "universal_type": "function", "name": "exit_glfw", "text_snippet": "void exit_glfw(void)\n{\n glfwTerminate();\n}"}, {"node_id": 39, "universal_type": "function", "name": "unknown", "text_snippet": "exit_glfw(void)"}, {"node_id": 47, "universal_type": "function", "name": "h,", "text_snippet": "GLFWwindow *mk_win(int w, int h, const char *title, bool rsz, bool fscr)\n{\n glfwWindowHint(GLFW_R"}, {"node_id": 51, "universal_type": "function", "name": "h,", "text_snippet": "mk_win(int w, int h, const char *title, bool rsz, bool fscr)"}, {"node_id": 140, "universal_type": "function", "name": "unknown", "text_snippet": "GLFWwindow *rm_win(GLFWwindow *win)\n{\n glfwDestroyWindow(win);\n return NULL;\n}"}, {"node_id": 144, "universal_type": "function", "name": "unknown", "text_snippet": "rm_win(GLFWwindow *win)"}, {"node_id": 159, "universal_type": "function", "name": "unknown", "text_snippet": "GLuint mk_vao(void)\n{\n GLuint vao;\n glGenVertexArrays(1, &vao);\n glBindVertexArray(vao);\n "}, {"node_id": 161, "universal_type": "function", "name": "unknown", "text_snippet": "mk_vao(void)"}, {"node_id": 181, "universal_type": "function", "name": "unknown", "text_snippet": "GLuint rm_vao(GLuint vao)\n{\n glDeleteVertexArrays(1, &vao);\n return 0;\n}"}, {"node_id": 183, "universal_type": "function", "name": "unknown", "text_snippet": "rm_vao(GLuint vao)"}, {"node_id": 197, "universal_type": "function", "name": "n_vars,", "text_snippet": "GLuint mk_prg(int n_shds, const char **srcs, const GLenum *types,\n int n_vars, const ch"}, {"node_id": 199, "universal_type": "function", "name": "n_vars,", "text_snippet": "mk_prg(int n_shds, const char **srcs, const GLenum *types,\n int n_vars, const char **na"}, {"node_id": 397, "universal_type": "function", "name": "unknown", "text_snippet": "GLuint rm_prg(GLuint prg)\n{\n glDeleteProgram(prg);\n return 0;\n}"}, {"node_id": 399, "universal_type": "function", "name": "unknown", "text_snippet": "rm_prg(GLuint prg)"}, {"node_id": 411, "universal_type": "function", "name": "unknown", "text_snippet": "static GLuint mk_shd(const char *src, GLenum type)\n{\n GLuint shd = glCreateShader(type);\n glSh"}, {"node_id": 413, "universal_type": "function", "name": "unknown", "text_snippet": "mk_shd(const char *src, GLenum type)"}, {"node_id": 448, "universal_type": "function", "name": "unknown", "text_snippet": "static GLuint rm_shd(GLuint shd)\n{\n glDeleteShader(shd);\n return 0;\n}"}, {"node_id": 450, "universal_type": "function", "name": "unknown", "text_snippet": "rm_shd(GLuint shd)"}, {"node_id": 462, "universal_type": "function", "name": "*data,", "text_snippet": "GLuint mk_vbo(GLenum type, size_t sz, void *data, GLenum usage)\n{\n GLuint vbo;\n glGenBuffers(1"}, {"node_id": 464, "universal_type": "function", "name": "*data,", "text_snippet": "mk_vbo(GLenum type, size_t sz, void *data, GLenum usage)"}, {"node_id": 504, "universal_type": "function", "name": "unknown", "text_snippet": "GLuint rm_vbo(GLuint vbo)\n{\n glDeleteBuffers(1, &vbo);\n return 0;\n}"}, {"node_id": 506, "universal_type": "function", "name": "unknown", "text_snippet": "rm_vbo(GLuint vbo)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"gutil.h\"\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <stdlib.h>\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#include \"gutil.h\"\n\n#include <stdlib.h>\n\nstatic GLuint mk_shd(const char *src, GLenum type);\nstatic GLuint rm_shd(GLuint shd);\n\nvoid init_glfw(void)\n{\n glfwInit();\n}\n\nvoid exit_glfw(void)\n{\n glfwTerminate();\n}\n\nGLFWwindow *mk_win(int w, int h, const char *title, bool rsz, bool fscr)\n{\n glfwWindowHint(GLFW_RESIZABLE, rsz);\n glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, GUTIL_CONTEXT_VERSION_MAJOR);\n glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, GUTIL_CONTEXT_VERSION_MINOR);\n glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GUTIL_OPENGL_FORWARD_COMPAT);\n glfwWindowHint(GLFW_OPENGL_PROFILE, GUTIL_OPENGL_PROFILE);\n glewExperimental = GUTIL_GLEW_EXPERIMENTAL;\n GLFWmonitor *mon = fscr ? glfwGetPrimaryMonitor() : NULL;\n GLFWwindow *win = glfwCreateWindow(w, h, title, mon, NULL);\n glfwMakeContextCurrent(win);\n glewInit();\n return win;\n}\n\nGLFWwindow *rm_win(GLFWwindow *win)\n{\n glfwDestroyWindow(win);\n return NULL;\n}\n\nGLuint mk_vao(void)\n{\n GLuint vao;\n glGenVertexArrays(1, &vao);\n glBindVertexArray(vao);\n return vao;\n}\n\nGLuint rm_vao(GLuint vao)\n{\n glDeleteVertexArrays(1, &vao);\n return 0;\n}\n\nGLuint mk_prg(int n_shds, const char **srcs, const GLenum *types,\n int n_vars, const char **names, GLint *locs)\n{\n GLuint prg = glCreateProgram();\n GLuint *shds = malloc(n_shds * sizeof(*shds));\n for (int i = 0; i < n_shds; ++i) shds[i] = mk_shd(srcs[i], types[i]);\n\n for (int i = 0; i < n_shds; ++i) glAttachShader(prg, shds[i]);\n glLinkProgram(prg);\n for (int i = 0; i < n_shds; ++i) glDetachShader(prg, shds[i]);\n\n glValidateProgram(prg);\n glUseProgram(prg);\n for (int i = 0; i < n_vars; ++i)locs[i]=glGetUniformLocation(prg,names[i]);\n\n for (int i = 0; i < n_shds; ++i) shds[i] = rm_shd(shds[i]);\n free(shds);\n return prg;\n}\n\nGLuint rm_prg(GLuint prg)\n{\n glDeleteProgram(prg);\n return 0;\n}\n\nstatic GLuint mk_shd(const char *src, GLenum type)\n{\n GLuint shd = glCreateShader(type);\n glShaderSource(shd, 1, &src, NULL);\n glCompileShader(shd);\n return shd;\n}\n\nstatic GLuint rm_shd(GLuint shd)\n{\n glDeleteShader(shd);\n return 0;\n}\n\nGLuint mk_vbo(GLenum type, size_t sz, void *data, GLenum usage)\n{\n GLuint vbo;\n glGenBuffers(1, &vbo);\n glBindBuffer(type, vbo);\n glBufferData(type, sz, data, usage);\n return vbo;\n}\n\nGLuint rm_vbo(GLuint vbo)\n{\n glDeleteBuffers(1, &vbo);\n return 0;\n}\n"}
| 81,224
|
c
|
class SendEntry {
public:
SendEntry( int thread, NicCmd* cmd = NULL ) : cmd(cmd), thread(thread), vc(0) {}
~SendEntry() {
if ( cmd ) {
delete cmd;
}
}
StreamHdr* getStreamHdr() { return &m_streamHdr; }
virtual int getAddr() = 0;
virtual int getLength() = 0;
virtual int getCqId() = 0;
virtual int getContext() = 0;
virtual int getDestNode() = 0;
virtual int getDestPid() = 0;
int getThread() { return thread; }
int getVC() { return vc; }
protected:
StreamHdr m_streamHdr;
NicCmd* cmd;
int thread;
int vc;
};
class MsgSendEntry : public SendEntry {
public:
MsgSendEntry( NicCmd* cmd, int thread ) : SendEntry(thread,cmd) {
m_streamHdr.type = StreamHdr::Msg;
m_streamHdr.data.msgKey = cmd->data.send.rqKey;
m_streamHdr.payloadLength = cmd->data.send.len;
}
int getCqId() { return cmd->data.send.cqId; }
int getAddr() { return cmd->data.send.addr; }
int getLength() { return cmd->data.send.len; }
int getContext() { return cmd->data.send.context; }
int getDestNode() { return cmd->data.send.node; }
int getDestPid() { return cmd->data.send.pe; }
private:
};
class WriteSendEntry : public SendEntry {
public:
WriteSendEntry( NicCmd* cmd, int thread ): SendEntry(thread,cmd) {
m_streamHdr.type = StreamHdr::Write;
m_streamHdr.data.rdma.memRgnKey = cmd->data.write.key;
m_streamHdr.data.rdma.offset = cmd->data.write.offset;
m_streamHdr.payloadLength = cmd->data.write.len;
}
int getLength() { return cmd->data.write.len; }
int getAddr() { return cmd->data.write.srcAddr; }
int getCqId() { return cmd->data.write.cqId; }
int getContext() { return cmd->data.write.context; }
int getDestNode() { return cmd->data.write.node; }
int getDestPid() { return cmd->data.write.pe; }
};
class ReadSendEntry : public SendEntry {
public:
ReadSendEntry( NicCmd* cmd, int thread, int readRespKey ): SendEntry(thread,cmd) {
m_streamHdr.type = StreamHdr::ReadReq;
m_streamHdr.payloadLength = 0;
m_streamHdr.data.rdma.memRgnKey = cmd->data.read.key;
m_streamHdr.data.rdma.offset = cmd->data.read.offset;
m_streamHdr.data.rdma.readRespKey = readRespKey;
m_streamHdr.data.rdma.readLength = cmd->data.read.len;
}
// we are only sending a read header so lengh and address are 0
// the read does send a completeion until the read completes so these are
// passed to the ReadRespRecvEntry
int getLength() { return 0; }
int getAddr() { return 0; }
int getCqId() { return -1; }
int getContext() { return 0; }
int getDestNode() { return cmd->data.read.node; }
int getDestPid() { return cmd->data.read.pe; }
private:
};
class ReadRespSendEntry : public SendEntry {
public:
ReadRespSendEntry( int thread, int destNode, int destPid, Addr_t srcAddr, int length, int readRespKey ):
SendEntry(thread), m_destNode(destNode), m_destPid(destPid), m_srcAddr(srcAddr), m_length(length)
{
m_streamHdr.type = StreamHdr::ReadResp;
m_streamHdr.payloadLength = m_length;
m_streamHdr.data.rdma.readRespKey = readRespKey;
}
int getLength() { return m_length; }
int getAddr() { return m_srcAddr; }
int getCqId() { return -1; }
int getContext() { return 0; }
int getDestNode() { return m_destNode; }
int getDestPid() { return m_destPid; }
private:
int m_srcAddr;
int m_length;
int m_destNode;
int m_destPid;
};
| 34.16
| 95
|
(translation_unit) "class SendEntry {\n public:\n SendEntry( int thread, NicCmd* cmd = NULL ) : cmd(cmd), thread(thread), vc(0) {}\n ~SendEntry() {\n if ( cmd ) {\n delete cmd;\n }\n }\n StreamHdr* getStreamHdr() { return &m_streamHdr; } \n virtual int getAddr() = 0;\n virtual int getLength() = 0;\n virtual int getCqId() = 0;\n virtual int getContext() = 0;\n virtual int getDestNode() = 0;\n virtual int getDestPid() = 0;\n int getThread() { return thread; }\n int getVC() { return vc; }\n protected:\n StreamHdr m_streamHdr;\n NicCmd* cmd;\n int thread;\n int vc;\n};\n\nclass MsgSendEntry : public SendEntry {\n public:\n MsgSendEntry( NicCmd* cmd, int thread ) : SendEntry(thread,cmd) {\n m_streamHdr.type = StreamHdr::Msg;\n m_streamHdr.data.msgKey = cmd->data.send.rqKey;\n m_streamHdr.payloadLength = cmd->data.send.len;\n }\n int getCqId() { return cmd->data.send.cqId; }\n int getAddr() { return cmd->data.send.addr; }\n int getLength() { return cmd->data.send.len; }\n int getContext() { return cmd->data.send.context; }\n int getDestNode() { return cmd->data.send.node; }\n int getDestPid() { return cmd->data.send.pe; }\n private: \n}; \n\nclass WriteSendEntry : public SendEntry {\n public:\n WriteSendEntry( NicCmd* cmd, int thread ): SendEntry(thread,cmd) {\n m_streamHdr.type = StreamHdr::Write;\n m_streamHdr.data.rdma.memRgnKey = cmd->data.write.key;\n m_streamHdr.data.rdma.offset = cmd->data.write.offset;\n m_streamHdr.payloadLength = cmd->data.write.len;\n }\n int getLength() { return cmd->data.write.len; }\n int getAddr() { return cmd->data.write.srcAddr; }\n int getCqId() { return cmd->data.write.cqId; }\n int getContext() { return cmd->data.write.context; }\n int getDestNode() { return cmd->data.write.node; }\n int getDestPid() { return cmd->data.write.pe; }\n}; \nclass ReadSendEntry : public SendEntry {\n public:\n ReadSendEntry( NicCmd* cmd, int thread, int readRespKey ): SendEntry(thread,cmd) {\n m_streamHdr.type = StreamHdr::ReadReq;\n m_streamHdr.payloadLength = 0;\n m_streamHdr.data.rdma.memRgnKey = cmd->data.read.key;\n m_streamHdr.data.rdma.offset = cmd->data.read.offset;\n m_streamHdr.data.rdma.readRespKey = readRespKey;\n m_streamHdr.data.rdma.readLength = cmd->data.read.len;\n }\n // we are only sending a read header so lengh and address are 0\n // the read does send a completeion until the read completes so these are\n // passed to the ReadRespRecvEntry\n int getLength() { return 0; }\n int getAddr() { return 0; }\n int getCqId() { return -1; }\n int getContext() { return 0; }\n int getDestNode() { return cmd->data.read.node; }\n int getDestPid() { return cmd->data.read.pe; }\n private:\n}; \n\nclass ReadRespSendEntry : public SendEntry {\n public:\n ReadRespSendEntry( int thread, int destNode, int destPid, Addr_t srcAddr, int length, int readRespKey ): \n SendEntry(thread), m_destNode(destNode), m_destPid(destPid), m_srcAddr(srcAddr), m_length(length) \n {\n m_streamHdr.type = StreamHdr::ReadResp;\n m_streamHdr.payloadLength = m_length;\n m_streamHdr.data.rdma.readRespKey = readRespKey;\n }\n\n int getLength() { return m_length; }\n int getAddr() { return m_srcAddr; }\n int getCqId() { return -1; }\n int getContext() { return 0; }\n int getDestNode() { return m_destNode; }\n int getDestPid() { return m_destPid; }\n private:\n int m_srcAddr;\n int m_length;\n int m_destNode;\n int m_destPid;\n}; \n\n\n\n\n"
(function_definition) "class SendEntry {\n public:\n SendEntry( int thread, NicCmd* cmd = NULL ) : cmd(cmd), thread(thread), vc(0) {}\n ~SendEntry() {\n if ( cmd ) {\n delete cmd;\n }"
(type_identifier) "class"
(identifier) "SendEntry"
(compound_statement) "{\n public:\n SendEntry( int thread, NicCmd* cmd = NULL ) : cmd(cmd), thread(thread), vc(0) {}\n ~SendEntry() {\n if ( cmd ) {\n delete cmd;\n }"
({) "{"
(labeled_statement) "public:\n SendEntry( int thread, NicCmd* cmd = NULL ) : cmd(cmd), thread(thread), vc(0) {}\n ~SendEntry() {\n if ( cmd ) {\n delete cmd;"
(statement_identifier) "public"
(:) ":"
(declaration) "SendEntry( int thread, NicCmd* cmd = NULL ) : cmd(cmd), thread(thread), vc(0) {}\n ~SendEntry() {\n if ( cmd ) {\n delete cmd;"
(macro_type_specifier) "SendEntry( int"
(identifier) "SendEntry"
(() "("
(type_descriptor) "int"
(primitive_type) "int"
()) ""
(identifier) "thread"
(,) ","
(ERROR) "NicCmd"
(identifier) "NicCmd"
(init_declarator) "* cmd = NULL ) : cmd(cmd)"
(pointer_declarator) "* cmd"
(*) "*"
(identifier) "cmd"
(=) "="
(ERROR) "NULL ) :"
(null) "NULL"
(NULL) "NULL"
()) ")"
(:) ":"
(call_expression) "cmd(cmd)"
(identifier) "cmd"
(argument_list) "(cmd)"
(() "("
(identifier) "cmd"
()) ")"
(,) ","
(function_declarator) "thread(thread)"
(identifier) "thread"
(parameter_list) "(thread)"
(() "("
(parameter_declaration) "thread"
(type_identifier) "thread"
()) ")"
(,) ","
(ERROR) "vc(0) {}\n ~SendEntry() {\n if ( cmd ) {\n delete"
(function_declarator) "vc(0)"
(identifier) "vc"
(parameter_list) "(0)"
(() "("
(ERROR) "0"
(number_literal) "0"
()) ")"
({) "{"
(}) "}"
(~) "~"
(function_declarator) "SendEntry() {\n if ( cmd )"
(function_declarator) "SendEntry()"
(identifier) "SendEntry"
(parameter_list) "()"
(() "("
()) ")"
(ERROR) "{\n if"
({) "{"
(if) "if"
(parameter_list) "( cmd )"
(() "("
(parameter_declaration) "cmd"
(type_identifier) "cmd"
()) ")"
({) "{"
(identifier) "delete"
(identifier) "cmd"
(;) ";"
(}) "}"
(ERROR) "}"
(}) "}"
(function_definition) "StreamHdr* getStreamHdr() { return &m_streamHdr; }"
(type_identifier) "StreamHdr"
(pointer_declarator) "* getStreamHdr()"
(*) "*"
(function_declarator) "getStreamHdr()"
(identifier) "getStreamHdr"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return &m_streamHdr; }"
({) "{"
(return_statement) "return &m_streamHdr;"
(return) "return"
(pointer_expression) "&m_streamHdr"
(&) "&"
(identifier) "m_streamHdr"
(;) ";"
(}) "}"
(declaration) "virtual int getAddr() = 0;"
(type_identifier) "virtual"
(ERROR) "int"
(identifier) "int"
(init_declarator) "getAddr() = 0"
(function_declarator) "getAddr()"
(identifier) "getAddr"
(parameter_list) "()"
(() "("
()) ")"
(=) "="
(number_literal) "0"
(;) ";"
(declaration) "virtual int getLength() = 0;"
(type_identifier) "virtual"
(ERROR) "int"
(identifier) "int"
(init_declarator) "getLength() = 0"
(function_declarator) "getLength()"
(identifier) "getLength"
(parameter_list) "()"
(() "("
()) ")"
(=) "="
(number_literal) "0"
(;) ";"
(declaration) "virtual int getCqId() = 0;"
(type_identifier) "virtual"
(ERROR) "int"
(identifier) "int"
(init_declarator) "getCqId() = 0"
(function_declarator) "getCqId()"
(identifier) "getCqId"
(parameter_list) "()"
(() "("
()) ")"
(=) "="
(number_literal) "0"
(;) ";"
(declaration) "virtual int getContext() = 0;"
(type_identifier) "virtual"
(ERROR) "int"
(identifier) "int"
(init_declarator) "getContext() = 0"
(function_declarator) "getContext()"
(identifier) "getContext"
(parameter_list) "()"
(() "("
()) ")"
(=) "="
(number_literal) "0"
(;) ";"
(declaration) "virtual int getDestNode() = 0;"
(type_identifier) "virtual"
(ERROR) "int"
(identifier) "int"
(init_declarator) "getDestNode() = 0"
(function_declarator) "getDestNode()"
(identifier) "getDestNode"
(parameter_list) "()"
(() "("
()) ")"
(=) "="
(number_literal) "0"
(;) ";"
(declaration) "virtual int getDestPid() = 0;"
(type_identifier) "virtual"
(ERROR) "int"
(identifier) "int"
(init_declarator) "getDestPid() = 0"
(function_declarator) "getDestPid()"
(identifier) "getDestPid"
(parameter_list) "()"
(() "("
()) ")"
(=) "="
(number_literal) "0"
(;) ";"
(function_definition) "int getThread() { return thread; }"
(primitive_type) "int"
(function_declarator) "getThread()"
(identifier) "getThread"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return thread; }"
({) "{"
(return_statement) "return thread;"
(return) "return"
(identifier) "thread"
(;) ";"
(}) "}"
(function_definition) "int getVC() { return vc; }"
(primitive_type) "int"
(function_declarator) "getVC()"
(identifier) "getVC"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return vc; }"
({) "{"
(return_statement) "return vc;"
(return) "return"
(identifier) "vc"
(;) ";"
(}) "}"
(labeled_statement) "protected:\n StreamHdr m_streamHdr;"
(statement_identifier) "protected"
(:) ":"
(declaration) "StreamHdr m_streamHdr;"
(type_identifier) "StreamHdr"
(identifier) "m_streamHdr"
(;) ";"
(declaration) "NicCmd* cmd;"
(type_identifier) "NicCmd"
(pointer_declarator) "* cmd"
(*) "*"
(identifier) "cmd"
(;) ";"
(declaration) "int thread;"
(primitive_type) "int"
(identifier) "thread"
(;) ";"
(declaration) "int vc;"
(primitive_type) "int"
(identifier) "vc"
(;) ";"
(ERROR) "}"
(}) "}"
(expression_statement) ";"
(;) ";"
(function_definition) "class MsgSendEntry : public SendEntry {\n public:\n MsgSendEntry( NicCmd* cmd, int thread ) : SendEntry(thread,cmd) {\n m_streamHdr.type = StreamHdr::Msg;\n m_streamHdr.data.msgKey = cmd->data.send.rqKey;\n m_streamHdr.payloadLength = cmd->data.send.len;\n }\n int getCqId() { return cmd->data.send.cqId; }\n int getAddr() { return cmd->data.send.addr; }\n int getLength() { return cmd->data.send.len; }\n int getContext() { return cmd->data.send.context; }\n int getDestNode() { return cmd->data.send.node; }\n int getDestPid() { return cmd->data.send.pe; }\n private: \n}; \n\nclass WriteSendEntry : public SendEntry {\n public:\n WriteSendEntry( NicCmd* cmd, int thread ): SendEntry(thread,cmd) {\n m_streamHdr.type = StreamHdr::Write;\n m_streamHdr.data.rdma.memRgnKey = cmd->data.write.key;\n m_streamHdr.data.rdma.offset = cmd->data.write.offset;\n m_streamHdr.payloadLength = cmd->data.write.len;\n }\n int getLength() { return cmd->data.write.len; }\n int getAddr() { return cmd->data.write.srcAddr; }\n int getCqId() { return cmd->data.write.cqId; }\n int getContext() { return cmd->data.write.context; }\n int getDestNode() { return cmd->data.write.node; }\n int getDestPid() { return cmd->data.write.pe; }\n}; \nclass ReadSendEntry : public SendEntry {\n public:\n ReadSendEntry( NicCmd* cmd, int thread, int readRespKey ): SendEntry(thread,cmd) {\n m_streamHdr.type = StreamHdr::ReadReq;\n m_streamHdr.payloadLength = 0;\n m_streamHdr.data.rdma.memRgnKey = cmd->data.read.key;\n m_streamHdr.data.rdma.offset = cmd->data.read.offset;\n m_streamHdr.data.rdma.readRespKey = readRespKey;\n m_streamHdr.data.rdma.readLength = cmd->data.read.len;\n }\n // we are only sending a read header so lengh and address are 0\n // the read does send a completeion until the read completes so these are\n // passed to the ReadRespRecvEntry\n int getLength() { return 0; }\n int getAddr() { return 0; }\n int getCqId() { return -1; }\n int getContext() { return 0; }\n int getDestNode() { return cmd->data.read.node; }\n int getDestPid() { return cmd->data.read.pe; }\n private:\n}; \n\nclass ReadRespSendEntry : public SendEntry {\n public:\n ReadRespSendEntry( int thread, int destNode, int destPid, Addr_t srcAddr, int length, int readRespKey ): \n SendEntry(thread), m_destNode(destNode), m_destPid(destPid), m_srcAddr(srcAddr), m_length(length) \n {\n m_streamHdr.type = StreamHdr::ReadResp;\n m_streamHdr.payloadLength = m_length;\n m_streamHdr.data.rdma.readRespKey = readRespKey;\n }\n\n int getLength() { return m_length; }\n int getAddr() { return m_srcAddr; }\n int getCqId() { return -1; }\n int getContext() { return 0; }\n int getDestNode() { return m_destNode; }\n int getDestPid() { return m_destPid; }\n private:\n int m_srcAddr;\n int m_length;\n int m_destNode;\n int m_destPid;\n};"
(type_identifier) "class"
(identifier) "MsgSendEntry"
(ERROR) ": public SendEntry"
(:) ":"
(identifier) "public"
(identifier) "SendEntry"
(compound_statement) "{\n public:\n MsgSendEntry( NicCmd* cmd, int thread ) : SendEntry(thread,cmd) {\n m_streamHdr.type = StreamHdr::Msg;\n m_streamHdr.data.msgKey = cmd->data.send.rqKey;\n m_streamHdr.payloadLength = cmd->data.send.len;\n }\n int getCqId() { return cmd->data.send.cqId; }\n int getAddr() { return cmd->data.send.addr; }\n int getLength() { return cmd->data.send.len; }\n int getContext() { return cmd->data.send.context; }\n int getDestNode() { return cmd->data.send.node; }\n int getDestPid() { return cmd->data.send.pe; }\n private: \n}; \n\nclass WriteSendEntry : public SendEntry {\n public:\n WriteSendEntry( NicCmd* cmd, int thread ): SendEntry(thread,cmd) {\n m_streamHdr.type = StreamHdr::Write;\n m_streamHdr.data.rdma.memRgnKey = cmd->data.write.key;\n m_streamHdr.data.rdma.offset = cmd->data.write.offset;\n m_streamHdr.payloadLength = cmd->data.write.len;\n }\n int getLength() { return cmd->data.write.len; }\n int getAddr() { return cmd->data.write.srcAddr; }\n int getCqId() { return cmd->data.write.cqId; }\n int getContext() { return cmd->data.write.context; }\n int getDestNode() { return cmd->data.write.node; }\n int getDestPid() { return cmd->data.write.pe; }\n}; \nclass ReadSendEntry : public SendEntry {\n public:\n ReadSendEntry( NicCmd* cmd, int thread, int readRespKey ): SendEntry(thread,cmd) {\n m_streamHdr.type = StreamHdr::ReadReq;\n m_streamHdr.payloadLength = 0;\n m_streamHdr.data.rdma.memRgnKey = cmd->data.read.key;\n m_streamHdr.data.rdma.offset = cmd->data.read.offset;\n m_streamHdr.data.rdma.readRespKey = readRespKey;\n m_streamHdr.data.rdma.readLength = cmd->data.read.len;\n }\n // we are only sending a read header so lengh and address are 0\n // the read does send a completeion until the read completes so these are\n // passed to the ReadRespRecvEntry\n int getLength() { return 0; }\n int getAddr() { return 0; }\n int getCqId() { return -1; }\n int getContext() { return 0; }\n int getDestNode() { return cmd->data.read.node; }\n int getDestPid() { return cmd->data.read.pe; }\n private:\n}; \n\nclass ReadRespSendEntry : public SendEntry {\n public:\n ReadRespSendEntry( int thread, int destNode, int destPid, Addr_t srcAddr, int length, int readRespKey ): \n SendEntry(thread), m_destNode(destNode), m_destPid(destPid), m_srcAddr(srcAddr), m_length(length) \n {\n m_streamHdr.type = StreamHdr::ReadResp;\n m_streamHdr.payloadLength = m_length;\n m_streamHdr.data.rdma.readRespKey = readRespKey;\n }\n\n int getLength() { return m_length; }\n int getAddr() { return m_srcAddr; }\n int getCqId() { return -1; }\n int getContext() { return 0; }\n int getDestNode() { return m_destNode; }\n int getDestPid() { return m_destPid; }\n private:\n int m_srcAddr;\n int m_length;\n int m_destNode;\n int m_destPid;\n};"
({) "{"
(labeled_statement) "public:\n MsgSendEntry( NicCmd* cmd, int thread ) : SendEntry(thread,cmd) {\n m_streamHdr.type = StreamHdr::Msg;\n m_streamHdr.data.msgKey = cmd->data.send.rqKey;\n m_streamHdr.payloadLength = cmd->data.send.len;\n }"
(statement_identifier) "public"
(:) ":"
(ERROR) "MsgSendEntry( NicCmd* cmd, int thread ) : SendEntry(thread,cmd)"
(call_expression) "MsgSendEntry( NicCmd* cmd, int thread )"
(identifier) "MsgSendEntry"
(argument_list) "( NicCmd* cmd, int thread )"
(() "("
(binary_expression) "NicCmd* cmd"
(identifier) "NicCmd"
(*) "*"
(identifier) "cmd"
(,) ","
(ERROR) "int"
(identifier) "int"
(identifier) "thread"
()) ")"
(:) ":"
(call_expression) "SendEntry(thread,cmd)"
(identifier) "SendEntry"
(argument_list) "(thread,cmd)"
(() "("
(identifier) "thread"
(,) ","
(identifier) "cmd"
()) ")"
(compound_statement) "{\n m_streamHdr.type = StreamHdr::Msg;\n m_streamHdr.data.msgKey = cmd->data.send.rqKey;\n m_streamHdr.payloadLength = cmd->data.send.len;\n }"
({) "{"
(expression_statement) "m_streamHdr.type = StreamHdr::Msg;"
(assignment_expression) "m_streamHdr.type = StreamHdr"
(field_expression) "m_streamHdr.type"
(identifier) "m_streamHdr"
(.) "."
(field_identifier) "type"
(=) "="
(identifier) "StreamHdr"
(ERROR) "::Msg"
(:) ":"
(:) ":"
(identifier) "Msg"
(;) ";"
(expression_statement) "m_streamHdr.data.msgKey = cmd->data.send.rqKey;"
(assignment_expression) "m_streamHdr.data.msgKey = cmd->data.send.rqKey"
(field_expression) "m_streamHdr.data.msgKey"
(field_expression) "m_streamHdr.data"
(identifier) "m_streamHdr"
(.) "."
(field_identifier) "data"
(.) "."
(field_identifier) "msgKey"
(=) "="
(field_expression) "cmd->data.send.rqKey"
(field_expression) "cmd->data.send"
(field_expression) "cmd->data"
(identifier) "cmd"
(->) "->"
(field_identifier) "data"
(.) "."
(field_identifier) "send"
(.) "."
(field_identifier) "rqKey"
(;) ";"
(expression_statement) "m_streamHdr.payloadLength = cmd->data.send.len;"
(assignment_expression) "m_streamHdr.payloadLength = cmd->data.send.len"
(field_expression) "m_streamHdr.payloadLength"
(identifier) "m_streamHdr"
(.) "."
(field_identifier) "payloadLength"
(=) "="
(field_expression) "cmd->data.send.len"
(field_expression) "cmd->data.send"
(field_expression) "cmd->data"
(identifier) "cmd"
(->) "->"
(field_identifier) "data"
(.) "."
(field_identifier) "send"
(.) "."
(field_identifier) "len"
(;) ";"
(}) "}"
(function_definition) "int getCqId() { return cmd->data.send.cqId; }"
(primitive_type) "int"
(function_declarator) "getCqId()"
(identifier) "getCqId"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return cmd->data.send.cqId; }"
({) "{"
(return_statement) "return cmd->data.send.cqId;"
(return) "return"
(field_expression) "cmd->data.send.cqId"
(field_expression) "cmd->data.send"
(field_expression) "cmd->data"
(identifier) "cmd"
(->) "->"
(field_identifier) "data"
(.) "."
(field_identifier) "send"
(.) "."
(field_identifier) "cqId"
(;) ";"
(}) "}"
(function_definition) "int getAddr() { return cmd->data.send.addr; }"
(primitive_type) "int"
(function_declarator) "getAddr()"
(identifier) "getAddr"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return cmd->data.send.addr; }"
({) "{"
(return_statement) "return cmd->data.send.addr;"
(return) "return"
(field_expression) "cmd->data.send.addr"
(field_expression) "cmd->data.send"
(field_expression) "cmd->data"
(identifier) "cmd"
(->) "->"
(field_identifier) "data"
(.) "."
(field_identifier) "send"
(.) "."
(field_identifier) "addr"
(;) ";"
(}) "}"
(function_definition) "int getLength() { return cmd->data.send.len; }"
(primitive_type) "int"
(function_declarator) "getLength()"
(identifier) "getLength"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return cmd->data.send.len; }"
({) "{"
(return_statement) "return cmd->data.send.len;"
(return) "return"
(field_expression) "cmd->data.send.len"
(field_expression) "cmd->data.send"
(field_expression) "cmd->data"
(identifier) "cmd"
(->) "->"
(field_identifier) "data"
(.) "."
(field_identifier) "send"
(.) "."
(field_identifier) "len"
(;) ";"
(}) "}"
(function_definition) "int getContext() { return cmd->data.send.context; }"
(primitive_type) "int"
(function_declarator) "getContext()"
(identifier) "getContext"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return cmd->data.send.context; }"
({) "{"
(return_statement) "return cmd->data.send.context;"
(return) "return"
(field_expression) "cmd->data.send.context"
(field_expression) "cmd->data.send"
(field_expression) "cmd->data"
(identifier) "cmd"
(->) "->"
(field_identifier) "data"
(.) "."
(field_identifier) "send"
(.) "."
(field_identifier) "context"
(;) ";"
(}) "}"
(function_definition) "int getDestNode() { return cmd->data.send.node; }"
(primitive_type) "int"
(function_declarator) "getDestNode()"
(identifier) "getDestNode"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return cmd->data.send.node; }"
({) "{"
(return_statement) "return cmd->data.send.node;"
(return) "return"
(field_expression) "cmd->data.send.node"
(field_expression) "cmd->data.send"
(field_expression) "cmd->data"
(identifier) "cmd"
(->) "->"
(field_identifier) "data"
(.) "."
(field_identifier) "send"
(.) "."
(field_identifier) "node"
(;) ";"
(}) "}"
(function_definition) "int getDestPid() { return cmd->data.send.pe; }"
(primitive_type) "int"
(function_declarator) "getDestPid()"
(identifier) "getDestPid"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return cmd->data.send.pe; }"
({) "{"
(return_statement) "return cmd->data.send.pe;"
(return) "return"
(field_expression) "cmd->data.send.pe"
(field_expression) "cmd->data.send"
(field_expression) "cmd->data"
(identifier) "cmd"
(->) "->"
(field_identifier) "data"
(.) "."
(field_identifier) "send"
(.) "."
(field_identifier) "pe"
(;) ";"
(}) "}"
(labeled_statement) "private: \n};"
(statement_identifier) "private"
(:) ":"
(ERROR) "}"
(}) "}"
(expression_statement) ";"
(;) ";"
(function_definition) "class WriteSendEntry : public SendEntry {\n public:\n WriteSendEntry( NicCmd* cmd, int thread ): SendEntry(thread,cmd) {\n m_streamHdr.type = StreamHdr::Write;\n m_streamHdr.data.rdma.memRgnKey = cmd->data.write.key;\n m_streamHdr.data.rdma.offset = cmd->data.write.offset;\n m_streamHdr.payloadLength = cmd->data.write.len;\n }\n int getLength() { return cmd->data.write.len; }\n int getAddr() { return cmd->data.write.srcAddr; }\n int getCqId() { return cmd->data.write.cqId; }\n int getContext() { return cmd->data.write.context; }\n int getDestNode() { return cmd->data.write.node; }\n int getDestPid() { return cmd->data.write.pe; }\n}"
(type_identifier) "class"
(identifier) "WriteSendEntry"
(ERROR) ": public SendEntry"
(:) ":"
(identifier) "public"
(identifier) "SendEntry"
(compound_statement) "{\n public:\n WriteSendEntry( NicCmd* cmd, int thread ): SendEntry(thread,cmd) {\n m_streamHdr.type = StreamHdr::Write;\n m_streamHdr.data.rdma.memRgnKey = cmd->data.write.key;\n m_streamHdr.data.rdma.offset = cmd->data.write.offset;\n m_streamHdr.payloadLength = cmd->data.write.len;\n }\n int getLength() { return cmd->data.write.len; }\n int getAddr() { return cmd->data.write.srcAddr; }\n int getCqId() { return cmd->data.write.cqId; }\n int getContext() { return cmd->data.write.context; }\n int getDestNode() { return cmd->data.write.node; }\n int getDestPid() { return cmd->data.write.pe; }\n}"
({) "{"
(labeled_statement) "public:\n WriteSendEntry( NicCmd* cmd, int thread ): SendEntry(thread,cmd) {\n m_streamHdr.type = StreamHdr::Write;\n m_streamHdr.data.rdma.memRgnKey = cmd->data.write.key;\n m_streamHdr.data.rdma.offset = cmd->data.write.offset;\n m_streamHdr.payloadLength = cmd->data.write.len;\n }"
(statement_identifier) "public"
(:) ":"
(ERROR) "WriteSendEntry( NicCmd* cmd, int thread ): SendEntry(thread,cmd)"
(call_expression) "WriteSendEntry( NicCmd* cmd, int thread )"
(identifier) "WriteSendEntry"
(argument_list) "( NicCmd* cmd, int thread )"
(() "("
(binary_expression) "NicCmd* cmd"
(identifier) "NicCmd"
(*) "*"
(identifier) "cmd"
(,) ","
(ERROR) "int"
(identifier) "int"
(identifier) "thread"
()) ")"
(:) ":"
(call_expression) "SendEntry(thread,cmd)"
(identifier) "SendEntry"
(argument_list) "(thread,cmd)"
(() "("
(identifier) "thread"
(,) ","
(identifier) "cmd"
()) ")"
(compound_statement) "{\n m_streamHdr.type = StreamHdr::Write;\n m_streamHdr.data.rdma.memRgnKey = cmd->data.write.key;\n m_streamHdr.data.rdma.offset = cmd->data.write.offset;\n m_streamHdr.payloadLength = cmd->data.write.len;\n }"
({) "{"
(expression_statement) "m_streamHdr.type = StreamHdr::Write;"
(assignment_expression) "m_streamHdr.type = StreamHdr"
(field_expression) "m_streamHdr.type"
(identifier) "m_streamHdr"
(.) "."
(field_identifier) "type"
(=) "="
(identifier) "StreamHdr"
(ERROR) "::Write"
(:) ":"
(:) ":"
(identifier) "Write"
(;) ";"
(expression_statement) "m_streamHdr.data.rdma.memRgnKey = cmd->data.write.key;"
(assignment_expression) "m_streamHdr.data.rdma.memRgnKey = cmd->data.write.key"
(field_expression) "m_streamHdr.data.rdma.memRgnKey"
(field_expression) "m_streamHdr.data.rdma"
(field_expression) "m_streamHdr.data"
(identifier) "m_streamHdr"
(.) "."
(field_identifier) "data"
(.) "."
(field_identifier) "rdma"
(.) "."
(field_identifier) "memRgnKey"
(=) "="
(field_expression) "cmd->data.write.key"
(field_expression) "cmd->data.write"
(field_expression) "cmd->data"
(identifier) "cmd"
(->) "->"
(field_identifier) "data"
(.) "."
(field_identifier) "write"
(.) "."
(field_identifier) "key"
(;) ";"
(expression_statement) "m_streamHdr.data.rdma.offset = cmd->data.write.offset;"
(assignment_expression) "m_streamHdr.data.rdma.offset = cmd->data.write.offset"
(field_expression) "m_streamHdr.data.rdma.offset"
(field_expression) "m_streamHdr.data.rdma"
(field_expression) "m_streamHdr.data"
(identifier) "m_streamHdr"
(.) "."
(field_identifier) "data"
(.) "."
(field_identifier) "rdma"
(.) "."
(field_identifier) "offset"
(=) "="
(field_expression) "cmd->data.write.offset"
(field_expression) "cmd->data.write"
(field_expression) "cmd->data"
(identifier) "cmd"
(->) "->"
(field_identifier) "data"
(.) "."
(field_identifier) "write"
(.) "."
(field_identifier) "offset"
(;) ";"
(expression_statement) "m_streamHdr.payloadLength = cmd->data.write.len;"
(assignment_expression) "m_streamHdr.payloadLength = cmd->data.write.len"
(field_expression) "m_streamHdr.payloadLength"
(identifier) "m_streamHdr"
(.) "."
(field_identifier) "payloadLength"
(=) "="
(field_expression) "cmd->data.write.len"
(field_expression) "cmd->data.write"
(field_expression) "cmd->data"
(identifier) "cmd"
(->) "->"
(field_identifier) "data"
(.) "."
(field_identifier) "write"
(.) "."
(field_identifier) "len"
(;) ";"
(}) "}"
(function_definition) "int getLength() { return cmd->data.write.len; }"
(primitive_type) "int"
(function_declarator) "getLength()"
(identifier) "getLength"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return cmd->data.write.len; }"
({) "{"
(return_statement) "return cmd->data.write.len;"
(return) "return"
(field_expression) "cmd->data.write.len"
(field_expression) "cmd->data.write"
(field_expression) "cmd->data"
(identifier) "cmd"
(->) "->"
(field_identifier) "data"
(.) "."
(field_identifier) "write"
(.) "."
(field_identifier) "len"
(;) ";"
(}) "}"
(function_definition) "int getAddr() { return cmd->data.write.srcAddr; }"
(primitive_type) "int"
(function_declarator) "getAddr()"
(identifier) "getAddr"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return cmd->data.write.srcAddr; }"
({) "{"
(return_statement) "return cmd->data.write.srcAddr;"
(return) "return"
(field_expression) "cmd->data.write.srcAddr"
(field_expression) "cmd->data.write"
(field_expression) "cmd->data"
(identifier) "cmd"
(->) "->"
(field_identifier) "data"
(.) "."
(field_identifier) "write"
(.) "."
(field_identifier) "srcAddr"
(;) ";"
(}) "}"
(function_definition) "int getCqId() { return cmd->data.write.cqId; }"
(primitive_type) "int"
(function_declarator) "getCqId()"
(identifier) "getCqId"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return cmd->data.write.cqId; }"
({) "{"
(return_statement) "return cmd->data.write.cqId;"
(return) "return"
(field_expression) "cmd->data.write.cqId"
(field_expression) "cmd->data.write"
(field_expression) "cmd->data"
(identifier) "cmd"
(->) "->"
(field_identifier) "data"
(.) "."
(field_identifier) "write"
(.) "."
(field_identifier) "cqId"
(;) ";"
(}) "}"
(function_definition) "int getContext() { return cmd->data.write.context; }"
(primitive_type) "int"
(function_declarator) "getContext()"
(identifier) "getContext"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return cmd->data.write.context; }"
({) "{"
(return_statement) "return cmd->data.write.context;"
(return) "return"
(field_expression) "cmd->data.write.context"
(field_expression) "cmd->data.write"
(field_expression) "cmd->data"
(identifier) "cmd"
(->) "->"
(field_identifier) "data"
(.) "."
(field_identifier) "write"
(.) "."
(field_identifier) "context"
(;) ";"
(}) "}"
(function_definition) "int getDestNode() { return cmd->data.write.node; }"
(primitive_type) "int"
(function_declarator) "getDestNode()"
(identifier) "getDestNode"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return cmd->data.write.node; }"
({) "{"
(return_statement) "return cmd->data.write.node;"
(return) "return"
(field_expression) "cmd->data.write.node"
(field_expression) "cmd->data.write"
(field_expression) "cmd->data"
(identifier) "cmd"
(->) "->"
(field_identifier) "data"
(.) "."
(field_identifier) "write"
(.) "."
(field_identifier) "node"
(;) ";"
(}) "}"
(function_definition) "int getDestPid() { return cmd->data.write.pe; }"
(primitive_type) "int"
(function_declarator) "getDestPid()"
(identifier) "getDestPid"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return cmd->data.write.pe; }"
({) "{"
(return_statement) "return cmd->data.write.pe;"
(return) "return"
(field_expression) "cmd->data.write.pe"
(field_expression) "cmd->data.write"
(field_expression) "cmd->data"
(identifier) "cmd"
(->) "->"
(field_identifier) "data"
(.) "."
(field_identifier) "write"
(.) "."
(field_identifier) "pe"
(;) ";"
(}) "}"
(}) "}"
(expression_statement) ";"
(;) ";"
(function_definition) "class ReadSendEntry : public SendEntry {\n public:\n ReadSendEntry( NicCmd* cmd, int thread, int readRespKey ): SendEntry(thread,cmd) {\n m_streamHdr.type = StreamHdr::ReadReq;\n m_streamHdr.payloadLength = 0;\n m_streamHdr.data.rdma.memRgnKey = cmd->data.read.key;\n m_streamHdr.data.rdma.offset = cmd->data.read.offset;\n m_streamHdr.data.rdma.readRespKey = readRespKey;\n m_streamHdr.data.rdma.readLength = cmd->data.read.len;\n }\n // we are only sending a read header so lengh and address are 0\n // the read does send a completeion until the read completes so these are\n // passed to the ReadRespRecvEntry\n int getLength() { return 0; }\n int getAddr() { return 0; }\n int getCqId() { return -1; }\n int getContext() { return 0; }\n int getDestNode() { return cmd->data.read.node; }\n int getDestPid() { return cmd->data.read.pe; }\n private:\n}; \n\nclass ReadRespSendEntry : public SendEntry {\n public:\n ReadRespSendEntry( int thread, int destNode, int destPid, Addr_t srcAddr, int length, int readRespKey ): \n SendEntry(thread), m_destNode(destNode), m_destPid(destPid), m_srcAddr(srcAddr), m_length(length) \n {\n m_streamHdr.type = StreamHdr::ReadResp;\n m_streamHdr.payloadLength = m_length;\n m_streamHdr.data.rdma.readRespKey = readRespKey;\n }\n\n int getLength() { return m_length; }\n int getAddr() { return m_srcAddr; }\n int getCqId() { return -1; }\n int getContext() { return 0; }\n int getDestNode() { return m_destNode; }\n int getDestPid() { return m_destPid; }\n private:\n int m_srcAddr;\n int m_length;\n int m_destNode;\n int m_destPid;\n}"
(type_identifier) "class"
(identifier) "ReadSendEntry"
(ERROR) ": public SendEntry"
(:) ":"
(identifier) "public"
(identifier) "SendEntry"
(compound_statement) "{\n public:\n ReadSendEntry( NicCmd* cmd, int thread, int readRespKey ): SendEntry(thread,cmd) {\n m_streamHdr.type = StreamHdr::ReadReq;\n m_streamHdr.payloadLength = 0;\n m_streamHdr.data.rdma.memRgnKey = cmd->data.read.key;\n m_streamHdr.data.rdma.offset = cmd->data.read.offset;\n m_streamHdr.data.rdma.readRespKey = readRespKey;\n m_streamHdr.data.rdma.readLength = cmd->data.read.len;\n }\n // we are only sending a read header so lengh and address are 0\n // the read does send a completeion until the read completes so these are\n // passed to the ReadRespRecvEntry\n int getLength() { return 0; }\n int getAddr() { return 0; }\n int getCqId() { return -1; }\n int getContext() { return 0; }\n int getDestNode() { return cmd->data.read.node; }\n int getDestPid() { return cmd->data.read.pe; }\n private:\n}; \n\nclass ReadRespSendEntry : public SendEntry {\n public:\n ReadRespSendEntry( int thread, int destNode, int destPid, Addr_t srcAddr, int length, int readRespKey ): \n SendEntry(thread), m_destNode(destNode), m_destPid(destPid), m_srcAddr(srcAddr), m_length(length) \n {\n m_streamHdr.type = StreamHdr::ReadResp;\n m_streamHdr.payloadLength = m_length;\n m_streamHdr.data.rdma.readRespKey = readRespKey;\n }\n\n int getLength() { return m_length; }\n int getAddr() { return m_srcAddr; }\n int getCqId() { return -1; }\n int getContext() { return 0; }\n int getDestNode() { return m_destNode; }\n int getDestPid() { return m_destPid; }\n private:\n int m_srcAddr;\n int m_length;\n int m_destNode;\n int m_destPid;\n}"
({) "{"
(labeled_statement) "public:\n ReadSendEntry( NicCmd* cmd, int thread, int readRespKey ): SendEntry(thread,cmd) {\n m_streamHdr.type = StreamHdr::ReadReq;\n m_streamHdr.payloadLength = 0;\n m_streamHdr.data.rdma.memRgnKey = cmd->data.read.key;\n m_streamHdr.data.rdma.offset = cmd->data.read.offset;\n m_streamHdr.data.rdma.readRespKey = readRespKey;\n m_streamHdr.data.rdma.readLength = cmd->data.read.len;\n }"
(statement_identifier) "public"
(:) ":"
(ERROR) "ReadSendEntry( NicCmd* cmd, int thread, int readRespKey ): SendEntry(thread,cmd)"
(call_expression) "ReadSendEntry( NicCmd* cmd, int thread, int readRespKey )"
(identifier) "ReadSendEntry"
(argument_list) "( NicCmd* cmd, int thread, int readRespKey )"
(() "("
(binary_expression) "NicCmd* cmd"
(identifier) "NicCmd"
(*) "*"
(identifier) "cmd"
(,) ","
(ERROR) "int"
(identifier) "int"
(identifier) "thread"
(,) ","
(ERROR) "int"
(identifier) "int"
(identifier) "readRespKey"
()) ")"
(:) ":"
(call_expression) "SendEntry(thread,cmd)"
(identifier) "SendEntry"
(argument_list) "(thread,cmd)"
(() "("
(identifier) "thread"
(,) ","
(identifier) "cmd"
()) ")"
(compound_statement) "{\n m_streamHdr.type = StreamHdr::ReadReq;\n m_streamHdr.payloadLength = 0;\n m_streamHdr.data.rdma.memRgnKey = cmd->data.read.key;\n m_streamHdr.data.rdma.offset = cmd->data.read.offset;\n m_streamHdr.data.rdma.readRespKey = readRespKey;\n m_streamHdr.data.rdma.readLength = cmd->data.read.len;\n }"
({) "{"
(expression_statement) "m_streamHdr.type = StreamHdr::ReadReq;"
(assignment_expression) "m_streamHdr.type = StreamHdr"
(field_expression) "m_streamHdr.type"
(identifier) "m_streamHdr"
(.) "."
(field_identifier) "type"
(=) "="
(identifier) "StreamHdr"
(ERROR) "::ReadReq"
(:) ":"
(:) ":"
(identifier) "ReadReq"
(;) ";"
(expression_statement) "m_streamHdr.payloadLength = 0;"
(assignment_expression) "m_streamHdr.payloadLength = 0"
(field_expression) "m_streamHdr.payloadLength"
(identifier) "m_streamHdr"
(.) "."
(field_identifier) "payloadLength"
(=) "="
(number_literal) "0"
(;) ";"
(expression_statement) "m_streamHdr.data.rdma.memRgnKey = cmd->data.read.key;"
(assignment_expression) "m_streamHdr.data.rdma.memRgnKey = cmd->data.read.key"
(field_expression) "m_streamHdr.data.rdma.memRgnKey"
(field_expression) "m_streamHdr.data.rdma"
(field_expression) "m_streamHdr.data"
(identifier) "m_streamHdr"
(.) "."
(field_identifier) "data"
(.) "."
(field_identifier) "rdma"
(.) "."
(field_identifier) "memRgnKey"
(=) "="
(field_expression) "cmd->data.read.key"
(field_expression) "cmd->data.read"
(field_expression) "cmd->data"
(identifier) "cmd"
(->) "->"
(field_identifier) "data"
(.) "."
(field_identifier) "read"
(.) "."
(field_identifier) "key"
(;) ";"
(expression_statement) "m_streamHdr.data.rdma.offset = cmd->data.read.offset;"
(assignment_expression) "m_streamHdr.data.rdma.offset = cmd->data.read.offset"
(field_expression) "m_streamHdr.data.rdma.offset"
(field_expression) "m_streamHdr.data.rdma"
(field_expression) "m_streamHdr.data"
(identifier) "m_streamHdr"
(.) "."
(field_identifier) "data"
(.) "."
(field_identifier) "rdma"
(.) "."
(field_identifier) "offset"
(=) "="
(field_expression) "cmd->data.read.offset"
(field_expression) "cmd->data.read"
(field_expression) "cmd->data"
(identifier) "cmd"
(->) "->"
(field_identifier) "data"
(.) "."
(field_identifier) "read"
(.) "."
(field_identifier) "offset"
(;) ";"
(expression_statement) "m_streamHdr.data.rdma.readRespKey = readRespKey;"
(assignment_expression) "m_streamHdr.data.rdma.readRespKey = readRespKey"
(field_expression) "m_streamHdr.data.rdma.readRespKey"
(field_expression) "m_streamHdr.data.rdma"
(field_expression) "m_streamHdr.data"
(identifier) "m_streamHdr"
(.) "."
(field_identifier) "data"
(.) "."
(field_identifier) "rdma"
(.) "."
(field_identifier) "readRespKey"
(=) "="
(identifier) "readRespKey"
(;) ";"
(expression_statement) "m_streamHdr.data.rdma.readLength = cmd->data.read.len;"
(assignment_expression) "m_streamHdr.data.rdma.readLength = cmd->data.read.len"
(field_expression) "m_streamHdr.data.rdma.readLength"
(field_expression) "m_streamHdr.data.rdma"
(field_expression) "m_streamHdr.data"
(identifier) "m_streamHdr"
(.) "."
(field_identifier) "data"
(.) "."
(field_identifier) "rdma"
(.) "."
(field_identifier) "readLength"
(=) "="
(field_expression) "cmd->data.read.len"
(field_expression) "cmd->data.read"
(field_expression) "cmd->data"
(identifier) "cmd"
(->) "->"
(field_identifier) "data"
(.) "."
(field_identifier) "read"
(.) "."
(field_identifier) "len"
(;) ";"
(}) "}"
(comment) "// we are only sending a read header so lengh and address are 0"
(comment) "// the read does send a completeion until the read completes so these are"
(comment) "// passed to the ReadRespRecvEntry"
(function_definition) "int getLength() { return 0; }"
(primitive_type) "int"
(function_declarator) "getLength()"
(identifier) "getLength"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return 0; }"
({) "{"
(return_statement) "return 0;"
(return) "return"
(number_literal) "0"
(;) ";"
(}) "}"
(function_definition) "int getAddr() { return 0; }"
(primitive_type) "int"
(function_declarator) "getAddr()"
(identifier) "getAddr"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return 0; }"
({) "{"
(return_statement) "return 0;"
(return) "return"
(number_literal) "0"
(;) ";"
(}) "}"
(function_definition) "int getCqId() { return -1; }"
(primitive_type) "int"
(function_declarator) "getCqId()"
(identifier) "getCqId"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return -1; }"
({) "{"
(return_statement) "return -1;"
(return) "return"
(number_literal) "-1"
(;) ";"
(}) "}"
(function_definition) "int getContext() { return 0; }"
(primitive_type) "int"
(function_declarator) "getContext()"
(identifier) "getContext"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return 0; }"
({) "{"
(return_statement) "return 0;"
(return) "return"
(number_literal) "0"
(;) ";"
(}) "}"
(function_definition) "int getDestNode() { return cmd->data.read.node; }"
(primitive_type) "int"
(function_declarator) "getDestNode()"
(identifier) "getDestNode"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return cmd->data.read.node; }"
({) "{"
(return_statement) "return cmd->data.read.node;"
(return) "return"
(field_expression) "cmd->data.read.node"
(field_expression) "cmd->data.read"
(field_expression) "cmd->data"
(identifier) "cmd"
(->) "->"
(field_identifier) "data"
(.) "."
(field_identifier) "read"
(.) "."
(field_identifier) "node"
(;) ";"
(}) "}"
(function_definition) "int getDestPid() { return cmd->data.read.pe; }"
(primitive_type) "int"
(function_declarator) "getDestPid()"
(identifier) "getDestPid"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return cmd->data.read.pe; }"
({) "{"
(return_statement) "return cmd->data.read.pe;"
(return) "return"
(field_expression) "cmd->data.read.pe"
(field_expression) "cmd->data.read"
(field_expression) "cmd->data"
(identifier) "cmd"
(->) "->"
(field_identifier) "data"
(.) "."
(field_identifier) "read"
(.) "."
(field_identifier) "pe"
(;) ";"
(}) "}"
(labeled_statement) "private:\n};"
(statement_identifier) "private"
(:) ":"
(ERROR) "}"
(}) "}"
(expression_statement) ";"
(;) ";"
(function_definition) "class ReadRespSendEntry : public SendEntry {\n public:\n ReadRespSendEntry( int thread, int destNode, int destPid, Addr_t srcAddr, int length, int readRespKey ): \n SendEntry(thread), m_destNode(destNode), m_destPid(destPid), m_srcAddr(srcAddr), m_length(length) \n {\n m_streamHdr.type = StreamHdr::ReadResp;\n m_streamHdr.payloadLength = m_length;\n m_streamHdr.data.rdma.readRespKey = readRespKey;\n }"
(type_identifier) "class"
(identifier) "ReadRespSendEntry"
(ERROR) ": public SendEntry"
(:) ":"
(identifier) "public"
(identifier) "SendEntry"
(compound_statement) "{\n public:\n ReadRespSendEntry( int thread, int destNode, int destPid, Addr_t srcAddr, int length, int readRespKey ): \n SendEntry(thread), m_destNode(destNode), m_destPid(destPid), m_srcAddr(srcAddr), m_length(length) \n {\n m_streamHdr.type = StreamHdr::ReadResp;\n m_streamHdr.payloadLength = m_length;\n m_streamHdr.data.rdma.readRespKey = readRespKey;\n }"
({) "{"
(labeled_statement) "public:\n ReadRespSendEntry( int thread, int destNode, int destPid, Addr_t srcAddr, int length, int readRespKey ): \n SendEntry(thread), m_destNode(destNode), m_destPid(destPid), m_srcAddr(srcAddr), m_length(length) \n {\n m_streamHdr.type = StreamHdr::ReadResp;"
(statement_identifier) "public"
(:) ":"
(declaration) "ReadRespSendEntry( int thread, int destNode, int destPid, Addr_t srcAddr, int length, int readRespKey ): \n SendEntry(thread), m_destNode(destNode), m_destPid(destPid), m_srcAddr(srcAddr), m_length(length) \n {\n m_streamHdr.type = StreamHdr::ReadResp;"
(macro_type_specifier) "ReadRespSendEntry( int"
(identifier) "ReadRespSendEntry"
(() "("
(type_descriptor) "int"
(primitive_type) "int"
()) ""
(identifier) "thread"
(,) ","
(ERROR) "int"
(identifier) "int"
(identifier) "destNode"
(,) ","
(ERROR) "int"
(identifier) "int"
(identifier) "destPid"
(,) ","
(ERROR) "Addr_t"
(identifier) "Addr_t"
(identifier) "srcAddr"
(,) ","
(ERROR) "int"
(identifier) "int"
(identifier) "length"
(,) ","
(ERROR) "int readRespKey ):"
(identifier) "int"
(identifier) "readRespKey"
()) ")"
(:) ":"
(function_declarator) "SendEntry(thread)"
(identifier) "SendEntry"
(parameter_list) "(thread)"
(() "("
(parameter_declaration) "thread"
(type_identifier) "thread"
()) ")"
(,) ","
(function_declarator) "m_destNode(destNode)"
(identifier) "m_destNode"
(parameter_list) "(destNode)"
(() "("
(parameter_declaration) "destNode"
(type_identifier) "destNode"
()) ")"
(,) ","
(function_declarator) "m_destPid(destPid)"
(identifier) "m_destPid"
(parameter_list) "(destPid)"
(() "("
(parameter_declaration) "destPid"
(type_identifier) "destPid"
()) ")"
(,) ","
(function_declarator) "m_srcAddr(srcAddr)"
(identifier) "m_srcAddr"
(parameter_list) "(srcAddr)"
(() "("
(parameter_declaration) "srcAddr"
(type_identifier) "srcAddr"
()) ")"
(,) ","
(init_declarator) "m_length(length) \n {\n m_streamHdr.type = StreamHdr"
(function_declarator) "m_length(length)"
(identifier) "m_length"
(parameter_list) "(length)"
(() "("
(parameter_declaration) "length"
(type_identifier) "length"
()) ")"
(ERROR) "{\n m_streamHdr.type"
({) "{"
(identifier) "m_streamHdr"
(.) "."
(identifier) "type"
(=) "="
(identifier) "StreamHdr"
(ERROR) "::ReadResp"
(:) ":"
(:) ":"
(identifier) "ReadResp"
(;) ";"
(expression_statement) "m_streamHdr.payloadLength = m_length;"
(assignment_expression) "m_streamHdr.payloadLength = m_length"
(field_expression) "m_streamHdr.payloadLength"
(identifier) "m_streamHdr"
(.) "."
(field_identifier) "payloadLength"
(=) "="
(identifier) "m_length"
(;) ";"
(expression_statement) "m_streamHdr.data.rdma.readRespKey = readRespKey;"
(assignment_expression) "m_streamHdr.data.rdma.readRespKey = readRespKey"
(field_expression) "m_streamHdr.data.rdma.readRespKey"
(field_expression) "m_streamHdr.data.rdma"
(field_expression) "m_streamHdr.data"
(identifier) "m_streamHdr"
(.) "."
(field_identifier) "data"
(.) "."
(field_identifier) "rdma"
(.) "."
(field_identifier) "readRespKey"
(=) "="
(identifier) "readRespKey"
(;) ";"
(}) "}"
(function_definition) "int getLength() { return m_length; }"
(primitive_type) "int"
(function_declarator) "getLength()"
(identifier) "getLength"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return m_length; }"
({) "{"
(return_statement) "return m_length;"
(return) "return"
(identifier) "m_length"
(;) ";"
(}) "}"
(function_definition) "int getAddr() { return m_srcAddr; }"
(primitive_type) "int"
(function_declarator) "getAddr()"
(identifier) "getAddr"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return m_srcAddr; }"
({) "{"
(return_statement) "return m_srcAddr;"
(return) "return"
(identifier) "m_srcAddr"
(;) ";"
(}) "}"
(function_definition) "int getCqId() { return -1; }"
(primitive_type) "int"
(function_declarator) "getCqId()"
(identifier) "getCqId"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return -1; }"
({) "{"
(return_statement) "return -1;"
(return) "return"
(number_literal) "-1"
(;) ";"
(}) "}"
(function_definition) "int getContext() { return 0; }"
(primitive_type) "int"
(function_declarator) "getContext()"
(identifier) "getContext"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return 0; }"
({) "{"
(return_statement) "return 0;"
(return) "return"
(number_literal) "0"
(;) ";"
(}) "}"
(function_definition) "int getDestNode() { return m_destNode; }"
(primitive_type) "int"
(function_declarator) "getDestNode()"
(identifier) "getDestNode"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return m_destNode; }"
({) "{"
(return_statement) "return m_destNode;"
(return) "return"
(identifier) "m_destNode"
(;) ";"
(}) "}"
(function_definition) "int getDestPid() { return m_destPid; }"
(primitive_type) "int"
(function_declarator) "getDestPid()"
(identifier) "getDestPid"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{ return m_destPid; }"
({) "{"
(return_statement) "return m_destPid;"
(return) "return"
(identifier) "m_destPid"
(;) ";"
(}) "}"
(labeled_statement) "private:\n int m_srcAddr;"
(statement_identifier) "private"
(:) ":"
(declaration) "int m_srcAddr;"
(primitive_type) "int"
(identifier) "m_srcAddr"
(;) ";"
(declaration) "int m_length;"
(primitive_type) "int"
(identifier) "m_length"
(;) ";"
(declaration) "int m_destNode;"
(primitive_type) "int"
(identifier) "m_destNode"
(;) ";"
(declaration) "int m_destPid;"
(primitive_type) "int"
(identifier) "m_destPid"
(;) ";"
(}) "}"
(expression_statement) ";"
(;) ";"
(}) ""
| 1,208
| 36
|
{"language": "c", "success": true, "metadata": {"lines": 95, "avg_line_length": 34.16, "nodes": 709, "errors": 0, "source_hash": "9f0fa0a17fb885ab388ca7b98254dfb2a4a8986a87a6625cc996a00f76ac3e67", "categorized_nodes": 540}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "function_definition", "text": "class SendEntry {\n public:\n SendEntry( int thread, NicCmd* cmd = NULL ) : cmd(cmd), thread(thread), vc(0) {}\n\t~SendEntry() {\n\t\tif ( cmd ) {\n\t\t\tdelete cmd;\n\t\t}", "parent": null, "children": [1], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 7, "column": 3}}, {"id": 1, "type": "identifier", "text": "SendEntry", "parent": 0, "children": [], "start_point": {"row": 1, "column": 6}, "end_point": {"row": 1, "column": 15}}, {"id": 2, "type": "labeled_statement", "text": "public:\n SendEntry( int thread, NicCmd* cmd = NULL ) : cmd(cmd), thread(thread), vc(0) {}\n\t~SendEntry() {\n\t\tif ( cmd ) {\n\t\t\tdelete cmd;", "parent": 0, "children": [3], "start_point": {"row": 2, "column": 2}, "end_point": {"row": 6, "column": 14}}, {"id": 3, "type": "declaration", "text": "SendEntry( int thread, NicCmd* cmd = NULL ) : cmd(cmd), thread(thread), vc(0) {}\n\t~SendEntry() {\n\t\tif ( cmd ) {\n\t\t\tdelete cmd;", "parent": 2, "children": [4, 8, 9, 11, 23, 28, 43], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 6, "column": 14}}, {"id": 4, "type": "macro_type_specifier", "text": "SendEntry( int", "parent": 3, "children": [5, 6], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 18}}, {"id": 5, "type": "identifier", "text": "SendEntry", "parent": 4, "children": [], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 13}}, {"id": 6, "type": "type_descriptor", "text": "int", "parent": 4, "children": [7], "start_point": {"row": 3, "column": 15}, "end_point": {"row": 3, "column": 18}}, {"id": 7, "type": "primitive_type", "text": "int", "parent": 6, "children": [], "start_point": {"row": 3, "column": 15}, "end_point": {"row": 3, "column": 18}}, {"id": 8, "type": "identifier", "text": "thread", "parent": 3, "children": [], "start_point": {"row": 3, "column": 19}, "end_point": {"row": 3, "column": 25}}, {"id": 9, "type": "ERROR", "text": "NicCmd", "parent": 3, "children": [10], "start_point": {"row": 3, "column": 27}, "end_point": {"row": 3, "column": 33}}, {"id": 10, "type": "identifier", "text": "NicCmd", "parent": 9, "children": [], "start_point": {"row": 3, "column": 27}, "end_point": {"row": 3, "column": 33}}, {"id": 11, "type": "init_declarator", "text": "* cmd = NULL ) : cmd(cmd)", "parent": 3, "children": [12, 15, 16, 19], "start_point": {"row": 3, "column": 33}, "end_point": {"row": 3, "column": 58}}, {"id": 12, "type": "pointer_declarator", "text": "* cmd", "parent": 11, "children": [13, 14], "start_point": {"row": 3, "column": 33}, "end_point": {"row": 3, "column": 38}}, {"id": 13, "type": "*", "text": "*", "parent": 12, "children": [], "start_point": {"row": 3, "column": 33}, "end_point": {"row": 3, "column": 34}}, {"id": 14, "type": "identifier", "text": "cmd", "parent": 12, "children": [], "start_point": {"row": 3, "column": 35}, "end_point": {"row": 3, "column": 38}}, {"id": 15, "type": "=", "text": "=", "parent": 11, "children": [], "start_point": {"row": 3, "column": 39}, "end_point": {"row": 3, "column": 40}}, {"id": 16, "type": "ERROR", "text": "NULL ) :", "parent": 11, "children": [17], "start_point": {"row": 3, "column": 41}, "end_point": {"row": 3, "column": 49}}, {"id": 17, "type": "null", "text": "NULL", "parent": 16, "children": [18], "start_point": {"row": 3, "column": 41}, "end_point": {"row": 3, "column": 45}}, {"id": 18, "type": "NULL", "text": "NULL", "parent": 17, "children": [], "start_point": {"row": 3, "column": 41}, "end_point": {"row": 3, "column": 45}}, {"id": 19, "type": "call_expression", "text": "cmd(cmd)", "parent": 11, "children": [20, 21], "start_point": {"row": 3, "column": 50}, "end_point": {"row": 3, "column": 58}}, {"id": 20, "type": "identifier", "text": "cmd", "parent": 19, "children": [], "start_point": {"row": 3, "column": 50}, "end_point": {"row": 3, "column": 53}}, {"id": 21, "type": "argument_list", "text": "(cmd)", "parent": 19, "children": [22], "start_point": {"row": 3, "column": 53}, "end_point": {"row": 3, "column": 58}}, {"id": 22, "type": "identifier", "text": "cmd", "parent": 21, "children": [], "start_point": {"row": 3, "column": 54}, "end_point": {"row": 3, "column": 57}}, {"id": 23, "type": "function_declarator", "text": "thread(thread)", "parent": 3, "children": [24, 25], "start_point": {"row": 3, "column": 60}, "end_point": {"row": 3, "column": 74}}, {"id": 24, "type": "identifier", "text": "thread", "parent": 23, "children": [], "start_point": {"row": 3, "column": 60}, "end_point": {"row": 3, "column": 66}}, {"id": 25, "type": "parameter_list", "text": "(thread)", "parent": 23, "children": [26], "start_point": {"row": 3, "column": 66}, "end_point": {"row": 3, "column": 74}}, {"id": 26, "type": "parameter_declaration", "text": "thread", "parent": 25, "children": [27], "start_point": {"row": 3, "column": 67}, "end_point": {"row": 3, "column": 73}}, {"id": 27, "type": "type_identifier", "text": "thread", "parent": 26, "children": [], "start_point": {"row": 3, "column": 67}, "end_point": {"row": 3, "column": 73}}, {"id": 28, "type": "ERROR", "text": "vc(0) {}\n\t~SendEntry() {\n\t\tif ( cmd ) {\n\t\t\tdelete", "parent": 3, "children": [29, 34, 35], "start_point": {"row": 3, "column": 76}, "end_point": {"row": 6, "column": 9}}, {"id": 29, "type": "function_declarator", "text": "vc(0)", "parent": 28, "children": [30, 31], "start_point": {"row": 3, "column": 76}, "end_point": {"row": 3, "column": 81}}, {"id": 30, "type": "identifier", "text": "vc", "parent": 29, "children": [], "start_point": {"row": 3, "column": 76}, "end_point": {"row": 3, "column": 78}}, {"id": 31, "type": "parameter_list", "text": "(0)", "parent": 29, "children": [32], "start_point": {"row": 3, "column": 78}, "end_point": {"row": 3, "column": 81}}, {"id": 32, "type": "ERROR", "text": "0", "parent": 31, "children": [33], "start_point": {"row": 3, "column": 79}, "end_point": {"row": 3, "column": 80}}, {"id": 33, "type": "number_literal", "text": "0", "parent": 32, "children": [], "start_point": {"row": 3, "column": 79}, "end_point": {"row": 3, "column": 80}}, {"id": 34, "type": "~", "text": "~", "parent": 28, "children": [], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 4, "column": 2}}, {"id": 35, "type": "function_declarator", "text": "SendEntry() {\n\t\tif ( cmd )", "parent": 28, "children": [36, 39, 40], "start_point": {"row": 4, "column": 2}, "end_point": {"row": 5, "column": 12}}, {"id": 36, "type": "function_declarator", "text": "SendEntry()", "parent": 35, "children": [37, 38], "start_point": {"row": 4, "column": 2}, "end_point": {"row": 4, "column": 13}}, {"id": 37, "type": "identifier", "text": "SendEntry", "parent": 36, "children": [], "start_point": {"row": 4, "column": 2}, "end_point": {"row": 4, "column": 11}}, {"id": 38, "type": "parameter_list", "text": "()", "parent": 36, "children": [], "start_point": {"row": 4, "column": 11}, "end_point": {"row": 4, "column": 13}}, {"id": 39, "type": "ERROR", "text": "{\n\t\tif", "parent": 35, "children": [], "start_point": {"row": 4, "column": 14}, "end_point": {"row": 5, "column": 4}}, {"id": 40, "type": "parameter_list", "text": "( cmd )", "parent": 35, "children": [41], "start_point": {"row": 5, "column": 5}, "end_point": {"row": 5, "column": 12}}, {"id": 41, "type": "parameter_declaration", "text": "cmd", "parent": 40, "children": [42], "start_point": {"row": 5, "column": 7}, "end_point": {"row": 5, "column": 10}}, {"id": 42, "type": "type_identifier", "text": "cmd", "parent": 41, "children": [], "start_point": {"row": 5, "column": 7}, "end_point": {"row": 5, "column": 10}}, {"id": 43, "type": "identifier", "text": "cmd", "parent": 3, "children": [], "start_point": {"row": 6, "column": 10}, "end_point": {"row": 6, "column": 13}}, {"id": 44, "type": "function_definition", "text": "StreamHdr* getStreamHdr() { return &m_streamHdr; }", "parent": null, "children": [45, 46], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 51}}, {"id": 45, "type": "type_identifier", "text": "StreamHdr", "parent": 44, "children": [], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 10}}, {"id": 46, "type": "pointer_declarator", "text": "* getStreamHdr()", "parent": 44, "children": [47, 48], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 9, "column": 26}}, {"id": 47, "type": "*", "text": "*", "parent": 46, "children": [], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 9, "column": 11}}, {"id": 48, "type": "function_declarator", "text": "getStreamHdr()", "parent": 46, "children": [49, 50], "start_point": {"row": 9, "column": 12}, "end_point": {"row": 9, "column": 26}}, {"id": 49, "type": "identifier", "text": "getStreamHdr", "parent": 48, "children": [], "start_point": {"row": 9, "column": 12}, "end_point": {"row": 9, "column": 24}}, {"id": 50, "type": "parameter_list", "text": "()", "parent": 48, "children": [], "start_point": {"row": 9, "column": 24}, "end_point": {"row": 9, "column": 26}}, {"id": 51, "type": "return_statement", "text": "return &m_streamHdr;", "parent": 44, "children": [52], "start_point": {"row": 9, "column": 29}, "end_point": {"row": 9, "column": 49}}, {"id": 52, "type": "pointer_expression", "text": "&m_streamHdr", "parent": 51, "children": [53], "start_point": {"row": 9, "column": 36}, "end_point": {"row": 9, "column": 48}}, {"id": 53, "type": "identifier", "text": "m_streamHdr", "parent": 52, "children": [], "start_point": {"row": 9, "column": 37}, "end_point": {"row": 9, "column": 48}}, {"id": 54, "type": "declaration", "text": "virtual int getAddr() = 0;", "parent": null, "children": [55, 56, 58], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 27}}, {"id": 55, "type": "type_identifier", "text": "virtual", "parent": 54, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 8}}, {"id": 56, "type": "ERROR", "text": "int", "parent": 54, "children": [57], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 12}}, {"id": 57, "type": "identifier", "text": "int", "parent": 56, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 12}}, {"id": 58, "type": "init_declarator", "text": "getAddr() = 0", "parent": 54, "children": [59, 62, 63], "start_point": {"row": 10, "column": 13}, "end_point": {"row": 10, "column": 26}}, {"id": 59, "type": "function_declarator", "text": "getAddr()", "parent": 58, "children": [60, 61], "start_point": {"row": 10, "column": 13}, "end_point": {"row": 10, "column": 22}}, {"id": 60, "type": "identifier", "text": "getAddr", "parent": 59, "children": [], "start_point": {"row": 10, "column": 13}, "end_point": {"row": 10, "column": 20}}, {"id": 61, "type": "parameter_list", "text": "()", "parent": 59, "children": [], "start_point": {"row": 10, "column": 20}, "end_point": {"row": 10, "column": 22}}, {"id": 62, "type": "=", "text": "=", "parent": 58, "children": [], "start_point": {"row": 10, "column": 23}, "end_point": {"row": 10, "column": 24}}, {"id": 63, "type": "number_literal", "text": "0", "parent": 58, "children": [], "start_point": {"row": 10, "column": 25}, "end_point": {"row": 10, "column": 26}}, {"id": 64, "type": "declaration", "text": "virtual int getLength() = 0;", "parent": null, "children": [65, 66, 68], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 29}}, {"id": 65, "type": "type_identifier", "text": "virtual", "parent": 64, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 8}}, {"id": 66, "type": "ERROR", "text": "int", "parent": 64, "children": [67], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 12}}, {"id": 67, "type": "identifier", "text": "int", "parent": 66, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 12}}, {"id": 68, "type": "init_declarator", "text": "getLength() = 0", "parent": 64, "children": [69, 72, 73], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 28}}, {"id": 69, "type": "function_declarator", "text": "getLength()", "parent": 68, "children": [70, 71], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 24}}, {"id": 70, "type": "identifier", "text": "getLength", "parent": 69, "children": [], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 22}}, {"id": 71, "type": "parameter_list", "text": "()", "parent": 69, "children": [], "start_point": {"row": 11, "column": 22}, "end_point": {"row": 11, "column": 24}}, {"id": 72, "type": "=", "text": "=", "parent": 68, "children": [], "start_point": {"row": 11, "column": 25}, "end_point": {"row": 11, "column": 26}}, {"id": 73, "type": "number_literal", "text": "0", "parent": 68, "children": [], "start_point": {"row": 11, "column": 27}, "end_point": {"row": 11, "column": 28}}, {"id": 74, "type": "declaration", "text": "virtual int getCqId() = 0;", "parent": null, "children": [75, 76, 78], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 27}}, {"id": 75, "type": "type_identifier", "text": "virtual", "parent": 74, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 8}}, {"id": 76, "type": "ERROR", "text": "int", "parent": 74, "children": [77], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 12}}, {"id": 77, "type": "identifier", "text": "int", "parent": 76, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 12}}, {"id": 78, "type": "init_declarator", "text": "getCqId() = 0", "parent": 74, "children": [79, 82, 83], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 26}}, {"id": 79, "type": "function_declarator", "text": "getCqId()", "parent": 78, "children": [80, 81], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 22}}, {"id": 80, "type": "identifier", "text": "getCqId", "parent": 79, "children": [], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 20}}, {"id": 81, "type": "parameter_list", "text": "()", "parent": 79, "children": [], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 12, "column": 22}}, {"id": 82, "type": "=", "text": "=", "parent": 78, "children": [], "start_point": {"row": 12, "column": 23}, "end_point": {"row": 12, "column": 24}}, {"id": 83, "type": "number_literal", "text": "0", "parent": 78, "children": [], "start_point": {"row": 12, "column": 25}, "end_point": {"row": 12, "column": 26}}, {"id": 84, "type": "declaration", "text": "virtual int getContext() = 0;", "parent": null, "children": [85, 86, 88], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 30}}, {"id": 85, "type": "type_identifier", "text": "virtual", "parent": 84, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 8}}, {"id": 86, "type": "ERROR", "text": "int", "parent": 84, "children": [87], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 12}}, {"id": 87, "type": "identifier", "text": "int", "parent": 86, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 12}}, {"id": 88, "type": "init_declarator", "text": "getContext() = 0", "parent": 84, "children": [89, 92, 93], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 29}}, {"id": 89, "type": "function_declarator", "text": "getContext()", "parent": 88, "children": [90, 91], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 25}}, {"id": 90, "type": "identifier", "text": "getContext", "parent": 89, "children": [], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 23}}, {"id": 91, "type": "parameter_list", "text": "()", "parent": 89, "children": [], "start_point": {"row": 13, "column": 23}, "end_point": {"row": 13, "column": 25}}, {"id": 92, "type": "=", "text": "=", "parent": 88, "children": [], "start_point": {"row": 13, "column": 26}, "end_point": {"row": 13, "column": 27}}, {"id": 93, "type": "number_literal", "text": "0", "parent": 88, "children": [], "start_point": {"row": 13, "column": 28}, "end_point": {"row": 13, "column": 29}}, {"id": 94, "type": "declaration", "text": "virtual int getDestNode() = 0;", "parent": null, "children": [95, 96, 98], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 31}}, {"id": 95, "type": "type_identifier", "text": "virtual", "parent": 94, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 8}}, {"id": 96, "type": "ERROR", "text": "int", "parent": 94, "children": [97], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 12}}, {"id": 97, "type": "identifier", "text": "int", "parent": 96, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 12}}, {"id": 98, "type": "init_declarator", "text": "getDestNode() = 0", "parent": 94, "children": [99, 102, 103], "start_point": {"row": 14, "column": 13}, "end_point": {"row": 14, "column": 30}}, {"id": 99, "type": "function_declarator", "text": "getDestNode()", "parent": 98, "children": [100, 101], "start_point": {"row": 14, "column": 13}, "end_point": {"row": 14, "column": 26}}, {"id": 100, "type": "identifier", "text": "getDestNode", "parent": 99, "children": [], "start_point": {"row": 14, "column": 13}, "end_point": {"row": 14, "column": 24}}, {"id": 101, "type": "parameter_list", "text": "()", "parent": 99, "children": [], "start_point": {"row": 14, "column": 24}, "end_point": {"row": 14, "column": 26}}, {"id": 102, "type": "=", "text": "=", "parent": 98, "children": [], "start_point": {"row": 14, "column": 27}, "end_point": {"row": 14, "column": 28}}, {"id": 103, "type": "number_literal", "text": "0", "parent": 98, "children": [], "start_point": {"row": 14, "column": 29}, "end_point": {"row": 14, "column": 30}}, {"id": 104, "type": "declaration", "text": "virtual int getDestPid() = 0;", "parent": null, "children": [105, 106, 108], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 30}}, {"id": 105, "type": "type_identifier", "text": "virtual", "parent": 104, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 8}}, {"id": 106, "type": "ERROR", "text": "int", "parent": 104, "children": [107], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 12}}, {"id": 107, "type": "identifier", "text": "int", "parent": 106, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 12}}, {"id": 108, "type": "init_declarator", "text": "getDestPid() = 0", "parent": 104, "children": [109, 112, 113], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 29}}, {"id": 109, "type": "function_declarator", "text": "getDestPid()", "parent": 108, "children": [110, 111], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 25}}, {"id": 110, "type": "identifier", "text": "getDestPid", "parent": 109, "children": [], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 23}}, {"id": 111, "type": "parameter_list", "text": "()", "parent": 109, "children": [], "start_point": {"row": 15, "column": 23}, "end_point": {"row": 15, "column": 25}}, {"id": 112, "type": "=", "text": "=", "parent": 108, "children": [], "start_point": {"row": 15, "column": 26}, "end_point": {"row": 15, "column": 27}}, {"id": 113, "type": "number_literal", "text": "0", "parent": 108, "children": [], "start_point": {"row": 15, "column": 28}, "end_point": {"row": 15, "column": 29}}, {"id": 114, "type": "function_definition", "text": "int getThread() { return thread; }", "parent": null, "children": [115, 116], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 35}}, {"id": 115, "type": "primitive_type", "text": "int", "parent": 114, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 4}}, {"id": 116, "type": "function_declarator", "text": "getThread()", "parent": 114, "children": [117, 118], "start_point": {"row": 16, "column": 5}, "end_point": {"row": 16, "column": 16}}, {"id": 117, "type": "identifier", "text": "getThread", "parent": 116, "children": [], "start_point": {"row": 16, "column": 5}, "end_point": {"row": 16, "column": 14}}, {"id": 118, "type": "parameter_list", "text": "()", "parent": 116, "children": [], "start_point": {"row": 16, "column": 14}, "end_point": {"row": 16, "column": 16}}, {"id": 119, "type": "return_statement", "text": "return thread;", "parent": 114, "children": [120], "start_point": {"row": 16, "column": 19}, "end_point": {"row": 16, "column": 33}}, {"id": 120, "type": "identifier", "text": "thread", "parent": 119, "children": [], "start_point": {"row": 16, "column": 26}, "end_point": {"row": 16, "column": 32}}, {"id": 121, "type": "function_definition", "text": "int getVC() { return vc; }", "parent": null, "children": [122, 123], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 27}}, {"id": 122, "type": "primitive_type", "text": "int", "parent": 121, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 4}}, {"id": 123, "type": "function_declarator", "text": "getVC()", "parent": 121, "children": [124, 125], "start_point": {"row": 17, "column": 5}, "end_point": {"row": 17, "column": 12}}, {"id": 124, "type": "identifier", "text": "getVC", "parent": 123, "children": [], "start_point": {"row": 17, "column": 5}, "end_point": {"row": 17, "column": 10}}, {"id": 125, "type": "parameter_list", "text": "()", "parent": 123, "children": [], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 12}}, {"id": 126, "type": "return_statement", "text": "return vc;", "parent": 121, "children": [127], "start_point": {"row": 17, "column": 15}, "end_point": {"row": 17, "column": 25}}, {"id": 127, "type": "identifier", "text": "vc", "parent": 126, "children": [], "start_point": {"row": 17, "column": 22}, "end_point": {"row": 17, "column": 24}}, {"id": 128, "type": "labeled_statement", "text": "protected:\n\tStreamHdr m_streamHdr;", "parent": null, "children": [129], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 19, "column": 23}}, {"id": 129, "type": "declaration", "text": "StreamHdr m_streamHdr;", "parent": 128, "children": [130, 131], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 23}}, {"id": 130, "type": "type_identifier", "text": "StreamHdr", "parent": 129, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 10}}, {"id": 131, "type": "identifier", "text": "m_streamHdr", "parent": 129, "children": [], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 22}}, {"id": 132, "type": "declaration", "text": "NicCmd* cmd;", "parent": null, "children": [133, 134], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 16}}, {"id": 133, "type": "type_identifier", "text": "NicCmd", "parent": 132, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 10}}, {"id": 134, "type": "pointer_declarator", "text": "* cmd", "parent": 132, "children": [135, 136], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 15}}, {"id": 135, "type": "*", "text": "*", "parent": 134, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 11}}, {"id": 136, "type": "identifier", "text": "cmd", "parent": 134, "children": [], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 15}}, {"id": 137, "type": "declaration", "text": "int thread;", "parent": null, "children": [138, 139], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 15}}, {"id": 138, "type": "primitive_type", "text": "int", "parent": 137, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 7}}, {"id": 139, "type": "identifier", "text": "thread", "parent": 137, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 14}}, {"id": 140, "type": "declaration", "text": "int vc;", "parent": null, "children": [141, 142], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 8}}, {"id": 141, "type": "primitive_type", "text": "int", "parent": 140, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 4}}, {"id": 142, "type": "identifier", "text": "vc", "parent": 140, "children": [], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 7}}, {"id": 143, "type": "function_definition", "text": "class MsgSendEntry : public SendEntry {\n public:\n MsgSendEntry( NicCmd* cmd, int thread ) : SendEntry(thread,cmd) {\n \tm_streamHdr.type = StreamHdr::Msg;\n \tm_streamHdr.data.msgKey = cmd->data.send.rqKey;\n \tm_streamHdr.payloadLength = cmd->data.send.len;\n\t}\n\tint getCqId() { return cmd->data.send.cqId; }\n\tint getAddr() { return cmd->data.send.addr; }\n\tint getLength() { return cmd->data.send.len; }\n\tint getContext() { return cmd->data.send.context; }\n\tint getDestNode() { return cmd->data.send.node; }\n\tint getDestPid() { return cmd->data.send.pe; }\n private:\t\n}; \n\nclass WriteSendEntry : public SendEntry {\n public:\n WriteSendEntry( NicCmd* cmd, int thread ): SendEntry(thread,cmd) {\n \tm_streamHdr.type = StreamHdr::Write;\n \tm_streamHdr.data.rdma.memRgnKey = cmd->data.write.key;\n \tm_streamHdr.data.rdma.offset = cmd->data.write.offset;\n \tm_streamHdr.payloadLength = cmd->data.write.len;\n\t}\n\tint getLength() { return cmd->data.write.len; }\n\tint getAddr() { return cmd->data.write.srcAddr; }\n\tint getCqId() { return cmd->data.write.cqId; }\n\tint getContext() { return cmd->data.write.context; }\n\tint getDestNode() { return cmd->data.write.node; }\n\tint getDestPid() { return cmd->data.write.pe; }\n}; \nclass ReadSendEntry : public SendEntry {\n public:\n ReadSendEntry( NicCmd* cmd, int thread, int readRespKey ): SendEntry(thread,cmd) {\n \tm_streamHdr.type = StreamHdr::ReadReq;\n \tm_streamHdr.payloadLength = 0;\n \tm_streamHdr.data.rdma.memRgnKey = cmd->data.read.key;\n \tm_streamHdr.data.rdma.offset = cmd->data.read.offset;\n\t\tm_streamHdr.data.rdma.readRespKey = readRespKey;\n\t\tm_streamHdr.data.rdma.readLength = cmd->data.read.len;\n\t}\n\t// we are only sending a read header so lengh and address are 0\n\t// the read does send a completeion until the read completes so these are\n\t// passed to the ReadRespRecvEntry\n\tint getLength() { return 0; }\n\tint getAddr() { return 0; }\n\tint getCqId() { return -1; }\n\tint getContext() { return 0; }\n\tint getDestNode() { return cmd->data.read.node; }\n\tint getDestPid() { return cmd->data.read.pe; }\n private:\n}; \n\nclass ReadRespSendEntry : public SendEntry {\n public:\n ReadRespSendEntry( int thread, int destNode, int destPid, Addr_t srcAddr, int length, int readRespKey ): \n\t\tSendEntry(thread), m_destNode(destNode), m_destPid(destPid), m_srcAddr(srcAddr), m_length(length) \n\t{\n \tm_streamHdr.type = StreamHdr::ReadResp;\n \tm_streamHdr.payloadLength = m_length;\n\t\tm_streamHdr.data.rdma.readRespKey = readRespKey;\n\t}\n\n\tint getLength() { return m_length; }\n\tint getAddr() { return m_srcAddr; }\n\tint getCqId() { return -1; }\n\tint getContext() { return 0; }\n\tint getDestNode() { return m_destNode; }\n\tint getDestPid() { return m_destPid; }\n private:\n\tint m_srcAddr;\n\tint m_length;\n\tint m_destNode;\n\tint m_destPid;\n};", "parent": null, "children": [144, 145], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 99, "column": 2}}, {"id": 144, "type": "identifier", "text": "MsgSendEntry", "parent": 143, "children": [], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 18}}, {"id": 145, "type": "ERROR", "text": ": public SendEntry", "parent": 143, "children": [146], "start_point": {"row": 25, "column": 19}, "end_point": {"row": 25, "column": 37}}, {"id": 146, "type": "identifier", "text": "SendEntry", "parent": 145, "children": [], "start_point": {"row": 25, "column": 28}, "end_point": {"row": 25, "column": 37}}, {"id": 147, "type": "labeled_statement", "text": "public:\n MsgSendEntry( NicCmd* cmd, int thread ) : SendEntry(thread,cmd) {\n \tm_streamHdr.type = StreamHdr::Msg;\n \tm_streamHdr.data.msgKey = cmd->data.send.rqKey;\n \tm_streamHdr.payloadLength = cmd->data.send.len;\n\t}", "parent": 143, "children": [148], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 31, "column": 2}}, {"id": 148, "type": "ERROR", "text": "MsgSendEntry( NicCmd* cmd, int thread ) : SendEntry(thread,cmd)", "parent": 147, "children": [149, 159], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 67}}, {"id": 149, "type": "call_expression", "text": "MsgSendEntry( NicCmd* cmd, int thread )", "parent": 148, "children": [150, 151], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 43}}, {"id": 150, "type": "identifier", "text": "MsgSendEntry", "parent": 149, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 16}}, {"id": 151, "type": "argument_list", "text": "( NicCmd* cmd, int thread )", "parent": 149, "children": [152, 156, 158], "start_point": {"row": 27, "column": 16}, "end_point": {"row": 27, "column": 43}}, {"id": 152, "type": "binary_expression", "text": "NicCmd* cmd", "parent": 151, "children": [153, 154, 155], "start_point": {"row": 27, "column": 18}, "end_point": {"row": 27, "column": 29}}, {"id": 153, "type": "identifier", "text": "NicCmd", "parent": 152, "children": [], "start_point": {"row": 27, "column": 18}, "end_point": {"row": 27, "column": 24}}, {"id": 154, "type": "*", "text": "*", "parent": 152, "children": [], "start_point": {"row": 27, "column": 24}, "end_point": {"row": 27, "column": 25}}, {"id": 155, "type": "identifier", "text": "cmd", "parent": 152, "children": [], "start_point": {"row": 27, "column": 26}, "end_point": {"row": 27, "column": 29}}, {"id": 156, "type": "ERROR", "text": "int", "parent": 151, "children": [157], "start_point": {"row": 27, "column": 31}, "end_point": {"row": 27, "column": 34}}, {"id": 157, "type": "identifier", "text": "int", "parent": 156, "children": [], "start_point": {"row": 27, "column": 31}, "end_point": {"row": 27, "column": 34}}, {"id": 158, "type": "identifier", "text": "thread", "parent": 151, "children": [], "start_point": {"row": 27, "column": 35}, "end_point": {"row": 27, "column": 41}}, {"id": 159, "type": "call_expression", "text": "SendEntry(thread,cmd)", "parent": 148, "children": [160, 161], "start_point": {"row": 27, "column": 46}, "end_point": {"row": 27, "column": 67}}, {"id": 160, "type": "identifier", "text": "SendEntry", "parent": 159, "children": [], "start_point": {"row": 27, "column": 46}, "end_point": {"row": 27, "column": 55}}, {"id": 161, "type": "argument_list", "text": "(thread,cmd)", "parent": 159, "children": [162, 163], "start_point": {"row": 27, "column": 55}, "end_point": {"row": 27, "column": 67}}, {"id": 162, "type": "identifier", "text": "thread", "parent": 161, "children": [], "start_point": {"row": 27, "column": 56}, "end_point": {"row": 27, "column": 62}}, {"id": 163, "type": "identifier", "text": "cmd", "parent": 161, "children": [], "start_point": {"row": 27, "column": 63}, "end_point": {"row": 27, "column": 66}}, {"id": 164, "type": "assignment_expression", "text": "m_streamHdr.type = StreamHdr", "parent": 147, "children": [165, 168, 169], "start_point": {"row": 28, "column": 5}, "end_point": {"row": 28, "column": 33}}, {"id": 165, "type": "field_expression", "text": "m_streamHdr.type", "parent": 164, "children": [166, 167], "start_point": {"row": 28, "column": 5}, "end_point": {"row": 28, "column": 21}}, {"id": 166, "type": "identifier", "text": "m_streamHdr", "parent": 165, "children": [], "start_point": {"row": 28, "column": 5}, "end_point": {"row": 28, "column": 16}}, {"id": 167, "type": "field_identifier", "text": "type", "parent": 165, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 21}}, {"id": 168, "type": "=", "text": "=", "parent": 164, "children": [], "start_point": {"row": 28, "column": 22}, "end_point": {"row": 28, "column": 23}}, {"id": 169, "type": "identifier", "text": "StreamHdr", "parent": 164, "children": [], "start_point": {"row": 28, "column": 24}, "end_point": {"row": 28, "column": 33}}, {"id": 170, "type": "ERROR", "text": "::Msg", "parent": 147, "children": [171], "start_point": {"row": 28, "column": 33}, "end_point": {"row": 28, "column": 38}}, {"id": 171, "type": "identifier", "text": "Msg", "parent": 170, "children": [], "start_point": {"row": 28, "column": 35}, "end_point": {"row": 28, "column": 38}}, {"id": 172, "type": "assignment_expression", "text": "m_streamHdr.data.msgKey = cmd->data.send.rqKey", "parent": 147, "children": [173, 178, 179], "start_point": {"row": 29, "column": 5}, "end_point": {"row": 29, "column": 51}}, {"id": 173, "type": "field_expression", "text": "m_streamHdr.data.msgKey", "parent": 172, "children": [174, 177], "start_point": {"row": 29, "column": 5}, "end_point": {"row": 29, "column": 28}}, {"id": 174, "type": "field_expression", "text": "m_streamHdr.data", "parent": 173, "children": [175, 176], "start_point": {"row": 29, "column": 5}, "end_point": {"row": 29, "column": 21}}, {"id": 175, "type": "identifier", "text": "m_streamHdr", "parent": 174, "children": [], "start_point": {"row": 29, "column": 5}, "end_point": {"row": 29, "column": 16}}, {"id": 176, "type": "field_identifier", "text": "data", "parent": 174, "children": [], "start_point": {"row": 29, "column": 17}, "end_point": {"row": 29, "column": 21}}, {"id": 177, "type": "field_identifier", "text": "msgKey", "parent": 173, "children": [], "start_point": {"row": 29, "column": 22}, "end_point": {"row": 29, "column": 28}}, {"id": 178, "type": "=", "text": "=", "parent": 172, "children": [], "start_point": {"row": 29, "column": 29}, "end_point": {"row": 29, "column": 30}}, {"id": 179, "type": "field_expression", "text": "cmd->data.send.rqKey", "parent": 172, "children": [180, 185], "start_point": {"row": 29, "column": 31}, "end_point": {"row": 29, "column": 51}}, {"id": 180, "type": "field_expression", "text": "cmd->data.send", "parent": 179, "children": [181, 184], "start_point": {"row": 29, "column": 31}, "end_point": {"row": 29, "column": 45}}, {"id": 181, "type": "field_expression", "text": "cmd->data", "parent": 180, "children": [182, 183], "start_point": {"row": 29, "column": 31}, "end_point": {"row": 29, "column": 40}}, {"id": 182, "type": "identifier", "text": "cmd", "parent": 181, "children": [], "start_point": {"row": 29, "column": 31}, "end_point": {"row": 29, "column": 34}}, {"id": 183, "type": "field_identifier", "text": "data", "parent": 181, "children": [], "start_point": {"row": 29, "column": 36}, "end_point": {"row": 29, "column": 40}}, {"id": 184, "type": "field_identifier", "text": "send", "parent": 180, "children": [], "start_point": {"row": 29, "column": 41}, "end_point": {"row": 29, "column": 45}}, {"id": 185, "type": "field_identifier", "text": "rqKey", "parent": 179, "children": [], "start_point": {"row": 29, "column": 46}, "end_point": {"row": 29, "column": 51}}, {"id": 186, "type": "assignment_expression", "text": "m_streamHdr.payloadLength = cmd->data.send.len", "parent": 147, "children": [187, 190, 191], "start_point": {"row": 30, "column": 5}, "end_point": {"row": 30, "column": 51}}, {"id": 187, "type": "field_expression", "text": "m_streamHdr.payloadLength", "parent": 186, "children": [188, 189], "start_point": {"row": 30, "column": 5}, "end_point": {"row": 30, "column": 30}}, {"id": 188, "type": "identifier", "text": "m_streamHdr", "parent": 187, "children": [], "start_point": {"row": 30, "column": 5}, "end_point": {"row": 30, "column": 16}}, {"id": 189, "type": "field_identifier", "text": "payloadLength", "parent": 187, "children": [], "start_point": {"row": 30, "column": 17}, "end_point": {"row": 30, "column": 30}}, {"id": 190, "type": "=", "text": "=", "parent": 186, "children": [], "start_point": {"row": 30, "column": 31}, "end_point": {"row": 30, "column": 32}}, {"id": 191, "type": "field_expression", "text": "cmd->data.send.len", "parent": 186, "children": [192, 197], "start_point": {"row": 30, "column": 33}, "end_point": {"row": 30, "column": 51}}, {"id": 192, "type": "field_expression", "text": "cmd->data.send", "parent": 191, "children": [193, 196], "start_point": {"row": 30, "column": 33}, "end_point": {"row": 30, "column": 47}}, {"id": 193, "type": "field_expression", "text": "cmd->data", "parent": 192, "children": [194, 195], "start_point": {"row": 30, "column": 33}, "end_point": {"row": 30, "column": 42}}, {"id": 194, "type": "identifier", "text": "cmd", "parent": 193, "children": [], "start_point": {"row": 30, "column": 33}, "end_point": {"row": 30, "column": 36}}, {"id": 195, "type": "field_identifier", "text": "data", "parent": 193, "children": [], "start_point": {"row": 30, "column": 38}, "end_point": {"row": 30, "column": 42}}, {"id": 196, "type": "field_identifier", "text": "send", "parent": 192, "children": [], "start_point": {"row": 30, "column": 43}, "end_point": {"row": 30, "column": 47}}, {"id": 197, "type": "field_identifier", "text": "len", "parent": 191, "children": [], "start_point": {"row": 30, "column": 48}, "end_point": {"row": 30, "column": 51}}, {"id": 198, "type": "function_definition", "text": "int getCqId() { return cmd->data.send.cqId; }", "parent": 143, "children": [199, 200], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 46}}, {"id": 199, "type": "primitive_type", "text": "int", "parent": 198, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 4}}, {"id": 200, "type": "function_declarator", "text": "getCqId()", "parent": 198, "children": [201, 202], "start_point": {"row": 32, "column": 5}, "end_point": {"row": 32, "column": 14}}, {"id": 201, "type": "identifier", "text": "getCqId", "parent": 200, "children": [], "start_point": {"row": 32, "column": 5}, "end_point": {"row": 32, "column": 12}}, {"id": 202, "type": "parameter_list", "text": "()", "parent": 200, "children": [], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 14}}, {"id": 203, "type": "return_statement", "text": "return cmd->data.send.cqId;", "parent": 198, "children": [204], "start_point": {"row": 32, "column": 17}, "end_point": {"row": 32, "column": 44}}, {"id": 204, "type": "field_expression", "text": "cmd->data.send.cqId", "parent": 203, "children": [205, 210], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 43}}, {"id": 205, "type": "field_expression", "text": "cmd->data.send", "parent": 204, "children": [206, 209], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 38}}, {"id": 206, "type": "field_expression", "text": "cmd->data", "parent": 205, "children": [207, 208], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 33}}, {"id": 207, "type": "identifier", "text": "cmd", "parent": 206, "children": [], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 27}}, {"id": 208, "type": "field_identifier", "text": "data", "parent": 206, "children": [], "start_point": {"row": 32, "column": 29}, "end_point": {"row": 32, "column": 33}}, {"id": 209, "type": "field_identifier", "text": "send", "parent": 205, "children": [], "start_point": {"row": 32, "column": 34}, "end_point": {"row": 32, "column": 38}}, {"id": 210, "type": "field_identifier", "text": "cqId", "parent": 204, "children": [], "start_point": {"row": 32, "column": 39}, "end_point": {"row": 32, "column": 43}}, {"id": 211, "type": "function_definition", "text": "int getAddr() { return cmd->data.send.addr; }", "parent": 143, "children": [212, 213], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 46}}, {"id": 212, "type": "primitive_type", "text": "int", "parent": 211, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 4}}, {"id": 213, "type": "function_declarator", "text": "getAddr()", "parent": 211, "children": [214, 215], "start_point": {"row": 33, "column": 5}, "end_point": {"row": 33, "column": 14}}, {"id": 214, "type": "identifier", "text": "getAddr", "parent": 213, "children": [], "start_point": {"row": 33, "column": 5}, "end_point": {"row": 33, "column": 12}}, {"id": 215, "type": "parameter_list", "text": "()", "parent": 213, "children": [], "start_point": {"row": 33, "column": 12}, "end_point": {"row": 33, "column": 14}}, {"id": 216, "type": "return_statement", "text": "return cmd->data.send.addr;", "parent": 211, "children": [217], "start_point": {"row": 33, "column": 17}, "end_point": {"row": 33, "column": 44}}, {"id": 217, "type": "field_expression", "text": "cmd->data.send.addr", "parent": 216, "children": [218, 223], "start_point": {"row": 33, "column": 24}, "end_point": {"row": 33, "column": 43}}, {"id": 218, "type": "field_expression", "text": "cmd->data.send", "parent": 217, "children": [219, 222], "start_point": {"row": 33, "column": 24}, "end_point": {"row": 33, "column": 38}}, {"id": 219, "type": "field_expression", "text": "cmd->data", "parent": 218, "children": [220, 221], "start_point": {"row": 33, "column": 24}, "end_point": {"row": 33, "column": 33}}, {"id": 220, "type": "identifier", "text": "cmd", "parent": 219, "children": [], "start_point": {"row": 33, "column": 24}, "end_point": {"row": 33, "column": 27}}, {"id": 221, "type": "field_identifier", "text": "data", "parent": 219, "children": [], "start_point": {"row": 33, "column": 29}, "end_point": {"row": 33, "column": 33}}, {"id": 222, "type": "field_identifier", "text": "send", "parent": 218, "children": [], "start_point": {"row": 33, "column": 34}, "end_point": {"row": 33, "column": 38}}, {"id": 223, "type": "field_identifier", "text": "addr", "parent": 217, "children": [], "start_point": {"row": 33, "column": 39}, "end_point": {"row": 33, "column": 43}}, {"id": 224, "type": "function_definition", "text": "int getLength() { return cmd->data.send.len; }", "parent": 143, "children": [225, 226], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 47}}, {"id": 225, "type": "primitive_type", "text": "int", "parent": 224, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 4}}, {"id": 226, "type": "function_declarator", "text": "getLength()", "parent": 224, "children": [227, 228], "start_point": {"row": 34, "column": 5}, "end_point": {"row": 34, "column": 16}}, {"id": 227, "type": "identifier", "text": "getLength", "parent": 226, "children": [], "start_point": {"row": 34, "column": 5}, "end_point": {"row": 34, "column": 14}}, {"id": 228, "type": "parameter_list", "text": "()", "parent": 226, "children": [], "start_point": {"row": 34, "column": 14}, "end_point": {"row": 34, "column": 16}}, {"id": 229, "type": "return_statement", "text": "return cmd->data.send.len;", "parent": 224, "children": [230], "start_point": {"row": 34, "column": 19}, "end_point": {"row": 34, "column": 45}}, {"id": 230, "type": "field_expression", "text": "cmd->data.send.len", "parent": 229, "children": [231, 236], "start_point": {"row": 34, "column": 26}, "end_point": {"row": 34, "column": 44}}, {"id": 231, "type": "field_expression", "text": "cmd->data.send", "parent": 230, "children": [232, 235], "start_point": {"row": 34, "column": 26}, "end_point": {"row": 34, "column": 40}}, {"id": 232, "type": "field_expression", "text": "cmd->data", "parent": 231, "children": [233, 234], "start_point": {"row": 34, "column": 26}, "end_point": {"row": 34, "column": 35}}, {"id": 233, "type": "identifier", "text": "cmd", "parent": 232, "children": [], "start_point": {"row": 34, "column": 26}, "end_point": {"row": 34, "column": 29}}, {"id": 234, "type": "field_identifier", "text": "data", "parent": 232, "children": [], "start_point": {"row": 34, "column": 31}, "end_point": {"row": 34, "column": 35}}, {"id": 235, "type": "field_identifier", "text": "send", "parent": 231, "children": [], "start_point": {"row": 34, "column": 36}, "end_point": {"row": 34, "column": 40}}, {"id": 236, "type": "field_identifier", "text": "len", "parent": 230, "children": [], "start_point": {"row": 34, "column": 41}, "end_point": {"row": 34, "column": 44}}, {"id": 237, "type": "function_definition", "text": "int getContext() { return cmd->data.send.context; }", "parent": 143, "children": [238, 239], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 52}}, {"id": 238, "type": "primitive_type", "text": "int", "parent": 237, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 4}}, {"id": 239, "type": "function_declarator", "text": "getContext()", "parent": 237, "children": [240, 241], "start_point": {"row": 35, "column": 5}, "end_point": {"row": 35, "column": 17}}, {"id": 240, "type": "identifier", "text": "getContext", "parent": 239, "children": [], "start_point": {"row": 35, "column": 5}, "end_point": {"row": 35, "column": 15}}, {"id": 241, "type": "parameter_list", "text": "()", "parent": 239, "children": [], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 17}}, {"id": 242, "type": "return_statement", "text": "return cmd->data.send.context;", "parent": 237, "children": [243], "start_point": {"row": 35, "column": 20}, "end_point": {"row": 35, "column": 50}}, {"id": 243, "type": "field_expression", "text": "cmd->data.send.context", "parent": 242, "children": [244, 249], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 49}}, {"id": 244, "type": "field_expression", "text": "cmd->data.send", "parent": 243, "children": [245, 248], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 41}}, {"id": 245, "type": "field_expression", "text": "cmd->data", "parent": 244, "children": [246, 247], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 36}}, {"id": 246, "type": "identifier", "text": "cmd", "parent": 245, "children": [], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 30}}, {"id": 247, "type": "field_identifier", "text": "data", "parent": 245, "children": [], "start_point": {"row": 35, "column": 32}, "end_point": {"row": 35, "column": 36}}, {"id": 248, "type": "field_identifier", "text": "send", "parent": 244, "children": [], "start_point": {"row": 35, "column": 37}, "end_point": {"row": 35, "column": 41}}, {"id": 249, "type": "field_identifier", "text": "context", "parent": 243, "children": [], "start_point": {"row": 35, "column": 42}, "end_point": {"row": 35, "column": 49}}, {"id": 250, "type": "function_definition", "text": "int getDestNode() { return cmd->data.send.node; }", "parent": 143, "children": [251, 252], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 50}}, {"id": 251, "type": "primitive_type", "text": "int", "parent": 250, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 4}}, {"id": 252, "type": "function_declarator", "text": "getDestNode()", "parent": 250, "children": [253, 254], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 18}}, {"id": 253, "type": "identifier", "text": "getDestNode", "parent": 252, "children": [], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 16}}, {"id": 254, "type": "parameter_list", "text": "()", "parent": 252, "children": [], "start_point": {"row": 36, "column": 16}, "end_point": {"row": 36, "column": 18}}, {"id": 255, "type": "return_statement", "text": "return cmd->data.send.node;", "parent": 250, "children": [256], "start_point": {"row": 36, "column": 21}, "end_point": {"row": 36, "column": 48}}, {"id": 256, "type": "field_expression", "text": "cmd->data.send.node", "parent": 255, "children": [257, 262], "start_point": {"row": 36, "column": 28}, "end_point": {"row": 36, "column": 47}}, {"id": 257, "type": "field_expression", "text": "cmd->data.send", "parent": 256, "children": [258, 261], "start_point": {"row": 36, "column": 28}, "end_point": {"row": 36, "column": 42}}, {"id": 258, "type": "field_expression", "text": "cmd->data", "parent": 257, "children": [259, 260], "start_point": {"row": 36, "column": 28}, "end_point": {"row": 36, "column": 37}}, {"id": 259, "type": "identifier", "text": "cmd", "parent": 258, "children": [], "start_point": {"row": 36, "column": 28}, "end_point": {"row": 36, "column": 31}}, {"id": 260, "type": "field_identifier", "text": "data", "parent": 258, "children": [], "start_point": {"row": 36, "column": 33}, "end_point": {"row": 36, "column": 37}}, {"id": 261, "type": "field_identifier", "text": "send", "parent": 257, "children": [], "start_point": {"row": 36, "column": 38}, "end_point": {"row": 36, "column": 42}}, {"id": 262, "type": "field_identifier", "text": "node", "parent": 256, "children": [], "start_point": {"row": 36, "column": 43}, "end_point": {"row": 36, "column": 47}}, {"id": 263, "type": "function_definition", "text": "int getDestPid() { return cmd->data.send.pe; }", "parent": 143, "children": [264, 265], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 47}}, {"id": 264, "type": "primitive_type", "text": "int", "parent": 263, "children": [], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 4}}, {"id": 265, "type": "function_declarator", "text": "getDestPid()", "parent": 263, "children": [266, 267], "start_point": {"row": 37, "column": 5}, "end_point": {"row": 37, "column": 17}}, {"id": 266, "type": "identifier", "text": "getDestPid", "parent": 265, "children": [], "start_point": {"row": 37, "column": 5}, "end_point": {"row": 37, "column": 15}}, {"id": 267, "type": "parameter_list", "text": "()", "parent": 265, "children": [], "start_point": {"row": 37, "column": 15}, "end_point": {"row": 37, "column": 17}}, {"id": 268, "type": "return_statement", "text": "return cmd->data.send.pe;", "parent": 263, "children": [269], "start_point": {"row": 37, "column": 20}, "end_point": {"row": 37, "column": 45}}, {"id": 269, "type": "field_expression", "text": "cmd->data.send.pe", "parent": 268, "children": [270, 275], "start_point": {"row": 37, "column": 27}, "end_point": {"row": 37, "column": 44}}, {"id": 270, "type": "field_expression", "text": "cmd->data.send", "parent": 269, "children": [271, 274], "start_point": {"row": 37, "column": 27}, "end_point": {"row": 37, "column": 41}}, {"id": 271, "type": "field_expression", "text": "cmd->data", "parent": 270, "children": [272, 273], "start_point": {"row": 37, "column": 27}, "end_point": {"row": 37, "column": 36}}, {"id": 272, "type": "identifier", "text": "cmd", "parent": 271, "children": [], "start_point": {"row": 37, "column": 27}, "end_point": {"row": 37, "column": 30}}, {"id": 273, "type": "field_identifier", "text": "data", "parent": 271, "children": [], "start_point": {"row": 37, "column": 32}, "end_point": {"row": 37, "column": 36}}, {"id": 274, "type": "field_identifier", "text": "send", "parent": 270, "children": [], "start_point": {"row": 37, "column": 37}, "end_point": {"row": 37, "column": 41}}, {"id": 275, "type": "field_identifier", "text": "pe", "parent": 269, "children": [], "start_point": {"row": 37, "column": 42}, "end_point": {"row": 37, "column": 44}}, {"id": 276, "type": "labeled_statement", "text": "private:\t\n};", "parent": 143, "children": [], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 39, "column": 2}}, {"id": 277, "type": "function_definition", "text": "class WriteSendEntry : public SendEntry {\n public:\n WriteSendEntry( NicCmd* cmd, int thread ): SendEntry(thread,cmd) {\n \tm_streamHdr.type = StreamHdr::Write;\n \tm_streamHdr.data.rdma.memRgnKey = cmd->data.write.key;\n \tm_streamHdr.data.rdma.offset = cmd->data.write.offset;\n \tm_streamHdr.payloadLength = cmd->data.write.len;\n\t}\n\tint getLength() { return cmd->data.write.len; }\n\tint getAddr() { return cmd->data.write.srcAddr; }\n\tint getCqId() { return cmd->data.write.cqId; }\n\tint getContext() { return cmd->data.write.context; }\n\tint getDestNode() { return cmd->data.write.node; }\n\tint getDestPid() { return cmd->data.write.pe; }\n}", "parent": 143, "children": [278, 279], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 55, "column": 1}}, {"id": 278, "type": "identifier", "text": "WriteSendEntry", "parent": 277, "children": [], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 20}}, {"id": 279, "type": "ERROR", "text": ": public SendEntry", "parent": 277, "children": [280], "start_point": {"row": 41, "column": 21}, "end_point": {"row": 41, "column": 39}}, {"id": 280, "type": "identifier", "text": "SendEntry", "parent": 279, "children": [], "start_point": {"row": 41, "column": 30}, "end_point": {"row": 41, "column": 39}}, {"id": 281, "type": "labeled_statement", "text": "public:\n WriteSendEntry( NicCmd* cmd, int thread ): SendEntry(thread,cmd) {\n \tm_streamHdr.type = StreamHdr::Write;\n \tm_streamHdr.data.rdma.memRgnKey = cmd->data.write.key;\n \tm_streamHdr.data.rdma.offset = cmd->data.write.offset;\n \tm_streamHdr.payloadLength = cmd->data.write.len;\n\t}", "parent": 277, "children": [282], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 48, "column": 2}}, {"id": 282, "type": "ERROR", "text": "WriteSendEntry( NicCmd* cmd, int thread ): SendEntry(thread,cmd)", "parent": 281, "children": [283, 293], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 68}}, {"id": 283, "type": "call_expression", "text": "WriteSendEntry( NicCmd* cmd, int thread )", "parent": 282, "children": [284, 285], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 45}}, {"id": 284, "type": "identifier", "text": "WriteSendEntry", "parent": 283, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 18}}, {"id": 285, "type": "argument_list", "text": "( NicCmd* cmd, int thread )", "parent": 283, "children": [286, 290, 292], "start_point": {"row": 43, "column": 18}, "end_point": {"row": 43, "column": 45}}, {"id": 286, "type": "binary_expression", "text": "NicCmd* cmd", "parent": 285, "children": [287, 288, 289], "start_point": {"row": 43, "column": 20}, "end_point": {"row": 43, "column": 31}}, {"id": 287, "type": "identifier", "text": "NicCmd", "parent": 286, "children": [], "start_point": {"row": 43, "column": 20}, "end_point": {"row": 43, "column": 26}}, {"id": 288, "type": "*", "text": "*", "parent": 286, "children": [], "start_point": {"row": 43, "column": 26}, "end_point": {"row": 43, "column": 27}}, {"id": 289, "type": "identifier", "text": "cmd", "parent": 286, "children": [], "start_point": {"row": 43, "column": 28}, "end_point": {"row": 43, "column": 31}}, {"id": 290, "type": "ERROR", "text": "int", "parent": 285, "children": [291], "start_point": {"row": 43, "column": 33}, "end_point": {"row": 43, "column": 36}}, {"id": 291, "type": "identifier", "text": "int", "parent": 290, "children": [], "start_point": {"row": 43, "column": 33}, "end_point": {"row": 43, "column": 36}}, {"id": 292, "type": "identifier", "text": "thread", "parent": 285, "children": [], "start_point": {"row": 43, "column": 37}, "end_point": {"row": 43, "column": 43}}, {"id": 293, "type": "call_expression", "text": "SendEntry(thread,cmd)", "parent": 282, "children": [294, 295], "start_point": {"row": 43, "column": 47}, "end_point": {"row": 43, "column": 68}}, {"id": 294, "type": "identifier", "text": "SendEntry", "parent": 293, "children": [], "start_point": {"row": 43, "column": 47}, "end_point": {"row": 43, "column": 56}}, {"id": 295, "type": "argument_list", "text": "(thread,cmd)", "parent": 293, "children": [296, 297], "start_point": {"row": 43, "column": 56}, "end_point": {"row": 43, "column": 68}}, {"id": 296, "type": "identifier", "text": "thread", "parent": 295, "children": [], "start_point": {"row": 43, "column": 57}, "end_point": {"row": 43, "column": 63}}, {"id": 297, "type": "identifier", "text": "cmd", "parent": 295, "children": [], "start_point": {"row": 43, "column": 64}, "end_point": {"row": 43, "column": 67}}, {"id": 298, "type": "assignment_expression", "text": "m_streamHdr.type = StreamHdr", "parent": 281, "children": [299, 302, 303], "start_point": {"row": 44, "column": 5}, "end_point": {"row": 44, "column": 33}}, {"id": 299, "type": "field_expression", "text": "m_streamHdr.type", "parent": 298, "children": [300, 301], "start_point": {"row": 44, "column": 5}, "end_point": {"row": 44, "column": 21}}, {"id": 300, "type": "identifier", "text": "m_streamHdr", "parent": 299, "children": [], "start_point": {"row": 44, "column": 5}, "end_point": {"row": 44, "column": 16}}, {"id": 301, "type": "field_identifier", "text": "type", "parent": 299, "children": [], "start_point": {"row": 44, "column": 17}, "end_point": {"row": 44, "column": 21}}, {"id": 302, "type": "=", "text": "=", "parent": 298, "children": [], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 23}}, {"id": 303, "type": "identifier", "text": "StreamHdr", "parent": 298, "children": [], "start_point": {"row": 44, "column": 24}, "end_point": {"row": 44, "column": 33}}, {"id": 304, "type": "ERROR", "text": "::Write", "parent": 281, "children": [305], "start_point": {"row": 44, "column": 33}, "end_point": {"row": 44, "column": 40}}, {"id": 305, "type": "identifier", "text": "Write", "parent": 304, "children": [], "start_point": {"row": 44, "column": 35}, "end_point": {"row": 44, "column": 40}}, {"id": 306, "type": "assignment_expression", "text": "m_streamHdr.data.rdma.memRgnKey = cmd->data.write.key", "parent": 281, "children": [307, 314, 315], "start_point": {"row": 45, "column": 5}, "end_point": {"row": 45, "column": 58}}, {"id": 307, "type": "field_expression", "text": "m_streamHdr.data.rdma.memRgnKey", "parent": 306, "children": [308, 313], "start_point": {"row": 45, "column": 5}, "end_point": {"row": 45, "column": 36}}, {"id": 308, "type": "field_expression", "text": "m_streamHdr.data.rdma", "parent": 307, "children": [309, 312], "start_point": {"row": 45, "column": 5}, "end_point": {"row": 45, "column": 26}}, {"id": 309, "type": "field_expression", "text": "m_streamHdr.data", "parent": 308, "children": [310, 311], "start_point": {"row": 45, "column": 5}, "end_point": {"row": 45, "column": 21}}, {"id": 310, "type": "identifier", "text": "m_streamHdr", "parent": 309, "children": [], "start_point": {"row": 45, "column": 5}, "end_point": {"row": 45, "column": 16}}, {"id": 311, "type": "field_identifier", "text": "data", "parent": 309, "children": [], "start_point": {"row": 45, "column": 17}, "end_point": {"row": 45, "column": 21}}, {"id": 312, "type": "field_identifier", "text": "rdma", "parent": 308, "children": [], "start_point": {"row": 45, "column": 22}, "end_point": {"row": 45, "column": 26}}, {"id": 313, "type": "field_identifier", "text": "memRgnKey", "parent": 307, "children": [], "start_point": {"row": 45, "column": 27}, "end_point": {"row": 45, "column": 36}}, {"id": 314, "type": "=", "text": "=", "parent": 306, "children": [], "start_point": {"row": 45, "column": 37}, "end_point": {"row": 45, "column": 38}}, {"id": 315, "type": "field_expression", "text": "cmd->data.write.key", "parent": 306, "children": [316, 321], "start_point": {"row": 45, "column": 39}, "end_point": {"row": 45, "column": 58}}, {"id": 316, "type": "field_expression", "text": "cmd->data.write", "parent": 315, "children": [317, 320], "start_point": {"row": 45, "column": 39}, "end_point": {"row": 45, "column": 54}}, {"id": 317, "type": "field_expression", "text": "cmd->data", "parent": 316, "children": [318, 319], "start_point": {"row": 45, "column": 39}, "end_point": {"row": 45, "column": 48}}, {"id": 318, "type": "identifier", "text": "cmd", "parent": 317, "children": [], "start_point": {"row": 45, "column": 39}, "end_point": {"row": 45, "column": 42}}, {"id": 319, "type": "field_identifier", "text": "data", "parent": 317, "children": [], "start_point": {"row": 45, "column": 44}, "end_point": {"row": 45, "column": 48}}, {"id": 320, "type": "field_identifier", "text": "write", "parent": 316, "children": [], "start_point": {"row": 45, "column": 49}, "end_point": {"row": 45, "column": 54}}, {"id": 321, "type": "field_identifier", "text": "key", "parent": 315, "children": [], "start_point": {"row": 45, "column": 55}, "end_point": {"row": 45, "column": 58}}, {"id": 322, "type": "assignment_expression", "text": "m_streamHdr.data.rdma.offset = cmd->data.write.offset", "parent": 281, "children": [323, 330, 331], "start_point": {"row": 46, "column": 5}, "end_point": {"row": 46, "column": 58}}, {"id": 323, "type": "field_expression", "text": "m_streamHdr.data.rdma.offset", "parent": 322, "children": [324, 329], "start_point": {"row": 46, "column": 5}, "end_point": {"row": 46, "column": 33}}, {"id": 324, "type": "field_expression", "text": "m_streamHdr.data.rdma", "parent": 323, "children": [325, 328], "start_point": {"row": 46, "column": 5}, "end_point": {"row": 46, "column": 26}}, {"id": 325, "type": "field_expression", "text": "m_streamHdr.data", "parent": 324, "children": [326, 327], "start_point": {"row": 46, "column": 5}, "end_point": {"row": 46, "column": 21}}, {"id": 326, "type": "identifier", "text": "m_streamHdr", "parent": 325, "children": [], "start_point": {"row": 46, "column": 5}, "end_point": {"row": 46, "column": 16}}, {"id": 327, "type": "field_identifier", "text": "data", "parent": 325, "children": [], "start_point": {"row": 46, "column": 17}, "end_point": {"row": 46, "column": 21}}, {"id": 328, "type": "field_identifier", "text": "rdma", "parent": 324, "children": [], "start_point": {"row": 46, "column": 22}, "end_point": {"row": 46, "column": 26}}, {"id": 329, "type": "field_identifier", "text": "offset", "parent": 323, "children": [], "start_point": {"row": 46, "column": 27}, "end_point": {"row": 46, "column": 33}}, {"id": 330, "type": "=", "text": "=", "parent": 322, "children": [], "start_point": {"row": 46, "column": 34}, "end_point": {"row": 46, "column": 35}}, {"id": 331, "type": "field_expression", "text": "cmd->data.write.offset", "parent": 322, "children": [332, 337], "start_point": {"row": 46, "column": 36}, "end_point": {"row": 46, "column": 58}}, {"id": 332, "type": "field_expression", "text": "cmd->data.write", "parent": 331, "children": [333, 336], "start_point": {"row": 46, "column": 36}, "end_point": {"row": 46, "column": 51}}, {"id": 333, "type": "field_expression", "text": "cmd->data", "parent": 332, "children": [334, 335], "start_point": {"row": 46, "column": 36}, "end_point": {"row": 46, "column": 45}}, {"id": 334, "type": "identifier", "text": "cmd", "parent": 333, "children": [], "start_point": {"row": 46, "column": 36}, "end_point": {"row": 46, "column": 39}}, {"id": 335, "type": "field_identifier", "text": "data", "parent": 333, "children": [], "start_point": {"row": 46, "column": 41}, "end_point": {"row": 46, "column": 45}}, {"id": 336, "type": "field_identifier", "text": "write", "parent": 332, "children": [], "start_point": {"row": 46, "column": 46}, "end_point": {"row": 46, "column": 51}}, {"id": 337, "type": "field_identifier", "text": "offset", "parent": 331, "children": [], "start_point": {"row": 46, "column": 52}, "end_point": {"row": 46, "column": 58}}, {"id": 338, "type": "assignment_expression", "text": "m_streamHdr.payloadLength = cmd->data.write.len", "parent": 281, "children": [339, 342, 343], "start_point": {"row": 47, "column": 5}, "end_point": {"row": 47, "column": 52}}, {"id": 339, "type": "field_expression", "text": "m_streamHdr.payloadLength", "parent": 338, "children": [340, 341], "start_point": {"row": 47, "column": 5}, "end_point": {"row": 47, "column": 30}}, {"id": 340, "type": "identifier", "text": "m_streamHdr", "parent": 339, "children": [], "start_point": {"row": 47, "column": 5}, "end_point": {"row": 47, "column": 16}}, {"id": 341, "type": "field_identifier", "text": "payloadLength", "parent": 339, "children": [], "start_point": {"row": 47, "column": 17}, "end_point": {"row": 47, "column": 30}}, {"id": 342, "type": "=", "text": "=", "parent": 338, "children": [], "start_point": {"row": 47, "column": 31}, "end_point": {"row": 47, "column": 32}}, {"id": 343, "type": "field_expression", "text": "cmd->data.write.len", "parent": 338, "children": [344, 349], "start_point": {"row": 47, "column": 33}, "end_point": {"row": 47, "column": 52}}, {"id": 344, "type": "field_expression", "text": "cmd->data.write", "parent": 343, "children": [345, 348], "start_point": {"row": 47, "column": 33}, "end_point": {"row": 47, "column": 48}}, {"id": 345, "type": "field_expression", "text": "cmd->data", "parent": 344, "children": [346, 347], "start_point": {"row": 47, "column": 33}, "end_point": {"row": 47, "column": 42}}, {"id": 346, "type": "identifier", "text": "cmd", "parent": 345, "children": [], "start_point": {"row": 47, "column": 33}, "end_point": {"row": 47, "column": 36}}, {"id": 347, "type": "field_identifier", "text": "data", "parent": 345, "children": [], "start_point": {"row": 47, "column": 38}, "end_point": {"row": 47, "column": 42}}, {"id": 348, "type": "field_identifier", "text": "write", "parent": 344, "children": [], "start_point": {"row": 47, "column": 43}, "end_point": {"row": 47, "column": 48}}, {"id": 349, "type": "field_identifier", "text": "len", "parent": 343, "children": [], "start_point": {"row": 47, "column": 49}, "end_point": {"row": 47, "column": 52}}, {"id": 350, "type": "function_definition", "text": "int getLength() { return cmd->data.write.len; }", "parent": 277, "children": [351, 352], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 48}}, {"id": 351, "type": "primitive_type", "text": "int", "parent": 350, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 4}}, {"id": 352, "type": "function_declarator", "text": "getLength()", "parent": 350, "children": [353, 354], "start_point": {"row": 49, "column": 5}, "end_point": {"row": 49, "column": 16}}, {"id": 353, "type": "identifier", "text": "getLength", "parent": 352, "children": [], "start_point": {"row": 49, "column": 5}, "end_point": {"row": 49, "column": 14}}, {"id": 354, "type": "parameter_list", "text": "()", "parent": 352, "children": [], "start_point": {"row": 49, "column": 14}, "end_point": {"row": 49, "column": 16}}, {"id": 355, "type": "return_statement", "text": "return cmd->data.write.len;", "parent": 350, "children": [356], "start_point": {"row": 49, "column": 19}, "end_point": {"row": 49, "column": 46}}, {"id": 356, "type": "field_expression", "text": "cmd->data.write.len", "parent": 355, "children": [357, 362], "start_point": {"row": 49, "column": 26}, "end_point": {"row": 49, "column": 45}}, {"id": 357, "type": "field_expression", "text": "cmd->data.write", "parent": 356, "children": [358, 361], "start_point": {"row": 49, "column": 26}, "end_point": {"row": 49, "column": 41}}, {"id": 358, "type": "field_expression", "text": "cmd->data", "parent": 357, "children": [359, 360], "start_point": {"row": 49, "column": 26}, "end_point": {"row": 49, "column": 35}}, {"id": 359, "type": "identifier", "text": "cmd", "parent": 358, "children": [], "start_point": {"row": 49, "column": 26}, "end_point": {"row": 49, "column": 29}}, {"id": 360, "type": "field_identifier", "text": "data", "parent": 358, "children": [], "start_point": {"row": 49, "column": 31}, "end_point": {"row": 49, "column": 35}}, {"id": 361, "type": "field_identifier", "text": "write", "parent": 357, "children": [], "start_point": {"row": 49, "column": 36}, "end_point": {"row": 49, "column": 41}}, {"id": 362, "type": "field_identifier", "text": "len", "parent": 356, "children": [], "start_point": {"row": 49, "column": 42}, "end_point": {"row": 49, "column": 45}}, {"id": 363, "type": "function_definition", "text": "int getAddr() { return cmd->data.write.srcAddr; }", "parent": 277, "children": [364, 365], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 50}}, {"id": 364, "type": "primitive_type", "text": "int", "parent": 363, "children": [], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 4}}, {"id": 365, "type": "function_declarator", "text": "getAddr()", "parent": 363, "children": [366, 367], "start_point": {"row": 50, "column": 5}, "end_point": {"row": 50, "column": 14}}, {"id": 366, "type": "identifier", "text": "getAddr", "parent": 365, "children": [], "start_point": {"row": 50, "column": 5}, "end_point": {"row": 50, "column": 12}}, {"id": 367, "type": "parameter_list", "text": "()", "parent": 365, "children": [], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 14}}, {"id": 368, "type": "return_statement", "text": "return cmd->data.write.srcAddr;", "parent": 363, "children": [369], "start_point": {"row": 50, "column": 17}, "end_point": {"row": 50, "column": 48}}, {"id": 369, "type": "field_expression", "text": "cmd->data.write.srcAddr", "parent": 368, "children": [370, 375], "start_point": {"row": 50, "column": 24}, "end_point": {"row": 50, "column": 47}}, {"id": 370, "type": "field_expression", "text": "cmd->data.write", "parent": 369, "children": [371, 374], "start_point": {"row": 50, "column": 24}, "end_point": {"row": 50, "column": 39}}, {"id": 371, "type": "field_expression", "text": "cmd->data", "parent": 370, "children": [372, 373], "start_point": {"row": 50, "column": 24}, "end_point": {"row": 50, "column": 33}}, {"id": 372, "type": "identifier", "text": "cmd", "parent": 371, "children": [], "start_point": {"row": 50, "column": 24}, "end_point": {"row": 50, "column": 27}}, {"id": 373, "type": "field_identifier", "text": "data", "parent": 371, "children": [], "start_point": {"row": 50, "column": 29}, "end_point": {"row": 50, "column": 33}}, {"id": 374, "type": "field_identifier", "text": "write", "parent": 370, "children": [], "start_point": {"row": 50, "column": 34}, "end_point": {"row": 50, "column": 39}}, {"id": 375, "type": "field_identifier", "text": "srcAddr", "parent": 369, "children": [], "start_point": {"row": 50, "column": 40}, "end_point": {"row": 50, "column": 47}}, {"id": 376, "type": "function_definition", "text": "int getCqId() { return cmd->data.write.cqId; }", "parent": 277, "children": [377, 378], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 47}}, {"id": 377, "type": "primitive_type", "text": "int", "parent": 376, "children": [], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 4}}, {"id": 378, "type": "function_declarator", "text": "getCqId()", "parent": 376, "children": [379, 380], "start_point": {"row": 51, "column": 5}, "end_point": {"row": 51, "column": 14}}, {"id": 379, "type": "identifier", "text": "getCqId", "parent": 378, "children": [], "start_point": {"row": 51, "column": 5}, "end_point": {"row": 51, "column": 12}}, {"id": 380, "type": "parameter_list", "text": "()", "parent": 378, "children": [], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 14}}, {"id": 381, "type": "return_statement", "text": "return cmd->data.write.cqId;", "parent": 376, "children": [382], "start_point": {"row": 51, "column": 17}, "end_point": {"row": 51, "column": 45}}, {"id": 382, "type": "field_expression", "text": "cmd->data.write.cqId", "parent": 381, "children": [383, 388], "start_point": {"row": 51, "column": 24}, "end_point": {"row": 51, "column": 44}}, {"id": 383, "type": "field_expression", "text": "cmd->data.write", "parent": 382, "children": [384, 387], "start_point": {"row": 51, "column": 24}, "end_point": {"row": 51, "column": 39}}, {"id": 384, "type": "field_expression", "text": "cmd->data", "parent": 383, "children": [385, 386], "start_point": {"row": 51, "column": 24}, "end_point": {"row": 51, "column": 33}}, {"id": 385, "type": "identifier", "text": "cmd", "parent": 384, "children": [], "start_point": {"row": 51, "column": 24}, "end_point": {"row": 51, "column": 27}}, {"id": 386, "type": "field_identifier", "text": "data", "parent": 384, "children": [], "start_point": {"row": 51, "column": 29}, "end_point": {"row": 51, "column": 33}}, {"id": 387, "type": "field_identifier", "text": "write", "parent": 383, "children": [], "start_point": {"row": 51, "column": 34}, "end_point": {"row": 51, "column": 39}}, {"id": 388, "type": "field_identifier", "text": "cqId", "parent": 382, "children": [], "start_point": {"row": 51, "column": 40}, "end_point": {"row": 51, "column": 44}}, {"id": 389, "type": "function_definition", "text": "int getContext() { return cmd->data.write.context; }", "parent": 277, "children": [390, 391], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 53}}, {"id": 390, "type": "primitive_type", "text": "int", "parent": 389, "children": [], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 4}}, {"id": 391, "type": "function_declarator", "text": "getContext()", "parent": 389, "children": [392, 393], "start_point": {"row": 52, "column": 5}, "end_point": {"row": 52, "column": 17}}, {"id": 392, "type": "identifier", "text": "getContext", "parent": 391, "children": [], "start_point": {"row": 52, "column": 5}, "end_point": {"row": 52, "column": 15}}, {"id": 393, "type": "parameter_list", "text": "()", "parent": 391, "children": [], "start_point": {"row": 52, "column": 15}, "end_point": {"row": 52, "column": 17}}, {"id": 394, "type": "return_statement", "text": "return cmd->data.write.context;", "parent": 389, "children": [395], "start_point": {"row": 52, "column": 20}, "end_point": {"row": 52, "column": 51}}, {"id": 395, "type": "field_expression", "text": "cmd->data.write.context", "parent": 394, "children": [396, 401], "start_point": {"row": 52, "column": 27}, "end_point": {"row": 52, "column": 50}}, {"id": 396, "type": "field_expression", "text": "cmd->data.write", "parent": 395, "children": [397, 400], "start_point": {"row": 52, "column": 27}, "end_point": {"row": 52, "column": 42}}, {"id": 397, "type": "field_expression", "text": "cmd->data", "parent": 396, "children": [398, 399], "start_point": {"row": 52, "column": 27}, "end_point": {"row": 52, "column": 36}}, {"id": 398, "type": "identifier", "text": "cmd", "parent": 397, "children": [], "start_point": {"row": 52, "column": 27}, "end_point": {"row": 52, "column": 30}}, {"id": 399, "type": "field_identifier", "text": "data", "parent": 397, "children": [], "start_point": {"row": 52, "column": 32}, "end_point": {"row": 52, "column": 36}}, {"id": 400, "type": "field_identifier", "text": "write", "parent": 396, "children": [], "start_point": {"row": 52, "column": 37}, "end_point": {"row": 52, "column": 42}}, {"id": 401, "type": "field_identifier", "text": "context", "parent": 395, "children": [], "start_point": {"row": 52, "column": 43}, "end_point": {"row": 52, "column": 50}}, {"id": 402, "type": "function_definition", "text": "int getDestNode() { return cmd->data.write.node; }", "parent": 277, "children": [403, 404], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 51}}, {"id": 403, "type": "primitive_type", "text": "int", "parent": 402, "children": [], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 4}}, {"id": 404, "type": "function_declarator", "text": "getDestNode()", "parent": 402, "children": [405, 406], "start_point": {"row": 53, "column": 5}, "end_point": {"row": 53, "column": 18}}, {"id": 405, "type": "identifier", "text": "getDestNode", "parent": 404, "children": [], "start_point": {"row": 53, "column": 5}, "end_point": {"row": 53, "column": 16}}, {"id": 406, "type": "parameter_list", "text": "()", "parent": 404, "children": [], "start_point": {"row": 53, "column": 16}, "end_point": {"row": 53, "column": 18}}, {"id": 407, "type": "return_statement", "text": "return cmd->data.write.node;", "parent": 402, "children": [408], "start_point": {"row": 53, "column": 21}, "end_point": {"row": 53, "column": 49}}, {"id": 408, "type": "field_expression", "text": "cmd->data.write.node", "parent": 407, "children": [409, 414], "start_point": {"row": 53, "column": 28}, "end_point": {"row": 53, "column": 48}}, {"id": 409, "type": "field_expression", "text": "cmd->data.write", "parent": 408, "children": [410, 413], "start_point": {"row": 53, "column": 28}, "end_point": {"row": 53, "column": 43}}, {"id": 410, "type": "field_expression", "text": "cmd->data", "parent": 409, "children": [411, 412], "start_point": {"row": 53, "column": 28}, "end_point": {"row": 53, "column": 37}}, {"id": 411, "type": "identifier", "text": "cmd", "parent": 410, "children": [], "start_point": {"row": 53, "column": 28}, "end_point": {"row": 53, "column": 31}}, {"id": 412, "type": "field_identifier", "text": "data", "parent": 410, "children": [], "start_point": {"row": 53, "column": 33}, "end_point": {"row": 53, "column": 37}}, {"id": 413, "type": "field_identifier", "text": "write", "parent": 409, "children": [], "start_point": {"row": 53, "column": 38}, "end_point": {"row": 53, "column": 43}}, {"id": 414, "type": "field_identifier", "text": "node", "parent": 408, "children": [], "start_point": {"row": 53, "column": 44}, "end_point": {"row": 53, "column": 48}}, {"id": 415, "type": "function_definition", "text": "int getDestPid() { return cmd->data.write.pe; }", "parent": 277, "children": [416, 417], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 48}}, {"id": 416, "type": "primitive_type", "text": "int", "parent": 415, "children": [], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 4}}, {"id": 417, "type": "function_declarator", "text": "getDestPid()", "parent": 415, "children": [418, 419], "start_point": {"row": 54, "column": 5}, "end_point": {"row": 54, "column": 17}}, {"id": 418, "type": "identifier", "text": "getDestPid", "parent": 417, "children": [], "start_point": {"row": 54, "column": 5}, "end_point": {"row": 54, "column": 15}}, {"id": 419, "type": "parameter_list", "text": "()", "parent": 417, "children": [], "start_point": {"row": 54, "column": 15}, "end_point": {"row": 54, "column": 17}}, {"id": 420, "type": "return_statement", "text": "return cmd->data.write.pe;", "parent": 415, "children": [421], "start_point": {"row": 54, "column": 20}, "end_point": {"row": 54, "column": 46}}, {"id": 421, "type": "field_expression", "text": "cmd->data.write.pe", "parent": 420, "children": [422, 427], "start_point": {"row": 54, "column": 27}, "end_point": {"row": 54, "column": 45}}, {"id": 422, "type": "field_expression", "text": "cmd->data.write", "parent": 421, "children": [423, 426], "start_point": {"row": 54, "column": 27}, "end_point": {"row": 54, "column": 42}}, {"id": 423, "type": "field_expression", "text": "cmd->data", "parent": 422, "children": [424, 425], "start_point": {"row": 54, "column": 27}, "end_point": {"row": 54, "column": 36}}, {"id": 424, "type": "identifier", "text": "cmd", "parent": 423, "children": [], "start_point": {"row": 54, "column": 27}, "end_point": {"row": 54, "column": 30}}, {"id": 425, "type": "field_identifier", "text": "data", "parent": 423, "children": [], "start_point": {"row": 54, "column": 32}, "end_point": {"row": 54, "column": 36}}, {"id": 426, "type": "field_identifier", "text": "write", "parent": 422, "children": [], "start_point": {"row": 54, "column": 37}, "end_point": {"row": 54, "column": 42}}, {"id": 427, "type": "field_identifier", "text": "pe", "parent": 421, "children": [], "start_point": {"row": 54, "column": 43}, "end_point": {"row": 54, "column": 45}}, {"id": 428, "type": "function_definition", "text": "class ReadSendEntry : public SendEntry {\n public:\n ReadSendEntry( NicCmd* cmd, int thread, int readRespKey ): SendEntry(thread,cmd) {\n \tm_streamHdr.type = StreamHdr::ReadReq;\n \tm_streamHdr.payloadLength = 0;\n \tm_streamHdr.data.rdma.memRgnKey = cmd->data.read.key;\n \tm_streamHdr.data.rdma.offset = cmd->data.read.offset;\n\t\tm_streamHdr.data.rdma.readRespKey = readRespKey;\n\t\tm_streamHdr.data.rdma.readLength = cmd->data.read.len;\n\t}\n\t// we are only sending a read header so lengh and address are 0\n\t// the read does send a completeion until the read completes so these are\n\t// passed to the ReadRespRecvEntry\n\tint getLength() { return 0; }\n\tint getAddr() { return 0; }\n\tint getCqId() { return -1; }\n\tint getContext() { return 0; }\n\tint getDestNode() { return cmd->data.read.node; }\n\tint getDestPid() { return cmd->data.read.pe; }\n private:\n}; \n\nclass ReadRespSendEntry : public SendEntry {\n public:\n ReadRespSendEntry( int thread, int destNode, int destPid, Addr_t srcAddr, int length, int readRespKey ): \n\t\tSendEntry(thread), m_destNode(destNode), m_destPid(destPid), m_srcAddr(srcAddr), m_length(length) \n\t{\n \tm_streamHdr.type = StreamHdr::ReadResp;\n \tm_streamHdr.payloadLength = m_length;\n\t\tm_streamHdr.data.rdma.readRespKey = readRespKey;\n\t}\n\n\tint getLength() { return m_length; }\n\tint getAddr() { return m_srcAddr; }\n\tint getCqId() { return -1; }\n\tint getContext() { return 0; }\n\tint getDestNode() { return m_destNode; }\n\tint getDestPid() { return m_destPid; }\n private:\n\tint m_srcAddr;\n\tint m_length;\n\tint m_destNode;\n\tint m_destPid;\n}", "parent": 143, "children": [429, 430], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 99, "column": 1}}, {"id": 429, "type": "identifier", "text": "ReadSendEntry", "parent": 428, "children": [], "start_point": {"row": 56, "column": 6}, "end_point": {"row": 56, "column": 19}}, {"id": 430, "type": "ERROR", "text": ": public SendEntry", "parent": 428, "children": [431], "start_point": {"row": 56, "column": 20}, "end_point": {"row": 56, "column": 38}}, {"id": 431, "type": "identifier", "text": "SendEntry", "parent": 430, "children": [], "start_point": {"row": 56, "column": 29}, "end_point": {"row": 56, "column": 38}}, {"id": 432, "type": "labeled_statement", "text": "public:\n ReadSendEntry( NicCmd* cmd, int thread, int readRespKey ): SendEntry(thread,cmd) {\n \tm_streamHdr.type = StreamHdr::ReadReq;\n \tm_streamHdr.payloadLength = 0;\n \tm_streamHdr.data.rdma.memRgnKey = cmd->data.read.key;\n \tm_streamHdr.data.rdma.offset = cmd->data.read.offset;\n\t\tm_streamHdr.data.rdma.readRespKey = readRespKey;\n\t\tm_streamHdr.data.rdma.readLength = cmd->data.read.len;\n\t}", "parent": 428, "children": [433], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 65, "column": 2}}, {"id": 433, "type": "ERROR", "text": "ReadSendEntry( NicCmd* cmd, int thread, int readRespKey ): SendEntry(thread,cmd)", "parent": 432, "children": [434, 447], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 84}}, {"id": 434, "type": "call_expression", "text": "ReadSendEntry( NicCmd* cmd, int thread, int readRespKey )", "parent": 433, "children": [435, 436], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 61}}, {"id": 435, "type": "identifier", "text": "ReadSendEntry", "parent": 434, "children": [], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 17}}, {"id": 436, "type": "argument_list", "text": "( NicCmd* cmd, int thread, int readRespKey )", "parent": 434, "children": [437, 441, 443, 444, 446], "start_point": {"row": 58, "column": 17}, "end_point": {"row": 58, "column": 61}}, {"id": 437, "type": "binary_expression", "text": "NicCmd* cmd", "parent": 436, "children": [438, 439, 440], "start_point": {"row": 58, "column": 19}, "end_point": {"row": 58, "column": 30}}, {"id": 438, "type": "identifier", "text": "NicCmd", "parent": 437, "children": [], "start_point": {"row": 58, "column": 19}, "end_point": {"row": 58, "column": 25}}, {"id": 439, "type": "*", "text": "*", "parent": 437, "children": [], "start_point": {"row": 58, "column": 25}, "end_point": {"row": 58, "column": 26}}, {"id": 440, "type": "identifier", "text": "cmd", "parent": 437, "children": [], "start_point": {"row": 58, "column": 27}, "end_point": {"row": 58, "column": 30}}, {"id": 441, "type": "ERROR", "text": "int", "parent": 436, "children": [442], "start_point": {"row": 58, "column": 32}, "end_point": {"row": 58, "column": 35}}, {"id": 442, "type": "identifier", "text": "int", "parent": 441, "children": [], "start_point": {"row": 58, "column": 32}, "end_point": {"row": 58, "column": 35}}, {"id": 443, "type": "identifier", "text": "thread", "parent": 436, "children": [], "start_point": {"row": 58, "column": 36}, "end_point": {"row": 58, "column": 42}}, {"id": 444, "type": "ERROR", "text": "int", "parent": 436, "children": [445], "start_point": {"row": 58, "column": 44}, "end_point": {"row": 58, "column": 47}}, {"id": 445, "type": "identifier", "text": "int", "parent": 444, "children": [], "start_point": {"row": 58, "column": 44}, "end_point": {"row": 58, "column": 47}}, {"id": 446, "type": "identifier", "text": "readRespKey", "parent": 436, "children": [], "start_point": {"row": 58, "column": 48}, "end_point": {"row": 58, "column": 59}}, {"id": 447, "type": "call_expression", "text": "SendEntry(thread,cmd)", "parent": 433, "children": [448, 449], "start_point": {"row": 58, "column": 63}, "end_point": {"row": 58, "column": 84}}, {"id": 448, "type": "identifier", "text": "SendEntry", "parent": 447, "children": [], "start_point": {"row": 58, "column": 63}, "end_point": {"row": 58, "column": 72}}, {"id": 449, "type": "argument_list", "text": "(thread,cmd)", "parent": 447, "children": [450, 451], "start_point": {"row": 58, "column": 72}, "end_point": {"row": 58, "column": 84}}, {"id": 450, "type": "identifier", "text": "thread", "parent": 449, "children": [], "start_point": {"row": 58, "column": 73}, "end_point": {"row": 58, "column": 79}}, {"id": 451, "type": "identifier", "text": "cmd", "parent": 449, "children": [], "start_point": {"row": 58, "column": 80}, "end_point": {"row": 58, "column": 83}}, {"id": 452, "type": "assignment_expression", "text": "m_streamHdr.type = StreamHdr", "parent": 432, "children": [453, 456, 457], "start_point": {"row": 59, "column": 5}, "end_point": {"row": 59, "column": 33}}, {"id": 453, "type": "field_expression", "text": "m_streamHdr.type", "parent": 452, "children": [454, 455], "start_point": {"row": 59, "column": 5}, "end_point": {"row": 59, "column": 21}}, {"id": 454, "type": "identifier", "text": "m_streamHdr", "parent": 453, "children": [], "start_point": {"row": 59, "column": 5}, "end_point": {"row": 59, "column": 16}}, {"id": 455, "type": "field_identifier", "text": "type", "parent": 453, "children": [], "start_point": {"row": 59, "column": 17}, "end_point": {"row": 59, "column": 21}}, {"id": 456, "type": "=", "text": "=", "parent": 452, "children": [], "start_point": {"row": 59, "column": 22}, "end_point": {"row": 59, "column": 23}}, {"id": 457, "type": "identifier", "text": "StreamHdr", "parent": 452, "children": [], "start_point": {"row": 59, "column": 24}, "end_point": {"row": 59, "column": 33}}, {"id": 458, "type": "ERROR", "text": "::ReadReq", "parent": 432, "children": [459], "start_point": {"row": 59, "column": 33}, "end_point": {"row": 59, "column": 42}}, {"id": 459, "type": "identifier", "text": "ReadReq", "parent": 458, "children": [], "start_point": {"row": 59, "column": 35}, "end_point": {"row": 59, "column": 42}}, {"id": 460, "type": "assignment_expression", "text": "m_streamHdr.payloadLength = 0", "parent": 432, "children": [461, 464, 465], "start_point": {"row": 60, "column": 5}, "end_point": {"row": 60, "column": 34}}, {"id": 461, "type": "field_expression", "text": "m_streamHdr.payloadLength", "parent": 460, "children": [462, 463], "start_point": {"row": 60, "column": 5}, "end_point": {"row": 60, "column": 30}}, {"id": 462, "type": "identifier", "text": "m_streamHdr", "parent": 461, "children": [], "start_point": {"row": 60, "column": 5}, "end_point": {"row": 60, "column": 16}}, {"id": 463, "type": "field_identifier", "text": "payloadLength", "parent": 461, "children": [], "start_point": {"row": 60, "column": 17}, "end_point": {"row": 60, "column": 30}}, {"id": 464, "type": "=", "text": "=", "parent": 460, "children": [], "start_point": {"row": 60, "column": 31}, "end_point": {"row": 60, "column": 32}}, {"id": 465, "type": "number_literal", "text": "0", "parent": 460, "children": [], "start_point": {"row": 60, "column": 33}, "end_point": {"row": 60, "column": 34}}, {"id": 466, "type": "assignment_expression", "text": "m_streamHdr.data.rdma.memRgnKey = cmd->data.read.key", "parent": 432, "children": [467, 474, 475], "start_point": {"row": 61, "column": 5}, "end_point": {"row": 61, "column": 57}}, {"id": 467, "type": "field_expression", "text": "m_streamHdr.data.rdma.memRgnKey", "parent": 466, "children": [468, 473], "start_point": {"row": 61, "column": 5}, "end_point": {"row": 61, "column": 36}}, {"id": 468, "type": "field_expression", "text": "m_streamHdr.data.rdma", "parent": 467, "children": [469, 472], "start_point": {"row": 61, "column": 5}, "end_point": {"row": 61, "column": 26}}, {"id": 469, "type": "field_expression", "text": "m_streamHdr.data", "parent": 468, "children": [470, 471], "start_point": {"row": 61, "column": 5}, "end_point": {"row": 61, "column": 21}}, {"id": 470, "type": "identifier", "text": "m_streamHdr", "parent": 469, "children": [], "start_point": {"row": 61, "column": 5}, "end_point": {"row": 61, "column": 16}}, {"id": 471, "type": "field_identifier", "text": "data", "parent": 469, "children": [], "start_point": {"row": 61, "column": 17}, "end_point": {"row": 61, "column": 21}}, {"id": 472, "type": "field_identifier", "text": "rdma", "parent": 468, "children": [], "start_point": {"row": 61, "column": 22}, "end_point": {"row": 61, "column": 26}}, {"id": 473, "type": "field_identifier", "text": "memRgnKey", "parent": 467, "children": [], "start_point": {"row": 61, "column": 27}, "end_point": {"row": 61, "column": 36}}, {"id": 474, "type": "=", "text": "=", "parent": 466, "children": [], "start_point": {"row": 61, "column": 37}, "end_point": {"row": 61, "column": 38}}, {"id": 475, "type": "field_expression", "text": "cmd->data.read.key", "parent": 466, "children": [476, 481], "start_point": {"row": 61, "column": 39}, "end_point": {"row": 61, "column": 57}}, {"id": 476, "type": "field_expression", "text": "cmd->data.read", "parent": 475, "children": [477, 480], "start_point": {"row": 61, "column": 39}, "end_point": {"row": 61, "column": 53}}, {"id": 477, "type": "field_expression", "text": "cmd->data", "parent": 476, "children": [478, 479], "start_point": {"row": 61, "column": 39}, "end_point": {"row": 61, "column": 48}}, {"id": 478, "type": "identifier", "text": "cmd", "parent": 477, "children": [], "start_point": {"row": 61, "column": 39}, "end_point": {"row": 61, "column": 42}}, {"id": 479, "type": "field_identifier", "text": "data", "parent": 477, "children": [], "start_point": {"row": 61, "column": 44}, "end_point": {"row": 61, "column": 48}}, {"id": 480, "type": "field_identifier", "text": "read", "parent": 476, "children": [], "start_point": {"row": 61, "column": 49}, "end_point": {"row": 61, "column": 53}}, {"id": 481, "type": "field_identifier", "text": "key", "parent": 475, "children": [], "start_point": {"row": 61, "column": 54}, "end_point": {"row": 61, "column": 57}}, {"id": 482, "type": "assignment_expression", "text": "m_streamHdr.data.rdma.offset = cmd->data.read.offset", "parent": 432, "children": [483, 490, 491], "start_point": {"row": 62, "column": 5}, "end_point": {"row": 62, "column": 57}}, {"id": 483, "type": "field_expression", "text": "m_streamHdr.data.rdma.offset", "parent": 482, "children": [484, 489], "start_point": {"row": 62, "column": 5}, "end_point": {"row": 62, "column": 33}}, {"id": 484, "type": "field_expression", "text": "m_streamHdr.data.rdma", "parent": 483, "children": [485, 488], "start_point": {"row": 62, "column": 5}, "end_point": {"row": 62, "column": 26}}, {"id": 485, "type": "field_expression", "text": "m_streamHdr.data", "parent": 484, "children": [486, 487], "start_point": {"row": 62, "column": 5}, "end_point": {"row": 62, "column": 21}}, {"id": 486, "type": "identifier", "text": "m_streamHdr", "parent": 485, "children": [], "start_point": {"row": 62, "column": 5}, "end_point": {"row": 62, "column": 16}}, {"id": 487, "type": "field_identifier", "text": "data", "parent": 485, "children": [], "start_point": {"row": 62, "column": 17}, "end_point": {"row": 62, "column": 21}}, {"id": 488, "type": "field_identifier", "text": "rdma", "parent": 484, "children": [], "start_point": {"row": 62, "column": 22}, "end_point": {"row": 62, "column": 26}}, {"id": 489, "type": "field_identifier", "text": "offset", "parent": 483, "children": [], "start_point": {"row": 62, "column": 27}, "end_point": {"row": 62, "column": 33}}, {"id": 490, "type": "=", "text": "=", "parent": 482, "children": [], "start_point": {"row": 62, "column": 34}, "end_point": {"row": 62, "column": 35}}, {"id": 491, "type": "field_expression", "text": "cmd->data.read.offset", "parent": 482, "children": [492, 497], "start_point": {"row": 62, "column": 36}, "end_point": {"row": 62, "column": 57}}, {"id": 492, "type": "field_expression", "text": "cmd->data.read", "parent": 491, "children": [493, 496], "start_point": {"row": 62, "column": 36}, "end_point": {"row": 62, "column": 50}}, {"id": 493, "type": "field_expression", "text": "cmd->data", "parent": 492, "children": [494, 495], "start_point": {"row": 62, "column": 36}, "end_point": {"row": 62, "column": 45}}, {"id": 494, "type": "identifier", "text": "cmd", "parent": 493, "children": [], "start_point": {"row": 62, "column": 36}, "end_point": {"row": 62, "column": 39}}, {"id": 495, "type": "field_identifier", "text": "data", "parent": 493, "children": [], "start_point": {"row": 62, "column": 41}, "end_point": {"row": 62, "column": 45}}, {"id": 496, "type": "field_identifier", "text": "read", "parent": 492, "children": [], "start_point": {"row": 62, "column": 46}, "end_point": {"row": 62, "column": 50}}, {"id": 497, "type": "field_identifier", "text": "offset", "parent": 491, "children": [], "start_point": {"row": 62, "column": 51}, "end_point": {"row": 62, "column": 57}}, {"id": 498, "type": "assignment_expression", "text": "m_streamHdr.data.rdma.readRespKey = readRespKey", "parent": 432, "children": [499, 506, 507], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 49}}, {"id": 499, "type": "field_expression", "text": "m_streamHdr.data.rdma.readRespKey", "parent": 498, "children": [500, 505], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 35}}, {"id": 500, "type": "field_expression", "text": "m_streamHdr.data.rdma", "parent": 499, "children": [501, 504], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 23}}, {"id": 501, "type": "field_expression", "text": "m_streamHdr.data", "parent": 500, "children": [502, 503], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 18}}, {"id": 502, "type": "identifier", "text": "m_streamHdr", "parent": 501, "children": [], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 13}}, {"id": 503, "type": "field_identifier", "text": "data", "parent": 501, "children": [], "start_point": {"row": 63, "column": 14}, "end_point": {"row": 63, "column": 18}}, {"id": 504, "type": "field_identifier", "text": "rdma", "parent": 500, "children": [], "start_point": {"row": 63, "column": 19}, "end_point": {"row": 63, "column": 23}}, {"id": 505, "type": "field_identifier", "text": "readRespKey", "parent": 499, "children": [], "start_point": {"row": 63, "column": 24}, "end_point": {"row": 63, "column": 35}}, {"id": 506, "type": "=", "text": "=", "parent": 498, "children": [], "start_point": {"row": 63, "column": 36}, "end_point": {"row": 63, "column": 37}}, {"id": 507, "type": "identifier", "text": "readRespKey", "parent": 498, "children": [], "start_point": {"row": 63, "column": 38}, "end_point": {"row": 63, "column": 49}}, {"id": 508, "type": "assignment_expression", "text": "m_streamHdr.data.rdma.readLength = cmd->data.read.len", "parent": 432, "children": [509, 516, 517], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 55}}, {"id": 509, "type": "field_expression", "text": "m_streamHdr.data.rdma.readLength", "parent": 508, "children": [510, 515], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 34}}, {"id": 510, "type": "field_expression", "text": "m_streamHdr.data.rdma", "parent": 509, "children": [511, 514], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 23}}, {"id": 511, "type": "field_expression", "text": "m_streamHdr.data", "parent": 510, "children": [512, 513], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 18}}, {"id": 512, "type": "identifier", "text": "m_streamHdr", "parent": 511, "children": [], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 13}}, {"id": 513, "type": "field_identifier", "text": "data", "parent": 511, "children": [], "start_point": {"row": 64, "column": 14}, "end_point": {"row": 64, "column": 18}}, {"id": 514, "type": "field_identifier", "text": "rdma", "parent": 510, "children": [], "start_point": {"row": 64, "column": 19}, "end_point": {"row": 64, "column": 23}}, {"id": 515, "type": "field_identifier", "text": "readLength", "parent": 509, "children": [], "start_point": {"row": 64, "column": 24}, "end_point": {"row": 64, "column": 34}}, {"id": 516, "type": "=", "text": "=", "parent": 508, "children": [], "start_point": {"row": 64, "column": 35}, "end_point": {"row": 64, "column": 36}}, {"id": 517, "type": "field_expression", "text": "cmd->data.read.len", "parent": 508, "children": [518, 523], "start_point": {"row": 64, "column": 37}, "end_point": {"row": 64, "column": 55}}, {"id": 518, "type": "field_expression", "text": "cmd->data.read", "parent": 517, "children": [519, 522], "start_point": {"row": 64, "column": 37}, "end_point": {"row": 64, "column": 51}}, {"id": 519, "type": "field_expression", "text": "cmd->data", "parent": 518, "children": [520, 521], "start_point": {"row": 64, "column": 37}, "end_point": {"row": 64, "column": 46}}, {"id": 520, "type": "identifier", "text": "cmd", "parent": 519, "children": [], "start_point": {"row": 64, "column": 37}, "end_point": {"row": 64, "column": 40}}, {"id": 521, "type": "field_identifier", "text": "data", "parent": 519, "children": [], "start_point": {"row": 64, "column": 42}, "end_point": {"row": 64, "column": 46}}, {"id": 522, "type": "field_identifier", "text": "read", "parent": 518, "children": [], "start_point": {"row": 64, "column": 47}, "end_point": {"row": 64, "column": 51}}, {"id": 523, "type": "field_identifier", "text": "len", "parent": 517, "children": [], "start_point": {"row": 64, "column": 52}, "end_point": {"row": 64, "column": 55}}, {"id": 524, "type": "function_definition", "text": "int getLength() { return 0; }", "parent": 428, "children": [525, 526], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 30}}, {"id": 525, "type": "primitive_type", "text": "int", "parent": 524, "children": [], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 4}}, {"id": 526, "type": "function_declarator", "text": "getLength()", "parent": 524, "children": [527, 528], "start_point": {"row": 69, "column": 5}, "end_point": {"row": 69, "column": 16}}, {"id": 527, "type": "identifier", "text": "getLength", "parent": 526, "children": [], "start_point": {"row": 69, "column": 5}, "end_point": {"row": 69, "column": 14}}, {"id": 528, "type": "parameter_list", "text": "()", "parent": 526, "children": [], "start_point": {"row": 69, "column": 14}, "end_point": {"row": 69, "column": 16}}, {"id": 529, "type": "return_statement", "text": "return 0;", "parent": 524, "children": [530], "start_point": {"row": 69, "column": 19}, "end_point": {"row": 69, "column": 28}}, {"id": 530, "type": "number_literal", "text": "0", "parent": 529, "children": [], "start_point": {"row": 69, "column": 26}, "end_point": {"row": 69, "column": 27}}, {"id": 531, "type": "function_definition", "text": "int getAddr() { return 0; }", "parent": 428, "children": [532, 533], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 28}}, {"id": 532, "type": "primitive_type", "text": "int", "parent": 531, "children": [], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 4}}, {"id": 533, "type": "function_declarator", "text": "getAddr()", "parent": 531, "children": [534, 535], "start_point": {"row": 70, "column": 5}, "end_point": {"row": 70, "column": 14}}, {"id": 534, "type": "identifier", "text": "getAddr", "parent": 533, "children": [], "start_point": {"row": 70, "column": 5}, "end_point": {"row": 70, "column": 12}}, {"id": 535, "type": "parameter_list", "text": "()", "parent": 533, "children": [], "start_point": {"row": 70, "column": 12}, "end_point": {"row": 70, "column": 14}}, {"id": 536, "type": "return_statement", "text": "return 0;", "parent": 531, "children": [537], "start_point": {"row": 70, "column": 17}, "end_point": {"row": 70, "column": 26}}, {"id": 537, "type": "number_literal", "text": "0", "parent": 536, "children": [], "start_point": {"row": 70, "column": 24}, "end_point": {"row": 70, "column": 25}}, {"id": 538, "type": "function_definition", "text": "int getCqId() { return -1; }", "parent": 428, "children": [539, 540], "start_point": {"row": 71, "column": 1}, "end_point": {"row": 71, "column": 29}}, {"id": 539, "type": "primitive_type", "text": "int", "parent": 538, "children": [], "start_point": {"row": 71, "column": 1}, "end_point": {"row": 71, "column": 4}}, {"id": 540, "type": "function_declarator", "text": "getCqId()", "parent": 538, "children": [541, 542], "start_point": {"row": 71, "column": 5}, "end_point": {"row": 71, "column": 14}}, {"id": 541, "type": "identifier", "text": "getCqId", "parent": 540, "children": [], "start_point": {"row": 71, "column": 5}, "end_point": {"row": 71, "column": 12}}, {"id": 542, "type": "parameter_list", "text": "()", "parent": 540, "children": [], "start_point": {"row": 71, "column": 12}, "end_point": {"row": 71, "column": 14}}, {"id": 543, "type": "return_statement", "text": "return -1;", "parent": 538, "children": [544], "start_point": {"row": 71, "column": 17}, "end_point": {"row": 71, "column": 27}}, {"id": 544, "type": "number_literal", "text": "-1", "parent": 543, "children": [], "start_point": {"row": 71, "column": 24}, "end_point": {"row": 71, "column": 26}}, {"id": 545, "type": "function_definition", "text": "int getContext() { return 0; }", "parent": 428, "children": [546, 547], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 31}}, {"id": 546, "type": "primitive_type", "text": "int", "parent": 545, "children": [], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 4}}, {"id": 547, "type": "function_declarator", "text": "getContext()", "parent": 545, "children": [548, 549], "start_point": {"row": 72, "column": 5}, "end_point": {"row": 72, "column": 17}}, {"id": 548, "type": "identifier", "text": "getContext", "parent": 547, "children": [], "start_point": {"row": 72, "column": 5}, "end_point": {"row": 72, "column": 15}}, {"id": 549, "type": "parameter_list", "text": "()", "parent": 547, "children": [], "start_point": {"row": 72, "column": 15}, "end_point": {"row": 72, "column": 17}}, {"id": 550, "type": "return_statement", "text": "return 0;", "parent": 545, "children": [551], "start_point": {"row": 72, "column": 20}, "end_point": {"row": 72, "column": 29}}, {"id": 551, "type": "number_literal", "text": "0", "parent": 550, "children": [], "start_point": {"row": 72, "column": 27}, "end_point": {"row": 72, "column": 28}}, {"id": 552, "type": "function_definition", "text": "int getDestNode() { return cmd->data.read.node; }", "parent": 428, "children": [553, 554], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 50}}, {"id": 553, "type": "primitive_type", "text": "int", "parent": 552, "children": [], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 4}}, {"id": 554, "type": "function_declarator", "text": "getDestNode()", "parent": 552, "children": [555, 556], "start_point": {"row": 73, "column": 5}, "end_point": {"row": 73, "column": 18}}, {"id": 555, "type": "identifier", "text": "getDestNode", "parent": 554, "children": [], "start_point": {"row": 73, "column": 5}, "end_point": {"row": 73, "column": 16}}, {"id": 556, "type": "parameter_list", "text": "()", "parent": 554, "children": [], "start_point": {"row": 73, "column": 16}, "end_point": {"row": 73, "column": 18}}, {"id": 557, "type": "return_statement", "text": "return cmd->data.read.node;", "parent": 552, "children": [558], "start_point": {"row": 73, "column": 21}, "end_point": {"row": 73, "column": 48}}, {"id": 558, "type": "field_expression", "text": "cmd->data.read.node", "parent": 557, "children": [559, 564], "start_point": {"row": 73, "column": 28}, "end_point": {"row": 73, "column": 47}}, {"id": 559, "type": "field_expression", "text": "cmd->data.read", "parent": 558, "children": [560, 563], "start_point": {"row": 73, "column": 28}, "end_point": {"row": 73, "column": 42}}, {"id": 560, "type": "field_expression", "text": "cmd->data", "parent": 559, "children": [561, 562], "start_point": {"row": 73, "column": 28}, "end_point": {"row": 73, "column": 37}}, {"id": 561, "type": "identifier", "text": "cmd", "parent": 560, "children": [], "start_point": {"row": 73, "column": 28}, "end_point": {"row": 73, "column": 31}}, {"id": 562, "type": "field_identifier", "text": "data", "parent": 560, "children": [], "start_point": {"row": 73, "column": 33}, "end_point": {"row": 73, "column": 37}}, {"id": 563, "type": "field_identifier", "text": "read", "parent": 559, "children": [], "start_point": {"row": 73, "column": 38}, "end_point": {"row": 73, "column": 42}}, {"id": 564, "type": "field_identifier", "text": "node", "parent": 558, "children": [], "start_point": {"row": 73, "column": 43}, "end_point": {"row": 73, "column": 47}}, {"id": 565, "type": "function_definition", "text": "int getDestPid() { return cmd->data.read.pe; }", "parent": 428, "children": [566, 567], "start_point": {"row": 74, "column": 1}, "end_point": {"row": 74, "column": 47}}, {"id": 566, "type": "primitive_type", "text": "int", "parent": 565, "children": [], "start_point": {"row": 74, "column": 1}, "end_point": {"row": 74, "column": 4}}, {"id": 567, "type": "function_declarator", "text": "getDestPid()", "parent": 565, "children": [568, 569], "start_point": {"row": 74, "column": 5}, "end_point": {"row": 74, "column": 17}}, {"id": 568, "type": "identifier", "text": "getDestPid", "parent": 567, "children": [], "start_point": {"row": 74, "column": 5}, "end_point": {"row": 74, "column": 15}}, {"id": 569, "type": "parameter_list", "text": "()", "parent": 567, "children": [], "start_point": {"row": 74, "column": 15}, "end_point": {"row": 74, "column": 17}}, {"id": 570, "type": "return_statement", "text": "return cmd->data.read.pe;", "parent": 565, "children": [571], "start_point": {"row": 74, "column": 20}, "end_point": {"row": 74, "column": 45}}, {"id": 571, "type": "field_expression", "text": "cmd->data.read.pe", "parent": 570, "children": [572, 577], "start_point": {"row": 74, "column": 27}, "end_point": {"row": 74, "column": 44}}, {"id": 572, "type": "field_expression", "text": "cmd->data.read", "parent": 571, "children": [573, 576], "start_point": {"row": 74, "column": 27}, "end_point": {"row": 74, "column": 41}}, {"id": 573, "type": "field_expression", "text": "cmd->data", "parent": 572, "children": [574, 575], "start_point": {"row": 74, "column": 27}, "end_point": {"row": 74, "column": 36}}, {"id": 574, "type": "identifier", "text": "cmd", "parent": 573, "children": [], "start_point": {"row": 74, "column": 27}, "end_point": {"row": 74, "column": 30}}, {"id": 575, "type": "field_identifier", "text": "data", "parent": 573, "children": [], "start_point": {"row": 74, "column": 32}, "end_point": {"row": 74, "column": 36}}, {"id": 576, "type": "field_identifier", "text": "read", "parent": 572, "children": [], "start_point": {"row": 74, "column": 37}, "end_point": {"row": 74, "column": 41}}, {"id": 577, "type": "field_identifier", "text": "pe", "parent": 571, "children": [], "start_point": {"row": 74, "column": 42}, "end_point": {"row": 74, "column": 44}}, {"id": 578, "type": "labeled_statement", "text": "private:\n};", "parent": 428, "children": [], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 76, "column": 2}}, {"id": 579, "type": "function_definition", "text": "class ReadRespSendEntry : public SendEntry {\n public:\n ReadRespSendEntry( int thread, int destNode, int destPid, Addr_t srcAddr, int length, int readRespKey ): \n\t\tSendEntry(thread), m_destNode(destNode), m_destPid(destPid), m_srcAddr(srcAddr), m_length(length) \n\t{\n \tm_streamHdr.type = StreamHdr::ReadResp;\n \tm_streamHdr.payloadLength = m_length;\n\t\tm_streamHdr.data.rdma.readRespKey = readRespKey;\n\t}", "parent": 428, "children": [580, 581], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 86, "column": 2}}, {"id": 580, "type": "identifier", "text": "ReadRespSendEntry", "parent": 579, "children": [], "start_point": {"row": 78, "column": 6}, "end_point": {"row": 78, "column": 23}}, {"id": 581, "type": "ERROR", "text": ": public SendEntry", "parent": 579, "children": [582], "start_point": {"row": 78, "column": 24}, "end_point": {"row": 78, "column": 42}}, {"id": 582, "type": "identifier", "text": "SendEntry", "parent": 581, "children": [], "start_point": {"row": 78, "column": 33}, "end_point": {"row": 78, "column": 42}}, {"id": 583, "type": "labeled_statement", "text": "public:\n ReadRespSendEntry( int thread, int destNode, int destPid, Addr_t srcAddr, int length, int readRespKey ): \n\t\tSendEntry(thread), m_destNode(destNode), m_destPid(destPid), m_srcAddr(srcAddr), m_length(length) \n\t{\n \tm_streamHdr.type = StreamHdr::ReadResp;", "parent": 579, "children": [584], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 83, "column": 44}}, {"id": 584, "type": "declaration", "text": "ReadRespSendEntry( int thread, int destNode, int destPid, Addr_t srcAddr, int length, int readRespKey ): \n\t\tSendEntry(thread), m_destNode(destNode), m_destPid(destPid), m_srcAddr(srcAddr), m_length(length) \n\t{\n \tm_streamHdr.type = StreamHdr::ReadResp;", "parent": 583, "children": [585, 589, 590, 592, 593, 595, 596, 598, 599, 601, 602, 605, 610, 615, 620, 625, 636], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 83, "column": 44}}, {"id": 585, "type": "macro_type_specifier", "text": "ReadRespSendEntry( int", "parent": 584, "children": [586, 587], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 26}}, {"id": 586, "type": "identifier", "text": "ReadRespSendEntry", "parent": 585, "children": [], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 21}}, {"id": 587, "type": "type_descriptor", "text": "int", "parent": 585, "children": [588], "start_point": {"row": 80, "column": 23}, "end_point": {"row": 80, "column": 26}}, {"id": 588, "type": "primitive_type", "text": "int", "parent": 587, "children": [], "start_point": {"row": 80, "column": 23}, "end_point": {"row": 80, "column": 26}}, {"id": 589, "type": "identifier", "text": "thread", "parent": 584, "children": [], "start_point": {"row": 80, "column": 27}, "end_point": {"row": 80, "column": 33}}, {"id": 590, "type": "ERROR", "text": "int", "parent": 584, "children": [591], "start_point": {"row": 80, "column": 35}, "end_point": {"row": 80, "column": 38}}, {"id": 591, "type": "identifier", "text": "int", "parent": 590, "children": [], "start_point": {"row": 80, "column": 35}, "end_point": {"row": 80, "column": 38}}, {"id": 592, "type": "identifier", "text": "destNode", "parent": 584, "children": [], "start_point": {"row": 80, "column": 39}, "end_point": {"row": 80, "column": 47}}, {"id": 593, "type": "ERROR", "text": "int", "parent": 584, "children": [594], "start_point": {"row": 80, "column": 49}, "end_point": {"row": 80, "column": 52}}, {"id": 594, "type": "identifier", "text": "int", "parent": 593, "children": [], "start_point": {"row": 80, "column": 49}, "end_point": {"row": 80, "column": 52}}, {"id": 595, "type": "identifier", "text": "destPid", "parent": 584, "children": [], "start_point": {"row": 80, "column": 53}, "end_point": {"row": 80, "column": 60}}, {"id": 596, "type": "ERROR", "text": "Addr_t", "parent": 584, "children": [597], "start_point": {"row": 80, "column": 62}, "end_point": {"row": 80, "column": 68}}, {"id": 597, "type": "identifier", "text": "Addr_t", "parent": 596, "children": [], "start_point": {"row": 80, "column": 62}, "end_point": {"row": 80, "column": 68}}, {"id": 598, "type": "identifier", "text": "srcAddr", "parent": 584, "children": [], "start_point": {"row": 80, "column": 69}, "end_point": {"row": 80, "column": 76}}, {"id": 599, "type": "ERROR", "text": "int", "parent": 584, "children": [600], "start_point": {"row": 80, "column": 78}, "end_point": {"row": 80, "column": 81}}, {"id": 600, "type": "identifier", "text": "int", "parent": 599, "children": [], "start_point": {"row": 80, "column": 78}, "end_point": {"row": 80, "column": 81}}, {"id": 601, "type": "identifier", "text": "length", "parent": 584, "children": [], "start_point": {"row": 80, "column": 82}, "end_point": {"row": 80, "column": 88}}, {"id": 602, "type": "ERROR", "text": "int readRespKey ):", "parent": 584, "children": [603, 604], "start_point": {"row": 80, "column": 90}, "end_point": {"row": 80, "column": 108}}, {"id": 603, "type": "identifier", "text": "int", "parent": 602, "children": [], "start_point": {"row": 80, "column": 90}, "end_point": {"row": 80, "column": 93}}, {"id": 604, "type": "identifier", "text": "readRespKey", "parent": 602, "children": [], "start_point": {"row": 80, "column": 94}, "end_point": {"row": 80, "column": 105}}, {"id": 605, "type": "function_declarator", "text": "SendEntry(thread)", "parent": 584, "children": [606, 607], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 19}}, {"id": 606, "type": "identifier", "text": "SendEntry", "parent": 605, "children": [], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 11}}, {"id": 607, "type": "parameter_list", "text": "(thread)", "parent": 605, "children": [608], "start_point": {"row": 81, "column": 11}, "end_point": {"row": 81, "column": 19}}, {"id": 608, "type": "parameter_declaration", "text": "thread", "parent": 607, "children": [609], "start_point": {"row": 81, "column": 12}, "end_point": {"row": 81, "column": 18}}, {"id": 609, "type": "type_identifier", "text": "thread", "parent": 608, "children": [], "start_point": {"row": 81, "column": 12}, "end_point": {"row": 81, "column": 18}}, {"id": 610, "type": "function_declarator", "text": "m_destNode(destNode)", "parent": 584, "children": [611, 612], "start_point": {"row": 81, "column": 21}, "end_point": {"row": 81, "column": 41}}, {"id": 611, "type": "identifier", "text": "m_destNode", "parent": 610, "children": [], "start_point": {"row": 81, "column": 21}, "end_point": {"row": 81, "column": 31}}, {"id": 612, "type": "parameter_list", "text": "(destNode)", "parent": 610, "children": [613], "start_point": {"row": 81, "column": 31}, "end_point": {"row": 81, "column": 41}}, {"id": 613, "type": "parameter_declaration", "text": "destNode", "parent": 612, "children": [614], "start_point": {"row": 81, "column": 32}, "end_point": {"row": 81, "column": 40}}, {"id": 614, "type": "type_identifier", "text": "destNode", "parent": 613, "children": [], "start_point": {"row": 81, "column": 32}, "end_point": {"row": 81, "column": 40}}, {"id": 615, "type": "function_declarator", "text": "m_destPid(destPid)", "parent": 584, "children": [616, 617], "start_point": {"row": 81, "column": 43}, "end_point": {"row": 81, "column": 61}}, {"id": 616, "type": "identifier", "text": "m_destPid", "parent": 615, "children": [], "start_point": {"row": 81, "column": 43}, "end_point": {"row": 81, "column": 52}}, {"id": 617, "type": "parameter_list", "text": "(destPid)", "parent": 615, "children": [618], "start_point": {"row": 81, "column": 52}, "end_point": {"row": 81, "column": 61}}, {"id": 618, "type": "parameter_declaration", "text": "destPid", "parent": 617, "children": [619], "start_point": {"row": 81, "column": 53}, "end_point": {"row": 81, "column": 60}}, {"id": 619, "type": "type_identifier", "text": "destPid", "parent": 618, "children": [], "start_point": {"row": 81, "column": 53}, "end_point": {"row": 81, "column": 60}}, {"id": 620, "type": "function_declarator", "text": "m_srcAddr(srcAddr)", "parent": 584, "children": [621, 622], "start_point": {"row": 81, "column": 63}, "end_point": {"row": 81, "column": 81}}, {"id": 621, "type": "identifier", "text": "m_srcAddr", "parent": 620, "children": [], "start_point": {"row": 81, "column": 63}, "end_point": {"row": 81, "column": 72}}, {"id": 622, "type": "parameter_list", "text": "(srcAddr)", "parent": 620, "children": [623], "start_point": {"row": 81, "column": 72}, "end_point": {"row": 81, "column": 81}}, {"id": 623, "type": "parameter_declaration", "text": "srcAddr", "parent": 622, "children": [624], "start_point": {"row": 81, "column": 73}, "end_point": {"row": 81, "column": 80}}, {"id": 624, "type": "type_identifier", "text": "srcAddr", "parent": 623, "children": [], "start_point": {"row": 81, "column": 73}, "end_point": {"row": 81, "column": 80}}, {"id": 625, "type": "init_declarator", "text": "m_length(length) \n\t{\n \tm_streamHdr.type = StreamHdr", "parent": 584, "children": [626, 631, 634, 635], "start_point": {"row": 81, "column": 83}, "end_point": {"row": 83, "column": 33}}, {"id": 626, "type": "function_declarator", "text": "m_length(length)", "parent": 625, "children": [627, 628], "start_point": {"row": 81, "column": 83}, "end_point": {"row": 81, "column": 99}}, {"id": 627, "type": "identifier", "text": "m_length", "parent": 626, "children": [], "start_point": {"row": 81, "column": 83}, "end_point": {"row": 81, "column": 91}}, {"id": 628, "type": "parameter_list", "text": "(length)", "parent": 626, "children": [629], "start_point": {"row": 81, "column": 91}, "end_point": {"row": 81, "column": 99}}, {"id": 629, "type": "parameter_declaration", "text": "length", "parent": 628, "children": [630], "start_point": {"row": 81, "column": 92}, "end_point": {"row": 81, "column": 98}}, {"id": 630, "type": "type_identifier", "text": "length", "parent": 629, "children": [], "start_point": {"row": 81, "column": 92}, "end_point": {"row": 81, "column": 98}}, {"id": 631, "type": "ERROR", "text": "{\n \tm_streamHdr.type", "parent": 625, "children": [632, 633], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 83, "column": 21}}, {"id": 632, "type": "identifier", "text": "m_streamHdr", "parent": 631, "children": [], "start_point": {"row": 83, "column": 5}, "end_point": {"row": 83, "column": 16}}, {"id": 633, "type": "identifier", "text": "type", "parent": 631, "children": [], "start_point": {"row": 83, "column": 17}, "end_point": {"row": 83, "column": 21}}, {"id": 634, "type": "=", "text": "=", "parent": 625, "children": [], "start_point": {"row": 83, "column": 22}, "end_point": {"row": 83, "column": 23}}, {"id": 635, "type": "identifier", "text": "StreamHdr", "parent": 625, "children": [], "start_point": {"row": 83, "column": 24}, "end_point": {"row": 83, "column": 33}}, {"id": 636, "type": "ERROR", "text": "::ReadResp", "parent": 584, "children": [637], "start_point": {"row": 83, "column": 33}, "end_point": {"row": 83, "column": 43}}, {"id": 637, "type": "identifier", "text": "ReadResp", "parent": 636, "children": [], "start_point": {"row": 83, "column": 35}, "end_point": {"row": 83, "column": 43}}, {"id": 638, "type": "assignment_expression", "text": "m_streamHdr.payloadLength = m_length", "parent": 579, "children": [639, 642, 643], "start_point": {"row": 84, "column": 5}, "end_point": {"row": 84, "column": 41}}, {"id": 639, "type": "field_expression", "text": "m_streamHdr.payloadLength", "parent": 638, "children": [640, 641], "start_point": {"row": 84, "column": 5}, "end_point": {"row": 84, "column": 30}}, {"id": 640, "type": "identifier", "text": "m_streamHdr", "parent": 639, "children": [], "start_point": {"row": 84, "column": 5}, "end_point": {"row": 84, "column": 16}}, {"id": 641, "type": "field_identifier", "text": "payloadLength", "parent": 639, "children": [], "start_point": {"row": 84, "column": 17}, "end_point": {"row": 84, "column": 30}}, {"id": 642, "type": "=", "text": "=", "parent": 638, "children": [], "start_point": {"row": 84, "column": 31}, "end_point": {"row": 84, "column": 32}}, {"id": 643, "type": "identifier", "text": "m_length", "parent": 638, "children": [], "start_point": {"row": 84, "column": 33}, "end_point": {"row": 84, "column": 41}}, {"id": 644, "type": "assignment_expression", "text": "m_streamHdr.data.rdma.readRespKey = readRespKey", "parent": 579, "children": [645, 652, 653], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 85, "column": 49}}, {"id": 645, "type": "field_expression", "text": "m_streamHdr.data.rdma.readRespKey", "parent": 644, "children": [646, 651], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 85, "column": 35}}, {"id": 646, "type": "field_expression", "text": "m_streamHdr.data.rdma", "parent": 645, "children": [647, 650], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 85, "column": 23}}, {"id": 647, "type": "field_expression", "text": "m_streamHdr.data", "parent": 646, "children": [648, 649], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 85, "column": 18}}, {"id": 648, "type": "identifier", "text": "m_streamHdr", "parent": 647, "children": [], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 85, "column": 13}}, {"id": 649, "type": "field_identifier", "text": "data", "parent": 647, "children": [], "start_point": {"row": 85, "column": 14}, "end_point": {"row": 85, "column": 18}}, {"id": 650, "type": "field_identifier", "text": "rdma", "parent": 646, "children": [], "start_point": {"row": 85, "column": 19}, "end_point": {"row": 85, "column": 23}}, {"id": 651, "type": "field_identifier", "text": "readRespKey", "parent": 645, "children": [], "start_point": {"row": 85, "column": 24}, "end_point": {"row": 85, "column": 35}}, {"id": 652, "type": "=", "text": "=", "parent": 644, "children": [], "start_point": {"row": 85, "column": 36}, "end_point": {"row": 85, "column": 37}}, {"id": 653, "type": "identifier", "text": "readRespKey", "parent": 644, "children": [], "start_point": {"row": 85, "column": 38}, "end_point": {"row": 85, "column": 49}}, {"id": 654, "type": "function_definition", "text": "int getLength() { return m_length; }", "parent": 428, "children": [655, 656], "start_point": {"row": 88, "column": 1}, "end_point": {"row": 88, "column": 37}}, {"id": 655, "type": "primitive_type", "text": "int", "parent": 654, "children": [], "start_point": {"row": 88, "column": 1}, "end_point": {"row": 88, "column": 4}}, {"id": 656, "type": "function_declarator", "text": "getLength()", "parent": 654, "children": [657, 658], "start_point": {"row": 88, "column": 5}, "end_point": {"row": 88, "column": 16}}, {"id": 657, "type": "identifier", "text": "getLength", "parent": 656, "children": [], "start_point": {"row": 88, "column": 5}, "end_point": {"row": 88, "column": 14}}, {"id": 658, "type": "parameter_list", "text": "()", "parent": 656, "children": [], "start_point": {"row": 88, "column": 14}, "end_point": {"row": 88, "column": 16}}, {"id": 659, "type": "return_statement", "text": "return m_length;", "parent": 654, "children": [660], "start_point": {"row": 88, "column": 19}, "end_point": {"row": 88, "column": 35}}, {"id": 660, "type": "identifier", "text": "m_length", "parent": 659, "children": [], "start_point": {"row": 88, "column": 26}, "end_point": {"row": 88, "column": 34}}, {"id": 661, "type": "function_definition", "text": "int getAddr() { return m_srcAddr; }", "parent": 428, "children": [662, 663], "start_point": {"row": 89, "column": 1}, "end_point": {"row": 89, "column": 36}}, {"id": 662, "type": "primitive_type", "text": "int", "parent": 661, "children": [], "start_point": {"row": 89, "column": 1}, "end_point": {"row": 89, "column": 4}}, {"id": 663, "type": "function_declarator", "text": "getAddr()", "parent": 661, "children": [664, 665], "start_point": {"row": 89, "column": 5}, "end_point": {"row": 89, "column": 14}}, {"id": 664, "type": "identifier", "text": "getAddr", "parent": 663, "children": [], "start_point": {"row": 89, "column": 5}, "end_point": {"row": 89, "column": 12}}, {"id": 665, "type": "parameter_list", "text": "()", "parent": 663, "children": [], "start_point": {"row": 89, "column": 12}, "end_point": {"row": 89, "column": 14}}, {"id": 666, "type": "return_statement", "text": "return m_srcAddr;", "parent": 661, "children": [667], "start_point": {"row": 89, "column": 17}, "end_point": {"row": 89, "column": 34}}, {"id": 667, "type": "identifier", "text": "m_srcAddr", "parent": 666, "children": [], "start_point": {"row": 89, "column": 24}, "end_point": {"row": 89, "column": 33}}, {"id": 668, "type": "function_definition", "text": "int getCqId() { return -1; }", "parent": 428, "children": [669, 670], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 29}}, {"id": 669, "type": "primitive_type", "text": "int", "parent": 668, "children": [], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 4}}, {"id": 670, "type": "function_declarator", "text": "getCqId()", "parent": 668, "children": [671, 672], "start_point": {"row": 90, "column": 5}, "end_point": {"row": 90, "column": 14}}, {"id": 671, "type": "identifier", "text": "getCqId", "parent": 670, "children": [], "start_point": {"row": 90, "column": 5}, "end_point": {"row": 90, "column": 12}}, {"id": 672, "type": "parameter_list", "text": "()", "parent": 670, "children": [], "start_point": {"row": 90, "column": 12}, "end_point": {"row": 90, "column": 14}}, {"id": 673, "type": "return_statement", "text": "return -1;", "parent": 668, "children": [674], "start_point": {"row": 90, "column": 17}, "end_point": {"row": 90, "column": 27}}, {"id": 674, "type": "number_literal", "text": "-1", "parent": 673, "children": [], "start_point": {"row": 90, "column": 24}, "end_point": {"row": 90, "column": 26}}, {"id": 675, "type": "function_definition", "text": "int getContext() { return 0; }", "parent": 428, "children": [676, 677], "start_point": {"row": 91, "column": 1}, "end_point": {"row": 91, "column": 31}}, {"id": 676, "type": "primitive_type", "text": "int", "parent": 675, "children": [], "start_point": {"row": 91, "column": 1}, "end_point": {"row": 91, "column": 4}}, {"id": 677, "type": "function_declarator", "text": "getContext()", "parent": 675, "children": [678, 679], "start_point": {"row": 91, "column": 5}, "end_point": {"row": 91, "column": 17}}, {"id": 678, "type": "identifier", "text": "getContext", "parent": 677, "children": [], "start_point": {"row": 91, "column": 5}, "end_point": {"row": 91, "column": 15}}, {"id": 679, "type": "parameter_list", "text": "()", "parent": 677, "children": [], "start_point": {"row": 91, "column": 15}, "end_point": {"row": 91, "column": 17}}, {"id": 680, "type": "return_statement", "text": "return 0;", "parent": 675, "children": [681], "start_point": {"row": 91, "column": 20}, "end_point": {"row": 91, "column": 29}}, {"id": 681, "type": "number_literal", "text": "0", "parent": 680, "children": [], "start_point": {"row": 91, "column": 27}, "end_point": {"row": 91, "column": 28}}, {"id": 682, "type": "function_definition", "text": "int getDestNode() { return m_destNode; }", "parent": 428, "children": [683, 684], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 41}}, {"id": 683, "type": "primitive_type", "text": "int", "parent": 682, "children": [], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 4}}, {"id": 684, "type": "function_declarator", "text": "getDestNode()", "parent": 682, "children": [685, 686], "start_point": {"row": 92, "column": 5}, "end_point": {"row": 92, "column": 18}}, {"id": 685, "type": "identifier", "text": "getDestNode", "parent": 684, "children": [], "start_point": {"row": 92, "column": 5}, "end_point": {"row": 92, "column": 16}}, {"id": 686, "type": "parameter_list", "text": "()", "parent": 684, "children": [], "start_point": {"row": 92, "column": 16}, "end_point": {"row": 92, "column": 18}}, {"id": 687, "type": "return_statement", "text": "return m_destNode;", "parent": 682, "children": [688], "start_point": {"row": 92, "column": 21}, "end_point": {"row": 92, "column": 39}}, {"id": 688, "type": "identifier", "text": "m_destNode", "parent": 687, "children": [], "start_point": {"row": 92, "column": 28}, "end_point": {"row": 92, "column": 38}}, {"id": 689, "type": "function_definition", "text": "int getDestPid() { return m_destPid; }", "parent": 428, "children": [690, 691], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 39}}, {"id": 690, "type": "primitive_type", "text": "int", "parent": 689, "children": [], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 4}}, {"id": 691, "type": "function_declarator", "text": "getDestPid()", "parent": 689, "children": [692, 693], "start_point": {"row": 93, "column": 5}, "end_point": {"row": 93, "column": 17}}, {"id": 692, "type": "identifier", "text": "getDestPid", "parent": 691, "children": [], "start_point": {"row": 93, "column": 5}, "end_point": {"row": 93, "column": 15}}, {"id": 693, "type": "parameter_list", "text": "()", "parent": 691, "children": [], "start_point": {"row": 93, "column": 15}, "end_point": {"row": 93, "column": 17}}, {"id": 694, "type": "return_statement", "text": "return m_destPid;", "parent": 689, "children": [695], "start_point": {"row": 93, "column": 20}, "end_point": {"row": 93, "column": 37}}, {"id": 695, "type": "identifier", "text": "m_destPid", "parent": 694, "children": [], "start_point": {"row": 93, "column": 27}, "end_point": {"row": 93, "column": 36}}, {"id": 696, "type": "labeled_statement", "text": "private:\n\tint m_srcAddr;", "parent": 428, "children": [697], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 95, "column": 15}}, {"id": 697, "type": "declaration", "text": "int m_srcAddr;", "parent": 696, "children": [698, 699], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 15}}, {"id": 698, "type": "primitive_type", "text": "int", "parent": 697, "children": [], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 4}}, {"id": 699, "type": "identifier", "text": "m_srcAddr", "parent": 697, "children": [], "start_point": {"row": 95, "column": 5}, "end_point": {"row": 95, "column": 14}}, {"id": 700, "type": "declaration", "text": "int m_length;", "parent": 428, "children": [701, 702], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 14}}, {"id": 701, "type": "primitive_type", "text": "int", "parent": 700, "children": [], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 4}}, {"id": 702, "type": "identifier", "text": "m_length", "parent": 700, "children": [], "start_point": {"row": 96, "column": 5}, "end_point": {"row": 96, "column": 13}}, {"id": 703, "type": "declaration", "text": "int m_destNode;", "parent": 428, "children": [704, 705], "start_point": {"row": 97, "column": 1}, "end_point": {"row": 97, "column": 16}}, {"id": 704, "type": "primitive_type", "text": "int", "parent": 703, "children": [], "start_point": {"row": 97, "column": 1}, "end_point": {"row": 97, "column": 4}}, {"id": 705, "type": "identifier", "text": "m_destNode", "parent": 703, "children": [], "start_point": {"row": 97, "column": 5}, "end_point": {"row": 97, "column": 15}}, {"id": 706, "type": "declaration", "text": "int m_destPid;", "parent": 428, "children": [707, 708], "start_point": {"row": 98, "column": 1}, "end_point": {"row": 98, "column": 15}}, {"id": 707, "type": "primitive_type", "text": "int", "parent": 706, "children": [], "start_point": {"row": 98, "column": 1}, "end_point": {"row": 98, "column": 4}}, {"id": 708, "type": "identifier", "text": "m_destPid", "parent": 706, "children": [], "start_point": {"row": 98, "column": 5}, "end_point": {"row": 98, "column": 14}}]}, "node_categories": {"declarations": {"functions": [0, 23, 29, 35, 36, 44, 48, 59, 69, 79, 89, 99, 109, 114, 116, 121, 123, 143, 198, 200, 211, 213, 224, 226, 237, 239, 250, 252, 263, 265, 277, 350, 352, 363, 365, 376, 378, 389, 391, 402, 404, 415, 417, 428, 524, 526, 531, 533, 538, 540, 545, 547, 552, 554, 565, 567, 579, 605, 610, 615, 620, 626, 654, 656, 661, 663, 668, 670, 675, 677, 682, 684, 689, 691], "variables": [3, 26, 41, 54, 64, 74, 84, 94, 104, 129, 132, 137, 140, 584, 608, 613, 618, 623, 629, 697, 700, 703, 706], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [19, 52, 149, 152, 159, 165, 173, 174, 179, 180, 181, 187, 191, 192, 193, 204, 205, 206, 217, 218, 219, 230, 231, 232, 243, 244, 245, 256, 257, 258, 269, 270, 271, 283, 286, 293, 299, 307, 308, 309, 315, 316, 317, 323, 324, 325, 331, 332, 333, 339, 343, 344, 345, 356, 357, 358, 369, 370, 371, 382, 383, 384, 395, 396, 397, 408, 409, 410, 421, 422, 423, 434, 437, 447, 453, 461, 467, 468, 469, 475, 476, 477, 483, 484, 485, 491, 492, 493, 499, 500, 501, 509, 510, 511, 517, 518, 519, 558, 559, 560, 571, 572, 573, 639, 645, 646, 647], "assignments": [164, 172, 186, 298, 306, 322, 338, 452, 460, 466, 482, 498, 508, 638, 644], "loops": [], "conditionals": [1, 4, 5, 8, 10, 14, 20, 22, 24, 27, 30, 37, 42, 43, 45, 49, 53, 55, 57, 60, 65, 67, 70, 75, 77, 80, 85, 87, 90, 95, 97, 100, 105, 107, 110, 117, 120, 124, 127, 130, 131, 133, 136, 139, 142, 144, 146, 150, 153, 155, 157, 158, 160, 162, 163, 166, 167, 169, 171, 175, 176, 177, 182, 183, 184, 185, 188, 189, 194, 195, 196, 197, 201, 207, 208, 209, 210, 214, 220, 221, 222, 223, 227, 233, 234, 235, 236, 240, 246, 247, 248, 249, 253, 259, 260, 261, 262, 266, 272, 273, 274, 275, 278, 280, 284, 287, 289, 291, 292, 294, 296, 297, 300, 301, 303, 305, 310, 311, 312, 313, 318, 319, 320, 321, 326, 327, 328, 329, 334, 335, 336, 337, 340, 341, 346, 347, 348, 349, 353, 359, 360, 361, 362, 366, 372, 373, 374, 375, 379, 385, 386, 387, 388, 392, 398, 399, 400, 401, 405, 411, 412, 413, 414, 418, 424, 425, 426, 427, 429, 431, 435, 438, 440, 442, 443, 445, 446, 448, 450, 451, 454, 455, 457, 459, 462, 463, 470, 471, 472, 473, 478, 479, 480, 481, 486, 487, 488, 489, 494, 495, 496, 497, 502, 503, 504, 505, 507, 512, 513, 514, 515, 520, 521, 522, 523, 527, 534, 541, 548, 555, 561, 562, 563, 564, 568, 574, 575, 576, 577, 580, 582, 585, 586, 589, 591, 592, 594, 595, 597, 598, 600, 601, 603, 604, 606, 609, 611, 614, 616, 619, 621, 624, 627, 630, 632, 633, 635, 637, 640, 641, 643, 648, 649, 650, 651, 653, 657, 660, 664, 667, 671, 678, 685, 688, 692, 695, 699, 702, 705, 708], "returns": [51, 119, 126, 203, 216, 229, 242, 255, 268, 355, 368, 381, 394, 407, 420, 529, 536, 543, 550, 557, 570, 659, 666, 673, 680, 687, 694], "exceptions": []}, "expressions": {"calls": [], "literals": [33, 63, 73, 83, 93, 103, 113, 465, 530, 537, 544, 551, 674, 681], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 0, "universal_type": "function", "name": "SendEntry", "text_snippet": "class SendEntry {\n public:\n SendEntry( int thread, NicCmd* cmd = NULL ) : cmd(cmd), thread(threa"}, {"node_id": 23, "universal_type": "function", "name": "unknown", "text_snippet": "thread(thread)"}, {"node_id": 29, "universal_type": "function", "name": "unknown", "text_snippet": "vc(0)"}, {"node_id": 35, "universal_type": "function", "name": "unknown", "text_snippet": "SendEntry() {\n\t\tif ( cmd )"}, {"node_id": 36, "universal_type": "function", "name": "unknown", "text_snippet": "SendEntry()"}, {"node_id": 44, "universal_type": "function", "name": "unknown", "text_snippet": "StreamHdr* getStreamHdr() { return &m_streamHdr; }"}, {"node_id": 48, "universal_type": "function", "name": "unknown", "text_snippet": "getStreamHdr()"}, {"node_id": 59, "universal_type": "function", "name": "unknown", "text_snippet": "getAddr()"}, {"node_id": 69, "universal_type": "function", "name": "unknown", "text_snippet": "getLength()"}, {"node_id": 79, "universal_type": "function", "name": "unknown", "text_snippet": "getCqId()"}, {"node_id": 89, "universal_type": "function", "name": "unknown", "text_snippet": "getContext()"}, {"node_id": 99, "universal_type": "function", "name": "unknown", "text_snippet": "getDestNode()"}, {"node_id": 109, "universal_type": "function", "name": "unknown", "text_snippet": "getDestPid()"}, {"node_id": 114, "universal_type": "function", "name": "getThread", "text_snippet": "int getThread() { return thread; }"}, {"node_id": 116, "universal_type": "function", "name": "unknown", "text_snippet": "getThread()"}, {"node_id": 121, "universal_type": "function", "name": "getVC", "text_snippet": "int getVC() { return vc; }"}, {"node_id": 123, "universal_type": "function", "name": "unknown", "text_snippet": "getVC()"}, {"node_id": 143, "universal_type": "function", "name": "MsgSendEntry", "text_snippet": "class MsgSendEntry : public SendEntry {\n public:\n MsgSendEntry( NicCmd* cmd, int thread ) : Send"}, {"node_id": 198, "universal_type": "function", "name": "getCqId", "text_snippet": "int getCqId() { return cmd->data.send.cqId; }"}, {"node_id": 200, "universal_type": "function", "name": "unknown", "text_snippet": "getCqId()"}, {"node_id": 211, "universal_type": "function", "name": "getAddr", "text_snippet": "int getAddr() { return cmd->data.send.addr; }"}, {"node_id": 213, "universal_type": "function", "name": "unknown", "text_snippet": "getAddr()"}, {"node_id": 224, "universal_type": "function", "name": "getLength", "text_snippet": "int getLength() { return cmd->data.send.len; }"}, {"node_id": 226, "universal_type": "function", "name": "unknown", "text_snippet": "getLength()"}, {"node_id": 237, "universal_type": "function", "name": "getContext", "text_snippet": "int getContext() { return cmd->data.send.context; }"}, {"node_id": 239, "universal_type": "function", "name": "unknown", "text_snippet": "getContext()"}, {"node_id": 250, "universal_type": "function", "name": "getDestNode", "text_snippet": "int getDestNode() { return cmd->data.send.node; }"}, {"node_id": 252, "universal_type": "function", "name": "unknown", "text_snippet": "getDestNode()"}, {"node_id": 263, "universal_type": "function", "name": "getDestPid", "text_snippet": "int getDestPid() { return cmd->data.send.pe; }"}, {"node_id": 265, "universal_type": "function", "name": "unknown", "text_snippet": "getDestPid()"}, {"node_id": 277, "universal_type": "function", "name": "WriteSendEntry", "text_snippet": "class WriteSendEntry : public SendEntry {\n public:\n WriteSendEntry( NicCmd* cmd, int thread ): S"}, {"node_id": 350, "universal_type": "function", "name": "getLength", "text_snippet": "int getLength() { return cmd->data.write.len; }"}, {"node_id": 352, "universal_type": "function", "name": "unknown", "text_snippet": "getLength()"}, {"node_id": 363, "universal_type": "function", "name": "getAddr", "text_snippet": "int getAddr() { return cmd->data.write.srcAddr; }"}, {"node_id": 365, "universal_type": "function", "name": "unknown", "text_snippet": "getAddr()"}, {"node_id": 376, "universal_type": "function", "name": "getCqId", "text_snippet": "int getCqId() { return cmd->data.write.cqId; }"}, {"node_id": 378, "universal_type": "function", "name": "unknown", "text_snippet": "getCqId()"}, {"node_id": 389, "universal_type": "function", "name": "getContext", "text_snippet": "int getContext() { return cmd->data.write.context; }"}, {"node_id": 391, "universal_type": "function", "name": "unknown", "text_snippet": "getContext()"}, {"node_id": 402, "universal_type": "function", "name": "getDestNode", "text_snippet": "int getDestNode() { return cmd->data.write.node; }"}, {"node_id": 404, "universal_type": "function", "name": "unknown", "text_snippet": "getDestNode()"}, {"node_id": 415, "universal_type": "function", "name": "getDestPid", "text_snippet": "int getDestPid() { return cmd->data.write.pe; }"}, {"node_id": 417, "universal_type": "function", "name": "unknown", "text_snippet": "getDestPid()"}, {"node_id": 428, "universal_type": "function", "name": "ReadSendEntry", "text_snippet": "class ReadSendEntry : public SendEntry {\n public:\n ReadSendEntry( NicCmd* cmd, int thread, int r"}, {"node_id": 524, "universal_type": "function", "name": "getLength", "text_snippet": "int getLength() { return 0; }"}, {"node_id": 526, "universal_type": "function", "name": "unknown", "text_snippet": "getLength()"}, {"node_id": 531, "universal_type": "function", "name": "getAddr", "text_snippet": "int getAddr() { return 0; }"}, {"node_id": 533, "universal_type": "function", "name": "unknown", "text_snippet": "getAddr()"}, {"node_id": 538, "universal_type": "function", "name": "getCqId", "text_snippet": "int getCqId() { return -1; }"}, {"node_id": 540, "universal_type": "function", "name": "unknown", "text_snippet": "getCqId()"}, {"node_id": 545, "universal_type": "function", "name": "getContext", "text_snippet": "int getContext() { return 0; }"}, {"node_id": 547, "universal_type": "function", "name": "unknown", "text_snippet": "getContext()"}, {"node_id": 552, "universal_type": "function", "name": "getDestNode", "text_snippet": "int getDestNode() { return cmd->data.read.node; }"}, {"node_id": 554, "universal_type": "function", "name": "unknown", "text_snippet": "getDestNode()"}, {"node_id": 565, "universal_type": "function", "name": "getDestPid", "text_snippet": "int getDestPid() { return cmd->data.read.pe; }"}, {"node_id": 567, "universal_type": "function", "name": "unknown", "text_snippet": "getDestPid()"}, {"node_id": 579, "universal_type": "function", "name": "ReadRespSendEntry", "text_snippet": "class ReadRespSendEntry : public SendEntry {\n public:\n ReadRespSendEntry( int thread, int destNo"}, {"node_id": 605, "universal_type": "function", "name": "unknown", "text_snippet": "SendEntry(thread)"}, {"node_id": 610, "universal_type": "function", "name": "unknown", "text_snippet": "m_destNode(destNode)"}, {"node_id": 615, "universal_type": "function", "name": "unknown", "text_snippet": "m_destPid(destPid)"}, {"node_id": 620, "universal_type": "function", "name": "unknown", "text_snippet": "m_srcAddr(srcAddr)"}, {"node_id": 626, "universal_type": "function", "name": "unknown", "text_snippet": "m_length(length)"}, {"node_id": 654, "universal_type": "function", "name": "getLength", "text_snippet": "int getLength() { return m_length; }"}, {"node_id": 656, "universal_type": "function", "name": "unknown", "text_snippet": "getLength()"}, {"node_id": 661, "universal_type": "function", "name": "getAddr", "text_snippet": "int getAddr() { return m_srcAddr; }"}, {"node_id": 663, "universal_type": "function", "name": "unknown", "text_snippet": "getAddr()"}, {"node_id": 668, "universal_type": "function", "name": "getCqId", "text_snippet": "int getCqId() { return -1; }"}, {"node_id": 670, "universal_type": "function", "name": "unknown", "text_snippet": "getCqId()"}, {"node_id": 675, "universal_type": "function", "name": "getContext", "text_snippet": "int getContext() { return 0; }"}, {"node_id": 677, "universal_type": "function", "name": "unknown", "text_snippet": "getContext()"}, {"node_id": 682, "universal_type": "function", "name": "getDestNode", "text_snippet": "int getDestNode() { return m_destNode; }"}, {"node_id": 684, "universal_type": "function", "name": "unknown", "text_snippet": "getDestNode()"}, {"node_id": 689, "universal_type": "function", "name": "getDestPid", "text_snippet": "int getDestPid() { return m_destPid; }"}, {"node_id": 691, "universal_type": "function", "name": "unknown", "text_snippet": "getDestPid()"}], "class_declarations": [], "import_statements": []}, "original_source_code": "\nclass SendEntry {\n public:\n SendEntry( int thread, NicCmd* cmd = NULL ) : cmd(cmd), thread(thread), vc(0) {}\n\t~SendEntry() {\n\t\tif ( cmd ) {\n\t\t\tdelete cmd;\n\t\t}\n\t}\n\tStreamHdr* getStreamHdr() { return &m_streamHdr; }\t\n\tvirtual int getAddr() = 0;\n\tvirtual int getLength() = 0;\n\tvirtual int getCqId() = 0;\n\tvirtual int getContext() = 0;\n\tvirtual int getDestNode() = 0;\n\tvirtual int getDestPid() = 0;\n\tint getThread() { return thread; }\n\tint getVC() { return vc; }\n protected:\n\tStreamHdr m_streamHdr;\n NicCmd* cmd;\n int thread;\n\tint vc;\n};\n\nclass MsgSendEntry : public SendEntry {\n public:\n MsgSendEntry( NicCmd* cmd, int thread ) : SendEntry(thread,cmd) {\n \tm_streamHdr.type = StreamHdr::Msg;\n \tm_streamHdr.data.msgKey = cmd->data.send.rqKey;\n \tm_streamHdr.payloadLength = cmd->data.send.len;\n\t}\n\tint getCqId() { return cmd->data.send.cqId; }\n\tint getAddr() { return cmd->data.send.addr; }\n\tint getLength() { return cmd->data.send.len; }\n\tint getContext() { return cmd->data.send.context; }\n\tint getDestNode() { return cmd->data.send.node; }\n\tint getDestPid() { return cmd->data.send.pe; }\n private:\t\n}; \n\nclass WriteSendEntry : public SendEntry {\n public:\n WriteSendEntry( NicCmd* cmd, int thread ): SendEntry(thread,cmd) {\n \tm_streamHdr.type = StreamHdr::Write;\n \tm_streamHdr.data.rdma.memRgnKey = cmd->data.write.key;\n \tm_streamHdr.data.rdma.offset = cmd->data.write.offset;\n \tm_streamHdr.payloadLength = cmd->data.write.len;\n\t}\n\tint getLength() { return cmd->data.write.len; }\n\tint getAddr() { return cmd->data.write.srcAddr; }\n\tint getCqId() { return cmd->data.write.cqId; }\n\tint getContext() { return cmd->data.write.context; }\n\tint getDestNode() { return cmd->data.write.node; }\n\tint getDestPid() { return cmd->data.write.pe; }\n}; \nclass ReadSendEntry : public SendEntry {\n public:\n ReadSendEntry( NicCmd* cmd, int thread, int readRespKey ): SendEntry(thread,cmd) {\n \tm_streamHdr.type = StreamHdr::ReadReq;\n \tm_streamHdr.payloadLength = 0;\n \tm_streamHdr.data.rdma.memRgnKey = cmd->data.read.key;\n \tm_streamHdr.data.rdma.offset = cmd->data.read.offset;\n\t\tm_streamHdr.data.rdma.readRespKey = readRespKey;\n\t\tm_streamHdr.data.rdma.readLength = cmd->data.read.len;\n\t}\n\t// we are only sending a read header so lengh and address are 0\n\t// the read does send a completeion until the read completes so these are\n\t// passed to the ReadRespRecvEntry\n\tint getLength() { return 0; }\n\tint getAddr() { return 0; }\n\tint getCqId() { return -1; }\n\tint getContext() { return 0; }\n\tint getDestNode() { return cmd->data.read.node; }\n\tint getDestPid() { return cmd->data.read.pe; }\n private:\n}; \n\nclass ReadRespSendEntry : public SendEntry {\n public:\n ReadRespSendEntry( int thread, int destNode, int destPid, Addr_t srcAddr, int length, int readRespKey ): \n\t\tSendEntry(thread), m_destNode(destNode), m_destPid(destPid), m_srcAddr(srcAddr), m_length(length) \n\t{\n \tm_streamHdr.type = StreamHdr::ReadResp;\n \tm_streamHdr.payloadLength = m_length;\n\t\tm_streamHdr.data.rdma.readRespKey = readRespKey;\n\t}\n\n\tint getLength() { return m_length; }\n\tint getAddr() { return m_srcAddr; }\n\tint getCqId() { return -1; }\n\tint getContext() { return 0; }\n\tint getDestNode() { return m_destNode; }\n\tint getDestPid() { return m_destPid; }\n private:\n\tint m_srcAddr;\n\tint m_length;\n\tint m_destNode;\n\tint m_destPid;\n}; \n\n\n\n\n"}
| 81,225
|
c
|
// function to reverse a number
#include <stdio.h>
#include <stdlib.h>
int rev(int t)
{
int last_digit=0,reversed=0;
while(t>0)
{
last_digit=t%10;
reversed = reversed*10 + last_digit;
t=t/10;
}
return reversed;
}
int main()
{
int a;
printf("\nEnter a number = ");
scanf("%d",&a);
printf("\nReverse of %d = %d\n",a,rev(a));
return 0;
}
| 17.14
| 22
|
(translation_unit) "// function to reverse a number\n#include <stdio.h>\n#include <stdlib.h>\nint rev(int t)\n{\n int last_digit=0,reversed=0;\n while(t>0)\n {\n last_digit=t%10;\n reversed = reversed*10 + last_digit;\n t=t/10;\n }\n return reversed;\n}\nint main()\n{\n int a;\n printf("\nEnter a number = ");\n scanf("%d",&a);\n printf("\nReverse of %d = %d\n",a,rev(a));\n return 0;\n}\n"
(comment) "// function to reverse a number"
(preproc_include) "#include <stdio.h>\n"
(#include) "#include"
(system_lib_string) "<stdio.h>"
(preproc_include) "#include <stdlib.h>\n"
(#include) "#include"
(system_lib_string) "<stdlib.h>"
(function_definition) "int rev(int t)\n{\n int last_digit=0,reversed=0;\n while(t>0)\n {\n last_digit=t%10;\n reversed = reversed*10 + last_digit;\n t=t/10;\n }\n return reversed;\n}"
(primitive_type) "int"
(function_declarator) "rev(int t)"
(identifier) "rev"
(parameter_list) "(int t)"
(() "("
(parameter_declaration) "int t"
(primitive_type) "int"
(identifier) "t"
()) ")"
(compound_statement) "{\n int last_digit=0,reversed=0;\n while(t>0)\n {\n last_digit=t%10;\n reversed = reversed*10 + last_digit;\n t=t/10;\n }\n return reversed;\n}"
({) "{"
(declaration) "int last_digit=0,reversed=0;"
(primitive_type) "int"
(init_declarator) "last_digit=0"
(identifier) "last_digit"
(=) "="
(number_literal) "0"
(,) ","
(init_declarator) "reversed=0"
(identifier) "reversed"
(=) "="
(number_literal) "0"
(;) ";"
(while_statement) "while(t>0)\n {\n last_digit=t%10;\n reversed = reversed*10 + last_digit;\n t=t/10;\n }"
(while) "while"
(parenthesized_expression) "(t>0)"
(() "("
(binary_expression) "t>0"
(identifier) "t"
(>) ">"
(number_literal) "0"
()) ")"
(compound_statement) "{\n last_digit=t%10;\n reversed = reversed*10 + last_digit;\n t=t/10;\n }"
({) "{"
(expression_statement) "last_digit=t%10;"
(assignment_expression) "last_digit=t%10"
(identifier) "last_digit"
(=) "="
(binary_expression) "t%10"
(identifier) "t"
(%) "%"
(number_literal) "10"
(;) ";"
(expression_statement) "reversed = reversed*10 + last_digit;"
(assignment_expression) "reversed = reversed*10 + last_digit"
(identifier) "reversed"
(=) "="
(binary_expression) "reversed*10 + last_digit"
(binary_expression) "reversed*10"
(identifier) "reversed"
(*) "*"
(number_literal) "10"
(+) "+"
(identifier) "last_digit"
(;) ";"
(expression_statement) "t=t/10;"
(assignment_expression) "t=t/10"
(identifier) "t"
(=) "="
(binary_expression) "t/10"
(identifier) "t"
(/) "/"
(number_literal) "10"
(;) ";"
(}) "}"
(return_statement) "return reversed;"
(return) "return"
(identifier) "reversed"
(;) ";"
(}) "}"
(function_definition) "int main()\n{\n int a;\n printf("\nEnter a number = ");\n scanf("%d",&a);\n printf("\nReverse of %d = %d\n",a,rev(a));\n return 0;\n}"
(primitive_type) "int"
(function_declarator) "main()"
(identifier) "main"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{\n int a;\n printf("\nEnter a number = ");\n scanf("%d",&a);\n printf("\nReverse of %d = %d\n",a,rev(a));\n return 0;\n}"
({) "{"
(declaration) "int a;"
(primitive_type) "int"
(identifier) "a"
(;) ";"
(expression_statement) "printf("\nEnter a number = ");"
(call_expression) "printf("\nEnter a number = ")"
(identifier) "printf"
(argument_list) "("\nEnter a number = ")"
(() "("
(string_literal) ""\nEnter a number = ""
(") """
(escape_sequence) "\n"
(string_content) "Enter a number = "
(") """
()) ")"
(;) ";"
(expression_statement) "scanf("%d",&a);"
(call_expression) "scanf("%d",&a)"
(identifier) "scanf"
(argument_list) "("%d",&a)"
(() "("
(string_literal) ""%d""
(") """
(string_content) "%d"
(") """
(,) ","
(pointer_expression) "&a"
(&) "&"
(identifier) "a"
()) ")"
(;) ";"
(expression_statement) "printf("\nReverse of %d = %d\n",a,rev(a));"
(call_expression) "printf("\nReverse of %d = %d\n",a,rev(a))"
(identifier) "printf"
(argument_list) "("\nReverse of %d = %d\n",a,rev(a))"
(() "("
(string_literal) ""\nReverse of %d = %d\n""
(") """
(escape_sequence) "\n"
(string_content) "Reverse of %d = %d"
(escape_sequence) "\n"
(") """
(,) ","
(identifier) "a"
(,) ","
(call_expression) "rev(a)"
(identifier) "rev"
(argument_list) "(a)"
(() "("
(identifier) "a"
()) ")"
()) ")"
(;) ";"
(return_statement) "return 0;"
(return) "return"
(number_literal) "0"
(;) ";"
(}) "}"
| 146
| 0
|
{"language": "c", "success": true, "metadata": {"lines": 22, "avg_line_length": 17.14, "nodes": 88, "errors": 0, "source_hash": "0a3367a2cbf12bc4d1d0d02587e8a0935cabf6156570918c7219b182fb036748", "categorized_nodes": 62}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 18}}, {"id": 3, "type": "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": "function_definition", "text": "int rev(int t)\n{\n int last_digit=0,reversed=0;\n while(t>0)\n {\n last_digit=t%10;\n reversed = reversed*10 + last_digit;\n t=t/10;\n }\n return reversed;\n}", "parent": null, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 7, "type": "primitive_type", "text": "int", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 3}}, {"id": 8, "type": "function_declarator", "text": "rev(int t)", "parent": 6, "children": [9, 10], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 14}}, {"id": 9, "type": "identifier", "text": "rev", "parent": 8, "children": [], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 7}}, {"id": 10, "type": "parameter_list", "text": "(int t)", "parent": 8, "children": [11], "start_point": {"row": 3, "column": 7}, "end_point": {"row": 3, "column": 14}}, {"id": 11, "type": "parameter_declaration", "text": "int t", "parent": 10, "children": [12, 13], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 13}}, {"id": 12, "type": "primitive_type", "text": "int", "parent": 11, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 11}}, {"id": 13, "type": "identifier", "text": "t", "parent": 11, "children": [], "start_point": {"row": 3, "column": 12}, "end_point": {"row": 3, "column": 13}}, {"id": 14, "type": "declaration", "text": "int last_digit=0,reversed=0;", "parent": 6, "children": [15, 16, 20], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 32}}, {"id": 15, "type": "primitive_type", "text": "int", "parent": 14, "children": [], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 7}}, {"id": 16, "type": "init_declarator", "text": "last_digit=0", "parent": 14, "children": [17, 18, 19], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 20}}, {"id": 17, "type": "identifier", "text": "last_digit", "parent": 16, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 18}}, {"id": 18, "type": "=", "text": "=", "parent": 16, "children": [], "start_point": {"row": 5, "column": 18}, "end_point": {"row": 5, "column": 19}}, {"id": 19, "type": "number_literal", "text": "0", "parent": 16, "children": [], "start_point": {"row": 5, "column": 19}, "end_point": {"row": 5, "column": 20}}, {"id": 20, "type": "init_declarator", "text": "reversed=0", "parent": 14, "children": [21, 22, 23], "start_point": {"row": 5, "column": 21}, "end_point": {"row": 5, "column": 31}}, {"id": 21, "type": "identifier", "text": "reversed", "parent": 20, "children": [], "start_point": {"row": 5, "column": 21}, "end_point": {"row": 5, "column": 29}}, {"id": 22, "type": "=", "text": "=", "parent": 20, "children": [], "start_point": {"row": 5, "column": 29}, "end_point": {"row": 5, "column": 30}}, {"id": 23, "type": "number_literal", "text": "0", "parent": 20, "children": [], "start_point": {"row": 5, "column": 30}, "end_point": {"row": 5, "column": 31}}, {"id": 24, "type": "while_statement", "text": "while(t>0)\n {\n last_digit=t%10;\n reversed = reversed*10 + last_digit;\n t=t/10;\n }", "parent": 6, "children": [25], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 11, "column": 5}}, {"id": 25, "type": "parenthesized_expression", "text": "(t>0)", "parent": 24, "children": [26], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 14}}, {"id": 26, "type": "binary_expression", "text": "t>0", "parent": 25, "children": [27, 28, 29], "start_point": {"row": 6, "column": 10}, "end_point": {"row": 6, "column": 13}}, {"id": 27, "type": "identifier", "text": "t", "parent": 26, "children": [], "start_point": {"row": 6, "column": 10}, "end_point": {"row": 6, "column": 11}}, {"id": 28, "type": ">", "text": ">", "parent": 26, "children": [], "start_point": {"row": 6, "column": 11}, "end_point": {"row": 6, "column": 12}}, {"id": 29, "type": "number_literal", "text": "0", "parent": 26, "children": [], "start_point": {"row": 6, "column": 12}, "end_point": {"row": 6, "column": 13}}, {"id": 30, "type": "assignment_expression", "text": "last_digit=t%10", "parent": 24, "children": [31, 32, 33], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 23}}, {"id": 31, "type": "identifier", "text": "last_digit", "parent": 30, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 18}}, {"id": 32, "type": "=", "text": "=", "parent": 30, "children": [], "start_point": {"row": 8, "column": 18}, "end_point": {"row": 8, "column": 19}}, {"id": 33, "type": "binary_expression", "text": "t%10", "parent": 30, "children": [34, 35, 36], "start_point": {"row": 8, "column": 19}, "end_point": {"row": 8, "column": 23}}, {"id": 34, "type": "identifier", "text": "t", "parent": 33, "children": [], "start_point": {"row": 8, "column": 19}, "end_point": {"row": 8, "column": 20}}, {"id": 35, "type": "%", "text": "%", "parent": 33, "children": [], "start_point": {"row": 8, "column": 20}, "end_point": {"row": 8, "column": 21}}, {"id": 36, "type": "number_literal", "text": "10", "parent": 33, "children": [], "start_point": {"row": 8, "column": 21}, "end_point": {"row": 8, "column": 23}}, {"id": 37, "type": "assignment_expression", "text": "reversed = reversed*10 + last_digit", "parent": 24, "children": [38, 39, 40], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 43}}, {"id": 38, "type": "identifier", "text": "reversed", "parent": 37, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 16}}, {"id": 39, "type": "=", "text": "=", "parent": 37, "children": [], "start_point": {"row": 9, "column": 17}, "end_point": {"row": 9, "column": 18}}, {"id": 40, "type": "binary_expression", "text": "reversed*10 + last_digit", "parent": 37, "children": [41, 45, 46], "start_point": {"row": 9, "column": 19}, "end_point": {"row": 9, "column": 43}}, {"id": 41, "type": "binary_expression", "text": "reversed*10", "parent": 40, "children": [42, 43, 44], "start_point": {"row": 9, "column": 19}, "end_point": {"row": 9, "column": 30}}, {"id": 42, "type": "identifier", "text": "reversed", "parent": 41, "children": [], "start_point": {"row": 9, "column": 19}, "end_point": {"row": 9, "column": 27}}, {"id": 43, "type": "*", "text": "*", "parent": 41, "children": [], "start_point": {"row": 9, "column": 27}, "end_point": {"row": 9, "column": 28}}, {"id": 44, "type": "number_literal", "text": "10", "parent": 41, "children": [], "start_point": {"row": 9, "column": 28}, "end_point": {"row": 9, "column": 30}}, {"id": 45, "type": "+", "text": "+", "parent": 40, "children": [], "start_point": {"row": 9, "column": 31}, "end_point": {"row": 9, "column": 32}}, {"id": 46, "type": "identifier", "text": "last_digit", "parent": 40, "children": [], "start_point": {"row": 9, "column": 33}, "end_point": {"row": 9, "column": 43}}, {"id": 47, "type": "assignment_expression", "text": "t=t/10", "parent": 24, "children": [48, 49, 50], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 14}}, {"id": 48, "type": "identifier", "text": "t", "parent": 47, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 9}}, {"id": 49, "type": "=", "text": "=", "parent": 47, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 10}}, {"id": 50, "type": "binary_expression", "text": "t/10", "parent": 47, "children": [51, 52, 53], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 14}}, {"id": 51, "type": "identifier", "text": "t", "parent": 50, "children": [], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 11}}, {"id": 52, "type": "/", "text": "/", "parent": 50, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 12}}, {"id": 53, "type": "number_literal", "text": "10", "parent": 50, "children": [], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 14}}, {"id": 54, "type": "return_statement", "text": "return reversed;", "parent": 6, "children": [55], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 20}}, {"id": 55, "type": "identifier", "text": "reversed", "parent": 54, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 19}}, {"id": 56, "type": "function_definition", "text": "int main()\n{\n int a;\n printf(\"\\nEnter a number = \");\n scanf(\"%d\",&a);\n printf(\"\\nReverse of %d = %d\\n\",a,rev(a));\n return 0;\n}", "parent": null, "children": [57, 58], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 57, "type": "primitive_type", "text": "int", "parent": 56, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 3}}, {"id": 58, "type": "function_declarator", "text": "main()", "parent": 56, "children": [59, 60], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 10}}, {"id": 59, "type": "identifier", "text": "main", "parent": 58, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 8}}, {"id": 60, "type": "parameter_list", "text": "()", "parent": 58, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 10}}, {"id": 61, "type": "declaration", "text": "int a;", "parent": 56, "children": [62, 63], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 10}}, {"id": 62, "type": "primitive_type", "text": "int", "parent": 61, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 7}}, {"id": 63, "type": "identifier", "text": "a", "parent": 61, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 9}}, {"id": 64, "type": "call_expression", "text": "printf(\"\\nEnter a number = \")", "parent": 56, "children": [65, 66], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 33}}, {"id": 65, "type": "identifier", "text": "printf", "parent": 64, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 10}}, {"id": 66, "type": "argument_list", "text": "(\"\\nEnter a number = \")", "parent": 64, "children": [67], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 33}}, {"id": 67, "type": "string_literal", "text": "\"\\nEnter a number = \"", "parent": 66, "children": [68], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 32}}, {"id": 68, "type": "escape_sequence", "text": "\\n", "parent": 67, "children": [], "start_point": {"row": 17, "column": 12}, "end_point": {"row": 17, "column": 14}}, {"id": 69, "type": "call_expression", "text": "scanf(\"%d\",&a)", "parent": 56, "children": [70, 71], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 18}}, {"id": 70, "type": "identifier", "text": "scanf", "parent": 69, "children": [], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 9}}, {"id": 71, "type": "argument_list", "text": "(\"%d\",&a)", "parent": 69, "children": [72, 73], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 18}}, {"id": 72, "type": "string_literal", "text": "\"%d\"", "parent": 71, "children": [], "start_point": {"row": 18, "column": 10}, "end_point": {"row": 18, "column": 14}}, {"id": 73, "type": "pointer_expression", "text": "&a", "parent": 71, "children": [74], "start_point": {"row": 18, "column": 15}, "end_point": {"row": 18, "column": 17}}, {"id": 74, "type": "identifier", "text": "a", "parent": 73, "children": [], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 17}}, {"id": 75, "type": "call_expression", "text": "printf(\"\\nReverse of %d = %d\\n\",a,rev(a))", "parent": 56, "children": [76, 77], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 45}}, {"id": 76, "type": "identifier", "text": "printf", "parent": 75, "children": [], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 10}}, {"id": 77, "type": "argument_list", "text": "(\"\\nReverse of %d = %d\\n\",a,rev(a))", "parent": 75, "children": [78, 81, 82], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 45}}, {"id": 78, "type": "string_literal", "text": "\"\\nReverse of %d = %d\\n\"", "parent": 77, "children": [79, 80], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 35}}, {"id": 79, "type": "escape_sequence", "text": "\\n", "parent": 78, "children": [], "start_point": {"row": 19, "column": 12}, "end_point": {"row": 19, "column": 14}}, {"id": 80, "type": "escape_sequence", "text": "\\n", "parent": 78, "children": [], "start_point": {"row": 19, "column": 32}, "end_point": {"row": 19, "column": 34}}, {"id": 81, "type": "identifier", "text": "a", "parent": 77, "children": [], "start_point": {"row": 19, "column": 36}, "end_point": {"row": 19, "column": 37}}, {"id": 82, "type": "call_expression", "text": "rev(a)", "parent": 77, "children": [83, 84], "start_point": {"row": 19, "column": 38}, "end_point": {"row": 19, "column": 44}}, {"id": 83, "type": "identifier", "text": "rev", "parent": 82, "children": [], "start_point": {"row": 19, "column": 38}, "end_point": {"row": 19, "column": 41}}, {"id": 84, "type": "argument_list", "text": "(a)", "parent": 82, "children": [85], "start_point": {"row": 19, "column": 41}, "end_point": {"row": 19, "column": 44}}, {"id": 85, "type": "identifier", "text": "a", "parent": 84, "children": [], "start_point": {"row": 19, "column": 42}, "end_point": {"row": 19, "column": 43}}, {"id": 86, "type": "return_statement", "text": "return 0;", "parent": 56, "children": [87], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 13}}, {"id": 87, "type": "number_literal", "text": "0", "parent": 86, "children": [], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 12}}]}, "node_categories": {"declarations": {"functions": [6, 8, 56, 58], "variables": [11, 14, 61], "classes": [], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [25, 26, 33, 40, 41, 50, 64, 69, 73, 75, 82], "assignments": [30, 37, 47], "loops": [24], "conditionals": [9, 13, 17, 21, 27, 31, 34, 38, 42, 46, 48, 51, 55, 59, 63, 65, 70, 74, 76, 81, 83, 85], "returns": [54, 86], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 19, 23, 29, 36, 44, 53, 67, 72, 78, 87], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "rev", "text_snippet": "int rev(int t)\n{\n int last_digit=0,reversed=0;\n while(t>0)\n {\n last_digit=t%10;\n "}, {"node_id": 8, "universal_type": "function", "name": "unknown", "text_snippet": "rev(int t)"}, {"node_id": 56, "universal_type": "function", "name": "main", "text_snippet": "int main()\n{\n int a;\n printf(\"\\nEnter a number = \");\n scanf(\"%d\",&a);\n printf(\"\\nReverse"}, {"node_id": 58, "universal_type": "function", "name": "unknown", "text_snippet": "main()"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <stdio.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <stdlib.h>\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "// function to reverse a number\n#include <stdio.h>\n#include <stdlib.h>\nint rev(int t)\n{\n int last_digit=0,reversed=0;\n while(t>0)\n {\n last_digit=t%10;\n reversed = reversed*10 + last_digit;\n t=t/10;\n }\n return reversed;\n}\nint main()\n{\n int a;\n printf(\"\\nEnter a number = \");\n scanf(\"%d\",&a);\n printf(\"\\nReverse of %d = %d\\n\",a,rev(a));\n return 0;\n}\n"}
| 81,226
|
c
|
#ifndef __USER_WIFI_SETTINGS_H__
#define __USER_WIFI_SETTINGS_H__
#define MY_WIFI_SSID "test"
#define MY_WIFI_PASSWD "<PASSWORD>"
#endif
| 26.8
| 5
|
(translation_unit) "#ifndef __USER_WIFI_SETTINGS_H__\n#define __USER_WIFI_SETTINGS_H__\n\n#define MY_WIFI_SSID "test"\n#define MY_WIFI_PASSWD "<PASSWORD>"\n\n#endif\n\n"
(preproc_ifdef) "#ifndef __USER_WIFI_SETTINGS_H__\n#define __USER_WIFI_SETTINGS_H__\n\n#define MY_WIFI_SSID "test"\n#define MY_WIFI_PASSWD "<PASSWORD>"\n\n#endif"
(#ifndef) "#ifndef"
(identifier) "__USER_WIFI_SETTINGS_H__"
(preproc_def) "#define __USER_WIFI_SETTINGS_H__\n"
(#define) "#define"
(identifier) "__USER_WIFI_SETTINGS_H__"
(preproc_def) "#define MY_WIFI_SSID "test"\n"
(#define) "#define"
(identifier) "MY_WIFI_SSID"
(preproc_arg) ""test""
(preproc_def) "#define MY_WIFI_PASSWD "<PASSWORD>"\n"
(#define) "#define"
(identifier) "MY_WIFI_PASSWD"
(preproc_arg) ""<PASSWORD>""
(#endif) "#endif"
| 16
| 0
|
{"language": "c", "success": true, "metadata": {"lines": 5, "avg_line_length": 26.8, "nodes": 15, "errors": 0, "source_hash": "9f7c14533399839a411dff393758b5124dcedeaed84d3915d9fb0015251738ff", "categorized_nodes": 7}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __USER_WIFI_SETTINGS_H__\n#define __USER_WIFI_SETTINGS_H__\n\n#define MY_WIFI_SSID \"test\"\n#define MY_WIFI_PASSWD \"<PASSWORD>\"\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 10, 14], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 6, "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": "__USER_WIFI_SETTINGS_H__", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 32}}, {"id": 3, "type": "preproc_def", "text": "#define __USER_WIFI_SETTINGS_H__\n", "parent": 0, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 7}}, {"id": 5, "type": "identifier", "text": "__USER_WIFI_SETTINGS_H__", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 32}}, {"id": 6, "type": "preproc_def", "text": "#define MY_WIFI_SSID \"test\"\n", "parent": 0, "children": [7, 8, 9], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 7, "type": "#define", "text": "#define", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 7}}, {"id": 8, "type": "identifier", "text": "MY_WIFI_SSID", "parent": 6, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 20}}, {"id": 9, "type": "preproc_arg", "text": "\"test\"", "parent": 6, "children": [], "start_point": {"row": 3, "column": 22}, "end_point": {"row": 3, "column": 28}}, {"id": 10, "type": "preproc_def", "text": "#define MY_WIFI_PASSWD \"<PASSWORD>\"\n", "parent": 0, "children": [11, 12, 13], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 11, "type": "#define", "text": "#define", "parent": 10, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 12, "type": "identifier", "text": "MY_WIFI_PASSWD", "parent": 10, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 22}}, {"id": 13, "type": "preproc_arg", "text": "\"<PASSWORD>\"", "parent": 10, "children": [], "start_point": {"row": 4, "column": 24}, "end_point": {"row": 4, "column": 36}}, {"id": 14, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 6}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 8, 12, 14], "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 __USER_WIFI_SETTINGS_H__\n#define __USER_WIFI_SETTINGS_H__\n\n#define MY_WIFI_SSID \"test\"\n#define MY_WIFI_PASSWD \"<PASSWORD>\"\n\n#endif\n\n"}
| 81,227
|
c
|
//
// WGHomeTabTitleRequest.h
// WeygoIPhone
//
// Created by muma on 2017/3/4.
// Copyright © 2017年 <EMAIL>. All rights reserved.
//
#import "WGRequest.h"
@interface WGHomeTabTitleRequest : WGRequest
//@property (nonatomic, assign) int is_Hot;
//@property (nonatomic, assign) int wh;
//@property (nonatomic, assign) int ah;
//@property (nonatomic, strong) NSString *sign;
@end
| 26.29
| 14
|
(translation_unit) "//\n// WGHomeTabTitleRequest.h\n// WeygoIPhone\n//\n// Created by muma on 2017/3/4.\n// Copyright © 2017年 <EMAIL>. All rights reserved.\n//\n\n#import "WGRequest.h"\n\n@interface WGHomeTabTitleRequest : WGRequest\n\n//@property (nonatomic, assign) int is_Hot;\n//@property (nonatomic, assign) int wh;\n//@property (nonatomic, assign) int ah;\n\n//@property (nonatomic, strong) NSString *sign;\n\n@end\n"
(comment) "//"
(comment) "// WGHomeTabTitleRequest.h"
(comment) "// WeygoIPhone"
(comment) "//"
(comment) "// Created by muma on 2017/3/4."
(comment) "// Copyright © 2017年 <EMAIL>. All rights reserved.\n//"
(comment) "\n#"
(preproc_call) "port "WGRequest.h"\n\n@i"
(preproc_directive) "port "W"
(preproc_arg) "Request.h"\n\n@"
(ERROR) "terface WGHomeTabTitleRequest : WGRequest\n\n//@property (nonatomic, assign) int is_Hot;\n//@property (nonatomic, assign) int wh;\n//@property (nonatomic, assign) int ah;\n\n//@property (nonatomic, strong) NSString *sign;\n\n@end\n"
(ERROR) "t"
(type_identifier) "erface WG"
(identifier) "omeTabTitleRequest : "
(:) "G"
(identifier) "equest\n\n/"
(comment) "property (nonatomic, assign) int is_Hot;\n//"
(comment) "property (nonatomic, assign) int wh;\n//"
(comment) "property (nonatomic, assign) int ah;\n\n/"
(comment) "property (nonatomic, strong) NSString *sign;\n\n@"
(ERROR) "d"
(identifier) "\n"
| 23
| 3
|
{"language": "c", "success": true, "metadata": {"lines": 14, "avg_line_length": 26.29, "nodes": 10, "errors": 0, "source_hash": "29a375213286bea9cf3abb4cecde34c9160af5e409a35294e40c2b3083b00dad", "categorized_nodes": 5}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "port \"WGRequest.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 \"W", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "Request.h\"\n\n@", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 21}}, {"id": 3, "type": "ERROR", "text": "terface WGHomeTabTitleRequest : WGRequest\n\n//@property (nonatomic, assign) int is_Hot;\n//@property (nonatomic, assign) int wh;\n//@property (nonatomic, assign) int ah;\n\n//@property (nonatomic, strong) NSString *sign;\n\n@end\n", "parent": null, "children": [4, 5, 6, 7, 8, 9], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 18, "column": 4}}, {"id": 4, "type": "ERROR", "text": "t", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 5, "type": "type_identifier", "text": "erface WG", "parent": 3, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 10}}, {"id": 6, "type": "identifier", "text": "omeTabTitleRequest : ", "parent": 3, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 32}}, {"id": 7, "type": "identifier", "text": "equest\n\n/", "parent": 3, "children": [], "start_point": {"row": 10, "column": 35}, "end_point": {"row": 10, "column": 44}}, {"id": 8, "type": "ERROR", "text": "d", "parent": 3, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 9, "type": "identifier", "text": "\n", "parent": 3, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 4}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [5, 6, 7, 9], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// WGHomeTabTitleRequest.h\n// WeygoIPhone\n//\n// Created by muma on 2017/3/4.\n// Copyright \u00a9 2017\u5e74 <EMAIL>. All rights reserved.\n//\n\n#import \"WGRequest.h\"\n\n@interface WGHomeTabTitleRequest : WGRequest\n\n//@property (nonatomic, assign) int is_Hot;\n//@property (nonatomic, assign) int wh;\n//@property (nonatomic, assign) int ah;\n\n//@property (nonatomic, strong) NSString *sign;\n\n@end\n"}
| 81,228
|
c
|
/*
* Copyright (c) 2012-2018 <NAME> and individual contributors.
* License: https://github.com/dbartolini/crown/blob/master/LICENSE
*/
#pragma once
#include "core/math/math.h"
#include "core/math/types.h"
#include "core/math/vector3.h"
namespace crown
{
/// Functions to manipulate Plane3.
///
/// @ingroup Math
namespace plane3
{
/// Returns the plane defined by @a point and @a normal.
Plane3 from_point_and_normal(const Vector3& point, const Vector3& normal);
/// Normalizes the plane @a p and returns its result.
Plane3& normalize(Plane3& p);
/// Returns the signed distance between plane @a p and point @a point.
f32 distance_to_point(const Plane3& p, const Vector3& point);
} // namespace plane3
namespace plane3
{
inline Plane3 from_point_and_normal(const Vector3& point, const Vector3& normal)
{
Plane3 p;
p.n = normal;
p.d = -dot(normal, point);
return p;
}
inline Plane3& normalize(Plane3& p)
{
const f32 len = length(p.n);
if (fequal(len, 0.0f))
return p;
const f32 inv_len = 1.0f / len;
p.n *= inv_len;
p.d *= inv_len;
return p;
}
inline f32 distance_to_point(const Plane3& p, const Vector3& point)
{
return dot(p.n, point) + p.d;
}
} // namespace plane3
} // namespace crown
| 25.19
| 47
|
(translation_unit) "/*\n * Copyright (c) 2012-2018 <NAME> and individual contributors.\n * License: https://github.com/dbartolini/crown/blob/master/LICENSE\n */\n\n#pragma once\n\n#include "core/math/math.h"\n#include "core/math/types.h"\n#include "core/math/vector3.h"\n\nnamespace crown\n{\n/// Functions to manipulate Plane3.\n///\n/// @ingroup Math\nnamespace plane3\n{\n /// Returns the plane defined by @a point and @a normal.\n Plane3 from_point_and_normal(const Vector3& point, const Vector3& normal);\n\n /// Normalizes the plane @a p and returns its result.\n Plane3& normalize(Plane3& p);\n\n /// Returns the signed distance between plane @a p and point @a point.\n f32 distance_to_point(const Plane3& p, const Vector3& point);\n\n} // namespace plane3\n\nnamespace plane3\n{\n inline Plane3 from_point_and_normal(const Vector3& point, const Vector3& normal)\n {\n Plane3 p;\n p.n = normal;\n p.d = -dot(normal, point);\n return p;\n }\n\n inline Plane3& normalize(Plane3& p)\n {\n const f32 len = length(p.n);\n\n if (fequal(len, 0.0f))\n return p;\n\n const f32 inv_len = 1.0f / len;\n\n p.n *= inv_len;\n p.d *= inv_len;\n\n return p;\n }\n\n inline f32 distance_to_point(const Plane3& p, const Vector3& point)\n {\n return dot(p.n, point) + p.d;\n }\n\n} // namespace plane3\n\n} // namespace crown\n"
(comment) "/*\n * Copyright (c) 2012-2018 <NAME> and individual contributors.\n * License: https://github.com/dbartolini/crown/blob/master/LICENSE\n */"
(preproc_call) "#pragma once\n"
(preproc_directive) "#pragma"
(preproc_arg) "once"
(preproc_include) "#include "core/math/math.h"\n"
(#include) "#include"
(string_literal) ""core/math/math.h""
(") """
(string_content) "core/math/math.h"
(") """
(preproc_include) "#include "core/math/types.h"\n"
(#include) "#include"
(string_literal) ""core/math/types.h""
(") """
(string_content) "core/math/types.h"
(") """
(preproc_include) "#include "core/math/vector3.h"\n"
(#include) "#include"
(string_literal) ""core/math/vector3.h""
(") """
(string_content) "core/math/vector3.h"
(") """
(function_definition) "namespace crown\n{\n/// Functions to manipulate Plane3.\n///\n/// @ingroup Math\nnamespace plane3\n{\n /// Returns the plane defined by @a point and @a normal.\n Plane3 from_point_and_normal(const Vector3& point, const Vector3& normal);\n\n /// Normalizes the plane @a p and returns its result.\n Plane3& normalize(Plane3& p);\n\n /// Returns the signed distance between plane @a p and point @a point.\n f32 distance_to_point(const Plane3& p, const Vector3& point);\n\n} // namespace plane3\n\nnamespace plane3\n{\n inline Plane3 from_point_and_normal(const Vector3& point, const Vector3& normal)\n {\n Plane3 p;\n p.n = normal;\n p.d = -dot(normal, point);\n return p;\n }\n\n inline Plane3& normalize(Plane3& p)\n {\n const f32 len = length(p.n);\n\n if (fequal(len, 0.0f))\n return p;\n\n const f32 inv_len = 1.0f / len;\n\n p.n *= inv_len;\n p.d *= inv_len;\n\n return p;\n }\n\n inline f32 distance_to_point(const Plane3& p, const Vector3& point)\n {\n return dot(p.n, point) + p.d;\n }\n\n}"
(type_identifier) "namespace"
(identifier) "crown"
(compound_statement) "{\n/// Functions to manipulate Plane3.\n///\n/// @ingroup Math\nnamespace plane3\n{\n /// Returns the plane defined by @a point and @a normal.\n Plane3 from_point_and_normal(const Vector3& point, const Vector3& normal);\n\n /// Normalizes the plane @a p and returns its result.\n Plane3& normalize(Plane3& p);\n\n /// Returns the signed distance between plane @a p and point @a point.\n f32 distance_to_point(const Plane3& p, const Vector3& point);\n\n} // namespace plane3\n\nnamespace plane3\n{\n inline Plane3 from_point_and_normal(const Vector3& point, const Vector3& normal)\n {\n Plane3 p;\n p.n = normal;\n p.d = -dot(normal, point);\n return p;\n }\n\n inline Plane3& normalize(Plane3& p)\n {\n const f32 len = length(p.n);\n\n if (fequal(len, 0.0f))\n return p;\n\n const f32 inv_len = 1.0f / len;\n\n p.n *= inv_len;\n p.d *= inv_len;\n\n return p;\n }\n\n inline f32 distance_to_point(const Plane3& p, const Vector3& point)\n {\n return dot(p.n, point) + p.d;\n }\n\n}"
({) "{"
(comment) "/// Functions to manipulate Plane3."
(comment) "///"
(comment) "/// @ingroup Math"
(function_definition) "namespace plane3\n{\n /// Returns the plane defined by @a point and @a normal.\n Plane3 from_point_and_normal(const Vector3& point, const Vector3& normal);\n\n /// Normalizes the plane @a p and returns its result.\n Plane3& normalize(Plane3& p);\n\n /// Returns the signed distance between plane @a p and point @a point.\n f32 distance_to_point(const Plane3& p, const Vector3& point);\n\n}"
(type_identifier) "namespace"
(identifier) "plane3"
(compound_statement) "{\n /// Returns the plane defined by @a point and @a normal.\n Plane3 from_point_and_normal(const Vector3& point, const Vector3& normal);\n\n /// Normalizes the plane @a p and returns its result.\n Plane3& normalize(Plane3& p);\n\n /// Returns the signed distance between plane @a p and point @a point.\n f32 distance_to_point(const Plane3& p, const Vector3& point);\n\n}"
({) "{"
(comment) "/// Returns the plane defined by @a point and @a normal."
(declaration) "Plane3 from_point_and_normal(const Vector3& point, const Vector3& normal);"
(type_identifier) "Plane3"
(function_declarator) "from_point_and_normal(const Vector3& point, const Vector3& normal)"
(identifier) "from_point_and_normal"
(parameter_list) "(const Vector3& point, const Vector3& normal)"
(() "("
(parameter_declaration) "const Vector3& point"
(type_qualifier) "const"
(const) "const"
(type_identifier) "Vector3"
(ERROR) "&"
(&) "&"
(identifier) "point"
(,) ","
(parameter_declaration) "const Vector3& normal"
(type_qualifier) "const"
(const) "const"
(type_identifier) "Vector3"
(ERROR) "&"
(&) "&"
(identifier) "normal"
()) ")"
(;) ";"
(comment) "/// Normalizes the plane @a p and returns its result."
(expression_statement) "Plane3& normalize(Plane3& p);"
(binary_expression) "Plane3& normalize(Plane3& p)"
(identifier) "Plane3"
(&) "&"
(call_expression) "normalize(Plane3& p)"
(identifier) "normalize"
(argument_list) "(Plane3& p)"
(() "("
(binary_expression) "Plane3& p"
(identifier) "Plane3"
(&) "&"
(identifier) "p"
()) ")"
(;) ";"
(comment) "/// Returns the signed distance between plane @a p and point @a point."
(declaration) "f32 distance_to_point(const Plane3& p, const Vector3& point);"
(type_identifier) "f32"
(function_declarator) "distance_to_point(const Plane3& p, const Vector3& point)"
(identifier) "distance_to_point"
(parameter_list) "(const Plane3& p, const Vector3& point)"
(() "("
(parameter_declaration) "const Plane3& p"
(type_qualifier) "const"
(const) "const"
(type_identifier) "Plane3"
(ERROR) "&"
(&) "&"
(identifier) "p"
(,) ","
(parameter_declaration) "const Vector3& point"
(type_qualifier) "const"
(const) "const"
(type_identifier) "Vector3"
(ERROR) "&"
(&) "&"
(identifier) "point"
()) ")"
(;) ";"
(}) "}"
(comment) "// namespace plane3"
(function_definition) "namespace plane3\n{\n inline Plane3 from_point_and_normal(const Vector3& point, const Vector3& normal)\n {\n Plane3 p;\n p.n = normal;\n p.d = -dot(normal, point);\n return p;\n }\n\n inline Plane3& normalize(Plane3& p)\n {\n const f32 len = length(p.n);\n\n if (fequal(len, 0.0f))\n return p;\n\n const f32 inv_len = 1.0f / len;\n\n p.n *= inv_len;\n p.d *= inv_len;\n\n return p;\n }"
(type_identifier) "namespace"
(identifier) "plane3"
(compound_statement) "{\n inline Plane3 from_point_and_normal(const Vector3& point, const Vector3& normal)\n {\n Plane3 p;\n p.n = normal;\n p.d = -dot(normal, point);\n return p;\n }\n\n inline Plane3& normalize(Plane3& p)\n {\n const f32 len = length(p.n);\n\n if (fequal(len, 0.0f))\n return p;\n\n const f32 inv_len = 1.0f / len;\n\n p.n *= inv_len;\n p.d *= inv_len;\n\n return p;\n }"
({) "{"
(function_definition) "inline Plane3 from_point_and_normal(const Vector3& point, const Vector3& normal)\n {\n Plane3 p;\n p.n = normal;\n p.d = -dot(normal, point);\n return p;\n }"
(storage_class_specifier) "inline"
(inline) "inline"
(type_identifier) "Plane3"
(function_declarator) "from_point_and_normal(const Vector3& point, const Vector3& normal)"
(identifier) "from_point_and_normal"
(parameter_list) "(const Vector3& point, const Vector3& normal)"
(() "("
(parameter_declaration) "const Vector3& point"
(type_qualifier) "const"
(const) "const"
(type_identifier) "Vector3"
(ERROR) "&"
(&) "&"
(identifier) "point"
(,) ","
(parameter_declaration) "const Vector3& normal"
(type_qualifier) "const"
(const) "const"
(type_identifier) "Vector3"
(ERROR) "&"
(&) "&"
(identifier) "normal"
()) ")"
(compound_statement) "{\n Plane3 p;\n p.n = normal;\n p.d = -dot(normal, point);\n return p;\n }"
({) "{"
(declaration) "Plane3 p;"
(type_identifier) "Plane3"
(identifier) "p"
(;) ";"
(expression_statement) "p.n = normal;"
(assignment_expression) "p.n = normal"
(field_expression) "p.n"
(identifier) "p"
(.) "."
(field_identifier) "n"
(=) "="
(identifier) "normal"
(;) ";"
(expression_statement) "p.d = -dot(normal, point);"
(assignment_expression) "p.d = -dot(normal, point)"
(field_expression) "p.d"
(identifier) "p"
(.) "."
(field_identifier) "d"
(=) "="
(unary_expression) "-dot(normal, point)"
(-) "-"
(call_expression) "dot(normal, point)"
(identifier) "dot"
(argument_list) "(normal, point)"
(() "("
(identifier) "normal"
(,) ","
(identifier) "point"
()) ")"
(;) ";"
(return_statement) "return p;"
(return) "return"
(identifier) "p"
(;) ";"
(}) "}"
(ERROR) "inline Plane3& normalize(Plane3& p)\n {"
(storage_class_specifier) "inline"
(inline) "inline"
(type_identifier) "Plane3"
(pointer_expression) "& normalize(Plane3& p)"
(&) "&"
(call_expression) "normalize(Plane3& p)"
(identifier) "normalize"
(argument_list) "(Plane3& p)"
(() "("
(binary_expression) "Plane3& p"
(identifier) "Plane3"
(&) "&"
(identifier) "p"
()) ")"
({) "{"
(declaration) "const f32 len = length(p.n);"
(type_qualifier) "const"
(const) "const"
(type_identifier) "f32"
(init_declarator) "len = length(p.n)"
(identifier) "len"
(=) "="
(call_expression) "length(p.n)"
(identifier) "length"
(argument_list) "(p.n)"
(() "("
(field_expression) "p.n"
(identifier) "p"
(.) "."
(field_identifier) "n"
()) ")"
(;) ";"
(if_statement) "if (fequal(len, 0.0f))\n return p;"
(if) "if"
(parenthesized_expression) "(fequal(len, 0.0f))"
(() "("
(call_expression) "fequal(len, 0.0f)"
(identifier) "fequal"
(argument_list) "(len, 0.0f)"
(() "("
(identifier) "len"
(,) ","
(number_literal) "0.0f"
()) ")"
()) ")"
(return_statement) "return p;"
(return) "return"
(identifier) "p"
(;) ";"
(declaration) "const f32 inv_len = 1.0f / len;"
(type_qualifier) "const"
(const) "const"
(type_identifier) "f32"
(init_declarator) "inv_len = 1.0f / len"
(identifier) "inv_len"
(=) "="
(binary_expression) "1.0f / len"
(number_literal) "1.0f"
(/) "/"
(identifier) "len"
(;) ";"
(expression_statement) "p.n *= inv_len;"
(assignment_expression) "p.n *= inv_len"
(field_expression) "p.n"
(identifier) "p"
(.) "."
(field_identifier) "n"
(*=) "*="
(identifier) "inv_len"
(;) ";"
(expression_statement) "p.d *= inv_len;"
(assignment_expression) "p.d *= inv_len"
(field_expression) "p.d"
(identifier) "p"
(.) "."
(field_identifier) "d"
(*=) "*="
(identifier) "inv_len"
(;) ";"
(return_statement) "return p;"
(return) "return"
(identifier) "p"
(;) ";"
(}) "}"
(function_definition) "inline f32 distance_to_point(const Plane3& p, const Vector3& point)\n {\n return dot(p.n, point) + p.d;\n }"
(storage_class_specifier) "inline"
(inline) "inline"
(type_identifier) "f32"
(function_declarator) "distance_to_point(const Plane3& p, const Vector3& point)"
(identifier) "distance_to_point"
(parameter_list) "(const Plane3& p, const Vector3& point)"
(() "("
(parameter_declaration) "const Plane3& p"
(type_qualifier) "const"
(const) "const"
(type_identifier) "Plane3"
(ERROR) "&"
(&) "&"
(identifier) "p"
(,) ","
(parameter_declaration) "const Vector3& point"
(type_qualifier) "const"
(const) "const"
(type_identifier) "Vector3"
(ERROR) "&"
(&) "&"
(identifier) "point"
()) ")"
(compound_statement) "{\n return dot(p.n, point) + p.d;\n }"
({) "{"
(return_statement) "return dot(p.n, point) + p.d;"
(return) "return"
(binary_expression) "dot(p.n, point) + p.d"
(call_expression) "dot(p.n, point)"
(identifier) "dot"
(argument_list) "(p.n, point)"
(() "("
(field_expression) "p.n"
(identifier) "p"
(.) "."
(field_identifier) "n"
(,) ","
(identifier) "point"
()) ")"
(+) "+"
(field_expression) "p.d"
(identifier) "p"
(.) "."
(field_identifier) "d"
(;) ";"
(}) "}"
(}) "}"
(comment) "// namespace plane3"
(ERROR) "}"
(}) "}"
(comment) "// namespace crown"
| 305
| 10
|
{"language": "c", "success": true, "metadata": {"lines": 47, "avg_line_length": 25.19, "nodes": 167, "errors": 0, "source_hash": "9d06b97024d3ba0c4be6faa59db407a63a303911842ab54e76fbaa6298742ea7", "categorized_nodes": 140}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include \"core/math/math.h\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"core/math/math.h\"", "parent": 3, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 27}}, {"id": 6, "type": "preproc_include", "text": "#include \"core/math/types.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"core/math/types.h\"", "parent": 6, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 28}}, {"id": 9, "type": "preproc_include", "text": "#include \"core/math/vector3.h\"\n", "parent": null, "children": [10, 11], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"core/math/vector3.h\"", "parent": 9, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 30}}, {"id": 12, "type": "function_definition", "text": "namespace crown\n{\n/// Functions to manipulate Plane3.\n///\n/// @ingroup Math\nnamespace plane3\n{\n\t/// Returns the plane defined by @a point and @a normal.\n\tPlane3 from_point_and_normal(const Vector3& point, const Vector3& normal);\n\n\t/// Normalizes the plane @a p and returns its result.\n\tPlane3& normalize(Plane3& p);\n\n\t/// Returns the signed distance between plane @a p and point @a point.\n\tf32 distance_to_point(const Plane3& p, const Vector3& point);\n\n} // namespace plane3\n\nnamespace plane3\n{\n\tinline Plane3 from_point_and_normal(const Vector3& point, const Vector3& normal)\n\t{\n\t\tPlane3 p;\n\t\tp.n = normal;\n\t\tp.d = -dot(normal, point);\n\t\treturn p;\n\t}\n\n\tinline Plane3& normalize(Plane3& p)\n\t{\n\t\tconst f32 len = length(p.n);\n\n\t\tif (fequal(len, 0.0f))\n\t\t\treturn p;\n\n\t\tconst f32 inv_len = 1.0f / len;\n\n\t\tp.n *= inv_len;\n\t\tp.d *= inv_len;\n\n\t\treturn p;\n\t}\n\n\tinline f32 distance_to_point(const Plane3& p, const Vector3& point)\n\t{\n\t\treturn dot(p.n, point) + p.d;\n\t}\n\n}", "parent": null, "children": [13, 14], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 59, "column": 1}}, {"id": 13, "type": "type_identifier", "text": "namespace", "parent": 12, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 9}}, {"id": 14, "type": "identifier", "text": "crown", "parent": 12, "children": [], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 15}}, {"id": 15, "type": "function_definition", "text": "namespace plane3\n{\n\t/// Returns the plane defined by @a point and @a normal.\n\tPlane3 from_point_and_normal(const Vector3& point, const Vector3& normal);\n\n\t/// Normalizes the plane @a p and returns its result.\n\tPlane3& normalize(Plane3& p);\n\n\t/// Returns the signed distance between plane @a p and point @a point.\n\tf32 distance_to_point(const Plane3& p, const Vector3& point);\n\n}", "parent": 12, "children": [16, 17], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 27, "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": "plane3", "parent": 15, "children": [], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 16}}, {"id": 18, "type": "declaration", "text": "Plane3 from_point_and_normal(const Vector3& point, const Vector3& normal);", "parent": 15, "children": [19, 20], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 75}}, {"id": 19, "type": "type_identifier", "text": "Plane3", "parent": 18, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 7}}, {"id": 20, "type": "function_declarator", "text": "from_point_and_normal(const Vector3& point, const Vector3& normal)", "parent": 18, "children": [21, 22], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 74}}, {"id": 21, "type": "identifier", "text": "from_point_and_normal", "parent": 20, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 29}}, {"id": 22, "type": "parameter_list", "text": "(const Vector3& point, const Vector3& normal)", "parent": 20, "children": [23, 26], "start_point": {"row": 19, "column": 29}, "end_point": {"row": 19, "column": 74}}, {"id": 23, "type": "parameter_declaration", "text": "const Vector3& point", "parent": 22, "children": [24, 25], "start_point": {"row": 19, "column": 30}, "end_point": {"row": 19, "column": 50}}, {"id": 24, "type": "type_identifier", "text": "Vector3", "parent": 23, "children": [], "start_point": {"row": 19, "column": 36}, "end_point": {"row": 19, "column": 43}}, {"id": 25, "type": "identifier", "text": "point", "parent": 23, "children": [], "start_point": {"row": 19, "column": 45}, "end_point": {"row": 19, "column": 50}}, {"id": 26, "type": "parameter_declaration", "text": "const Vector3& normal", "parent": 22, "children": [27, 28], "start_point": {"row": 19, "column": 52}, "end_point": {"row": 19, "column": 73}}, {"id": 27, "type": "type_identifier", "text": "Vector3", "parent": 26, "children": [], "start_point": {"row": 19, "column": 58}, "end_point": {"row": 19, "column": 65}}, {"id": 28, "type": "identifier", "text": "normal", "parent": 26, "children": [], "start_point": {"row": 19, "column": 67}, "end_point": {"row": 19, "column": 73}}, {"id": 29, "type": "binary_expression", "text": "Plane3& normalize(Plane3& p)", "parent": 15, "children": [30, 31], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 29}}, {"id": 30, "type": "identifier", "text": "Plane3", "parent": 29, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 7}}, {"id": 31, "type": "call_expression", "text": "normalize(Plane3& p)", "parent": 29, "children": [32, 33], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 29}}, {"id": 32, "type": "identifier", "text": "normalize", "parent": 31, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 18}}, {"id": 33, "type": "argument_list", "text": "(Plane3& p)", "parent": 31, "children": [34], "start_point": {"row": 22, "column": 18}, "end_point": {"row": 22, "column": 29}}, {"id": 34, "type": "binary_expression", "text": "Plane3& p", "parent": 33, "children": [35, 36], "start_point": {"row": 22, "column": 19}, "end_point": {"row": 22, "column": 28}}, {"id": 35, "type": "identifier", "text": "Plane3", "parent": 34, "children": [], "start_point": {"row": 22, "column": 19}, "end_point": {"row": 22, "column": 25}}, {"id": 36, "type": "identifier", "text": "p", "parent": 34, "children": [], "start_point": {"row": 22, "column": 27}, "end_point": {"row": 22, "column": 28}}, {"id": 37, "type": "declaration", "text": "f32 distance_to_point(const Plane3& p, const Vector3& point);", "parent": 15, "children": [38, 39], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 62}}, {"id": 38, "type": "type_identifier", "text": "f32", "parent": 37, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 4}}, {"id": 39, "type": "function_declarator", "text": "distance_to_point(const Plane3& p, const Vector3& point)", "parent": 37, "children": [40, 41], "start_point": {"row": 25, "column": 5}, "end_point": {"row": 25, "column": 61}}, {"id": 40, "type": "identifier", "text": "distance_to_point", "parent": 39, "children": [], "start_point": {"row": 25, "column": 5}, "end_point": {"row": 25, "column": 22}}, {"id": 41, "type": "parameter_list", "text": "(const Plane3& p, const Vector3& point)", "parent": 39, "children": [42, 45], "start_point": {"row": 25, "column": 22}, "end_point": {"row": 25, "column": 61}}, {"id": 42, "type": "parameter_declaration", "text": "const Plane3& p", "parent": 41, "children": [43, 44], "start_point": {"row": 25, "column": 23}, "end_point": {"row": 25, "column": 38}}, {"id": 43, "type": "type_identifier", "text": "Plane3", "parent": 42, "children": [], "start_point": {"row": 25, "column": 29}, "end_point": {"row": 25, "column": 35}}, {"id": 44, "type": "identifier", "text": "p", "parent": 42, "children": [], "start_point": {"row": 25, "column": 37}, "end_point": {"row": 25, "column": 38}}, {"id": 45, "type": "parameter_declaration", "text": "const Vector3& point", "parent": 41, "children": [46, 47], "start_point": {"row": 25, "column": 40}, "end_point": {"row": 25, "column": 60}}, {"id": 46, "type": "type_identifier", "text": "Vector3", "parent": 45, "children": [], "start_point": {"row": 25, "column": 46}, "end_point": {"row": 25, "column": 53}}, {"id": 47, "type": "identifier", "text": "point", "parent": 45, "children": [], "start_point": {"row": 25, "column": 55}, "end_point": {"row": 25, "column": 60}}, {"id": 48, "type": "function_definition", "text": "namespace plane3\n{\n\tinline Plane3 from_point_and_normal(const Vector3& point, const Vector3& normal)\n\t{\n\t\tPlane3 p;\n\t\tp.n = normal;\n\t\tp.d = -dot(normal, point);\n\t\treturn p;\n\t}\n\n\tinline Plane3& normalize(Plane3& p)\n\t{\n\t\tconst f32 len = length(p.n);\n\n\t\tif (fequal(len, 0.0f))\n\t\t\treturn p;\n\n\t\tconst f32 inv_len = 1.0f / len;\n\n\t\tp.n *= inv_len;\n\t\tp.d *= inv_len;\n\n\t\treturn p;\n\t}", "parent": 12, "children": [49, 50], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 52, "column": 2}}, {"id": 49, "type": "type_identifier", "text": "namespace", "parent": 48, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 9}}, {"id": 50, "type": "identifier", "text": "plane3", "parent": 48, "children": [], "start_point": {"row": 29, "column": 10}, "end_point": {"row": 29, "column": 16}}, {"id": 51, "type": "function_definition", "text": "inline Plane3 from_point_and_normal(const Vector3& point, const Vector3& normal)\n\t{\n\t\tPlane3 p;\n\t\tp.n = normal;\n\t\tp.d = -dot(normal, point);\n\t\treturn p;\n\t}", "parent": 48, "children": [52, 54, 55], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 37, "column": 2}}, {"id": 52, "type": "storage_class_specifier", "text": "inline", "parent": 51, "children": [53], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 7}}, {"id": 53, "type": "inline", "text": "inline", "parent": 52, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 7}}, {"id": 54, "type": "type_identifier", "text": "Plane3", "parent": 51, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 14}}, {"id": 55, "type": "function_declarator", "text": "from_point_and_normal(const Vector3& point, const Vector3& normal)", "parent": 51, "children": [56, 57], "start_point": {"row": 31, "column": 15}, "end_point": {"row": 31, "column": 81}}, {"id": 56, "type": "identifier", "text": "from_point_and_normal", "parent": 55, "children": [], "start_point": {"row": 31, "column": 15}, "end_point": {"row": 31, "column": 36}}, {"id": 57, "type": "parameter_list", "text": "(const Vector3& point, const Vector3& normal)", "parent": 55, "children": [58, 61], "start_point": {"row": 31, "column": 36}, "end_point": {"row": 31, "column": 81}}, {"id": 58, "type": "parameter_declaration", "text": "const Vector3& point", "parent": 57, "children": [59, 60], "start_point": {"row": 31, "column": 37}, "end_point": {"row": 31, "column": 57}}, {"id": 59, "type": "type_identifier", "text": "Vector3", "parent": 58, "children": [], "start_point": {"row": 31, "column": 43}, "end_point": {"row": 31, "column": 50}}, {"id": 60, "type": "identifier", "text": "point", "parent": 58, "children": [], "start_point": {"row": 31, "column": 52}, "end_point": {"row": 31, "column": 57}}, {"id": 61, "type": "parameter_declaration", "text": "const Vector3& normal", "parent": 57, "children": [62, 63], "start_point": {"row": 31, "column": 59}, "end_point": {"row": 31, "column": 80}}, {"id": 62, "type": "type_identifier", "text": "Vector3", "parent": 61, "children": [], "start_point": {"row": 31, "column": 65}, "end_point": {"row": 31, "column": 72}}, {"id": 63, "type": "identifier", "text": "normal", "parent": 61, "children": [], "start_point": {"row": 31, "column": 74}, "end_point": {"row": 31, "column": 80}}, {"id": 64, "type": "declaration", "text": "Plane3 p;", "parent": 51, "children": [65, 66], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 11}}, {"id": 65, "type": "type_identifier", "text": "Plane3", "parent": 64, "children": [], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 8}}, {"id": 66, "type": "identifier", "text": "p", "parent": 64, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 10}}, {"id": 67, "type": "assignment_expression", "text": "p.n = normal", "parent": 51, "children": [68, 71, 72], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 14}}, {"id": 68, "type": "field_expression", "text": "p.n", "parent": 67, "children": [69, 70], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 5}}, {"id": 69, "type": "identifier", "text": "p", "parent": 68, "children": [], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 3}}, {"id": 70, "type": "field_identifier", "text": "n", "parent": 68, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 5}}, {"id": 71, "type": "=", "text": "=", "parent": 67, "children": [], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 7}}, {"id": 72, "type": "identifier", "text": "normal", "parent": 67, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 14}}, {"id": 73, "type": "assignment_expression", "text": "p.d = -dot(normal, point)", "parent": 51, "children": [74, 77, 78], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 27}}, {"id": 74, "type": "field_expression", "text": "p.d", "parent": 73, "children": [75, 76], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 5}}, {"id": 75, "type": "identifier", "text": "p", "parent": 74, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 3}}, {"id": 76, "type": "field_identifier", "text": "d", "parent": 74, "children": [], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 5}}, {"id": 77, "type": "=", "text": "=", "parent": 73, "children": [], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 7}}, {"id": 78, "type": "unary_expression", "text": "-dot(normal, point)", "parent": 73, "children": [79, 80], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 27}}, {"id": 79, "type": "-", "text": "-", "parent": 78, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 9}}, {"id": 80, "type": "call_expression", "text": "dot(normal, point)", "parent": 78, "children": [81, 82], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 27}}, {"id": 81, "type": "identifier", "text": "dot", "parent": 80, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 12}}, {"id": 82, "type": "argument_list", "text": "(normal, point)", "parent": 80, "children": [83, 84], "start_point": {"row": 35, "column": 12}, "end_point": {"row": 35, "column": 27}}, {"id": 83, "type": "identifier", "text": "normal", "parent": 82, "children": [], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 19}}, {"id": 84, "type": "identifier", "text": "point", "parent": 82, "children": [], "start_point": {"row": 35, "column": 21}, "end_point": {"row": 35, "column": 26}}, {"id": 85, "type": "return_statement", "text": "return p;", "parent": 51, "children": [86], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 11}}, {"id": 86, "type": "identifier", "text": "p", "parent": 85, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 10}}, {"id": 87, "type": "ERROR", "text": "inline Plane3& normalize(Plane3& p)\n\t{", "parent": 48, "children": [88, 90, 91], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 40, "column": 2}}, {"id": 88, "type": "storage_class_specifier", "text": "inline", "parent": 87, "children": [89], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 7}}, {"id": 89, "type": "inline", "text": "inline", "parent": 88, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 7}}, {"id": 90, "type": "type_identifier", "text": "Plane3", "parent": 87, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 14}}, {"id": 91, "type": "pointer_expression", "text": "& normalize(Plane3& p)", "parent": 87, "children": [92], "start_point": {"row": 39, "column": 14}, "end_point": {"row": 39, "column": 36}}, {"id": 92, "type": "call_expression", "text": "normalize(Plane3& p)", "parent": 91, "children": [93, 94], "start_point": {"row": 39, "column": 16}, "end_point": {"row": 39, "column": 36}}, {"id": 93, "type": "identifier", "text": "normalize", "parent": 92, "children": [], "start_point": {"row": 39, "column": 16}, "end_point": {"row": 39, "column": 25}}, {"id": 94, "type": "argument_list", "text": "(Plane3& p)", "parent": 92, "children": [95], "start_point": {"row": 39, "column": 25}, "end_point": {"row": 39, "column": 36}}, {"id": 95, "type": "binary_expression", "text": "Plane3& p", "parent": 94, "children": [96, 97], "start_point": {"row": 39, "column": 26}, "end_point": {"row": 39, "column": 35}}, {"id": 96, "type": "identifier", "text": "Plane3", "parent": 95, "children": [], "start_point": {"row": 39, "column": 26}, "end_point": {"row": 39, "column": 32}}, {"id": 97, "type": "identifier", "text": "p", "parent": 95, "children": [], "start_point": {"row": 39, "column": 34}, "end_point": {"row": 39, "column": 35}}, {"id": 98, "type": "declaration", "text": "const f32 len = length(p.n);", "parent": 48, "children": [99, 100], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 30}}, {"id": 99, "type": "type_identifier", "text": "f32", "parent": 98, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 11}}, {"id": 100, "type": "init_declarator", "text": "len = length(p.n)", "parent": 98, "children": [101, 102, 103], "start_point": {"row": 41, "column": 12}, "end_point": {"row": 41, "column": 29}}, {"id": 101, "type": "identifier", "text": "len", "parent": 100, "children": [], "start_point": {"row": 41, "column": 12}, "end_point": {"row": 41, "column": 15}}, {"id": 102, "type": "=", "text": "=", "parent": 100, "children": [], "start_point": {"row": 41, "column": 16}, "end_point": {"row": 41, "column": 17}}, {"id": 103, "type": "call_expression", "text": "length(p.n)", "parent": 100, "children": [104, 105], "start_point": {"row": 41, "column": 18}, "end_point": {"row": 41, "column": 29}}, {"id": 104, "type": "identifier", "text": "length", "parent": 103, "children": [], "start_point": {"row": 41, "column": 18}, "end_point": {"row": 41, "column": 24}}, {"id": 105, "type": "argument_list", "text": "(p.n)", "parent": 103, "children": [106], "start_point": {"row": 41, "column": 24}, "end_point": {"row": 41, "column": 29}}, {"id": 106, "type": "field_expression", "text": "p.n", "parent": 105, "children": [107, 108], "start_point": {"row": 41, "column": 25}, "end_point": {"row": 41, "column": 28}}, {"id": 107, "type": "identifier", "text": "p", "parent": 106, "children": [], "start_point": {"row": 41, "column": 25}, "end_point": {"row": 41, "column": 26}}, {"id": 108, "type": "field_identifier", "text": "n", "parent": 106, "children": [], "start_point": {"row": 41, "column": 27}, "end_point": {"row": 41, "column": 28}}, {"id": 109, "type": "if_statement", "text": "if (fequal(len, 0.0f))\n\t\t\treturn p;", "parent": 48, "children": [110, 116], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 44, "column": 12}}, {"id": 110, "type": "parenthesized_expression", "text": "(fequal(len, 0.0f))", "parent": 109, "children": [111], "start_point": {"row": 43, "column": 5}, "end_point": {"row": 43, "column": 24}}, {"id": 111, "type": "call_expression", "text": "fequal(len, 0.0f)", "parent": 110, "children": [112, 113], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 23}}, {"id": 112, "type": "identifier", "text": "fequal", "parent": 111, "children": [], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 12}}, {"id": 113, "type": "argument_list", "text": "(len, 0.0f)", "parent": 111, "children": [114, 115], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 23}}, {"id": 114, "type": "identifier", "text": "len", "parent": 113, "children": [], "start_point": {"row": 43, "column": 13}, "end_point": {"row": 43, "column": 16}}, {"id": 115, "type": "number_literal", "text": "0.0f", "parent": 113, "children": [], "start_point": {"row": 43, "column": 18}, "end_point": {"row": 43, "column": 22}}, {"id": 116, "type": "return_statement", "text": "return p;", "parent": 109, "children": [117], "start_point": {"row": 44, "column": 3}, "end_point": {"row": 44, "column": 12}}, {"id": 117, "type": "identifier", "text": "p", "parent": 116, "children": [], "start_point": {"row": 44, "column": 10}, "end_point": {"row": 44, "column": 11}}, {"id": 118, "type": "declaration", "text": "const f32 inv_len = 1.0f / len;", "parent": 48, "children": [119, 120], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 33}}, {"id": 119, "type": "type_identifier", "text": "f32", "parent": 118, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 11}}, {"id": 120, "type": "init_declarator", "text": "inv_len = 1.0f / len", "parent": 118, "children": [121, 122, 123], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 32}}, {"id": 121, "type": "identifier", "text": "inv_len", "parent": 120, "children": [], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 19}}, {"id": 122, "type": "=", "text": "=", "parent": 120, "children": [], "start_point": {"row": 46, "column": 20}, "end_point": {"row": 46, "column": 21}}, {"id": 123, "type": "binary_expression", "text": "1.0f / len", "parent": 120, "children": [124, 125, 126], "start_point": {"row": 46, "column": 22}, "end_point": {"row": 46, "column": 32}}, {"id": 124, "type": "number_literal", "text": "1.0f", "parent": 123, "children": [], "start_point": {"row": 46, "column": 22}, "end_point": {"row": 46, "column": 26}}, {"id": 125, "type": "/", "text": "/", "parent": 123, "children": [], "start_point": {"row": 46, "column": 27}, "end_point": {"row": 46, "column": 28}}, {"id": 126, "type": "identifier", "text": "len", "parent": 123, "children": [], "start_point": {"row": 46, "column": 29}, "end_point": {"row": 46, "column": 32}}, {"id": 127, "type": "assignment_expression", "text": "p.n *= inv_len", "parent": 48, "children": [128, 131, 132], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 16}}, {"id": 128, "type": "field_expression", "text": "p.n", "parent": 127, "children": [129, 130], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 5}}, {"id": 129, "type": "identifier", "text": "p", "parent": 128, "children": [], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 3}}, {"id": 130, "type": "field_identifier", "text": "n", "parent": 128, "children": [], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 5}}, {"id": 131, "type": "*=", "text": "*=", "parent": 127, "children": [], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 8}}, {"id": 132, "type": "identifier", "text": "inv_len", "parent": 127, "children": [], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 16}}, {"id": 133, "type": "assignment_expression", "text": "p.d *= inv_len", "parent": 48, "children": [134, 137, 138], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 16}}, {"id": 134, "type": "field_expression", "text": "p.d", "parent": 133, "children": [135, 136], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 5}}, {"id": 135, "type": "identifier", "text": "p", "parent": 134, "children": [], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 3}}, {"id": 136, "type": "field_identifier", "text": "d", "parent": 134, "children": [], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 5}}, {"id": 137, "type": "*=", "text": "*=", "parent": 133, "children": [], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 8}}, {"id": 138, "type": "identifier", "text": "inv_len", "parent": 133, "children": [], "start_point": {"row": 49, "column": 9}, "end_point": {"row": 49, "column": 16}}, {"id": 139, "type": "return_statement", "text": "return p;", "parent": 48, "children": [140], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 11}}, {"id": 140, "type": "identifier", "text": "p", "parent": 139, "children": [], "start_point": {"row": 51, "column": 9}, "end_point": {"row": 51, "column": 10}}, {"id": 141, "type": "function_definition", "text": "inline f32 distance_to_point(const Plane3& p, const Vector3& point)\n\t{\n\t\treturn dot(p.n, point) + p.d;\n\t}", "parent": 12, "children": [142, 144, 145], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 57, "column": 2}}, {"id": 142, "type": "storage_class_specifier", "text": "inline", "parent": 141, "children": [143], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 7}}, {"id": 143, "type": "inline", "text": "inline", "parent": 142, "children": [], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 7}}, {"id": 144, "type": "type_identifier", "text": "f32", "parent": 141, "children": [], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 11}}, {"id": 145, "type": "function_declarator", "text": "distance_to_point(const Plane3& p, const Vector3& point)", "parent": 141, "children": [146, 147], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 68}}, {"id": 146, "type": "identifier", "text": "distance_to_point", "parent": 145, "children": [], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 29}}, {"id": 147, "type": "parameter_list", "text": "(const Plane3& p, const Vector3& point)", "parent": 145, "children": [148, 151], "start_point": {"row": 54, "column": 29}, "end_point": {"row": 54, "column": 68}}, {"id": 148, "type": "parameter_declaration", "text": "const Plane3& p", "parent": 147, "children": [149, 150], "start_point": {"row": 54, "column": 30}, "end_point": {"row": 54, "column": 45}}, {"id": 149, "type": "type_identifier", "text": "Plane3", "parent": 148, "children": [], "start_point": {"row": 54, "column": 36}, "end_point": {"row": 54, "column": 42}}, {"id": 150, "type": "identifier", "text": "p", "parent": 148, "children": [], "start_point": {"row": 54, "column": 44}, "end_point": {"row": 54, "column": 45}}, {"id": 151, "type": "parameter_declaration", "text": "const Vector3& point", "parent": 147, "children": [152, 153], "start_point": {"row": 54, "column": 47}, "end_point": {"row": 54, "column": 67}}, {"id": 152, "type": "type_identifier", "text": "Vector3", "parent": 151, "children": [], "start_point": {"row": 54, "column": 53}, "end_point": {"row": 54, "column": 60}}, {"id": 153, "type": "identifier", "text": "point", "parent": 151, "children": [], "start_point": {"row": 54, "column": 62}, "end_point": {"row": 54, "column": 67}}, {"id": 154, "type": "return_statement", "text": "return dot(p.n, point) + p.d;", "parent": 141, "children": [155], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 56, "column": 31}}, {"id": 155, "type": "binary_expression", "text": "dot(p.n, point) + p.d", "parent": 154, "children": [156, 163, 164], "start_point": {"row": 56, "column": 9}, "end_point": {"row": 56, "column": 30}}, {"id": 156, "type": "call_expression", "text": "dot(p.n, point)", "parent": 155, "children": [157, 158], "start_point": {"row": 56, "column": 9}, "end_point": {"row": 56, "column": 24}}, {"id": 157, "type": "identifier", "text": "dot", "parent": 156, "children": [], "start_point": {"row": 56, "column": 9}, "end_point": {"row": 56, "column": 12}}, {"id": 158, "type": "argument_list", "text": "(p.n, point)", "parent": 156, "children": [159, 162], "start_point": {"row": 56, "column": 12}, "end_point": {"row": 56, "column": 24}}, {"id": 159, "type": "field_expression", "text": "p.n", "parent": 158, "children": [160, 161], "start_point": {"row": 56, "column": 13}, "end_point": {"row": 56, "column": 16}}, {"id": 160, "type": "identifier", "text": "p", "parent": 159, "children": [], "start_point": {"row": 56, "column": 13}, "end_point": {"row": 56, "column": 14}}, {"id": 161, "type": "field_identifier", "text": "n", "parent": 159, "children": [], "start_point": {"row": 56, "column": 15}, "end_point": {"row": 56, "column": 16}}, {"id": 162, "type": "identifier", "text": "point", "parent": 158, "children": [], "start_point": {"row": 56, "column": 18}, "end_point": {"row": 56, "column": 23}}, {"id": 163, "type": "+", "text": "+", "parent": 155, "children": [], "start_point": {"row": 56, "column": 25}, "end_point": {"row": 56, "column": 26}}, {"id": 164, "type": "field_expression", "text": "p.d", "parent": 155, "children": [165, 166], "start_point": {"row": 56, "column": 27}, "end_point": {"row": 56, "column": 30}}, {"id": 165, "type": "identifier", "text": "p", "parent": 164, "children": [], "start_point": {"row": 56, "column": 27}, "end_point": {"row": 56, "column": 28}}, {"id": 166, "type": "field_identifier", "text": "d", "parent": 164, "children": [], "start_point": {"row": 56, "column": 29}, "end_point": {"row": 56, "column": 30}}]}, "node_categories": {"declarations": {"functions": [12, 15, 20, 39, 48, 51, 55, 141, 145], "variables": [18, 23, 26, 37, 42, 45, 58, 61, 64, 98, 118, 148, 151], "classes": [52, 88, 142], "imports": [3, 4, 6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [29, 31, 34, 68, 74, 78, 80, 91, 92, 95, 103, 106, 110, 111, 123, 128, 134, 155, 156, 159, 164], "assignments": [67, 73, 127, 133], "loops": [], "conditionals": [13, 14, 16, 17, 19, 21, 24, 25, 27, 28, 30, 32, 35, 36, 38, 40, 43, 44, 46, 47, 49, 50, 54, 56, 59, 60, 62, 63, 65, 66, 69, 70, 72, 75, 76, 81, 83, 84, 86, 90, 93, 96, 97, 99, 101, 104, 107, 108, 109, 112, 114, 117, 119, 121, 126, 129, 130, 132, 135, 136, 138, 140, 144, 146, 149, 150, 152, 153, 157, 160, 161, 162, 165, 166], "returns": [85, 116, 139, 154], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11, 115, 124], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 12, "universal_type": "function", "name": "unknown", "text_snippet": "namespace crown\n{\n/// Functions to manipulate Plane3.\n///\n/// @ingroup Math\nnamespace plane3\n{\n\t/// "}, {"node_id": 15, "universal_type": "function", "name": "unknown", "text_snippet": "namespace plane3\n{\n\t/// Returns the plane defined by @a point and @a normal.\n\tPlane3 from_point_and_"}, {"node_id": 20, "universal_type": "function", "name": "unknown", "text_snippet": "from_point_and_normal(const Vector3& point, const Vector3& normal)"}, {"node_id": 39, "universal_type": "function", "name": "unknown", "text_snippet": "distance_to_point(const Plane3& p, const Vector3& point)"}, {"node_id": 48, "universal_type": "function", "name": "unknown", "text_snippet": "namespace plane3\n{\n\tinline Plane3 from_point_and_normal(const Vector3& point, const Vector3& normal)"}, {"node_id": 51, "universal_type": "function", "name": "unknown", "text_snippet": "inline Plane3 from_point_and_normal(const Vector3& point, const Vector3& normal)\n\t{\n\t\tPlane3 p;\n\t\tp."}, {"node_id": 55, "universal_type": "function", "name": "unknown", "text_snippet": "from_point_and_normal(const Vector3& point, const Vector3& normal)"}, {"node_id": 141, "universal_type": "function", "name": "unknown", "text_snippet": "inline f32 distance_to_point(const Plane3& p, const Vector3& point)\n\t{\n\t\treturn dot(p.n, point) + p."}, {"node_id": 145, "universal_type": "function", "name": "unknown", "text_snippet": "distance_to_point(const Plane3& p, const Vector3& point)"}], "class_declarations": [{"node_id": 52, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 88, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 142, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}], "import_statements": [{"node_id": 3, "text": "#include \"core/math/math.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"core/math/types.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"core/math/vector3.h\"\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "/*\n * Copyright (c) 2012-2018 <NAME> and individual contributors.\n * License: https://github.com/dbartolini/crown/blob/master/LICENSE\n */\n\n#pragma once\n\n#include \"core/math/math.h\"\n#include \"core/math/types.h\"\n#include \"core/math/vector3.h\"\n\nnamespace crown\n{\n/// Functions to manipulate Plane3.\n///\n/// @ingroup Math\nnamespace plane3\n{\n\t/// Returns the plane defined by @a point and @a normal.\n\tPlane3 from_point_and_normal(const Vector3& point, const Vector3& normal);\n\n\t/// Normalizes the plane @a p and returns its result.\n\tPlane3& normalize(Plane3& p);\n\n\t/// Returns the signed distance between plane @a p and point @a point.\n\tf32 distance_to_point(const Plane3& p, const Vector3& point);\n\n} // namespace plane3\n\nnamespace plane3\n{\n\tinline Plane3 from_point_and_normal(const Vector3& point, const Vector3& normal)\n\t{\n\t\tPlane3 p;\n\t\tp.n = normal;\n\t\tp.d = -dot(normal, point);\n\t\treturn p;\n\t}\n\n\tinline Plane3& normalize(Plane3& p)\n\t{\n\t\tconst f32 len = length(p.n);\n\n\t\tif (fequal(len, 0.0f))\n\t\t\treturn p;\n\n\t\tconst f32 inv_len = 1.0f / len;\n\n\t\tp.n *= inv_len;\n\t\tp.d *= inv_len;\n\n\t\treturn p;\n\t}\n\n\tinline f32 distance_to_point(const Plane3& p, const Vector3& point)\n\t{\n\t\treturn dot(p.n, point) + p.d;\n\t}\n\n} // namespace plane3\n\n} // namespace crown\n"}
| 81,229
|
c
|
/*
* Copyright (c) 2012-2021 <NAME> et al.
* License: https://github.com/dbartolini/crown/blob/master/LICENSE
*/
#pragma once
#include "core/platform.h"
#if CROWN_PLATFORM_ANDROID
#include "core/filesystem/filesystem.h"
#include <sys/types.h> // off_t
#include <android/asset_manager.h>
namespace crown
{
/// Access files on Android's assets folder.
/// The assets folder is read-only and all the paths are relative.
///
/// @ingroup Filesystem
struct FilesystemApk : public Filesystem
{
Allocator* _allocator;
AAssetManager* _asset_manager;
FilesystemApk(Allocator& a, AAssetManager* asset_manager);
/// @copydoc Filesystem::open()
File* open(const char* path, FileOpenMode::Enum mode);
/// @copydoc Filesystem::close()
void close(File& file);
/// @copydoc Filesystem::stat()
Stat stat(const char* path);
/// @copydoc Filesystem::exists()
bool exists(const char* path);
/// @copydoc Filesystem::is_directory()
bool is_directory(const char* path);
/// @copydoc Filesystem::is_file()
bool is_file(const char* path);
/// @copydoc Filesystem::last_modified_time()
u64 last_modified_time(const char* path);
/// @copydoc Filesystem::create_directory()
CreateResult create_directory(const char* path);
/// @copydoc Filesystem::delete_directory()
DeleteResult delete_directory(const char* path);
/// @copydoc Filesystem::delete_file()
DeleteResult delete_file(const char* path);
/// @copydoc Filesystem::list_files()
void list_files(const char* path, Vector<DynamicString>& files);
/// @copydoc Filesystem::absolute_path()
void absolute_path(DynamicString& os_path, const char* path);
};
} // namespace crown
#endif // CROWN_PLATFORM_ANDROID
| 33.69
| 48
|
(translation_unit) "/*\n * Copyright (c) 2012-2021 <NAME> et al.\n * License: https://github.com/dbartolini/crown/blob/master/LICENSE\n */\n\n#pragma once\n\n#include "core/platform.h"\n\n#if CROWN_PLATFORM_ANDROID\n\n#include "core/filesystem/filesystem.h"\n#include <sys/types.h> // off_t\n#include <android/asset_manager.h>\n\nnamespace crown\n{\n/// Access files on Android's assets folder.\n/// The assets folder is read-only and all the paths are relative.\n///\n/// @ingroup Filesystem\nstruct FilesystemApk : public Filesystem\n{\n Allocator* _allocator;\n AAssetManager* _asset_manager;\n\n FilesystemApk(Allocator& a, AAssetManager* asset_manager);\n\n /// @copydoc Filesystem::open()\n File* open(const char* path, FileOpenMode::Enum mode);\n\n /// @copydoc Filesystem::close()\n void close(File& file);\n\n /// @copydoc Filesystem::stat()\n Stat stat(const char* path);\n\n /// @copydoc Filesystem::exists()\n bool exists(const char* path);\n\n /// @copydoc Filesystem::is_directory()\n bool is_directory(const char* path);\n\n /// @copydoc Filesystem::is_file()\n bool is_file(const char* path);\n\n /// @copydoc Filesystem::last_modified_time()\n u64 last_modified_time(const char* path);\n\n /// @copydoc Filesystem::create_directory()\n CreateResult create_directory(const char* path);\n\n /// @copydoc Filesystem::delete_directory()\n DeleteResult delete_directory(const char* path);\n\n /// @copydoc Filesystem::delete_file()\n DeleteResult delete_file(const char* path);\n\n /// @copydoc Filesystem::list_files()\n void list_files(const char* path, Vector<DynamicString>& files);\n\n /// @copydoc Filesystem::absolute_path()\n void absolute_path(DynamicString& os_path, const char* path);\n};\n\n} // namespace crown\n\n#endif // CROWN_PLATFORM_ANDROID\n"
(comment) "/*\n * Copyright (c) 2012-2021 <NAME> et al.\n * License: https://github.com/dbartolini/crown/blob/master/LICENSE\n */"
(preproc_call) "#pragma once\n"
(preproc_directive) "#pragma"
(preproc_arg) "once"
(preproc_include) "#include "core/platform.h"\n"
(#include) "#include"
(string_literal) ""core/platform.h""
(") """
(string_content) "core/platform.h"
(") """
(preproc_if) "#if CROWN_PLATFORM_ANDROID\n\n#include "core/filesystem/filesystem.h"\n#include <sys/types.h> // off_t\n#include <android/asset_manager.h>\n\nnamespace crown\n{\n/// Access files on Android's assets folder.\n/// The assets folder is read-only and all the paths are relative.\n///\n/// @ingroup Filesystem\nstruct FilesystemApk : public Filesystem\n{\n Allocator* _allocator;\n AAssetManager* _asset_manager;\n\n FilesystemApk(Allocator& a, AAssetManager* asset_manager);\n\n /// @copydoc Filesystem::open()\n File* open(const char* path, FileOpenMode::Enum mode);\n\n /// @copydoc Filesystem::close()\n void close(File& file);\n\n /// @copydoc Filesystem::stat()\n Stat stat(const char* path);\n\n /// @copydoc Filesystem::exists()\n bool exists(const char* path);\n\n /// @copydoc Filesystem::is_directory()\n bool is_directory(const char* path);\n\n /// @copydoc Filesystem::is_file()\n bool is_file(const char* path);\n\n /// @copydoc Filesystem::last_modified_time()\n u64 last_modified_time(const char* path);\n\n /// @copydoc Filesystem::create_directory()\n CreateResult create_directory(const char* path);\n\n /// @copydoc Filesystem::delete_directory()\n DeleteResult delete_directory(const char* path);\n\n /// @copydoc Filesystem::delete_file()\n DeleteResult delete_file(const char* path);\n\n /// @copydoc Filesystem::list_files()\n void list_files(const char* path, Vector<DynamicString>& files);\n\n /// @copydoc Filesystem::absolute_path()\n void absolute_path(DynamicString& os_path, const char* path);\n};\n\n} // namespace crown\n\n#endif"
(#if) "#if"
(identifier) "CROWN_PLATFORM_ANDROID"
(
) "\n\n"
(preproc_include) "#include "core/filesystem/filesystem.h"\n"
(#include) "#include"
(string_literal) ""core/filesystem/filesystem.h""
(") """
(string_content) "core/filesystem/filesystem.h"
(") """
(preproc_include) "#include <sys/types.h> // off_t\n"
(#include) "#include"
(system_lib_string) "<sys/types.h>"
(comment) "// off_t"
(preproc_include) "#include <android/asset_manager.h>\n"
(#include) "#include"
(system_lib_string) "<android/asset_manager.h>"
(function_definition) "namespace crown\n{\n/// Access files on Android's assets folder.\n/// The assets folder is read-only and all the paths are relative.\n///\n/// @ingroup Filesystem\nstruct FilesystemApk : public Filesystem\n{\n Allocator* _allocator;\n AAssetManager* _asset_manager;\n\n FilesystemApk(Allocator& a, AAssetManager* asset_manager);\n\n /// @copydoc Filesystem::open()\n File* open(const char* path, FileOpenMode::Enum mode);\n\n /// @copydoc Filesystem::close()\n void close(File& file);\n\n /// @copydoc Filesystem::stat()\n Stat stat(const char* path);\n\n /// @copydoc Filesystem::exists()\n bool exists(const char* path);\n\n /// @copydoc Filesystem::is_directory()\n bool is_directory(const char* path);\n\n /// @copydoc Filesystem::is_file()\n bool is_file(const char* path);\n\n /// @copydoc Filesystem::last_modified_time()\n u64 last_modified_time(const char* path);\n\n /// @copydoc Filesystem::create_directory()\n CreateResult create_directory(const char* path);\n\n /// @copydoc Filesystem::delete_directory()\n DeleteResult delete_directory(const char* path);\n\n /// @copydoc Filesystem::delete_file()\n DeleteResult delete_file(const char* path);\n\n /// @copydoc Filesystem::list_files()\n void list_files(const char* path, Vector<DynamicString>& files);\n\n /// @copydoc Filesystem::absolute_path()\n void absolute_path(DynamicString& os_path, const char* path);\n};\n\n}"
(type_identifier) "namespace"
(identifier) "crown"
(compound_statement) "{\n/// Access files on Android's assets folder.\n/// The assets folder is read-only and all the paths are relative.\n///\n/// @ingroup Filesystem\nstruct FilesystemApk : public Filesystem\n{\n Allocator* _allocator;\n AAssetManager* _asset_manager;\n\n FilesystemApk(Allocator& a, AAssetManager* asset_manager);\n\n /// @copydoc Filesystem::open()\n File* open(const char* path, FileOpenMode::Enum mode);\n\n /// @copydoc Filesystem::close()\n void close(File& file);\n\n /// @copydoc Filesystem::stat()\n Stat stat(const char* path);\n\n /// @copydoc Filesystem::exists()\n bool exists(const char* path);\n\n /// @copydoc Filesystem::is_directory()\n bool is_directory(const char* path);\n\n /// @copydoc Filesystem::is_file()\n bool is_file(const char* path);\n\n /// @copydoc Filesystem::last_modified_time()\n u64 last_modified_time(const char* path);\n\n /// @copydoc Filesystem::create_directory()\n CreateResult create_directory(const char* path);\n\n /// @copydoc Filesystem::delete_directory()\n DeleteResult delete_directory(const char* path);\n\n /// @copydoc Filesystem::delete_file()\n DeleteResult delete_file(const char* path);\n\n /// @copydoc Filesystem::list_files()\n void list_files(const char* path, Vector<DynamicString>& files);\n\n /// @copydoc Filesystem::absolute_path()\n void absolute_path(DynamicString& os_path, const char* path);\n};\n\n}"
({) "{"
(comment) "/// Access files on Android's assets folder."
(comment) "/// The assets folder is read-only and all the paths are relative."
(comment) "///"
(comment) "/// @ingroup Filesystem"
(function_definition) "struct FilesystemApk : public Filesystem\n{\n Allocator* _allocator;\n AAssetManager* _asset_manager;\n\n FilesystemApk(Allocator& a, AAssetManager* asset_manager);\n\n /// @copydoc Filesystem::open()\n File* open(const char* path, FileOpenMode::Enum mode);\n\n /// @copydoc Filesystem::close()\n void close(File& file);\n\n /// @copydoc Filesystem::stat()\n Stat stat(const char* path);\n\n /// @copydoc Filesystem::exists()\n bool exists(const char* path);\n\n /// @copydoc Filesystem::is_directory()\n bool is_directory(const char* path);\n\n /// @copydoc Filesystem::is_file()\n bool is_file(const char* path);\n\n /// @copydoc Filesystem::last_modified_time()\n u64 last_modified_time(const char* path);\n\n /// @copydoc Filesystem::create_directory()\n CreateResult create_directory(const char* path);\n\n /// @copydoc Filesystem::delete_directory()\n DeleteResult delete_directory(const char* path);\n\n /// @copydoc Filesystem::delete_file()\n DeleteResult delete_file(const char* path);\n\n /// @copydoc Filesystem::list_files()\n void list_files(const char* path, Vector<DynamicString>& files);\n\n /// @copydoc Filesystem::absolute_path()\n void absolute_path(DynamicString& os_path, const char* path);\n}"
(struct_specifier) "struct FilesystemApk"
(struct) "struct"
(type_identifier) "FilesystemApk"
(ERROR) ": public"
(:) ":"
(identifier) "public"
(identifier) "Filesystem"
(compound_statement) "{\n Allocator* _allocator;\n AAssetManager* _asset_manager;\n\n FilesystemApk(Allocator& a, AAssetManager* asset_manager);\n\n /// @copydoc Filesystem::open()\n File* open(const char* path, FileOpenMode::Enum mode);\n\n /// @copydoc Filesystem::close()\n void close(File& file);\n\n /// @copydoc Filesystem::stat()\n Stat stat(const char* path);\n\n /// @copydoc Filesystem::exists()\n bool exists(const char* path);\n\n /// @copydoc Filesystem::is_directory()\n bool is_directory(const char* path);\n\n /// @copydoc Filesystem::is_file()\n bool is_file(const char* path);\n\n /// @copydoc Filesystem::last_modified_time()\n u64 last_modified_time(const char* path);\n\n /// @copydoc Filesystem::create_directory()\n CreateResult create_directory(const char* path);\n\n /// @copydoc Filesystem::delete_directory()\n DeleteResult delete_directory(const char* path);\n\n /// @copydoc Filesystem::delete_file()\n DeleteResult delete_file(const char* path);\n\n /// @copydoc Filesystem::list_files()\n void list_files(const char* path, Vector<DynamicString>& files);\n\n /// @copydoc Filesystem::absolute_path()\n void absolute_path(DynamicString& os_path, const char* path);\n}"
({) "{"
(declaration) "Allocator* _allocator;"
(type_identifier) "Allocator"
(pointer_declarator) "* _allocator"
(*) "*"
(identifier) "_allocator"
(;) ";"
(declaration) "AAssetManager* _asset_manager;"
(type_identifier) "AAssetManager"
(pointer_declarator) "* _asset_manager"
(*) "*"
(identifier) "_asset_manager"
(;) ";"
(expression_statement) "FilesystemApk(Allocator& a, AAssetManager* asset_manager);"
(call_expression) "FilesystemApk(Allocator& a, AAssetManager* asset_manager)"
(identifier) "FilesystemApk"
(argument_list) "(Allocator& a, AAssetManager* asset_manager)"
(() "("
(binary_expression) "Allocator& a"
(identifier) "Allocator"
(&) "&"
(identifier) "a"
(,) ","
(binary_expression) "AAssetManager* asset_manager"
(identifier) "AAssetManager"
(*) "*"
(identifier) "asset_manager"
()) ")"
(;) ";"
(comment) "/// @copydoc Filesystem::open()"
(declaration) "File* open(const char* path, FileOpenMode::Enum mode);"
(type_identifier) "File"
(pointer_declarator) "* open(const char* path, FileOpenMode::Enum mode)"
(*) "*"
(function_declarator) "open(const char* path, FileOpenMode::Enum mode)"
(identifier) "open"
(parameter_list) "(const char* path, FileOpenMode::Enum mode)"
(() "("
(parameter_declaration) "const char* path"
(type_qualifier) "const"
(const) "const"
(primitive_type) "char"
(pointer_declarator) "* path"
(*) "*"
(identifier) "path"
(,) ","
(parameter_declaration) "FileOpenMode::Enum mode"
(type_identifier) "FileOpenMode"
(ERROR) "::Enum"
(:) ":"
(:) ":"
(identifier) "Enum"
(identifier) "mode"
()) ")"
(;) ";"
(comment) "/// @copydoc Filesystem::close()"
(declaration) "void close(File& file);"
(primitive_type) "void"
(function_declarator) "close(File& file)"
(identifier) "close"
(parameter_list) "(File& file)"
(() "("
(parameter_declaration) "File& file"
(type_identifier) "File"
(ERROR) "&"
(&) "&"
(identifier) "file"
()) ")"
(;) ";"
(comment) "/// @copydoc Filesystem::stat()"
(declaration) "Stat stat(const char* path);"
(type_identifier) "Stat"
(function_declarator) "stat(const char* path)"
(identifier) "stat"
(parameter_list) "(const char* path)"
(() "("
(parameter_declaration) "const char* path"
(type_qualifier) "const"
(const) "const"
(primitive_type) "char"
(pointer_declarator) "* path"
(*) "*"
(identifier) "path"
()) ")"
(;) ";"
(comment) "/// @copydoc Filesystem::exists()"
(declaration) "bool exists(const char* path);"
(primitive_type) "bool"
(function_declarator) "exists(const char* path)"
(identifier) "exists"
(parameter_list) "(const char* path)"
(() "("
(parameter_declaration) "const char* path"
(type_qualifier) "const"
(const) "const"
(primitive_type) "char"
(pointer_declarator) "* path"
(*) "*"
(identifier) "path"
()) ")"
(;) ";"
(comment) "/// @copydoc Filesystem::is_directory()"
(declaration) "bool is_directory(const char* path);"
(primitive_type) "bool"
(function_declarator) "is_directory(const char* path)"
(identifier) "is_directory"
(parameter_list) "(const char* path)"
(() "("
(parameter_declaration) "const char* path"
(type_qualifier) "const"
(const) "const"
(primitive_type) "char"
(pointer_declarator) "* path"
(*) "*"
(identifier) "path"
()) ")"
(;) ";"
(comment) "/// @copydoc Filesystem::is_file()"
(declaration) "bool is_file(const char* path);"
(primitive_type) "bool"
(function_declarator) "is_file(const char* path)"
(identifier) "is_file"
(parameter_list) "(const char* path)"
(() "("
(parameter_declaration) "const char* path"
(type_qualifier) "const"
(const) "const"
(primitive_type) "char"
(pointer_declarator) "* path"
(*) "*"
(identifier) "path"
()) ")"
(;) ";"
(comment) "/// @copydoc Filesystem::last_modified_time()"
(declaration) "u64 last_modified_time(const char* path);"
(type_identifier) "u64"
(function_declarator) "last_modified_time(const char* path)"
(identifier) "last_modified_time"
(parameter_list) "(const char* path)"
(() "("
(parameter_declaration) "const char* path"
(type_qualifier) "const"
(const) "const"
(primitive_type) "char"
(pointer_declarator) "* path"
(*) "*"
(identifier) "path"
()) ")"
(;) ";"
(comment) "/// @copydoc Filesystem::create_directory()"
(declaration) "CreateResult create_directory(const char* path);"
(type_identifier) "CreateResult"
(function_declarator) "create_directory(const char* path)"
(identifier) "create_directory"
(parameter_list) "(const char* path)"
(() "("
(parameter_declaration) "const char* path"
(type_qualifier) "const"
(const) "const"
(primitive_type) "char"
(pointer_declarator) "* path"
(*) "*"
(identifier) "path"
()) ")"
(;) ";"
(comment) "/// @copydoc Filesystem::delete_directory()"
(declaration) "DeleteResult delete_directory(const char* path);"
(type_identifier) "DeleteResult"
(function_declarator) "delete_directory(const char* path)"
(identifier) "delete_directory"
(parameter_list) "(const char* path)"
(() "("
(parameter_declaration) "const char* path"
(type_qualifier) "const"
(const) "const"
(primitive_type) "char"
(pointer_declarator) "* path"
(*) "*"
(identifier) "path"
()) ")"
(;) ";"
(comment) "/// @copydoc Filesystem::delete_file()"
(declaration) "DeleteResult delete_file(const char* path);"
(type_identifier) "DeleteResult"
(function_declarator) "delete_file(const char* path)"
(identifier) "delete_file"
(parameter_list) "(const char* path)"
(() "("
(parameter_declaration) "const char* path"
(type_qualifier) "const"
(const) "const"
(primitive_type) "char"
(pointer_declarator) "* path"
(*) "*"
(identifier) "path"
()) ")"
(;) ";"
(comment) "/// @copydoc Filesystem::list_files()"
(declaration) "void list_files(const char* path, Vector<DynamicString>& files);"
(primitive_type) "void"
(function_declarator) "list_files(const char* path, Vector<DynamicString>& files)"
(identifier) "list_files"
(parameter_list) "(const char* path, Vector<DynamicString>& files)"
(() "("
(parameter_declaration) "const char* path"
(type_qualifier) "const"
(const) "const"
(primitive_type) "char"
(pointer_declarator) "* path"
(*) "*"
(identifier) "path"
(,) ","
(parameter_declaration) "Vector<DynamicString>& files"
(type_identifier) "Vector"
(ERROR) "<DynamicString>&"
(<) "<"
(identifier) "DynamicString"
(>) ">"
(&) "&"
(identifier) "files"
()) ")"
(;) ";"
(comment) "/// @copydoc Filesystem::absolute_path()"
(declaration) "void absolute_path(DynamicString& os_path, const char* path);"
(primitive_type) "void"
(function_declarator) "absolute_path(DynamicString& os_path, const char* path)"
(identifier) "absolute_path"
(parameter_list) "(DynamicString& os_path, const char* path)"
(() "("
(parameter_declaration) "DynamicString& os_path"
(type_identifier) "DynamicString"
(ERROR) "&"
(&) "&"
(identifier) "os_path"
(,) ","
(parameter_declaration) "const char* path"
(type_qualifier) "const"
(const) "const"
(primitive_type) "char"
(pointer_declarator) "* path"
(*) "*"
(identifier) "path"
()) ")"
(;) ";"
(}) "}"
(expression_statement) ";"
(;) ";"
(}) "}"
(comment) "// namespace crown"
(#endif) "#endif"
(comment) "// CROWN_PLATFORM_ANDROID"
| 297
| 5
|
{"language": "c", "success": true, "metadata": {"lines": 48, "avg_line_length": 33.69, "nodes": 184, "errors": 0, "source_hash": "5f338bcd3e4502678cf2f690465c09eead808a641f937b4e7c4cc5a5884c5a71", "categorized_nodes": 117}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include \"core/platform.h\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"core/platform.h\"", "parent": 3, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 26}}, {"id": 6, "type": "preproc_if", "text": "#if CROWN_PLATFORM_ANDROID\n\n#include \"core/filesystem/filesystem.h\"\n#include <sys/types.h> // off_t\n#include <android/asset_manager.h>\n\nnamespace crown\n{\n/// Access files on Android's assets folder.\n/// The assets folder is read-only and all the paths are relative.\n///\n/// @ingroup Filesystem\nstruct FilesystemApk : public Filesystem\n{\n\tAllocator* _allocator;\n\tAAssetManager* _asset_manager;\n\n\tFilesystemApk(Allocator& a, AAssetManager* asset_manager);\n\n\t/// @copydoc Filesystem::open()\n\tFile* open(const char* path, FileOpenMode::Enum mode);\n\n\t/// @copydoc Filesystem::close()\n\tvoid close(File& file);\n\n\t/// @copydoc Filesystem::stat()\n\tStat stat(const char* path);\n\n\t/// @copydoc Filesystem::exists()\n\tbool exists(const char* path);\n\n\t/// @copydoc Filesystem::is_directory()\n\tbool is_directory(const char* path);\n\n\t/// @copydoc Filesystem::is_file()\n\tbool is_file(const char* path);\n\n\t/// @copydoc Filesystem::last_modified_time()\n\tu64 last_modified_time(const char* path);\n\n\t/// @copydoc Filesystem::create_directory()\n\tCreateResult create_directory(const char* path);\n\n\t/// @copydoc Filesystem::delete_directory()\n\tDeleteResult delete_directory(const char* path);\n\n\t/// @copydoc Filesystem::delete_file()\n\tDeleteResult delete_file(const char* path);\n\n\t/// @copydoc Filesystem::list_files()\n\tvoid list_files(const char* path, Vector<DynamicString>& files);\n\n\t/// @copydoc Filesystem::absolute_path()\n\tvoid absolute_path(DynamicString& os_path, const char* path);\n};\n\n} // namespace crown\n\n#endif", "parent": null, "children": [7, 8, 9, 10, 13, 16, 19, 183], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 67, "column": 6}}, {"id": 7, "type": "#if", "text": "#if", "parent": 6, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 3}}, {"id": 8, "type": "identifier", "text": "CROWN_PLATFORM_ANDROID", "parent": 6, "children": [], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 26}}, {"id": 9, "type": "\n", "text": "\n\n", "parent": 6, "children": [], "start_point": {"row": 9, "column": 26}, "end_point": {"row": 11, "column": 0}}, {"id": 10, "type": "preproc_include", "text": "#include \"core/filesystem/filesystem.h\"\n", "parent": 6, "children": [11, 12], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 11, "type": "#include", "text": "#include", "parent": 10, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 12, "type": "string_literal", "text": "\"core/filesystem/filesystem.h\"", "parent": 10, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 39}}, {"id": 13, "type": "preproc_include", "text": "#include <sys/types.h> // off_t\n", "parent": 6, "children": [14, 15], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 14, "type": "#include", "text": "#include", "parent": 13, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 15, "type": "system_lib_string", "text": "<sys/types.h>", "parent": 13, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 22}}, {"id": 16, "type": "preproc_include", "text": "#include <android/asset_manager.h>\n", "parent": 6, "children": [17, 18], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 17, "type": "#include", "text": "#include", "parent": 16, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 18, "type": "system_lib_string", "text": "<android/asset_manager.h>", "parent": 16, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 34}}, {"id": 19, "type": "function_definition", "text": "namespace crown\n{\n/// Access files on Android's assets folder.\n/// The assets folder is read-only and all the paths are relative.\n///\n/// @ingroup Filesystem\nstruct FilesystemApk : public Filesystem\n{\n\tAllocator* _allocator;\n\tAAssetManager* _asset_manager;\n\n\tFilesystemApk(Allocator& a, AAssetManager* asset_manager);\n\n\t/// @copydoc Filesystem::open()\n\tFile* open(const char* path, FileOpenMode::Enum mode);\n\n\t/// @copydoc Filesystem::close()\n\tvoid close(File& file);\n\n\t/// @copydoc Filesystem::stat()\n\tStat stat(const char* path);\n\n\t/// @copydoc Filesystem::exists()\n\tbool exists(const char* path);\n\n\t/// @copydoc Filesystem::is_directory()\n\tbool is_directory(const char* path);\n\n\t/// @copydoc Filesystem::is_file()\n\tbool is_file(const char* path);\n\n\t/// @copydoc Filesystem::last_modified_time()\n\tu64 last_modified_time(const char* path);\n\n\t/// @copydoc Filesystem::create_directory()\n\tCreateResult create_directory(const char* path);\n\n\t/// @copydoc Filesystem::delete_directory()\n\tDeleteResult delete_directory(const char* path);\n\n\t/// @copydoc Filesystem::delete_file()\n\tDeleteResult delete_file(const char* path);\n\n\t/// @copydoc Filesystem::list_files()\n\tvoid list_files(const char* path, Vector<DynamicString>& files);\n\n\t/// @copydoc Filesystem::absolute_path()\n\tvoid absolute_path(DynamicString& os_path, const char* path);\n};\n\n}", "parent": 6, "children": [20, 21], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 65, "column": 1}}, {"id": 20, "type": "type_identifier", "text": "namespace", "parent": 19, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 9}}, {"id": 21, "type": "identifier", "text": "crown", "parent": 19, "children": [], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 15}}, {"id": 22, "type": "function_definition", "text": "struct FilesystemApk : public Filesystem\n{\n\tAllocator* _allocator;\n\tAAssetManager* _asset_manager;\n\n\tFilesystemApk(Allocator& a, AAssetManager* asset_manager);\n\n\t/// @copydoc Filesystem::open()\n\tFile* open(const char* path, FileOpenMode::Enum mode);\n\n\t/// @copydoc Filesystem::close()\n\tvoid close(File& file);\n\n\t/// @copydoc Filesystem::stat()\n\tStat stat(const char* path);\n\n\t/// @copydoc Filesystem::exists()\n\tbool exists(const char* path);\n\n\t/// @copydoc Filesystem::is_directory()\n\tbool is_directory(const char* path);\n\n\t/// @copydoc Filesystem::is_file()\n\tbool is_file(const char* path);\n\n\t/// @copydoc Filesystem::last_modified_time()\n\tu64 last_modified_time(const char* path);\n\n\t/// @copydoc Filesystem::create_directory()\n\tCreateResult create_directory(const char* path);\n\n\t/// @copydoc Filesystem::delete_directory()\n\tDeleteResult delete_directory(const char* path);\n\n\t/// @copydoc Filesystem::delete_file()\n\tDeleteResult delete_file(const char* path);\n\n\t/// @copydoc Filesystem::list_files()\n\tvoid list_files(const char* path, Vector<DynamicString>& files);\n\n\t/// @copydoc Filesystem::absolute_path()\n\tvoid absolute_path(DynamicString& os_path, const char* path);\n}", "parent": 19, "children": [23, 26, 27], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 63, "column": 1}}, {"id": 23, "type": "struct_specifier", "text": "struct FilesystemApk", "parent": 22, "children": [24, 25], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 20}}, {"id": 24, "type": "struct", "text": "struct", "parent": 23, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 6}}, {"id": 25, "type": "type_identifier", "text": "FilesystemApk", "parent": 23, "children": [], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 20}}, {"id": 26, "type": "ERROR", "text": ": public", "parent": 22, "children": [], "start_point": {"row": 21, "column": 21}, "end_point": {"row": 21, "column": 29}}, {"id": 27, "type": "identifier", "text": "Filesystem", "parent": 22, "children": [], "start_point": {"row": 21, "column": 30}, "end_point": {"row": 21, "column": 40}}, {"id": 28, "type": "declaration", "text": "Allocator* _allocator;", "parent": 22, "children": [29, 30], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 23}}, {"id": 29, "type": "type_identifier", "text": "Allocator", "parent": 28, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 10}}, {"id": 30, "type": "pointer_declarator", "text": "* _allocator", "parent": 28, "children": [31, 32], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 22}}, {"id": 31, "type": "*", "text": "*", "parent": 30, "children": [], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 11}}, {"id": 32, "type": "identifier", "text": "_allocator", "parent": 30, "children": [], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 22}}, {"id": 33, "type": "declaration", "text": "AAssetManager* _asset_manager;", "parent": 22, "children": [34, 35], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 31}}, {"id": 34, "type": "type_identifier", "text": "AAssetManager", "parent": 33, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 14}}, {"id": 35, "type": "pointer_declarator", "text": "* _asset_manager", "parent": 33, "children": [36, 37], "start_point": {"row": 24, "column": 14}, "end_point": {"row": 24, "column": 30}}, {"id": 36, "type": "*", "text": "*", "parent": 35, "children": [], "start_point": {"row": 24, "column": 14}, "end_point": {"row": 24, "column": 15}}, {"id": 37, "type": "identifier", "text": "_asset_manager", "parent": 35, "children": [], "start_point": {"row": 24, "column": 16}, "end_point": {"row": 24, "column": 30}}, {"id": 38, "type": "call_expression", "text": "FilesystemApk(Allocator& a, AAssetManager* asset_manager)", "parent": 22, "children": [39, 40], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 58}}, {"id": 39, "type": "identifier", "text": "FilesystemApk", "parent": 38, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 14}}, {"id": 40, "type": "argument_list", "text": "(Allocator& a, AAssetManager* asset_manager)", "parent": 38, "children": [41, 44], "start_point": {"row": 26, "column": 14}, "end_point": {"row": 26, "column": 58}}, {"id": 41, "type": "binary_expression", "text": "Allocator& a", "parent": 40, "children": [42, 43], "start_point": {"row": 26, "column": 15}, "end_point": {"row": 26, "column": 27}}, {"id": 42, "type": "identifier", "text": "Allocator", "parent": 41, "children": [], "start_point": {"row": 26, "column": 15}, "end_point": {"row": 26, "column": 24}}, {"id": 43, "type": "identifier", "text": "a", "parent": 41, "children": [], "start_point": {"row": 26, "column": 26}, "end_point": {"row": 26, "column": 27}}, {"id": 44, "type": "binary_expression", "text": "AAssetManager* asset_manager", "parent": 40, "children": [45, 46, 47], "start_point": {"row": 26, "column": 29}, "end_point": {"row": 26, "column": 57}}, {"id": 45, "type": "identifier", "text": "AAssetManager", "parent": 44, "children": [], "start_point": {"row": 26, "column": 29}, "end_point": {"row": 26, "column": 42}}, {"id": 46, "type": "*", "text": "*", "parent": 44, "children": [], "start_point": {"row": 26, "column": 42}, "end_point": {"row": 26, "column": 43}}, {"id": 47, "type": "identifier", "text": "asset_manager", "parent": 44, "children": [], "start_point": {"row": 26, "column": 44}, "end_point": {"row": 26, "column": 57}}, {"id": 48, "type": "declaration", "text": "File* open(const char* path, FileOpenMode::Enum mode);", "parent": 22, "children": [49, 50], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 55}}, {"id": 49, "type": "type_identifier", "text": "File", "parent": 48, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 5}}, {"id": 50, "type": "pointer_declarator", "text": "* open(const char* path, FileOpenMode::Enum mode)", "parent": 48, "children": [51, 52], "start_point": {"row": 29, "column": 5}, "end_point": {"row": 29, "column": 54}}, {"id": 51, "type": "*", "text": "*", "parent": 50, "children": [], "start_point": {"row": 29, "column": 5}, "end_point": {"row": 29, "column": 6}}, {"id": 52, "type": "function_declarator", "text": "open(const char* path, FileOpenMode::Enum mode)", "parent": 50, "children": [53, 54], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 54}}, {"id": 53, "type": "identifier", "text": "open", "parent": 52, "children": [], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 11}}, {"id": 54, "type": "parameter_list", "text": "(const char* path, FileOpenMode::Enum mode)", "parent": 52, "children": [55, 60], "start_point": {"row": 29, "column": 11}, "end_point": {"row": 29, "column": 54}}, {"id": 55, "type": "parameter_declaration", "text": "const char* path", "parent": 54, "children": [56, 57], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 28}}, {"id": 56, "type": "primitive_type", "text": "char", "parent": 55, "children": [], "start_point": {"row": 29, "column": 18}, "end_point": {"row": 29, "column": 22}}, {"id": 57, "type": "pointer_declarator", "text": "* path", "parent": 55, "children": [58, 59], "start_point": {"row": 29, "column": 22}, "end_point": {"row": 29, "column": 28}}, {"id": 58, "type": "*", "text": "*", "parent": 57, "children": [], "start_point": {"row": 29, "column": 22}, "end_point": {"row": 29, "column": 23}}, {"id": 59, "type": "identifier", "text": "path", "parent": 57, "children": [], "start_point": {"row": 29, "column": 24}, "end_point": {"row": 29, "column": 28}}, {"id": 60, "type": "parameter_declaration", "text": "FileOpenMode::Enum mode", "parent": 54, "children": [61, 62, 64], "start_point": {"row": 29, "column": 30}, "end_point": {"row": 29, "column": 53}}, {"id": 61, "type": "type_identifier", "text": "FileOpenMode", "parent": 60, "children": [], "start_point": {"row": 29, "column": 30}, "end_point": {"row": 29, "column": 42}}, {"id": 62, "type": "ERROR", "text": "::Enum", "parent": 60, "children": [63], "start_point": {"row": 29, "column": 42}, "end_point": {"row": 29, "column": 48}}, {"id": 63, "type": "identifier", "text": "Enum", "parent": 62, "children": [], "start_point": {"row": 29, "column": 44}, "end_point": {"row": 29, "column": 48}}, {"id": 64, "type": "identifier", "text": "mode", "parent": 60, "children": [], "start_point": {"row": 29, "column": 49}, "end_point": {"row": 29, "column": 53}}, {"id": 65, "type": "declaration", "text": "void close(File& file);", "parent": 22, "children": [66, 67], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 24}}, {"id": 66, "type": "primitive_type", "text": "void", "parent": 65, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 5}}, {"id": 67, "type": "function_declarator", "text": "close(File& file)", "parent": 65, "children": [68, 69], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 23}}, {"id": 68, "type": "identifier", "text": "close", "parent": 67, "children": [], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 11}}, {"id": 69, "type": "parameter_list", "text": "(File& file)", "parent": 67, "children": [70], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 23}}, {"id": 70, "type": "parameter_declaration", "text": "File& file", "parent": 69, "children": [71, 72], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 22}}, {"id": 71, "type": "type_identifier", "text": "File", "parent": 70, "children": [], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 16}}, {"id": 72, "type": "identifier", "text": "file", "parent": 70, "children": [], "start_point": {"row": 32, "column": 18}, "end_point": {"row": 32, "column": 22}}, {"id": 73, "type": "declaration", "text": "Stat stat(const char* path);", "parent": 22, "children": [74, 75], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 29}}, {"id": 74, "type": "type_identifier", "text": "Stat", "parent": 73, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 5}}, {"id": 75, "type": "function_declarator", "text": "stat(const char* path)", "parent": 73, "children": [76, 77], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 28}}, {"id": 76, "type": "identifier", "text": "stat", "parent": 75, "children": [], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 10}}, {"id": 77, "type": "parameter_list", "text": "(const char* path)", "parent": 75, "children": [78], "start_point": {"row": 35, "column": 10}, "end_point": {"row": 35, "column": 28}}, {"id": 78, "type": "parameter_declaration", "text": "const char* path", "parent": 77, "children": [79, 80], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 27}}, {"id": 79, "type": "primitive_type", "text": "char", "parent": 78, "children": [], "start_point": {"row": 35, "column": 17}, "end_point": {"row": 35, "column": 21}}, {"id": 80, "type": "pointer_declarator", "text": "* path", "parent": 78, "children": [81, 82], "start_point": {"row": 35, "column": 21}, "end_point": {"row": 35, "column": 27}}, {"id": 81, "type": "*", "text": "*", "parent": 80, "children": [], "start_point": {"row": 35, "column": 21}, "end_point": {"row": 35, "column": 22}}, {"id": 82, "type": "identifier", "text": "path", "parent": 80, "children": [], "start_point": {"row": 35, "column": 23}, "end_point": {"row": 35, "column": 27}}, {"id": 83, "type": "declaration", "text": "bool exists(const char* path);", "parent": 22, "children": [84, 85], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 31}}, {"id": 84, "type": "primitive_type", "text": "bool", "parent": 83, "children": [], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 5}}, {"id": 85, "type": "function_declarator", "text": "exists(const char* path)", "parent": 83, "children": [86, 87], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 30}}, {"id": 86, "type": "identifier", "text": "exists", "parent": 85, "children": [], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 12}}, {"id": 87, "type": "parameter_list", "text": "(const char* path)", "parent": 85, "children": [88], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 30}}, {"id": 88, "type": "parameter_declaration", "text": "const char* path", "parent": 87, "children": [89, 90], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 29}}, {"id": 89, "type": "primitive_type", "text": "char", "parent": 88, "children": [], "start_point": {"row": 38, "column": 19}, "end_point": {"row": 38, "column": 23}}, {"id": 90, "type": "pointer_declarator", "text": "* path", "parent": 88, "children": [91, 92], "start_point": {"row": 38, "column": 23}, "end_point": {"row": 38, "column": 29}}, {"id": 91, "type": "*", "text": "*", "parent": 90, "children": [], "start_point": {"row": 38, "column": 23}, "end_point": {"row": 38, "column": 24}}, {"id": 92, "type": "identifier", "text": "path", "parent": 90, "children": [], "start_point": {"row": 38, "column": 25}, "end_point": {"row": 38, "column": 29}}, {"id": 93, "type": "declaration", "text": "bool is_directory(const char* path);", "parent": 22, "children": [94, 95], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 37}}, {"id": 94, "type": "primitive_type", "text": "bool", "parent": 93, "children": [], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 5}}, {"id": 95, "type": "function_declarator", "text": "is_directory(const char* path)", "parent": 93, "children": [96, 97], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 36}}, {"id": 96, "type": "identifier", "text": "is_directory", "parent": 95, "children": [], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 18}}, {"id": 97, "type": "parameter_list", "text": "(const char* path)", "parent": 95, "children": [98], "start_point": {"row": 41, "column": 18}, "end_point": {"row": 41, "column": 36}}, {"id": 98, "type": "parameter_declaration", "text": "const char* path", "parent": 97, "children": [99, 100], "start_point": {"row": 41, "column": 19}, "end_point": {"row": 41, "column": 35}}, {"id": 99, "type": "primitive_type", "text": "char", "parent": 98, "children": [], "start_point": {"row": 41, "column": 25}, "end_point": {"row": 41, "column": 29}}, {"id": 100, "type": "pointer_declarator", "text": "* path", "parent": 98, "children": [101, 102], "start_point": {"row": 41, "column": 29}, "end_point": {"row": 41, "column": 35}}, {"id": 101, "type": "*", "text": "*", "parent": 100, "children": [], "start_point": {"row": 41, "column": 29}, "end_point": {"row": 41, "column": 30}}, {"id": 102, "type": "identifier", "text": "path", "parent": 100, "children": [], "start_point": {"row": 41, "column": 31}, "end_point": {"row": 41, "column": 35}}, {"id": 103, "type": "declaration", "text": "bool is_file(const char* path);", "parent": 22, "children": [104, 105], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 32}}, {"id": 104, "type": "primitive_type", "text": "bool", "parent": 103, "children": [], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 5}}, {"id": 105, "type": "function_declarator", "text": "is_file(const char* path)", "parent": 103, "children": [106, 107], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 31}}, {"id": 106, "type": "identifier", "text": "is_file", "parent": 105, "children": [], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 13}}, {"id": 107, "type": "parameter_list", "text": "(const char* path)", "parent": 105, "children": [108], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 31}}, {"id": 108, "type": "parameter_declaration", "text": "const char* path", "parent": 107, "children": [109, 110], "start_point": {"row": 44, "column": 14}, "end_point": {"row": 44, "column": 30}}, {"id": 109, "type": "primitive_type", "text": "char", "parent": 108, "children": [], "start_point": {"row": 44, "column": 20}, "end_point": {"row": 44, "column": 24}}, {"id": 110, "type": "pointer_declarator", "text": "* path", "parent": 108, "children": [111, 112], "start_point": {"row": 44, "column": 24}, "end_point": {"row": 44, "column": 30}}, {"id": 111, "type": "*", "text": "*", "parent": 110, "children": [], "start_point": {"row": 44, "column": 24}, "end_point": {"row": 44, "column": 25}}, {"id": 112, "type": "identifier", "text": "path", "parent": 110, "children": [], "start_point": {"row": 44, "column": 26}, "end_point": {"row": 44, "column": 30}}, {"id": 113, "type": "declaration", "text": "u64 last_modified_time(const char* path);", "parent": 22, "children": [114, 115], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 42}}, {"id": 114, "type": "type_identifier", "text": "u64", "parent": 113, "children": [], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 4}}, {"id": 115, "type": "function_declarator", "text": "last_modified_time(const char* path)", "parent": 113, "children": [116, 117], "start_point": {"row": 47, "column": 5}, "end_point": {"row": 47, "column": 41}}, {"id": 116, "type": "identifier", "text": "last_modified_time", "parent": 115, "children": [], "start_point": {"row": 47, "column": 5}, "end_point": {"row": 47, "column": 23}}, {"id": 117, "type": "parameter_list", "text": "(const char* path)", "parent": 115, "children": [118], "start_point": {"row": 47, "column": 23}, "end_point": {"row": 47, "column": 41}}, {"id": 118, "type": "parameter_declaration", "text": "const char* path", "parent": 117, "children": [119, 120], "start_point": {"row": 47, "column": 24}, "end_point": {"row": 47, "column": 40}}, {"id": 119, "type": "primitive_type", "text": "char", "parent": 118, "children": [], "start_point": {"row": 47, "column": 30}, "end_point": {"row": 47, "column": 34}}, {"id": 120, "type": "pointer_declarator", "text": "* path", "parent": 118, "children": [121, 122], "start_point": {"row": 47, "column": 34}, "end_point": {"row": 47, "column": 40}}, {"id": 121, "type": "*", "text": "*", "parent": 120, "children": [], "start_point": {"row": 47, "column": 34}, "end_point": {"row": 47, "column": 35}}, {"id": 122, "type": "identifier", "text": "path", "parent": 120, "children": [], "start_point": {"row": 47, "column": 36}, "end_point": {"row": 47, "column": 40}}, {"id": 123, "type": "declaration", "text": "CreateResult create_directory(const char* path);", "parent": 22, "children": [124, 125], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 49}}, {"id": 124, "type": "type_identifier", "text": "CreateResult", "parent": 123, "children": [], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 13}}, {"id": 125, "type": "function_declarator", "text": "create_directory(const char* path)", "parent": 123, "children": [126, 127], "start_point": {"row": 50, "column": 14}, "end_point": {"row": 50, "column": 48}}, {"id": 126, "type": "identifier", "text": "create_directory", "parent": 125, "children": [], "start_point": {"row": 50, "column": 14}, "end_point": {"row": 50, "column": 30}}, {"id": 127, "type": "parameter_list", "text": "(const char* path)", "parent": 125, "children": [128], "start_point": {"row": 50, "column": 30}, "end_point": {"row": 50, "column": 48}}, {"id": 128, "type": "parameter_declaration", "text": "const char* path", "parent": 127, "children": [129, 130], "start_point": {"row": 50, "column": 31}, "end_point": {"row": 50, "column": 47}}, {"id": 129, "type": "primitive_type", "text": "char", "parent": 128, "children": [], "start_point": {"row": 50, "column": 37}, "end_point": {"row": 50, "column": 41}}, {"id": 130, "type": "pointer_declarator", "text": "* path", "parent": 128, "children": [131, 132], "start_point": {"row": 50, "column": 41}, "end_point": {"row": 50, "column": 47}}, {"id": 131, "type": "*", "text": "*", "parent": 130, "children": [], "start_point": {"row": 50, "column": 41}, "end_point": {"row": 50, "column": 42}}, {"id": 132, "type": "identifier", "text": "path", "parent": 130, "children": [], "start_point": {"row": 50, "column": 43}, "end_point": {"row": 50, "column": 47}}, {"id": 133, "type": "declaration", "text": "DeleteResult delete_directory(const char* path);", "parent": 22, "children": [134, 135], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 49}}, {"id": 134, "type": "type_identifier", "text": "DeleteResult", "parent": 133, "children": [], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 13}}, {"id": 135, "type": "function_declarator", "text": "delete_directory(const char* path)", "parent": 133, "children": [136, 137], "start_point": {"row": 53, "column": 14}, "end_point": {"row": 53, "column": 48}}, {"id": 136, "type": "identifier", "text": "delete_directory", "parent": 135, "children": [], "start_point": {"row": 53, "column": 14}, "end_point": {"row": 53, "column": 30}}, {"id": 137, "type": "parameter_list", "text": "(const char* path)", "parent": 135, "children": [138], "start_point": {"row": 53, "column": 30}, "end_point": {"row": 53, "column": 48}}, {"id": 138, "type": "parameter_declaration", "text": "const char* path", "parent": 137, "children": [139, 140], "start_point": {"row": 53, "column": 31}, "end_point": {"row": 53, "column": 47}}, {"id": 139, "type": "primitive_type", "text": "char", "parent": 138, "children": [], "start_point": {"row": 53, "column": 37}, "end_point": {"row": 53, "column": 41}}, {"id": 140, "type": "pointer_declarator", "text": "* path", "parent": 138, "children": [141, 142], "start_point": {"row": 53, "column": 41}, "end_point": {"row": 53, "column": 47}}, {"id": 141, "type": "*", "text": "*", "parent": 140, "children": [], "start_point": {"row": 53, "column": 41}, "end_point": {"row": 53, "column": 42}}, {"id": 142, "type": "identifier", "text": "path", "parent": 140, "children": [], "start_point": {"row": 53, "column": 43}, "end_point": {"row": 53, "column": 47}}, {"id": 143, "type": "declaration", "text": "DeleteResult delete_file(const char* path);", "parent": 22, "children": [144, 145], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 44}}, {"id": 144, "type": "type_identifier", "text": "DeleteResult", "parent": 143, "children": [], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 13}}, {"id": 145, "type": "function_declarator", "text": "delete_file(const char* path)", "parent": 143, "children": [146, 147], "start_point": {"row": 56, "column": 14}, "end_point": {"row": 56, "column": 43}}, {"id": 146, "type": "identifier", "text": "delete_file", "parent": 145, "children": [], "start_point": {"row": 56, "column": 14}, "end_point": {"row": 56, "column": 25}}, {"id": 147, "type": "parameter_list", "text": "(const char* path)", "parent": 145, "children": [148], "start_point": {"row": 56, "column": 25}, "end_point": {"row": 56, "column": 43}}, {"id": 148, "type": "parameter_declaration", "text": "const char* path", "parent": 147, "children": [149, 150], "start_point": {"row": 56, "column": 26}, "end_point": {"row": 56, "column": 42}}, {"id": 149, "type": "primitive_type", "text": "char", "parent": 148, "children": [], "start_point": {"row": 56, "column": 32}, "end_point": {"row": 56, "column": 36}}, {"id": 150, "type": "pointer_declarator", "text": "* path", "parent": 148, "children": [151, 152], "start_point": {"row": 56, "column": 36}, "end_point": {"row": 56, "column": 42}}, {"id": 151, "type": "*", "text": "*", "parent": 150, "children": [], "start_point": {"row": 56, "column": 36}, "end_point": {"row": 56, "column": 37}}, {"id": 152, "type": "identifier", "text": "path", "parent": 150, "children": [], "start_point": {"row": 56, "column": 38}, "end_point": {"row": 56, "column": 42}}, {"id": 153, "type": "declaration", "text": "void list_files(const char* path, Vector<DynamicString>& files);", "parent": 22, "children": [154, 155], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 65}}, {"id": 154, "type": "primitive_type", "text": "void", "parent": 153, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 5}}, {"id": 155, "type": "function_declarator", "text": "list_files(const char* path, Vector<DynamicString>& files)", "parent": 153, "children": [156, 157], "start_point": {"row": 59, "column": 6}, "end_point": {"row": 59, "column": 64}}, {"id": 156, "type": "identifier", "text": "list_files", "parent": 155, "children": [], "start_point": {"row": 59, "column": 6}, "end_point": {"row": 59, "column": 16}}, {"id": 157, "type": "parameter_list", "text": "(const char* path, Vector<DynamicString>& files)", "parent": 155, "children": [158, 163], "start_point": {"row": 59, "column": 16}, "end_point": {"row": 59, "column": 64}}, {"id": 158, "type": "parameter_declaration", "text": "const char* path", "parent": 157, "children": [159, 160], "start_point": {"row": 59, "column": 17}, "end_point": {"row": 59, "column": 33}}, {"id": 159, "type": "primitive_type", "text": "char", "parent": 158, "children": [], "start_point": {"row": 59, "column": 23}, "end_point": {"row": 59, "column": 27}}, {"id": 160, "type": "pointer_declarator", "text": "* path", "parent": 158, "children": [161, 162], "start_point": {"row": 59, "column": 27}, "end_point": {"row": 59, "column": 33}}, {"id": 161, "type": "*", "text": "*", "parent": 160, "children": [], "start_point": {"row": 59, "column": 27}, "end_point": {"row": 59, "column": 28}}, {"id": 162, "type": "identifier", "text": "path", "parent": 160, "children": [], "start_point": {"row": 59, "column": 29}, "end_point": {"row": 59, "column": 33}}, {"id": 163, "type": "parameter_declaration", "text": "Vector<DynamicString>& files", "parent": 157, "children": [164, 165, 169], "start_point": {"row": 59, "column": 35}, "end_point": {"row": 59, "column": 63}}, {"id": 164, "type": "type_identifier", "text": "Vector", "parent": 163, "children": [], "start_point": {"row": 59, "column": 35}, "end_point": {"row": 59, "column": 41}}, {"id": 165, "type": "ERROR", "text": "<DynamicString>&", "parent": 163, "children": [166, 167, 168], "start_point": {"row": 59, "column": 41}, "end_point": {"row": 59, "column": 57}}, {"id": 166, "type": "<", "text": "<", "parent": 165, "children": [], "start_point": {"row": 59, "column": 41}, "end_point": {"row": 59, "column": 42}}, {"id": 167, "type": "identifier", "text": "DynamicString", "parent": 165, "children": [], "start_point": {"row": 59, "column": 42}, "end_point": {"row": 59, "column": 55}}, {"id": 168, "type": ">", "text": ">", "parent": 165, "children": [], "start_point": {"row": 59, "column": 55}, "end_point": {"row": 59, "column": 56}}, {"id": 169, "type": "identifier", "text": "files", "parent": 163, "children": [], "start_point": {"row": 59, "column": 58}, "end_point": {"row": 59, "column": 63}}, {"id": 170, "type": "declaration", "text": "void absolute_path(DynamicString& os_path, const char* path);", "parent": 22, "children": [171, 172], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 62}}, {"id": 171, "type": "primitive_type", "text": "void", "parent": 170, "children": [], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 5}}, {"id": 172, "type": "function_declarator", "text": "absolute_path(DynamicString& os_path, const char* path)", "parent": 170, "children": [173, 174], "start_point": {"row": 62, "column": 6}, "end_point": {"row": 62, "column": 61}}, {"id": 173, "type": "identifier", "text": "absolute_path", "parent": 172, "children": [], "start_point": {"row": 62, "column": 6}, "end_point": {"row": 62, "column": 19}}, {"id": 174, "type": "parameter_list", "text": "(DynamicString& os_path, const char* path)", "parent": 172, "children": [175, 178], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 62, "column": 61}}, {"id": 175, "type": "parameter_declaration", "text": "DynamicString& os_path", "parent": 174, "children": [176, 177], "start_point": {"row": 62, "column": 20}, "end_point": {"row": 62, "column": 42}}, {"id": 176, "type": "type_identifier", "text": "DynamicString", "parent": 175, "children": [], "start_point": {"row": 62, "column": 20}, "end_point": {"row": 62, "column": 33}}, {"id": 177, "type": "identifier", "text": "os_path", "parent": 175, "children": [], "start_point": {"row": 62, "column": 35}, "end_point": {"row": 62, "column": 42}}, {"id": 178, "type": "parameter_declaration", "text": "const char* path", "parent": 174, "children": [179, 180], "start_point": {"row": 62, "column": 44}, "end_point": {"row": 62, "column": 60}}, {"id": 179, "type": "primitive_type", "text": "char", "parent": 178, "children": [], "start_point": {"row": 62, "column": 50}, "end_point": {"row": 62, "column": 54}}, {"id": 180, "type": "pointer_declarator", "text": "* path", "parent": 178, "children": [181, 182], "start_point": {"row": 62, "column": 54}, "end_point": {"row": 62, "column": 60}}, {"id": 181, "type": "*", "text": "*", "parent": 180, "children": [], "start_point": {"row": 62, "column": 54}, "end_point": {"row": 62, "column": 55}}, {"id": 182, "type": "identifier", "text": "path", "parent": 180, "children": [], "start_point": {"row": 62, "column": 56}, "end_point": {"row": 62, "column": 60}}, {"id": 183, "type": "#endif", "text": "#endif", "parent": 6, "children": [], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 6}}]}, "node_categories": {"declarations": {"functions": [19, 22, 52, 67, 75, 85, 95, 105, 115, 125, 135, 145, 155, 172], "variables": [28, 33, 48, 55, 60, 65, 70, 73, 78, 83, 88, 93, 98, 103, 108, 113, 118, 123, 128, 133, 138, 143, 148, 153, 158, 163, 170, 175, 178], "classes": [23, 24], "imports": [3, 4, 10, 11, 13, 14, 16, 17], "modules": [], "enums": []}, "statements": {"expressions": [38, 41, 44], "assignments": [], "loops": [], "conditionals": [6, 7, 8, 20, 21, 25, 27, 29, 32, 34, 37, 39, 42, 43, 45, 47, 49, 53, 59, 61, 63, 64, 68, 71, 72, 74, 76, 82, 86, 92, 96, 102, 106, 112, 114, 116, 122, 124, 126, 132, 134, 136, 142, 144, 146, 152, 156, 162, 164, 167, 169, 173, 176, 177, 182, 183], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 12, 15, 18], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 19, "universal_type": "function", "name": "FilesystemApk", "text_snippet": "namespace crown\n{\n/// Access files on Android's assets folder.\n/// The assets folder is read-only an"}, {"node_id": 22, "universal_type": "function", "name": "FilesystemApk", "text_snippet": "struct FilesystemApk : public Filesystem\n{\n\tAllocator* _allocator;\n\tAAssetManager* _asset_manager;\n\n"}, {"node_id": 52, "universal_type": "function", "name": "unknown", "text_snippet": "open(const char* path, FileOpenMode::Enum mode)"}, {"node_id": 67, "universal_type": "function", "name": "unknown", "text_snippet": "close(File& file)"}, {"node_id": 75, "universal_type": "function", "name": "unknown", "text_snippet": "stat(const char* path)"}, {"node_id": 85, "universal_type": "function", "name": "unknown", "text_snippet": "exists(const char* path)"}, {"node_id": 95, "universal_type": "function", "name": "unknown", "text_snippet": "is_directory(const char* path)"}, {"node_id": 105, "universal_type": "function", "name": "unknown", "text_snippet": "is_file(const char* path)"}, {"node_id": 115, "universal_type": "function", "name": "unknown", "text_snippet": "last_modified_time(const char* path)"}, {"node_id": 125, "universal_type": "function", "name": "unknown", "text_snippet": "create_directory(const char* path)"}, {"node_id": 135, "universal_type": "function", "name": "unknown", "text_snippet": "delete_directory(const char* path)"}, {"node_id": 145, "universal_type": "function", "name": "unknown", "text_snippet": "delete_file(const char* path)"}, {"node_id": 155, "universal_type": "function", "name": "unknown", "text_snippet": "list_files(const char* path, Vector<DynamicString>& files)"}, {"node_id": 172, "universal_type": "function", "name": "unknown", "text_snippet": "absolute_path(DynamicString& os_path, const char* path)"}], "class_declarations": [{"node_id": 23, "universal_type": "class", "name": "FilesystemApk", "text_snippet": "struct FilesystemApk"}, {"node_id": 24, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 3, "text": "#include \"core/platform.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 10, "text": "#include \"core/filesystem/filesystem.h\"\n"}, {"node_id": 11, "text": "#include"}, {"node_id": 13, "text": "#include <sys/types.h> // off_t\n"}, {"node_id": 14, "text": "#include"}, {"node_id": 16, "text": "#include <android/asset_manager.h>\n"}, {"node_id": 17, "text": "#include"}]}, "original_source_code": "/*\n * Copyright (c) 2012-2021 <NAME> et al.\n * License: https://github.com/dbartolini/crown/blob/master/LICENSE\n */\n\n#pragma once\n\n#include \"core/platform.h\"\n\n#if CROWN_PLATFORM_ANDROID\n\n#include \"core/filesystem/filesystem.h\"\n#include <sys/types.h> // off_t\n#include <android/asset_manager.h>\n\nnamespace crown\n{\n/// Access files on Android's assets folder.\n/// The assets folder is read-only and all the paths are relative.\n///\n/// @ingroup Filesystem\nstruct FilesystemApk : public Filesystem\n{\n\tAllocator* _allocator;\n\tAAssetManager* _asset_manager;\n\n\tFilesystemApk(Allocator& a, AAssetManager* asset_manager);\n\n\t/// @copydoc Filesystem::open()\n\tFile* open(const char* path, FileOpenMode::Enum mode);\n\n\t/// @copydoc Filesystem::close()\n\tvoid close(File& file);\n\n\t/// @copydoc Filesystem::stat()\n\tStat stat(const char* path);\n\n\t/// @copydoc Filesystem::exists()\n\tbool exists(const char* path);\n\n\t/// @copydoc Filesystem::is_directory()\n\tbool is_directory(const char* path);\n\n\t/// @copydoc Filesystem::is_file()\n\tbool is_file(const char* path);\n\n\t/// @copydoc Filesystem::last_modified_time()\n\tu64 last_modified_time(const char* path);\n\n\t/// @copydoc Filesystem::create_directory()\n\tCreateResult create_directory(const char* path);\n\n\t/// @copydoc Filesystem::delete_directory()\n\tDeleteResult delete_directory(const char* path);\n\n\t/// @copydoc Filesystem::delete_file()\n\tDeleteResult delete_file(const char* path);\n\n\t/// @copydoc Filesystem::list_files()\n\tvoid list_files(const char* path, Vector<DynamicString>& files);\n\n\t/// @copydoc Filesystem::absolute_path()\n\tvoid absolute_path(DynamicString& os_path, const char* path);\n};\n\n} // namespace crown\n\n#endif // CROWN_PLATFORM_ANDROID\n"}
| 81,230
|
c
|
// Copyright <NAME> 2021
//
// Distributed under the Boost Software License, Version 1.0.
// http://www.boost.org/LICENSE_1_0.txt)
#pragma once
typedef uint16_t NetworkAddress;
typedef uint64_t MacAddress;
struct SimpleDescriptor {
unsigned int endpoint_number = 0;
unsigned int profile_id = 0;
unsigned int device_id = 0;
unsigned int device_version = 0;
std::vector<unsigned int> input_clusters;
std::vector<unsigned int> output_clusters;
};
struct Endpoint {
NetworkAddress address;
uint8_t number;
bool operator==(const Endpoint &endpoint) const { return (this->address == endpoint.address && this->number == endpoint.number); }
bool operator!=(const Endpoint &endpoint) const { return (!(*this == endpoint)); }
};
struct Message {
Endpoint source;
Endpoint destination;
zcl::Cluster cluster;
zcl::Frame zcl_frame;
};
enum class LogicalType {
COORDINATOR = 0,
ROUTER = 1,
END_DEVICE = 2
}; // TODO: Znp?
struct NetworkConfiguration {
uint16_t pan_id = 0;
uint64_t extended_pan_id = 0;
LogicalType logical_type = LogicalType::COORDINATOR;
std::vector<unsigned int> channels;
std::array<uint8_t, 16> precfg_key = {};
bool precfg_key_enable = false; // value: 0 (FALSE) only coord defualtKey need to be set, and OTA to set other devices in the network.
// value: 1 (TRUE) Not only coord, but also all devices need to set their defualtKey (the same key). Or they can't not join the network.
bool operator==(const NetworkConfiguration &configuration) const {
return (this->pan_id == configuration.pan_id &&
this->extended_pan_id == configuration.extended_pan_id &&
this->logical_type == configuration.logical_type &&
this->channels == configuration.channels &&
precfg_key_enable ? this->precfg_key == configuration.precfg_key : true);
}
bool operator!=(const NetworkConfiguration &configuration) const { return (!(*this == configuration)); }
};
class Device {
public:
virtual zigbee::NetworkAddress getNetworkAddress() = 0;
virtual zigbee::MacAddress getMacAddress() = 0;
};
| 36.65
| 54
|
(translation_unit) "// Copyright <NAME> 2021\n//\n// Distributed under the Boost Software License, Version 1.0.\n// http://www.boost.org/LICENSE_1_0.txt)\n\n#pragma once\n\ntypedef uint16_t NetworkAddress;\ntypedef uint64_t MacAddress;\n\nstruct SimpleDescriptor {\n unsigned int endpoint_number = 0;\n unsigned int profile_id = 0;\n unsigned int device_id = 0;\n unsigned int device_version = 0;\n std::vector<unsigned int> input_clusters;\n std::vector<unsigned int> output_clusters;\n};\n\nstruct Endpoint {\n NetworkAddress address;\n uint8_t number;\n\n bool operator==(const Endpoint &endpoint) const { return (this->address == endpoint.address && this->number == endpoint.number); }\n bool operator!=(const Endpoint &endpoint) const { return (!(*this == endpoint)); }\n};\n\nstruct Message {\n Endpoint source;\n Endpoint destination;\n zcl::Cluster cluster;\n zcl::Frame zcl_frame;\n};\n\nenum class LogicalType {\n COORDINATOR = 0,\n ROUTER = 1,\n END_DEVICE = 2\n}; // TODO: Znp?\n\nstruct NetworkConfiguration {\n uint16_t pan_id = 0;\n uint64_t extended_pan_id = 0;\n LogicalType logical_type = LogicalType::COORDINATOR;\n std::vector<unsigned int> channels;\n std::array<uint8_t, 16> precfg_key = {};\n bool precfg_key_enable = false; // value: 0 (FALSE) only coord defualtKey need to be set, and OTA to set other devices in the network.\n // value: 1 (TRUE) Not only coord, but also all devices need to set their defualtKey (the same key). Or they can't not join the network.\n\n bool operator==(const NetworkConfiguration &configuration) const {\n return (this->pan_id == configuration.pan_id && \n this->extended_pan_id == configuration.extended_pan_id && \n this->logical_type == configuration.logical_type && \n this->channels == configuration.channels && \n precfg_key_enable ? this->precfg_key == configuration.precfg_key : true);\n }\n\n bool operator!=(const NetworkConfiguration &configuration) const { return (!(*this == configuration)); }\n};\n\nclass Device {\npublic:\n\n virtual zigbee::NetworkAddress getNetworkAddress() = 0;\n virtual zigbee::MacAddress getMacAddress() = 0;\n};"
(comment) "// Copyright <NAME> 2021"
(comment) "//"
(comment) "// Distributed under the Boost Software License, Version 1.0."
(comment) "// http://www.boost.org/LICENSE_1_0.txt)"
(preproc_call) "#pragma once\n"
(preproc_directive) "#pragma"
(preproc_arg) "once"
(type_definition) "typedef uint16_t NetworkAddress;"
(typedef) "typedef"
(primitive_type) "uint16_t"
(type_identifier) "NetworkAddress"
(;) ";"
(type_definition) "typedef uint64_t MacAddress;"
(typedef) "typedef"
(primitive_type) "uint64_t"
(type_identifier) "MacAddress"
(;) ";"
(struct_specifier) "struct SimpleDescriptor {\n unsigned int endpoint_number = 0;\n unsigned int profile_id = 0;\n unsigned int device_id = 0;\n unsigned int device_version = 0;\n std::vector<unsigned int> input_clusters;\n std::vector<unsigned int> output_clusters;\n}"
(struct) "struct"
(type_identifier) "SimpleDescriptor"
(field_declaration_list) "{\n unsigned int endpoint_number = 0;\n unsigned int profile_id = 0;\n unsigned int device_id = 0;\n unsigned int device_version = 0;\n std::vector<unsigned int> input_clusters;\n std::vector<unsigned int> output_clusters;\n}"
({) "{"
(field_declaration) "unsigned int endpoint_number = 0;"
(sized_type_specifier) "unsigned int"
(unsigned) "unsigned"
(primitive_type) "int"
(field_identifier) "endpoint_number"
(ERROR) "= 0"
(=) "="
(number_literal) "0"
(;) ";"
(field_declaration) "unsigned int profile_id = 0;"
(sized_type_specifier) "unsigned int"
(unsigned) "unsigned"
(primitive_type) "int"
(field_identifier) "profile_id"
(ERROR) "= 0"
(=) "="
(number_literal) "0"
(;) ";"
(field_declaration) "unsigned int device_id = 0;"
(sized_type_specifier) "unsigned int"
(unsigned) "unsigned"
(primitive_type) "int"
(field_identifier) "device_id"
(ERROR) "= 0"
(=) "="
(number_literal) "0"
(;) ";"
(field_declaration) "unsigned int device_version = 0;"
(sized_type_specifier) "unsigned int"
(unsigned) "unsigned"
(primitive_type) "int"
(field_identifier) "device_version"
(ERROR) "= 0"
(=) "="
(number_literal) "0"
(;) ";"
(ERROR) "std::vector<"
(type_identifier) "std"
(ERROR) "::"
(:) ":"
(:) ":"
(field_identifier) "vector"
(<) "<"
(field_declaration) "unsigned int> input_clusters;"
(sized_type_specifier) "unsigned int"
(unsigned) "unsigned"
(primitive_type) "int"
(ERROR) ">"
(>) ">"
(field_identifier) "input_clusters"
(;) ";"
(ERROR) "std::vector<"
(type_identifier) "std"
(ERROR) "::"
(:) ":"
(:) ":"
(field_identifier) "vector"
(<) "<"
(field_declaration) "unsigned int> output_clusters;"
(sized_type_specifier) "unsigned int"
(unsigned) "unsigned"
(primitive_type) "int"
(ERROR) ">"
(>) ">"
(field_identifier) "output_clusters"
(;) ";"
(}) "}"
(;) ";"
(declaration) "struct Endpoint {\n NetworkAddress address;\n uint8_t number;\n\n bool operator==(const Endpoint &endpoint) const { return (this->address == endpoint.address && this->number == endpoint.number); }\n bool"
(struct_specifier) "struct Endpoint {\n NetworkAddress address;\n uint8_t number;\n\n bool operator==(const Endpoint &endpoint) const { return (this->address == endpoint.address && this->number == endpoint.number); }"
(struct) "struct"
(type_identifier) "Endpoint"
(field_declaration_list) "{\n NetworkAddress address;\n uint8_t number;\n\n bool operator==(const Endpoint &endpoint) const { return (this->address == endpoint.address && this->number == endpoint.number); }"
({) "{"
(field_declaration) "NetworkAddress address;"
(type_identifier) "NetworkAddress"
(field_identifier) "address"
(;) ";"
(field_declaration) "uint8_t number;"
(primitive_type) "uint8_t"
(field_identifier) "number"
(;) ";"
(ERROR) "bool operator==(const Endpoint &endpoint)"
(primitive_type) "bool"
(field_identifier) "operator"
(==) "=="
(() "("
(type_qualifier) "const"
(const) "const"
(type_identifier) "Endpoint"
(ERROR) "&"
(&) "&"
(field_identifier) "endpoint"
()) ")"
(field_declaration) "const { return (this->address == endpoint.address && this->number == endpoint.number);"
(type_qualifier) "const"
(const) "const"
(ERROR) "{ return ("
({) "{"
(return) "return"
(() "("
(type_identifier) "this"
(ERROR) "->address == endpoint.address && this->number == endpoint."
(->) "->"
(field_identifier) "address"
(==) "=="
(field_identifier) "endpoint"
(.) "."
(field_identifier) "address"
(&&) "&&"
(field_identifier) "this"
(->) "->"
(field_identifier) "number"
(==) "=="
(field_identifier) "endpoint"
(.) "."
(field_identifier) "number"
(ERROR) ")"
()) ")"
(;) ";"
(}) "}"
(identifier) "bool"
(;) ""
(ERROR) "operator!=(const Endpoint &endpoint) const"
(binary_expression) "operator!=(const Endpoint &endpoint)"
(identifier) "operator"
(!=) "!="
(parenthesized_expression) "(const Endpoint &endpoint)"
(() "("
(ERROR) "const Endpoint"
(type_descriptor) "const Endpoint"
(type_qualifier) "const"
(const) "const"
(type_identifier) "Endpoint"
(pointer_expression) "&endpoint"
(&) "&"
(identifier) "endpoint"
()) ")"
(identifier) "const"
(compound_statement) "{ return (!(*this == endpoint)); }"
({) "{"
(return_statement) "return (!(*this == endpoint));"
(return) "return"
(parenthesized_expression) "(!(*this == endpoint))"
(() "("
(unary_expression) "!(*this == endpoint)"
(!) "!"
(parenthesized_expression) "(*this == endpoint)"
(() "("
(binary_expression) "*this == endpoint"
(pointer_expression) "*this"
(*) "*"
(identifier) "this"
(==) "=="
(identifier) "endpoint"
()) ")"
()) ")"
(;) ";"
(}) "}"
(ERROR) "}"
(}) "}"
(expression_statement) ";"
(;) ";"
(struct_specifier) "struct Message {\n Endpoint source;\n Endpoint destination;\n zcl::Cluster cluster;\n zcl::Frame zcl_frame;\n}"
(struct) "struct"
(type_identifier) "Message"
(field_declaration_list) "{\n Endpoint source;\n Endpoint destination;\n zcl::Cluster cluster;\n zcl::Frame zcl_frame;\n}"
({) "{"
(field_declaration) "Endpoint source;"
(type_identifier) "Endpoint"
(field_identifier) "source"
(;) ";"
(field_declaration) "Endpoint destination;"
(type_identifier) "Endpoint"
(field_identifier) "destination"
(;) ";"
(field_declaration) "zcl::Cluster cluster;"
(type_identifier) "zcl"
(ERROR) "::Cluster"
(:) ":"
(:) ":"
(field_identifier) "Cluster"
(field_identifier) "cluster"
(;) ";"
(field_declaration) "zcl::Frame zcl_frame;"
(type_identifier) "zcl"
(ERROR) "::Frame"
(:) ":"
(:) ":"
(field_identifier) "Frame"
(field_identifier) "zcl_frame"
(;) ";"
(}) "}"
(;) ";"
(function_definition) "enum class LogicalType {\n COORDINATOR = 0,\n ROUTER = 1,\n END_DEVICE = 2\n}; // TODO: Znp?\n\nstruct NetworkConfiguration {\n uint16_t pan_id = 0;\n uint64_t extended_pan_id = 0;\n LogicalType logical_type = LogicalType::COORDINATOR;\n std::vector<unsigned int> channels;\n std::array<uint8_t, 16> precfg_key = {};\n bool precfg_key_enable = false; // value: 0 (FALSE) only coord defualtKey need to be set, and OTA to set other devices in the network.\n // value: 1 (TRUE) Not only coord, but also all devices need to set their defualtKey (the same key). Or they can't not join the network.\n\n bool operator==(const NetworkConfiguration &configuration) const {\n return (this->pan_id == configuration.pan_id && \n this->extended_pan_id == configuration.extended_pan_id && \n this->logical_type == configuration.logical_type && \n this->channels == configuration.channels && \n precfg_key_enable ? this->precfg_key == configuration.precfg_key : true);\n }\n\n bool operator!=(const NetworkConfiguration &configuration) const { return (!(*this == configuration)); }\n}"
(enum_specifier) "enum class"
(enum) "enum"
(type_identifier) "class"
(identifier) "LogicalType"
(compound_statement) "{\n COORDINATOR = 0,\n ROUTER = 1,\n END_DEVICE = 2\n}; // TODO: Znp?\n\nstruct NetworkConfiguration {\n uint16_t pan_id = 0;\n uint64_t extended_pan_id = 0;\n LogicalType logical_type = LogicalType::COORDINATOR;\n std::vector<unsigned int> channels;\n std::array<uint8_t, 16> precfg_key = {};\n bool precfg_key_enable = false; // value: 0 (FALSE) only coord defualtKey need to be set, and OTA to set other devices in the network.\n // value: 1 (TRUE) Not only coord, but also all devices need to set their defualtKey (the same key). Or they can't not join the network.\n\n bool operator==(const NetworkConfiguration &configuration) const {\n return (this->pan_id == configuration.pan_id && \n this->extended_pan_id == configuration.extended_pan_id && \n this->logical_type == configuration.logical_type && \n this->channels == configuration.channels && \n precfg_key_enable ? this->precfg_key == configuration.precfg_key : true);\n }\n\n bool operator!=(const NetworkConfiguration &configuration) const { return (!(*this == configuration)); }\n}"
({) "{"
(expression_statement) "COORDINATOR = 0,\n ROUTER = 1,\n END_DEVICE = 2\n};"
(comma_expression) "COORDINATOR = 0,\n ROUTER = 1,\n END_DEVICE = 2"
(assignment_expression) "COORDINATOR = 0"
(identifier) "COORDINATOR"
(=) "="
(number_literal) "0"
(,) ","
(comma_expression) "ROUTER = 1,\n END_DEVICE = 2"
(assignment_expression) "ROUTER = 1"
(identifier) "ROUTER"
(=) "="
(number_literal) "1"
(,) ","
(assignment_expression) "END_DEVICE = 2"
(identifier) "END_DEVICE"
(=) "="
(number_literal) "2"
(ERROR) "}"
(}) "}"
(;) ";"
(comment) "// TODO: Znp?"
(declaration) "struct NetworkConfiguration {\n uint16_t pan_id = 0;\n uint64_t extended_pan_id = 0;\n LogicalType logical_type = LogicalType::COORDINATOR;\n std::vector<unsigned int> channels;\n std::array<uint8_t, 16> precfg_key = {};\n bool precfg_key_enable = false; // value: 0 (FALSE) only coord defualtKey need to be set, and OTA to set other devices in the network.\n // value: 1 (TRUE) Not only coord, but also all devices need to set their defualtKey (the same key). Or they can't not join the network.\n\n bool operator==(const NetworkConfiguration &configuration) const {\n return (this->pan_id == configuration.pan_id && \n this->extended_pan_id == configuration.extended_pan_id && \n this->logical_type == configuration.logical_type && \n this->channels == configuration.channels && \n precfg_key_enable ? this->precfg_key == configuration.precfg_key : true);\n }\n\n bool"
(struct_specifier) "struct NetworkConfiguration {\n uint16_t pan_id = 0;\n uint64_t extended_pan_id = 0;\n LogicalType logical_type = LogicalType::COORDINATOR;\n std::vector<unsigned int> channels;\n std::array<uint8_t, 16> precfg_key = {};\n bool precfg_key_enable = false; // value: 0 (FALSE) only coord defualtKey need to be set, and OTA to set other devices in the network.\n // value: 1 (TRUE) Not only coord, but also all devices need to set their defualtKey (the same key). Or they can't not join the network.\n\n bool operator==(const NetworkConfiguration &configuration) const {\n return (this->pan_id == configuration.pan_id && \n this->extended_pan_id == configuration.extended_pan_id && \n this->logical_type == configuration.logical_type && \n this->channels == configuration.channels && \n precfg_key_enable ? this->precfg_key == configuration.precfg_key : true);\n }"
(struct) "struct"
(type_identifier) "NetworkConfiguration"
(field_declaration_list) "{\n uint16_t pan_id = 0;\n uint64_t extended_pan_id = 0;\n LogicalType logical_type = LogicalType::COORDINATOR;\n std::vector<unsigned int> channels;\n std::array<uint8_t, 16> precfg_key = {};\n bool precfg_key_enable = false; // value: 0 (FALSE) only coord defualtKey need to be set, and OTA to set other devices in the network.\n // value: 1 (TRUE) Not only coord, but also all devices need to set their defualtKey (the same key). Or they can't not join the network.\n\n bool operator==(const NetworkConfiguration &configuration) const {\n return (this->pan_id == configuration.pan_id && \n this->extended_pan_id == configuration.extended_pan_id && \n this->logical_type == configuration.logical_type && \n this->channels == configuration.channels && \n precfg_key_enable ? this->precfg_key == configuration.precfg_key : true);\n }"
({) "{"
(field_declaration) "uint16_t pan_id = 0;"
(primitive_type) "uint16_t"
(field_identifier) "pan_id"
(ERROR) "= 0"
(=) "="
(number_literal) "0"
(;) ";"
(field_declaration) "uint64_t extended_pan_id = 0;"
(primitive_type) "uint64_t"
(field_identifier) "extended_pan_id"
(ERROR) "= 0"
(=) "="
(number_literal) "0"
(;) ";"
(field_declaration) "LogicalType logical_type = LogicalType::COORDINATOR;"
(type_identifier) "LogicalType"
(field_identifier) "logical_type"
(ERROR) "= LogicalType:"
(=) "="
(identifier) "LogicalType"
(:) ":"
(bitfield_clause) ":COORDINATOR"
(:) ":"
(identifier) "COORDINATOR"
(;) ";"
(ERROR) "std::vector<"
(type_identifier) "std"
(ERROR) "::"
(:) ":"
(:) ":"
(field_identifier) "vector"
(<) "<"
(field_declaration) "unsigned int> channels;"
(sized_type_specifier) "unsigned int"
(unsigned) "unsigned"
(primitive_type) "int"
(ERROR) ">"
(>) ">"
(field_identifier) "channels"
(;) ";"
(field_declaration) "std::array<uint8_t, 16> precfg_key = {};"
(type_identifier) "std"
(ERROR) "::"
(:) ":"
(:) ":"
(field_identifier) "array"
(ERROR) "<uint8_t"
(<) "<"
(primitive_type) "uint8_t"
(,) ","
(ERROR) "16>"
(number_literal) "16"
(>) ">"
(field_identifier) "precfg_key"
(ERROR) "= {}"
(=) "="
({) "{"
(}) "}"
(;) ";"
(field_declaration) "bool precfg_key_enable = false;"
(primitive_type) "bool"
(field_identifier) "precfg_key_enable"
(ERROR) "= false"
(=) "="
(false) "false"
(;) ";"
(comment) "// value: 0 (FALSE) only coord defualtKey need to be set, and OTA to set other devices in the network."
(comment) "// value: 1 (TRUE) Not only coord, but also all devices need to set their defualtKey (the same key). Or they can't not join the network."
(ERROR) "bool operator==(const NetworkConfiguration &configuration)"
(primitive_type) "bool"
(field_identifier) "operator"
(==) "=="
(() "("
(type_qualifier) "const"
(const) "const"
(type_identifier) "NetworkConfiguration"
(ERROR) "&"
(&) "&"
(field_identifier) "configuration"
()) ")"
(field_declaration) "const {\n return (this->pan_id == configuration.pan_id && \n this->extended_pan_id == configuration.extended_pan_id && \n this->logical_type == configuration.logical_type && \n this->channels == configuration.channels && \n precfg_key_enable ? this->precfg_key == configuration.precfg_key : true);"
(type_qualifier) "const"
(const) "const"
(ERROR) "{\n return ("
({) "{"
(return) "return"
(() "("
(type_identifier) "this"
(ERROR) "->pan_id == configuration.pan_id && \n this->extended_pan_id == configuration.extended_pan_id && \n this->logical_type == configuration.logical_type && \n this->channels == configuration.channels && \n precfg_key_enable ? this->precfg_key == configuration."
(->) "->"
(field_identifier) "pan_id"
(==) "=="
(field_identifier) "configuration"
(.) "."
(field_identifier) "pan_id"
(&&) "&&"
(field_identifier) "this"
(->) "->"
(field_identifier) "extended_pan_id"
(==) "=="
(field_identifier) "configuration"
(.) "."
(field_identifier) "extended_pan_id"
(&&) "&&"
(field_identifier) "this"
(->) "->"
(field_identifier) "logical_type"
(==) "=="
(field_identifier) "configuration"
(.) "."
(field_identifier) "logical_type"
(&&) "&&"
(field_identifier) "this"
(->) "->"
(field_identifier) "channels"
(==) "=="
(field_identifier) "configuration"
(.) "."
(field_identifier) "channels"
(&&) "&&"
(field_identifier) "precfg_key_enable"
(?) "?"
(field_identifier) "this"
(->) "->"
(field_identifier) "precfg_key"
(==) "=="
(field_identifier) "configuration"
(.) "."
(field_identifier) "precfg_key"
(bitfield_clause) ": true"
(:) ":"
(true) "true"
(ERROR) ")"
()) ")"
(;) ";"
(}) "}"
(identifier) "bool"
(;) ""
(ERROR) "operator!=(const NetworkConfiguration &configuration) const"
(binary_expression) "operator!=(const NetworkConfiguration &configuration)"
(identifier) "operator"
(!=) "!="
(parenthesized_expression) "(const NetworkConfiguration &configuration)"
(() "("
(ERROR) "const NetworkConfiguration"
(type_descriptor) "const NetworkConfiguration"
(type_qualifier) "const"
(const) "const"
(type_identifier) "NetworkConfiguration"
(pointer_expression) "&configuration"
(&) "&"
(identifier) "configuration"
()) ")"
(identifier) "const"
(compound_statement) "{ return (!(*this == configuration)); }"
({) "{"
(return_statement) "return (!(*this == configuration));"
(return) "return"
(parenthesized_expression) "(!(*this == configuration))"
(() "("
(unary_expression) "!(*this == configuration)"
(!) "!"
(parenthesized_expression) "(*this == configuration)"
(() "("
(binary_expression) "*this == configuration"
(pointer_expression) "*this"
(*) "*"
(identifier) "this"
(==) "=="
(identifier) "configuration"
()) ")"
()) ")"
(;) ";"
(}) "}"
(}) "}"
(expression_statement) ";"
(;) ";"
(function_definition) "class Device {\npublic:\n\n virtual zigbee::NetworkAddress getNetworkAddress() = 0;\n virtual zigbee::MacAddress getMacAddress() = 0;\n}"
(type_identifier) "class"
(identifier) "Device"
(compound_statement) "{\npublic:\n\n virtual zigbee::NetworkAddress getNetworkAddress() = 0;\n virtual zigbee::MacAddress getMacAddress() = 0;\n}"
({) "{"
(labeled_statement) "public:\n\n virtual zigbee::NetworkAddress getNetworkAddress() = 0;"
(statement_identifier) "public"
(ERROR) ":\n\n virtual zigbee:"
(:) ":"
(type_identifier) "virtual"
(identifier) "zigbee"
(:) ":"
(:) ":"
(declaration) "NetworkAddress getNetworkAddress() = 0;"
(type_identifier) "NetworkAddress"
(init_declarator) "getNetworkAddress() = 0"
(function_declarator) "getNetworkAddress()"
(identifier) "getNetworkAddress"
(parameter_list) "()"
(() "("
()) ")"
(=) "="
(number_literal) "0"
(;) ";"
(declaration) "virtual zigbee::MacAddress getMacAddress() = 0;"
(type_identifier) "virtual"
(ERROR) "zigbee::MacAddress"
(identifier) "zigbee"
(:) ":"
(:) ":"
(identifier) "MacAddress"
(init_declarator) "getMacAddress() = 0"
(function_declarator) "getMacAddress()"
(identifier) "getMacAddress"
(parameter_list) "()"
(() "("
()) ")"
(=) "="
(number_literal) "0"
(;) ";"
(}) "}"
(expression_statement) ";"
(;) ";"
| 471
| 41
|
{"language": "c", "success": true, "metadata": {"lines": 54, "avg_line_length": 36.65, "nodes": 299, "errors": 0, "source_hash": "7753d58af40fb83664fe9f6dd07114f8d6c3fd3840e722cfd8b2621279ef8f27", "categorized_nodes": 187}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 12}}, {"id": 3, "type": "type_definition", "text": "typedef uint16_t NetworkAddress;", "parent": null, "children": [4, 5, 6], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 32}}, {"id": 4, "type": "typedef", "text": "typedef", "parent": 3, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 5, "type": "primitive_type", "text": "uint16_t", "parent": 3, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 16}}, {"id": 6, "type": "type_identifier", "text": "NetworkAddress", "parent": 3, "children": [], "start_point": {"row": 7, "column": 17}, "end_point": {"row": 7, "column": 31}}, {"id": 7, "type": "type_definition", "text": "typedef uint64_t MacAddress;", "parent": null, "children": [8, 9, 10], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 28}}, {"id": 8, "type": "typedef", "text": "typedef", "parent": 7, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 9, "type": "primitive_type", "text": "uint64_t", "parent": 7, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 16}}, {"id": 10, "type": "type_identifier", "text": "MacAddress", "parent": 7, "children": [], "start_point": {"row": 8, "column": 17}, "end_point": {"row": 8, "column": 27}}, {"id": 11, "type": "struct_specifier", "text": "struct SimpleDescriptor {\n\tunsigned int endpoint_number = 0;\n\tunsigned int profile_id = 0;\n\tunsigned int device_id = 0;\n\tunsigned int device_version = 0;\n\tstd::vector<unsigned int> input_clusters;\n\tstd::vector<unsigned int> output_clusters;\n}", "parent": null, "children": [12, 13], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 12, "type": "struct", "text": "struct", "parent": 11, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 6}}, {"id": 13, "type": "type_identifier", "text": "SimpleDescriptor", "parent": 11, "children": [], "start_point": {"row": 10, "column": 7}, "end_point": {"row": 10, "column": 23}}, {"id": 14, "type": "field_declaration", "text": "unsigned int endpoint_number = 0;", "parent": 11, "children": [15, 18, 19], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 34}}, {"id": 15, "type": "sized_type_specifier", "text": "unsigned int", "parent": 14, "children": [16, 17], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 13}}, {"id": 16, "type": "unsigned", "text": "unsigned", "parent": 15, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 9}}, {"id": 17, "type": "primitive_type", "text": "int", "parent": 15, "children": [], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 13}}, {"id": 18, "type": "field_identifier", "text": "endpoint_number", "parent": 14, "children": [], "start_point": {"row": 11, "column": 14}, "end_point": {"row": 11, "column": 29}}, {"id": 19, "type": "ERROR", "text": "= 0", "parent": 14, "children": [20, 21], "start_point": {"row": 11, "column": 30}, "end_point": {"row": 11, "column": 33}}, {"id": 20, "type": "=", "text": "=", "parent": 19, "children": [], "start_point": {"row": 11, "column": 30}, "end_point": {"row": 11, "column": 31}}, {"id": 21, "type": "number_literal", "text": "0", "parent": 19, "children": [], "start_point": {"row": 11, "column": 32}, "end_point": {"row": 11, "column": 33}}, {"id": 22, "type": "field_declaration", "text": "unsigned int profile_id = 0;", "parent": 11, "children": [23, 26, 27], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 29}}, {"id": 23, "type": "sized_type_specifier", "text": "unsigned int", "parent": 22, "children": [24, 25], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 13}}, {"id": 24, "type": "unsigned", "text": "unsigned", "parent": 23, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 9}}, {"id": 25, "type": "primitive_type", "text": "int", "parent": 23, "children": [], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 13}}, {"id": 26, "type": "field_identifier", "text": "profile_id", "parent": 22, "children": [], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 24}}, {"id": 27, "type": "ERROR", "text": "= 0", "parent": 22, "children": [28, 29], "start_point": {"row": 12, "column": 25}, "end_point": {"row": 12, "column": 28}}, {"id": 28, "type": "=", "text": "=", "parent": 27, "children": [], "start_point": {"row": 12, "column": 25}, "end_point": {"row": 12, "column": 26}}, {"id": 29, "type": "number_literal", "text": "0", "parent": 27, "children": [], "start_point": {"row": 12, "column": 27}, "end_point": {"row": 12, "column": 28}}, {"id": 30, "type": "field_declaration", "text": "unsigned int device_id = 0;", "parent": 11, "children": [31, 34, 35], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 28}}, {"id": 31, "type": "sized_type_specifier", "text": "unsigned int", "parent": 30, "children": [32, 33], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 13}}, {"id": 32, "type": "unsigned", "text": "unsigned", "parent": 31, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 9}}, {"id": 33, "type": "primitive_type", "text": "int", "parent": 31, "children": [], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 13}}, {"id": 34, "type": "field_identifier", "text": "device_id", "parent": 30, "children": [], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 23}}, {"id": 35, "type": "ERROR", "text": "= 0", "parent": 30, "children": [36, 37], "start_point": {"row": 13, "column": 24}, "end_point": {"row": 13, "column": 27}}, {"id": 36, "type": "=", "text": "=", "parent": 35, "children": [], "start_point": {"row": 13, "column": 24}, "end_point": {"row": 13, "column": 25}}, {"id": 37, "type": "number_literal", "text": "0", "parent": 35, "children": [], "start_point": {"row": 13, "column": 26}, "end_point": {"row": 13, "column": 27}}, {"id": 38, "type": "field_declaration", "text": "unsigned int device_version = 0;", "parent": 11, "children": [39, 42, 43], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 33}}, {"id": 39, "type": "sized_type_specifier", "text": "unsigned int", "parent": 38, "children": [40, 41], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 13}}, {"id": 40, "type": "unsigned", "text": "unsigned", "parent": 39, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 9}}, {"id": 41, "type": "primitive_type", "text": "int", "parent": 39, "children": [], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 13}}, {"id": 42, "type": "field_identifier", "text": "device_version", "parent": 38, "children": [], "start_point": {"row": 14, "column": 14}, "end_point": {"row": 14, "column": 28}}, {"id": 43, "type": "ERROR", "text": "= 0", "parent": 38, "children": [44, 45], "start_point": {"row": 14, "column": 29}, "end_point": {"row": 14, "column": 32}}, {"id": 44, "type": "=", "text": "=", "parent": 43, "children": [], "start_point": {"row": 14, "column": 29}, "end_point": {"row": 14, "column": 30}}, {"id": 45, "type": "number_literal", "text": "0", "parent": 43, "children": [], "start_point": {"row": 14, "column": 31}, "end_point": {"row": 14, "column": 32}}, {"id": 46, "type": "ERROR", "text": "std::vector<", "parent": 11, "children": [47, 48, 49], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 13}}, {"id": 47, "type": "type_identifier", "text": "std", "parent": 46, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 4}}, {"id": 48, "type": "field_identifier", "text": "vector", "parent": 46, "children": [], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 12}}, {"id": 49, "type": "<", "text": "<", "parent": 46, "children": [], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 15, "column": 13}}, {"id": 50, "type": "field_declaration", "text": "unsigned int> input_clusters;", "parent": 11, "children": [51, 54, 56], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 42}}, {"id": 51, "type": "sized_type_specifier", "text": "unsigned int", "parent": 50, "children": [52, 53], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 25}}, {"id": 52, "type": "unsigned", "text": "unsigned", "parent": 51, "children": [], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 21}}, {"id": 53, "type": "primitive_type", "text": "int", "parent": 51, "children": [], "start_point": {"row": 15, "column": 22}, "end_point": {"row": 15, "column": 25}}, {"id": 54, "type": "ERROR", "text": ">", "parent": 50, "children": [55], "start_point": {"row": 15, "column": 25}, "end_point": {"row": 15, "column": 26}}, {"id": 55, "type": ">", "text": ">", "parent": 54, "children": [], "start_point": {"row": 15, "column": 25}, "end_point": {"row": 15, "column": 26}}, {"id": 56, "type": "field_identifier", "text": "input_clusters", "parent": 50, "children": [], "start_point": {"row": 15, "column": 27}, "end_point": {"row": 15, "column": 41}}, {"id": 57, "type": "ERROR", "text": "std::vector<", "parent": 11, "children": [58, 59, 60], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 13}}, {"id": 58, "type": "type_identifier", "text": "std", "parent": 57, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 4}}, {"id": 59, "type": "field_identifier", "text": "vector", "parent": 57, "children": [], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 12}}, {"id": 60, "type": "<", "text": "<", "parent": 57, "children": [], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 13}}, {"id": 61, "type": "field_declaration", "text": "unsigned int> output_clusters;", "parent": 11, "children": [62, 65, 67], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 43}}, {"id": 62, "type": "sized_type_specifier", "text": "unsigned int", "parent": 61, "children": [63, 64], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 25}}, {"id": 63, "type": "unsigned", "text": "unsigned", "parent": 62, "children": [], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 21}}, {"id": 64, "type": "primitive_type", "text": "int", "parent": 62, "children": [], "start_point": {"row": 16, "column": 22}, "end_point": {"row": 16, "column": 25}}, {"id": 65, "type": "ERROR", "text": ">", "parent": 61, "children": [66], "start_point": {"row": 16, "column": 25}, "end_point": {"row": 16, "column": 26}}, {"id": 66, "type": ">", "text": ">", "parent": 65, "children": [], "start_point": {"row": 16, "column": 25}, "end_point": {"row": 16, "column": 26}}, {"id": 67, "type": "field_identifier", "text": "output_clusters", "parent": 61, "children": [], "start_point": {"row": 16, "column": 27}, "end_point": {"row": 16, "column": 42}}, {"id": 68, "type": "declaration", "text": "struct Endpoint {\n\tNetworkAddress address;\n\tuint8_t number;\n\n\tbool operator==(const Endpoint &endpoint) const { return (this->address == endpoint.address && this->number == endpoint.number); }\n\tbool", "parent": null, "children": [69, 98], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 24, "column": 5}}, {"id": 69, "type": "struct_specifier", "text": "struct Endpoint {\n\tNetworkAddress address;\n\tuint8_t number;\n\n\tbool operator==(const Endpoint &endpoint) const { return (this->address == endpoint.address && this->number == endpoint.number); }", "parent": 68, "children": [70, 71], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 23, "column": 131}}, {"id": 70, "type": "struct", "text": "struct", "parent": 69, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 6}}, {"id": 71, "type": "type_identifier", "text": "Endpoint", "parent": 69, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 15}}, {"id": 72, "type": "field_declaration", "text": "NetworkAddress address;", "parent": 69, "children": [73, 74], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 24}}, {"id": 73, "type": "type_identifier", "text": "NetworkAddress", "parent": 72, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 15}}, {"id": 74, "type": "field_identifier", "text": "address", "parent": 72, "children": [], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 23}}, {"id": 75, "type": "field_declaration", "text": "uint8_t number;", "parent": 69, "children": [76, 77], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 16}}, {"id": 76, "type": "primitive_type", "text": "uint8_t", "parent": 75, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 8}}, {"id": 77, "type": "field_identifier", "text": "number", "parent": 75, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 15}}, {"id": 78, "type": "ERROR", "text": "bool operator==(const Endpoint &endpoint)", "parent": 69, "children": [79, 80, 81, 82, 83], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 42}}, {"id": 79, "type": "primitive_type", "text": "bool", "parent": 78, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 5}}, {"id": 80, "type": "field_identifier", "text": "operator", "parent": 78, "children": [], "start_point": {"row": 23, "column": 6}, "end_point": {"row": 23, "column": 14}}, {"id": 81, "type": "==", "text": "==", "parent": 78, "children": [], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 16}}, {"id": 82, "type": "type_identifier", "text": "Endpoint", "parent": 78, "children": [], "start_point": {"row": 23, "column": 23}, "end_point": {"row": 23, "column": 31}}, {"id": 83, "type": "field_identifier", "text": "endpoint", "parent": 78, "children": [], "start_point": {"row": 23, "column": 33}, "end_point": {"row": 23, "column": 41}}, {"id": 84, "type": "field_declaration", "text": "const { return (this->address == endpoint.address && this->number == endpoint.number);", "parent": 69, "children": [85, 86, 87, 97], "start_point": {"row": 23, "column": 43}, "end_point": {"row": 23, "column": 129}}, {"id": 85, "type": "ERROR", "text": "{ return (", "parent": 84, "children": [], "start_point": {"row": 23, "column": 49}, "end_point": {"row": 23, "column": 59}}, {"id": 86, "type": "type_identifier", "text": "this", "parent": 84, "children": [], "start_point": {"row": 23, "column": 59}, "end_point": {"row": 23, "column": 63}}, {"id": 87, "type": "ERROR", "text": "->address == endpoint.address && this->number == endpoint.", "parent": 84, "children": [88, 89, 90, 91, 92, 93, 94, 95, 96], "start_point": {"row": 23, "column": 63}, "end_point": {"row": 23, "column": 121}}, {"id": 88, "type": "field_identifier", "text": "address", "parent": 87, "children": [], "start_point": {"row": 23, "column": 65}, "end_point": {"row": 23, "column": 72}}, {"id": 89, "type": "==", "text": "==", "parent": 87, "children": [], "start_point": {"row": 23, "column": 73}, "end_point": {"row": 23, "column": 75}}, {"id": 90, "type": "field_identifier", "text": "endpoint", "parent": 87, "children": [], "start_point": {"row": 23, "column": 76}, "end_point": {"row": 23, "column": 84}}, {"id": 91, "type": "field_identifier", "text": "address", "parent": 87, "children": [], "start_point": {"row": 23, "column": 85}, "end_point": {"row": 23, "column": 92}}, {"id": 92, "type": "&&", "text": "&&", "parent": 87, "children": [], "start_point": {"row": 23, "column": 93}, "end_point": {"row": 23, "column": 95}}, {"id": 93, "type": "field_identifier", "text": "this", "parent": 87, "children": [], "start_point": {"row": 23, "column": 96}, "end_point": {"row": 23, "column": 100}}, {"id": 94, "type": "field_identifier", "text": "number", "parent": 87, "children": [], "start_point": {"row": 23, "column": 102}, "end_point": {"row": 23, "column": 108}}, {"id": 95, "type": "==", "text": "==", "parent": 87, "children": [], "start_point": {"row": 23, "column": 109}, "end_point": {"row": 23, "column": 111}}, {"id": 96, "type": "field_identifier", "text": "endpoint", "parent": 87, "children": [], "start_point": {"row": 23, "column": 112}, "end_point": {"row": 23, "column": 120}}, {"id": 97, "type": "field_identifier", "text": "number", "parent": 84, "children": [], "start_point": {"row": 23, "column": 121}, "end_point": {"row": 23, "column": 127}}, {"id": 98, "type": "identifier", "text": "bool", "parent": 68, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 5}}, {"id": 99, "type": "ERROR", "text": "operator!=(const Endpoint &endpoint) const", "parent": null, "children": [100], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 48}}, {"id": 100, "type": "binary_expression", "text": "operator!=(const Endpoint &endpoint)", "parent": 99, "children": [101, 102, 103], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 42}}, {"id": 101, "type": "identifier", "text": "operator", "parent": 100, "children": [], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 14}}, {"id": 102, "type": "!=", "text": "!=", "parent": 100, "children": [], "start_point": {"row": 24, "column": 14}, "end_point": {"row": 24, "column": 16}}, {"id": 103, "type": "parenthesized_expression", "text": "(const Endpoint &endpoint)", "parent": 100, "children": [104, 107], "start_point": {"row": 24, "column": 16}, "end_point": {"row": 24, "column": 42}}, {"id": 104, "type": "ERROR", "text": "const Endpoint", "parent": 103, "children": [105], "start_point": {"row": 24, "column": 17}, "end_point": {"row": 24, "column": 31}}, {"id": 105, "type": "type_descriptor", "text": "const Endpoint", "parent": 104, "children": [106], "start_point": {"row": 24, "column": 17}, "end_point": {"row": 24, "column": 31}}, {"id": 106, "type": "type_identifier", "text": "Endpoint", "parent": 105, "children": [], "start_point": {"row": 24, "column": 23}, "end_point": {"row": 24, "column": 31}}, {"id": 107, "type": "pointer_expression", "text": "&endpoint", "parent": 103, "children": [108], "start_point": {"row": 24, "column": 32}, "end_point": {"row": 24, "column": 41}}, {"id": 108, "type": "identifier", "text": "endpoint", "parent": 107, "children": [], "start_point": {"row": 24, "column": 33}, "end_point": {"row": 24, "column": 41}}, {"id": 109, "type": "return_statement", "text": "return (!(*this == endpoint));", "parent": null, "children": [110], "start_point": {"row": 24, "column": 51}, "end_point": {"row": 24, "column": 81}}, {"id": 110, "type": "parenthesized_expression", "text": "(!(*this == endpoint))", "parent": 109, "children": [111], "start_point": {"row": 24, "column": 58}, "end_point": {"row": 24, "column": 80}}, {"id": 111, "type": "unary_expression", "text": "!(*this == endpoint)", "parent": 110, "children": [112, 113], "start_point": {"row": 24, "column": 59}, "end_point": {"row": 24, "column": 79}}, {"id": 112, "type": "!", "text": "!", "parent": 111, "children": [], "start_point": {"row": 24, "column": 59}, "end_point": {"row": 24, "column": 60}}, {"id": 113, "type": "parenthesized_expression", "text": "(*this == endpoint)", "parent": 111, "children": [114], "start_point": {"row": 24, "column": 60}, "end_point": {"row": 24, "column": 79}}, {"id": 114, "type": "binary_expression", "text": "*this == endpoint", "parent": 113, "children": [115, 118, 119], "start_point": {"row": 24, "column": 61}, "end_point": {"row": 24, "column": 78}}, {"id": 115, "type": "pointer_expression", "text": "*this", "parent": 114, "children": [116, 117], "start_point": {"row": 24, "column": 61}, "end_point": {"row": 24, "column": 66}}, {"id": 116, "type": "*", "text": "*", "parent": 115, "children": [], "start_point": {"row": 24, "column": 61}, "end_point": {"row": 24, "column": 62}}, {"id": 117, "type": "identifier", "text": "this", "parent": 115, "children": [], "start_point": {"row": 24, "column": 62}, "end_point": {"row": 24, "column": 66}}, {"id": 118, "type": "==", "text": "==", "parent": 114, "children": [], "start_point": {"row": 24, "column": 67}, "end_point": {"row": 24, "column": 69}}, {"id": 119, "type": "identifier", "text": "endpoint", "parent": 114, "children": [], "start_point": {"row": 24, "column": 70}, "end_point": {"row": 24, "column": 78}}, {"id": 120, "type": "struct_specifier", "text": "struct Message {\n\tEndpoint source;\n\tEndpoint destination;\n\tzcl::Cluster cluster;\n\tzcl::Frame zcl_frame;\n}", "parent": null, "children": [121, 122], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 32, "column": 1}}, {"id": 121, "type": "struct", "text": "struct", "parent": 120, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 6}}, {"id": 122, "type": "type_identifier", "text": "Message", "parent": 120, "children": [], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 14}}, {"id": 123, "type": "field_declaration", "text": "Endpoint source;", "parent": 120, "children": [124, 125], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 17}}, {"id": 124, "type": "type_identifier", "text": "Endpoint", "parent": 123, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 9}}, {"id": 125, "type": "field_identifier", "text": "source", "parent": 123, "children": [], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 16}}, {"id": 126, "type": "field_declaration", "text": "Endpoint destination;", "parent": 120, "children": [127, 128], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 22}}, {"id": 127, "type": "type_identifier", "text": "Endpoint", "parent": 126, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 9}}, {"id": 128, "type": "field_identifier", "text": "destination", "parent": 126, "children": [], "start_point": {"row": 29, "column": 10}, "end_point": {"row": 29, "column": 21}}, {"id": 129, "type": "field_declaration", "text": "zcl::Cluster cluster;", "parent": 120, "children": [130, 131, 133], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 22}}, {"id": 130, "type": "type_identifier", "text": "zcl", "parent": 129, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 4}}, {"id": 131, "type": "ERROR", "text": "::Cluster", "parent": 129, "children": [132], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 13}}, {"id": 132, "type": "field_identifier", "text": "Cluster", "parent": 131, "children": [], "start_point": {"row": 30, "column": 6}, "end_point": {"row": 30, "column": 13}}, {"id": 133, "type": "field_identifier", "text": "cluster", "parent": 129, "children": [], "start_point": {"row": 30, "column": 14}, "end_point": {"row": 30, "column": 21}}, {"id": 134, "type": "field_declaration", "text": "zcl::Frame zcl_frame;", "parent": 120, "children": [135, 136, 138], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 22}}, {"id": 135, "type": "type_identifier", "text": "zcl", "parent": 134, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 4}}, {"id": 136, "type": "ERROR", "text": "::Frame", "parent": 134, "children": [137], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 11}}, {"id": 137, "type": "field_identifier", "text": "Frame", "parent": 136, "children": [], "start_point": {"row": 31, "column": 6}, "end_point": {"row": 31, "column": 11}}, {"id": 138, "type": "field_identifier", "text": "zcl_frame", "parent": 134, "children": [], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 31, "column": 21}}, {"id": 139, "type": "function_definition", "text": "enum class LogicalType {\n\tCOORDINATOR = 0,\n\tROUTER = 1,\n\tEND_DEVICE = 2\n}; // TODO: Znp?\n\nstruct NetworkConfiguration {\n\tuint16_t pan_id = 0;\n\tuint64_t extended_pan_id = 0;\n\tLogicalType logical_type = LogicalType::COORDINATOR;\n\tstd::vector<unsigned int> channels;\n\tstd::array<uint8_t, 16> precfg_key = {};\n\tbool precfg_key_enable = false; // value: 0 (FALSE) only coord defualtKey need to be set, and OTA to set other devices in the network.\n\t\t\t\t\t\t\t\t\t// value: 1 (TRUE) Not only coord, but also all devices need to set their defualtKey (the same key). Or they can't not join the network.\n\n\tbool operator==(const NetworkConfiguration &configuration) const {\n\t\treturn (this->pan_id == configuration.pan_id && \n\t\t\t\tthis->extended_pan_id == configuration.extended_pan_id && \n\t\t\t\tthis->logical_type == configuration.logical_type && \n\t\t\t\tthis->channels == configuration.channels && \n\t\t\t\tprecfg_key_enable ? this->precfg_key == configuration.precfg_key : true);\n\t}\n\n\tbool operator!=(const NetworkConfiguration &configuration) const { return (!(*this == configuration)); }\n}", "parent": null, "children": [140, 142], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 58, "column": 1}}, {"id": 140, "type": "enum_specifier", "text": "enum class", "parent": 139, "children": [141], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 10}}, {"id": 141, "type": "enum", "text": "enum", "parent": 140, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 4}}, {"id": 142, "type": "identifier", "text": "LogicalType", "parent": 139, "children": [], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 22}}, {"id": 143, "type": "comma_expression", "text": "COORDINATOR = 0,\n\tROUTER = 1,\n\tEND_DEVICE = 2", "parent": 139, "children": [144, 148], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 37, "column": 15}}, {"id": 144, "type": "assignment_expression", "text": "COORDINATOR = 0", "parent": 143, "children": [145, 146, 147], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 16}}, {"id": 145, "type": "identifier", "text": "COORDINATOR", "parent": 144, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 12}}, {"id": 146, "type": "=", "text": "=", "parent": 144, "children": [], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 14}}, {"id": 147, "type": "number_literal", "text": "0", "parent": 144, "children": [], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 16}}, {"id": 148, "type": "comma_expression", "text": "ROUTER = 1,\n\tEND_DEVICE = 2", "parent": 143, "children": [149, 153], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 37, "column": 15}}, {"id": 149, "type": "assignment_expression", "text": "ROUTER = 1", "parent": 148, "children": [150, 151, 152], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 11}}, {"id": 150, "type": "identifier", "text": "ROUTER", "parent": 149, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 7}}, {"id": 151, "type": "=", "text": "=", "parent": 149, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 9}}, {"id": 152, "type": "number_literal", "text": "1", "parent": 149, "children": [], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 11}}, {"id": 153, "type": "assignment_expression", "text": "END_DEVICE = 2", "parent": 148, "children": [154, 155, 156], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 15}}, {"id": 154, "type": "identifier", "text": "END_DEVICE", "parent": 153, "children": [], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 11}}, {"id": 155, "type": "=", "text": "=", "parent": 153, "children": [], "start_point": {"row": 37, "column": 12}, "end_point": {"row": 37, "column": 13}}, {"id": 156, "type": "number_literal", "text": "2", "parent": 153, "children": [], "start_point": {"row": 37, "column": 14}, "end_point": {"row": 37, "column": 15}}, {"id": 157, "type": "declaration", "text": "struct NetworkConfiguration {\n\tuint16_t pan_id = 0;\n\tuint64_t extended_pan_id = 0;\n\tLogicalType logical_type = LogicalType::COORDINATOR;\n\tstd::vector<unsigned int> channels;\n\tstd::array<uint8_t, 16> precfg_key = {};\n\tbool precfg_key_enable = false; // value: 0 (FALSE) only coord defualtKey need to be set, and OTA to set other devices in the network.\n\t\t\t\t\t\t\t\t\t// value: 1 (TRUE) Not only coord, but also all devices need to set their defualtKey (the same key). Or they can't not join the network.\n\n\tbool operator==(const NetworkConfiguration &configuration) const {\n\t\treturn (this->pan_id == configuration.pan_id && \n\t\t\t\tthis->extended_pan_id == configuration.extended_pan_id && \n\t\t\t\tthis->logical_type == configuration.logical_type && \n\t\t\t\tthis->channels == configuration.channels && \n\t\t\t\tprecfg_key_enable ? this->precfg_key == configuration.precfg_key : true);\n\t}\n\n\tbool", "parent": 139, "children": [158, 252], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 57, "column": 5}}, {"id": 158, "type": "struct_specifier", "text": "struct NetworkConfiguration {\n\tuint16_t pan_id = 0;\n\tuint64_t extended_pan_id = 0;\n\tLogicalType logical_type = LogicalType::COORDINATOR;\n\tstd::vector<unsigned int> channels;\n\tstd::array<uint8_t, 16> precfg_key = {};\n\tbool precfg_key_enable = false; // value: 0 (FALSE) only coord defualtKey need to be set, and OTA to set other devices in the network.\n\t\t\t\t\t\t\t\t\t// value: 1 (TRUE) Not only coord, but also all devices need to set their defualtKey (the same key). Or they can't not join the network.\n\n\tbool operator==(const NetworkConfiguration &configuration) const {\n\t\treturn (this->pan_id == configuration.pan_id && \n\t\t\t\tthis->extended_pan_id == configuration.extended_pan_id && \n\t\t\t\tthis->logical_type == configuration.logical_type && \n\t\t\t\tthis->channels == configuration.channels && \n\t\t\t\tprecfg_key_enable ? this->precfg_key == configuration.precfg_key : true);\n\t}", "parent": 157, "children": [159, 160], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 55, "column": 2}}, {"id": 159, "type": "struct", "text": "struct", "parent": 158, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 6}}, {"id": 160, "type": "type_identifier", "text": "NetworkConfiguration", "parent": 158, "children": [], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 27}}, {"id": 161, "type": "field_declaration", "text": "uint16_t pan_id = 0;", "parent": 158, "children": [162, 163, 164], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 21}}, {"id": 162, "type": "primitive_type", "text": "uint16_t", "parent": 161, "children": [], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 9}}, {"id": 163, "type": "field_identifier", "text": "pan_id", "parent": 161, "children": [], "start_point": {"row": 41, "column": 10}, "end_point": {"row": 41, "column": 16}}, {"id": 164, "type": "ERROR", "text": "= 0", "parent": 161, "children": [165, 166], "start_point": {"row": 41, "column": 17}, "end_point": {"row": 41, "column": 20}}, {"id": 165, "type": "=", "text": "=", "parent": 164, "children": [], "start_point": {"row": 41, "column": 17}, "end_point": {"row": 41, "column": 18}}, {"id": 166, "type": "number_literal", "text": "0", "parent": 164, "children": [], "start_point": {"row": 41, "column": 19}, "end_point": {"row": 41, "column": 20}}, {"id": 167, "type": "field_declaration", "text": "uint64_t extended_pan_id = 0;", "parent": 158, "children": [168, 169, 170], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 30}}, {"id": 168, "type": "primitive_type", "text": "uint64_t", "parent": 167, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 9}}, {"id": 169, "type": "field_identifier", "text": "extended_pan_id", "parent": 167, "children": [], "start_point": {"row": 42, "column": 10}, "end_point": {"row": 42, "column": 25}}, {"id": 170, "type": "ERROR", "text": "= 0", "parent": 167, "children": [171, 172], "start_point": {"row": 42, "column": 26}, "end_point": {"row": 42, "column": 29}}, {"id": 171, "type": "=", "text": "=", "parent": 170, "children": [], "start_point": {"row": 42, "column": 26}, "end_point": {"row": 42, "column": 27}}, {"id": 172, "type": "number_literal", "text": "0", "parent": 170, "children": [], "start_point": {"row": 42, "column": 28}, "end_point": {"row": 42, "column": 29}}, {"id": 173, "type": "field_declaration", "text": "LogicalType logical_type = LogicalType::COORDINATOR;", "parent": 158, "children": [174, 175, 176, 179], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 53}}, {"id": 174, "type": "type_identifier", "text": "LogicalType", "parent": 173, "children": [], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 12}}, {"id": 175, "type": "field_identifier", "text": "logical_type", "parent": 173, "children": [], "start_point": {"row": 43, "column": 13}, "end_point": {"row": 43, "column": 25}}, {"id": 176, "type": "ERROR", "text": "= LogicalType:", "parent": 173, "children": [177, 178], "start_point": {"row": 43, "column": 26}, "end_point": {"row": 43, "column": 40}}, {"id": 177, "type": "=", "text": "=", "parent": 176, "children": [], "start_point": {"row": 43, "column": 26}, "end_point": {"row": 43, "column": 27}}, {"id": 178, "type": "identifier", "text": "LogicalType", "parent": 176, "children": [], "start_point": {"row": 43, "column": 28}, "end_point": {"row": 43, "column": 39}}, {"id": 179, "type": "bitfield_clause", "text": ":COORDINATOR", "parent": 173, "children": [180], "start_point": {"row": 43, "column": 40}, "end_point": {"row": 43, "column": 52}}, {"id": 180, "type": "identifier", "text": "COORDINATOR", "parent": 179, "children": [], "start_point": {"row": 43, "column": 41}, "end_point": {"row": 43, "column": 52}}, {"id": 181, "type": "ERROR", "text": "std::vector<", "parent": 158, "children": [182, 183, 184], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 13}}, {"id": 182, "type": "type_identifier", "text": "std", "parent": 181, "children": [], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 4}}, {"id": 183, "type": "field_identifier", "text": "vector", "parent": 181, "children": [], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 12}}, {"id": 184, "type": "<", "text": "<", "parent": 181, "children": [], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 13}}, {"id": 185, "type": "field_declaration", "text": "unsigned int> channels;", "parent": 158, "children": [186, 189, 191], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 36}}, {"id": 186, "type": "sized_type_specifier", "text": "unsigned int", "parent": 185, "children": [187, 188], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 25}}, {"id": 187, "type": "unsigned", "text": "unsigned", "parent": 186, "children": [], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 21}}, {"id": 188, "type": "primitive_type", "text": "int", "parent": 186, "children": [], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 25}}, {"id": 189, "type": "ERROR", "text": ">", "parent": 185, "children": [190], "start_point": {"row": 44, "column": 25}, "end_point": {"row": 44, "column": 26}}, {"id": 190, "type": ">", "text": ">", "parent": 189, "children": [], "start_point": {"row": 44, "column": 25}, "end_point": {"row": 44, "column": 26}}, {"id": 191, "type": "field_identifier", "text": "channels", "parent": 185, "children": [], "start_point": {"row": 44, "column": 27}, "end_point": {"row": 44, "column": 35}}, {"id": 192, "type": "field_declaration", "text": "std::array<uint8_t, 16> precfg_key = {};", "parent": 158, "children": [193, 194, 195, 198, 201, 202], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 41}}, {"id": 193, "type": "type_identifier", "text": "std", "parent": 192, "children": [], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 4}}, {"id": 194, "type": "field_identifier", "text": "array", "parent": 192, "children": [], "start_point": {"row": 45, "column": 6}, "end_point": {"row": 45, "column": 11}}, {"id": 195, "type": "ERROR", "text": "<uint8_t", "parent": 192, "children": [196, 197], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 19}}, {"id": 196, "type": "<", "text": "<", "parent": 195, "children": [], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 12}}, {"id": 197, "type": "primitive_type", "text": "uint8_t", "parent": 195, "children": [], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 19}}, {"id": 198, "type": "ERROR", "text": "16>", "parent": 192, "children": [199, 200], "start_point": {"row": 45, "column": 21}, "end_point": {"row": 45, "column": 24}}, {"id": 199, "type": "number_literal", "text": "16", "parent": 198, "children": [], "start_point": {"row": 45, "column": 21}, "end_point": {"row": 45, "column": 23}}, {"id": 200, "type": ">", "text": ">", "parent": 198, "children": [], "start_point": {"row": 45, "column": 23}, "end_point": {"row": 45, "column": 24}}, {"id": 201, "type": "field_identifier", "text": "precfg_key", "parent": 192, "children": [], "start_point": {"row": 45, "column": 25}, "end_point": {"row": 45, "column": 35}}, {"id": 202, "type": "ERROR", "text": "= {}", "parent": 192, "children": [203], "start_point": {"row": 45, "column": 36}, "end_point": {"row": 45, "column": 40}}, {"id": 203, "type": "=", "text": "=", "parent": 202, "children": [], "start_point": {"row": 45, "column": 36}, "end_point": {"row": 45, "column": 37}}, {"id": 204, "type": "field_declaration", "text": "bool precfg_key_enable = false;", "parent": 158, "children": [205, 206, 207], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 32}}, {"id": 205, "type": "primitive_type", "text": "bool", "parent": 204, "children": [], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 5}}, {"id": 206, "type": "field_identifier", "text": "precfg_key_enable", "parent": 204, "children": [], "start_point": {"row": 46, "column": 6}, "end_point": {"row": 46, "column": 23}}, {"id": 207, "type": "ERROR", "text": "= false", "parent": 204, "children": [208, 209], "start_point": {"row": 46, "column": 24}, "end_point": {"row": 46, "column": 31}}, {"id": 208, "type": "=", "text": "=", "parent": 207, "children": [], "start_point": {"row": 46, "column": 24}, "end_point": {"row": 46, "column": 25}}, {"id": 209, "type": "false", "text": "false", "parent": 207, "children": [], "start_point": {"row": 46, "column": 26}, "end_point": {"row": 46, "column": 31}}, {"id": 210, "type": "ERROR", "text": "bool operator==(const NetworkConfiguration &configuration)", "parent": 158, "children": [211, 212, 213, 214, 215], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 59}}, {"id": 211, "type": "primitive_type", "text": "bool", "parent": 210, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 5}}, {"id": 212, "type": "field_identifier", "text": "operator", "parent": 210, "children": [], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 14}}, {"id": 213, "type": "==", "text": "==", "parent": 210, "children": [], "start_point": {"row": 49, "column": 14}, "end_point": {"row": 49, "column": 16}}, {"id": 214, "type": "type_identifier", "text": "NetworkConfiguration", "parent": 210, "children": [], "start_point": {"row": 49, "column": 23}, "end_point": {"row": 49, "column": 43}}, {"id": 215, "type": "field_identifier", "text": "configuration", "parent": 210, "children": [], "start_point": {"row": 49, "column": 45}, "end_point": {"row": 49, "column": 58}}, {"id": 216, "type": "field_declaration", "text": "const {\n\t\treturn (this->pan_id == configuration.pan_id && \n\t\t\t\tthis->extended_pan_id == configuration.extended_pan_id && \n\t\t\t\tthis->logical_type == configuration.logical_type && \n\t\t\t\tthis->channels == configuration.channels && \n\t\t\t\tprecfg_key_enable ? this->precfg_key == configuration.precfg_key : true);", "parent": 158, "children": [217, 218, 219, 249, 250], "start_point": {"row": 49, "column": 60}, "end_point": {"row": 54, "column": 77}}, {"id": 217, "type": "ERROR", "text": "{\n\t\treturn (", "parent": 216, "children": [], "start_point": {"row": 49, "column": 66}, "end_point": {"row": 50, "column": 10}}, {"id": 218, "type": "type_identifier", "text": "this", "parent": 216, "children": [], "start_point": {"row": 50, "column": 10}, "end_point": {"row": 50, "column": 14}}, {"id": 219, "type": "ERROR", "text": "->pan_id == configuration.pan_id && \n\t\t\t\tthis->extended_pan_id == configuration.extended_pan_id && \n\t\t\t\tthis->logical_type == configuration.logical_type && \n\t\t\t\tthis->channels == configuration.channels && \n\t\t\t\tprecfg_key_enable ? this->precfg_key == configuration.", "parent": 216, "children": [220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248], "start_point": {"row": 50, "column": 14}, "end_point": {"row": 54, "column": 58}}, {"id": 220, "type": "field_identifier", "text": "pan_id", "parent": 219, "children": [], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 22}}, {"id": 221, "type": "==", "text": "==", "parent": 219, "children": [], "start_point": {"row": 50, "column": 23}, "end_point": {"row": 50, "column": 25}}, {"id": 222, "type": "field_identifier", "text": "configuration", "parent": 219, "children": [], "start_point": {"row": 50, "column": 26}, "end_point": {"row": 50, "column": 39}}, {"id": 223, "type": "field_identifier", "text": "pan_id", "parent": 219, "children": [], "start_point": {"row": 50, "column": 40}, "end_point": {"row": 50, "column": 46}}, {"id": 224, "type": "&&", "text": "&&", "parent": 219, "children": [], "start_point": {"row": 50, "column": 47}, "end_point": {"row": 50, "column": 49}}, {"id": 225, "type": "field_identifier", "text": "this", "parent": 219, "children": [], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 8}}, {"id": 226, "type": "field_identifier", "text": "extended_pan_id", "parent": 219, "children": [], "start_point": {"row": 51, "column": 10}, "end_point": {"row": 51, "column": 25}}, {"id": 227, "type": "==", "text": "==", "parent": 219, "children": [], "start_point": {"row": 51, "column": 26}, "end_point": {"row": 51, "column": 28}}, {"id": 228, "type": "field_identifier", "text": "configuration", "parent": 219, "children": [], "start_point": {"row": 51, "column": 29}, "end_point": {"row": 51, "column": 42}}, {"id": 229, "type": "field_identifier", "text": "extended_pan_id", "parent": 219, "children": [], "start_point": {"row": 51, "column": 43}, "end_point": {"row": 51, "column": 58}}, {"id": 230, "type": "&&", "text": "&&", "parent": 219, "children": [], "start_point": {"row": 51, "column": 59}, "end_point": {"row": 51, "column": 61}}, {"id": 231, "type": "field_identifier", "text": "this", "parent": 219, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 8}}, {"id": 232, "type": "field_identifier", "text": "logical_type", "parent": 219, "children": [], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 22}}, {"id": 233, "type": "==", "text": "==", "parent": 219, "children": [], "start_point": {"row": 52, "column": 23}, "end_point": {"row": 52, "column": 25}}, {"id": 234, "type": "field_identifier", "text": "configuration", "parent": 219, "children": [], "start_point": {"row": 52, "column": 26}, "end_point": {"row": 52, "column": 39}}, {"id": 235, "type": "field_identifier", "text": "logical_type", "parent": 219, "children": [], "start_point": {"row": 52, "column": 40}, "end_point": {"row": 52, "column": 52}}, {"id": 236, "type": "&&", "text": "&&", "parent": 219, "children": [], "start_point": {"row": 52, "column": 53}, "end_point": {"row": 52, "column": 55}}, {"id": 237, "type": "field_identifier", "text": "this", "parent": 219, "children": [], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 8}}, {"id": 238, "type": "field_identifier", "text": "channels", "parent": 219, "children": [], "start_point": {"row": 53, "column": 10}, "end_point": {"row": 53, "column": 18}}, {"id": 239, "type": "==", "text": "==", "parent": 219, "children": [], "start_point": {"row": 53, "column": 19}, "end_point": {"row": 53, "column": 21}}, {"id": 240, "type": "field_identifier", "text": "configuration", "parent": 219, "children": [], "start_point": {"row": 53, "column": 22}, "end_point": {"row": 53, "column": 35}}, {"id": 241, "type": "field_identifier", "text": "channels", "parent": 219, "children": [], "start_point": {"row": 53, "column": 36}, "end_point": {"row": 53, "column": 44}}, {"id": 242, "type": "&&", "text": "&&", "parent": 219, "children": [], "start_point": {"row": 53, "column": 45}, "end_point": {"row": 53, "column": 47}}, {"id": 243, "type": "field_identifier", "text": "precfg_key_enable", "parent": 219, "children": [], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 21}}, {"id": 244, "type": "?", "text": "?", "parent": 219, "children": [], "start_point": {"row": 54, "column": 22}, "end_point": {"row": 54, "column": 23}}, {"id": 245, "type": "field_identifier", "text": "this", "parent": 219, "children": [], "start_point": {"row": 54, "column": 24}, "end_point": {"row": 54, "column": 28}}, {"id": 246, "type": "field_identifier", "text": "precfg_key", "parent": 219, "children": [], "start_point": {"row": 54, "column": 30}, "end_point": {"row": 54, "column": 40}}, {"id": 247, "type": "==", "text": "==", "parent": 219, "children": [], "start_point": {"row": 54, "column": 41}, "end_point": {"row": 54, "column": 43}}, {"id": 248, "type": "field_identifier", "text": "configuration", "parent": 219, "children": [], "start_point": {"row": 54, "column": 44}, "end_point": {"row": 54, "column": 57}}, {"id": 249, "type": "field_identifier", "text": "precfg_key", "parent": 216, "children": [], "start_point": {"row": 54, "column": 58}, "end_point": {"row": 54, "column": 68}}, {"id": 250, "type": "bitfield_clause", "text": ": true", "parent": 216, "children": [251], "start_point": {"row": 54, "column": 69}, "end_point": {"row": 54, "column": 75}}, {"id": 251, "type": "true", "text": "true", "parent": 250, "children": [], "start_point": {"row": 54, "column": 71}, "end_point": {"row": 54, "column": 75}}, {"id": 252, "type": "identifier", "text": "bool", "parent": 157, "children": [], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 5}}, {"id": 253, "type": "ERROR", "text": "operator!=(const NetworkConfiguration &configuration) const", "parent": 139, "children": [254], "start_point": {"row": 57, "column": 6}, "end_point": {"row": 57, "column": 65}}, {"id": 254, "type": "binary_expression", "text": "operator!=(const NetworkConfiguration &configuration)", "parent": 253, "children": [255, 256, 257], "start_point": {"row": 57, "column": 6}, "end_point": {"row": 57, "column": 59}}, {"id": 255, "type": "identifier", "text": "operator", "parent": 254, "children": [], "start_point": {"row": 57, "column": 6}, "end_point": {"row": 57, "column": 14}}, {"id": 256, "type": "!=", "text": "!=", "parent": 254, "children": [], "start_point": {"row": 57, "column": 14}, "end_point": {"row": 57, "column": 16}}, {"id": 257, "type": "parenthesized_expression", "text": "(const NetworkConfiguration &configuration)", "parent": 254, "children": [258, 261], "start_point": {"row": 57, "column": 16}, "end_point": {"row": 57, "column": 59}}, {"id": 258, "type": "ERROR", "text": "const NetworkConfiguration", "parent": 257, "children": [259], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 43}}, {"id": 259, "type": "type_descriptor", "text": "const NetworkConfiguration", "parent": 258, "children": [260], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 43}}, {"id": 260, "type": "type_identifier", "text": "NetworkConfiguration", "parent": 259, "children": [], "start_point": {"row": 57, "column": 23}, "end_point": {"row": 57, "column": 43}}, {"id": 261, "type": "pointer_expression", "text": "&configuration", "parent": 257, "children": [262], "start_point": {"row": 57, "column": 44}, "end_point": {"row": 57, "column": 58}}, {"id": 262, "type": "identifier", "text": "configuration", "parent": 261, "children": [], "start_point": {"row": 57, "column": 45}, "end_point": {"row": 57, "column": 58}}, {"id": 263, "type": "return_statement", "text": "return (!(*this == configuration));", "parent": 139, "children": [264], "start_point": {"row": 57, "column": 68}, "end_point": {"row": 57, "column": 103}}, {"id": 264, "type": "parenthesized_expression", "text": "(!(*this == configuration))", "parent": 263, "children": [265], "start_point": {"row": 57, "column": 75}, "end_point": {"row": 57, "column": 102}}, {"id": 265, "type": "unary_expression", "text": "!(*this == configuration)", "parent": 264, "children": [266, 267], "start_point": {"row": 57, "column": 76}, "end_point": {"row": 57, "column": 101}}, {"id": 266, "type": "!", "text": "!", "parent": 265, "children": [], "start_point": {"row": 57, "column": 76}, "end_point": {"row": 57, "column": 77}}, {"id": 267, "type": "parenthesized_expression", "text": "(*this == configuration)", "parent": 265, "children": [268], "start_point": {"row": 57, "column": 77}, "end_point": {"row": 57, "column": 101}}, {"id": 268, "type": "binary_expression", "text": "*this == configuration", "parent": 267, "children": [269, 272, 273], "start_point": {"row": 57, "column": 78}, "end_point": {"row": 57, "column": 100}}, {"id": 269, "type": "pointer_expression", "text": "*this", "parent": 268, "children": [270, 271], "start_point": {"row": 57, "column": 78}, "end_point": {"row": 57, "column": 83}}, {"id": 270, "type": "*", "text": "*", "parent": 269, "children": [], "start_point": {"row": 57, "column": 78}, "end_point": {"row": 57, "column": 79}}, {"id": 271, "type": "identifier", "text": "this", "parent": 269, "children": [], "start_point": {"row": 57, "column": 79}, "end_point": {"row": 57, "column": 83}}, {"id": 272, "type": "==", "text": "==", "parent": 268, "children": [], "start_point": {"row": 57, "column": 84}, "end_point": {"row": 57, "column": 86}}, {"id": 273, "type": "identifier", "text": "configuration", "parent": 268, "children": [], "start_point": {"row": 57, "column": 87}, "end_point": {"row": 57, "column": 100}}, {"id": 274, "type": "function_definition", "text": "class Device {\npublic:\n\n\tvirtual zigbee::NetworkAddress getNetworkAddress() = 0;\n\tvirtual zigbee::MacAddress getMacAddress() = 0;\n}", "parent": null, "children": [275], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 65, "column": 1}}, {"id": 275, "type": "identifier", "text": "Device", "parent": 274, "children": [], "start_point": {"row": 60, "column": 6}, "end_point": {"row": 60, "column": 12}}, {"id": 276, "type": "labeled_statement", "text": "public:\n\n\tvirtual zigbee::NetworkAddress getNetworkAddress() = 0;", "parent": 274, "children": [277, 280], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 63, "column": 56}}, {"id": 277, "type": "ERROR", "text": ":\n\n\tvirtual zigbee:", "parent": 276, "children": [278, 279], "start_point": {"row": 61, "column": 6}, "end_point": {"row": 63, "column": 16}}, {"id": 278, "type": "type_identifier", "text": "virtual", "parent": 277, "children": [], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 8}}, {"id": 279, "type": "identifier", "text": "zigbee", "parent": 277, "children": [], "start_point": {"row": 63, "column": 9}, "end_point": {"row": 63, "column": 15}}, {"id": 280, "type": "declaration", "text": "NetworkAddress getNetworkAddress() = 0;", "parent": 276, "children": [281, 282], "start_point": {"row": 63, "column": 17}, "end_point": {"row": 63, "column": 56}}, {"id": 281, "type": "type_identifier", "text": "NetworkAddress", "parent": 280, "children": [], "start_point": {"row": 63, "column": 17}, "end_point": {"row": 63, "column": 31}}, {"id": 282, "type": "init_declarator", "text": "getNetworkAddress() = 0", "parent": 280, "children": [283, 286, 287], "start_point": {"row": 63, "column": 32}, "end_point": {"row": 63, "column": 55}}, {"id": 283, "type": "function_declarator", "text": "getNetworkAddress()", "parent": 282, "children": [284, 285], "start_point": {"row": 63, "column": 32}, "end_point": {"row": 63, "column": 51}}, {"id": 284, "type": "identifier", "text": "getNetworkAddress", "parent": 283, "children": [], "start_point": {"row": 63, "column": 32}, "end_point": {"row": 63, "column": 49}}, {"id": 285, "type": "parameter_list", "text": "()", "parent": 283, "children": [], "start_point": {"row": 63, "column": 49}, "end_point": {"row": 63, "column": 51}}, {"id": 286, "type": "=", "text": "=", "parent": 282, "children": [], "start_point": {"row": 63, "column": 52}, "end_point": {"row": 63, "column": 53}}, {"id": 287, "type": "number_literal", "text": "0", "parent": 282, "children": [], "start_point": {"row": 63, "column": 54}, "end_point": {"row": 63, "column": 55}}, {"id": 288, "type": "declaration", "text": "virtual zigbee::MacAddress getMacAddress() = 0;", "parent": 274, "children": [289, 290, 293], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 48}}, {"id": 289, "type": "type_identifier", "text": "virtual", "parent": 288, "children": [], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 8}}, {"id": 290, "type": "ERROR", "text": "zigbee::MacAddress", "parent": 288, "children": [291, 292], "start_point": {"row": 64, "column": 9}, "end_point": {"row": 64, "column": 27}}, {"id": 291, "type": "identifier", "text": "zigbee", "parent": 290, "children": [], "start_point": {"row": 64, "column": 9}, "end_point": {"row": 64, "column": 15}}, {"id": 292, "type": "identifier", "text": "MacAddress", "parent": 290, "children": [], "start_point": {"row": 64, "column": 17}, "end_point": {"row": 64, "column": 27}}, {"id": 293, "type": "init_declarator", "text": "getMacAddress() = 0", "parent": 288, "children": [294, 297, 298], "start_point": {"row": 64, "column": 28}, "end_point": {"row": 64, "column": 47}}, {"id": 294, "type": "function_declarator", "text": "getMacAddress()", "parent": 293, "children": [295, 296], "start_point": {"row": 64, "column": 28}, "end_point": {"row": 64, "column": 43}}, {"id": 295, "type": "identifier", "text": "getMacAddress", "parent": 294, "children": [], "start_point": {"row": 64, "column": 28}, "end_point": {"row": 64, "column": 41}}, {"id": 296, "type": "parameter_list", "text": "()", "parent": 294, "children": [], "start_point": {"row": 64, "column": 41}, "end_point": {"row": 64, "column": 43}}, {"id": 297, "type": "=", "text": "=", "parent": 293, "children": [], "start_point": {"row": 64, "column": 44}, "end_point": {"row": 64, "column": 45}}, {"id": 298, "type": "number_literal", "text": "0", "parent": 293, "children": [], "start_point": {"row": 64, "column": 46}, "end_point": {"row": 64, "column": 47}}]}, "node_categories": {"declarations": {"functions": [139, 274, 283, 294], "variables": [3, 7, 14, 22, 30, 38, 50, 61, 68, 72, 75, 84, 123, 126, 129, 134, 157, 161, 167, 173, 185, 192, 204, 216, 280, 288], "classes": [11, 12, 69, 70, 120, 121, 158, 159], "imports": [], "modules": [], "enums": [140, 141]}, "statements": {"expressions": [100, 103, 107, 110, 111, 113, 114, 115, 143, 148, 254, 257, 261, 264, 265, 267, 268, 269], "assignments": [144, 149, 153], "loops": [], "conditionals": [6, 10, 13, 15, 18, 23, 26, 31, 34, 39, 42, 47, 48, 51, 56, 58, 59, 62, 67, 71, 73, 74, 77, 80, 82, 83, 86, 88, 90, 91, 93, 94, 96, 97, 98, 101, 106, 108, 117, 119, 122, 124, 125, 127, 128, 130, 132, 133, 135, 137, 138, 142, 145, 150, 154, 160, 163, 169, 174, 175, 178, 180, 182, 183, 186, 191, 193, 194, 201, 206, 212, 214, 215, 218, 220, 222, 223, 225, 226, 228, 229, 231, 232, 234, 235, 237, 238, 240, 241, 243, 245, 246, 248, 249, 252, 255, 260, 262, 271, 273, 275, 278, 279, 281, 284, 289, 291, 292, 295], "returns": [109, 263], "exceptions": []}, "expressions": {"calls": [0], "literals": [21, 29, 37, 45, 147, 152, 156, 166, 172, 199, 287, 298], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": [179, 250]}}, "cross_language_map": {"function_declarations": [{"node_id": 139, "universal_type": "function", "name": "LogicalType", "text_snippet": "enum class LogicalType {\n\tCOORDINATOR = 0,\n\tROUTER = 1,\n\tEND_DEVICE = 2\n}; // TODO: Znp?\n\nstruct Net"}, {"node_id": 274, "universal_type": "function", "name": "Device", "text_snippet": "class Device {\npublic:\n\n\tvirtual zigbee::NetworkAddress getNetworkAddress() = 0;\n\tvirtual zigbee::Ma"}, {"node_id": 283, "universal_type": "function", "name": "unknown", "text_snippet": "getNetworkAddress()"}, {"node_id": 294, "universal_type": "function", "name": "unknown", "text_snippet": "getMacAddress()"}], "class_declarations": [{"node_id": 11, "universal_type": "class", "name": "SimpleDescriptor", "text_snippet": "struct SimpleDescriptor {\n\tunsigned int endpoint_number = 0;\n\tunsigned int profile_id = 0;\n\tunsigned"}, {"node_id": 12, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 69, "universal_type": "class", "name": "Endpoint", "text_snippet": "struct Endpoint {\n\tNetworkAddress address;\n\tuint8_t number;\n\n\tbool operator==(const Endpoint &endpoi"}, {"node_id": 70, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 120, "universal_type": "class", "name": "Message", "text_snippet": "struct Message {\n\tEndpoint source;\n\tEndpoint destination;\n\tzcl::Cluster cluster;\n\tzcl::Frame zcl_fra"}, {"node_id": 121, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 158, "universal_type": "class", "name": "NetworkConfiguration", "text_snippet": "struct NetworkConfiguration {\n\tuint16_t pan_id = 0;\n\tuint64_t extended_pan_id = 0;\n\tLogicalType logi"}, {"node_id": 159, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": []}, "original_source_code": "// Copyright <NAME> 2021\n//\n// Distributed under the Boost Software License, Version 1.0.\n// http://www.boost.org/LICENSE_1_0.txt)\n\n#pragma once\n\ntypedef uint16_t NetworkAddress;\ntypedef uint64_t MacAddress;\n\nstruct SimpleDescriptor {\n\tunsigned int endpoint_number = 0;\n\tunsigned int profile_id = 0;\n\tunsigned int device_id = 0;\n\tunsigned int device_version = 0;\n\tstd::vector<unsigned int> input_clusters;\n\tstd::vector<unsigned int> output_clusters;\n};\n\nstruct Endpoint {\n\tNetworkAddress address;\n\tuint8_t number;\n\n\tbool operator==(const Endpoint &endpoint) const { return (this->address == endpoint.address && this->number == endpoint.number); }\n\tbool operator!=(const Endpoint &endpoint) const { return (!(*this == endpoint)); }\n};\n\nstruct Message {\n\tEndpoint source;\n\tEndpoint destination;\n\tzcl::Cluster cluster;\n\tzcl::Frame zcl_frame;\n};\n\nenum class LogicalType {\n\tCOORDINATOR = 0,\n\tROUTER = 1,\n\tEND_DEVICE = 2\n}; // TODO: Znp?\n\nstruct NetworkConfiguration {\n\tuint16_t pan_id = 0;\n\tuint64_t extended_pan_id = 0;\n\tLogicalType logical_type = LogicalType::COORDINATOR;\n\tstd::vector<unsigned int> channels;\n\tstd::array<uint8_t, 16> precfg_key = {};\n\tbool precfg_key_enable = false; // value: 0 (FALSE) only coord defualtKey need to be set, and OTA to set other devices in the network.\n\t\t\t\t\t\t\t\t\t// value: 1 (TRUE) Not only coord, but also all devices need to set their defualtKey (the same key). Or they can't not join the network.\n\n\tbool operator==(const NetworkConfiguration &configuration) const {\n\t\treturn (this->pan_id == configuration.pan_id && \n\t\t\t\tthis->extended_pan_id == configuration.extended_pan_id && \n\t\t\t\tthis->logical_type == configuration.logical_type && \n\t\t\t\tthis->channels == configuration.channels && \n\t\t\t\tprecfg_key_enable ? this->precfg_key == configuration.precfg_key : true);\n\t}\n\n\tbool operator!=(const NetworkConfiguration &configuration) const { return (!(*this == configuration)); }\n};\n\nclass Device {\npublic:\n\n\tvirtual zigbee::NetworkAddress getNetworkAddress() = 0;\n\tvirtual zigbee::MacAddress getMacAddress() = 0;\n};"}
| 81,231
|
c
|
#pragma once
#include <tdme/tdme.h>
#include <tdme/audio/decoder/fwd-tdme.h>
#include <tdme/utils/fwd-tdme.h>
#include <tdme/utils/ExceptionBase.h>
using tdme::utils::ExceptionBase;
/**
* Audio decoder exception
* @author <NAME>
* @version $Id$
*/
class tdme::audio::decoder::AudioDecoderException: public ExceptionBase
{
public:
/**
* @brief Public constructor
* @param message message exception message
*/
AudioDecoderException(const string& message) throw();
};
| 22.85
| 20
|
(translation_unit) "#pragma once\n\n#include <tdme/tdme.h>\n#include <tdme/audio/decoder/fwd-tdme.h>\n#include <tdme/utils/fwd-tdme.h>\n#include <tdme/utils/ExceptionBase.h>\n\nusing tdme::utils::ExceptionBase;\n\n/**\n * Audio decoder exception\n * @author <NAME>\n * @version $Id$\n */\nclass tdme::audio::decoder::AudioDecoderException: public ExceptionBase\n{\npublic:\n\n /**\n * @brief Public constructor\n * @param message message exception message\n */\n AudioDecoderException(const string& message) throw();\n\n};\n"
(preproc_call) "#pragma once\n"
(preproc_directive) "#pragma"
(preproc_arg) "once"
(preproc_include) "#include <tdme/tdme.h>\n"
(#include) "#include"
(system_lib_string) "<tdme/tdme.h>"
(preproc_include) "#include <tdme/audio/decoder/fwd-tdme.h>\n"
(#include) "#include"
(system_lib_string) "<tdme/audio/decoder/fwd-tdme.h>"
(preproc_include) "#include <tdme/utils/fwd-tdme.h>\n"
(#include) "#include"
(system_lib_string) "<tdme/utils/fwd-tdme.h>"
(preproc_include) "#include <tdme/utils/ExceptionBase.h>\n"
(#include) "#include"
(system_lib_string) "<tdme/utils/ExceptionBase.h>"
(declaration) "using tdme::utils::ExceptionBase;"
(type_identifier) "using"
(ERROR) "tdme::utils::"
(identifier) "tdme"
(:) ":"
(:) ":"
(identifier) "utils"
(:) ":"
(:) ":"
(identifier) "ExceptionBase"
(;) ";"
(comment) "/**\n * Audio decoder exception\n * @author <NAME>\n * @version $Id$\n */"
(function_definition) "class tdme::audio::decoder::AudioDecoderException: public ExceptionBase\n{\npublic:\n\n /**\n * @brief Public constructor\n * @param message message exception message\n */\n AudioDecoderException(const string& message) throw();\n\n}"
(type_identifier) "class"
(ERROR) "tdme::audio::decoder::AudioDecoderException: public"
(identifier) "tdme"
(:) ":"
(:) ":"
(identifier) "audio"
(:) ":"
(:) ":"
(identifier) "decoder"
(:) ":"
(:) ":"
(identifier) "AudioDecoderException"
(:) ":"
(identifier) "public"
(identifier) "ExceptionBase"
(compound_statement) "{\npublic:\n\n /**\n * @brief Public constructor\n * @param message message exception message\n */\n AudioDecoderException(const string& message) throw();\n\n}"
({) "{"
(labeled_statement) "public:\n\n /**\n * @brief Public constructor\n * @param message message exception message\n */\n AudioDecoderException(const string& message) throw();"
(statement_identifier) "public"
(:) ":"
(comment) "/**\n * @brief Public constructor\n * @param message message exception message\n */"
(declaration) "AudioDecoderException(const string& message) throw();"
(macro_type_specifier) "AudioDecoderException(const string& message)"
(identifier) "AudioDecoderException"
(() "("
(type_descriptor) "const string"
(type_qualifier) "const"
(const) "const"
(type_identifier) "string"
(ERROR) "& message"
(&) "&"
(identifier) "message"
()) ")"
(function_declarator) "throw()"
(identifier) "throw"
(parameter_list) "()"
(() "("
()) ")"
(;) ";"
(}) "}"
(expression_statement) ";"
(;) ";"
| 71
| 3
|
{"language": "c", "success": true, "metadata": {"lines": 20, "avg_line_length": 22.85, "nodes": 38, "errors": 0, "source_hash": "e7cf1eb00a4fd9d04f215ba3124e8fd6de32329a35a7927d73169f1ad635495e", "categorized_nodes": 30}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include <tdme/tdme.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": "<tdme/tdme.h>", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 22}}, {"id": 6, "type": "preproc_include", "text": "#include <tdme/audio/decoder/fwd-tdme.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": "<tdme/audio/decoder/fwd-tdme.h>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 40}}, {"id": 9, "type": "preproc_include", "text": "#include <tdme/utils/fwd-tdme.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": "<tdme/utils/fwd-tdme.h>", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 32}}, {"id": 12, "type": "preproc_include", "text": "#include <tdme/utils/ExceptionBase.h>\n", "parent": null, "children": [13, 14], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<tdme/utils/ExceptionBase.h>", "parent": 12, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 37}}, {"id": 15, "type": "declaration", "text": "using tdme::utils::ExceptionBase;", "parent": null, "children": [16, 17, 20], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 33}}, {"id": 16, "type": "type_identifier", "text": "using", "parent": 15, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 5}}, {"id": 17, "type": "ERROR", "text": "tdme::utils::", "parent": 15, "children": [18, 19], "start_point": {"row": 7, "column": 6}, "end_point": {"row": 7, "column": 19}}, {"id": 18, "type": "identifier", "text": "tdme", "parent": 17, "children": [], "start_point": {"row": 7, "column": 6}, "end_point": {"row": 7, "column": 10}}, {"id": 19, "type": "identifier", "text": "utils", "parent": 17, "children": [], "start_point": {"row": 7, "column": 12}, "end_point": {"row": 7, "column": 17}}, {"id": 20, "type": "identifier", "text": "ExceptionBase", "parent": 15, "children": [], "start_point": {"row": 7, "column": 19}, "end_point": {"row": 7, "column": 32}}, {"id": 21, "type": "function_definition", "text": "class tdme::audio::decoder::AudioDecoderException: public ExceptionBase\n{\npublic:\n\n\t/**\n\t * @brief Public constructor\n\t * @param message message exception message\n\t */\n\tAudioDecoderException(const string& message) throw();\n\n}", "parent": null, "children": [22, 27], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 22, "type": "ERROR", "text": "tdme::audio::decoder::AudioDecoderException: public", "parent": 21, "children": [23, 24, 25, 26], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 57}}, {"id": 23, "type": "identifier", "text": "tdme", "parent": 22, "children": [], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 10}}, {"id": 24, "type": "identifier", "text": "audio", "parent": 22, "children": [], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 17}}, {"id": 25, "type": "identifier", "text": "decoder", "parent": 22, "children": [], "start_point": {"row": 14, "column": 19}, "end_point": {"row": 14, "column": 26}}, {"id": 26, "type": "identifier", "text": "AudioDecoderException", "parent": 22, "children": [], "start_point": {"row": 14, "column": 28}, "end_point": {"row": 14, "column": 49}}, {"id": 27, "type": "identifier", "text": "ExceptionBase", "parent": 21, "children": [], "start_point": {"row": 14, "column": 58}, "end_point": {"row": 14, "column": 71}}, {"id": 28, "type": "labeled_statement", "text": "public:\n\n\t/**\n\t * @brief Public constructor\n\t * @param message message exception message\n\t */\n\tAudioDecoderException(const string& message) throw();", "parent": 21, "children": [29], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 22, "column": 54}}, {"id": 29, "type": "declaration", "text": "AudioDecoderException(const string& message) throw();", "parent": 28, "children": [30, 36], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 54}}, {"id": 30, "type": "macro_type_specifier", "text": "AudioDecoderException(const string& message)", "parent": 29, "children": [31, 32, 34], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 45}}, {"id": 31, "type": "identifier", "text": "AudioDecoderException", "parent": 30, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 22}}, {"id": 32, "type": "type_descriptor", "text": "const string", "parent": 30, "children": [33], "start_point": {"row": 22, "column": 23}, "end_point": {"row": 22, "column": 35}}, {"id": 33, "type": "type_identifier", "text": "string", "parent": 32, "children": [], "start_point": {"row": 22, "column": 29}, "end_point": {"row": 22, "column": 35}}, {"id": 34, "type": "ERROR", "text": "& message", "parent": 30, "children": [35], "start_point": {"row": 22, "column": 35}, "end_point": {"row": 22, "column": 44}}, {"id": 35, "type": "identifier", "text": "message", "parent": 34, "children": [], "start_point": {"row": 22, "column": 37}, "end_point": {"row": 22, "column": 44}}, {"id": 36, "type": "function_declarator", "text": "throw()", "parent": 29, "children": [37], "start_point": {"row": 22, "column": 46}, "end_point": {"row": 22, "column": 53}}, {"id": 37, "type": "parameter_list", "text": "()", "parent": 36, "children": [], "start_point": {"row": 22, "column": 51}, "end_point": {"row": 22, "column": 53}}]}, "node_categories": {"declarations": {"functions": [21, 36], "variables": [15, 29], "classes": [], "imports": [3, 4, 6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [16, 18, 19, 20, 23, 24, 25, 26, 27, 30, 31, 33, 35], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11, 14], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 21, "universal_type": "function", "name": "tdme::audio::decoder::AudioDecoderException:", "text_snippet": "class tdme::audio::decoder::AudioDecoderException: public ExceptionBase\n{\npublic:\n\n\t/**\n\t * @brief P"}, {"node_id": 36, "universal_type": "function", "name": "unknown", "text_snippet": "throw()"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include <tdme/tdme.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <tdme/audio/decoder/fwd-tdme.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <tdme/utils/fwd-tdme.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <tdme/utils/ExceptionBase.h>\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include <tdme/tdme.h>\n#include <tdme/audio/decoder/fwd-tdme.h>\n#include <tdme/utils/fwd-tdme.h>\n#include <tdme/utils/ExceptionBase.h>\n\nusing tdme::utils::ExceptionBase;\n\n/**\n * Audio decoder exception\n * @author <NAME>\n * @version $Id$\n */\nclass tdme::audio::decoder::AudioDecoderException: public ExceptionBase\n{\npublic:\n\n\t/**\n\t * @brief Public constructor\n\t * @param message message exception message\n\t */\n\tAudioDecoderException(const string& message) throw();\n\n};\n"}
| 81,232
|
c
|
// Copyright (c) 2020, devgo.club
// All rights reserved.
#ifndef FILE_IO_H
#define FILE_IO_H
int copy(int fd_src, int fd_des);
int get_size(int fd);
int set_flag(int fd, int flag);
int add_flag(int fd, int flag);
int rm_flag(int fd, int flag);
int lock_file(int fd, int cmd, int type, int whence, int start, int len);
// 共享读锁(非阻塞)
#define READ_LOCK(fd, whence, start, len) lock_file(fd, F_SETLK, F_RDLCK, whence, start, len)
// 共享读锁(阻塞)
#define READ_LOCKW(fd, whence, start, len) lock_file(fd, F_SETLKW, F_RDLCK, whence, start, len)
// 独占写锁(非阻塞)
#define WRITE_LOCK(fd, whence, start, len) lock_file(fd, F_SETLK, F_WRLCK, whence, start, len)
// 独占写锁(阻塞)
#define WRITE_LOCKW(fd, whence, start, len) lock_file(fd, F_SETLKW, F_WRLCK, whence, start, len)
// 解锁
#define UN_LOCK(fd, whence, start, len) lock_file(fd, F_SETLKW, F_UNLCK, whence, start, len)
#endif
| 39.81
| 21
|
(translation_unit) "// Copyright (c) 2020, devgo.club\n// All rights reserved.\n\n#ifndef FILE_IO_H\n#define FILE_IO_H\n\nint copy(int fd_src, int fd_des);\n\nint get_size(int fd);\n\nint set_flag(int fd, int flag);\n\nint add_flag(int fd, int flag);\n\nint rm_flag(int fd, int flag);\n\nint lock_file(int fd, int cmd, int type, int whence, int start, int len);\n\n// 共享读锁(非阻塞)\n#define READ_LOCK(fd, whence, start, len) lock_file(fd, F_SETLK, F_RDLCK, whence, start, len)\n\n// 共享读锁(阻塞)\n#define READ_LOCKW(fd, whence, start, len) lock_file(fd, F_SETLKW, F_RDLCK, whence, start, len)\n\n// 独占写锁(非阻塞)\n#define WRITE_LOCK(fd, whence, start, len) lock_file(fd, F_SETLK, F_WRLCK, whence, start, len)\n\n// 独占写锁(阻塞)\n#define WRITE_LOCKW(fd, whence, start, len) lock_file(fd, F_SETLKW, F_WRLCK, whence, start, len)\n\n// 解锁\n#define UN_LOCK(fd, whence, start, len) lock_file(fd, F_SETLKW, F_UNLCK, whence, start, len)\n\n#endif"
(comment) "// Copyright (c) 2020, devgo.club"
(comment) "// All rights reserved."
(preproc_ifdef) "#ifndef FILE_IO_H\n#define FILE_IO_H\n\nint copy(int fd_src, int fd_des);\n\nint get_size(int fd);\n\nint set_flag(int fd, int flag);\n\nint add_flag(int fd, int flag);\n\nint rm_flag(int fd, int flag);\n\nint lock_file(int fd, int cmd, int type, int whence, int start, int len);\n\n// 共享读锁(非阻塞)\n#define READ_LOCK(fd, whence, start, len) lock_file(fd, F_SETLK, F_RDLCK, whence, start, len)\n\n// 共享读锁(阻塞)\n#define READ_LOCKW(fd, whence, start, len) lock_file(fd, F_SETLKW, F_RDLCK, whence, start, len)\n\n// 独占写锁(非阻塞)\n#define WRITE_LOCK(fd, whence, start, len) lock_file(fd, F_SETLK, F_WRLCK, whence, start, len)\n\n// 独占写锁(阻塞)\n#define WRITE_LOCKW(fd, whence, start, len) lock_file(fd, F_SETLKW, F_WRLCK, whence, start, len)\n\n// 解锁\n#define UN_LOCK(fd, whence, start, len) lock_file(fd, F_SETLKW, F_UNLCK, whence, start, len)\n\n#endif"
(#ifndef) "#ifndef"
(identifier) "FILE_IO_H"
(preproc_def) "#define FILE_IO_H\n"
(#define) "#define"
(identifier) "FILE_IO_H"
(declaration) "int copy(int fd_src, int fd_des);"
(primitive_type) "int"
(function_declarator) "copy(int fd_src, int fd_des)"
(identifier) "copy"
(parameter_list) "(int fd_src, int fd_des)"
(() "("
(parameter_declaration) "int fd_src"
(primitive_type) "int"
(identifier) "fd_src"
(,) ","
(parameter_declaration) "int fd_des"
(primitive_type) "int"
(identifier) "fd_des"
()) ")"
(;) ";"
(declaration) "int get_size(int fd);"
(primitive_type) "int"
(function_declarator) "get_size(int fd)"
(identifier) "get_size"
(parameter_list) "(int fd)"
(() "("
(parameter_declaration) "int fd"
(primitive_type) "int"
(identifier) "fd"
()) ")"
(;) ";"
(declaration) "int set_flag(int fd, int flag);"
(primitive_type) "int"
(function_declarator) "set_flag(int fd, int flag)"
(identifier) "set_flag"
(parameter_list) "(int fd, int flag)"
(() "("
(parameter_declaration) "int fd"
(primitive_type) "int"
(identifier) "fd"
(,) ","
(parameter_declaration) "int flag"
(primitive_type) "int"
(identifier) "flag"
()) ")"
(;) ";"
(declaration) "int add_flag(int fd, int flag);"
(primitive_type) "int"
(function_declarator) "add_flag(int fd, int flag)"
(identifier) "add_flag"
(parameter_list) "(int fd, int flag)"
(() "("
(parameter_declaration) "int fd"
(primitive_type) "int"
(identifier) "fd"
(,) ","
(parameter_declaration) "int flag"
(primitive_type) "int"
(identifier) "flag"
()) ")"
(;) ";"
(declaration) "int rm_flag(int fd, int flag);"
(primitive_type) "int"
(function_declarator) "rm_flag(int fd, int flag)"
(identifier) "rm_flag"
(parameter_list) "(int fd, int flag)"
(() "("
(parameter_declaration) "int fd"
(primitive_type) "int"
(identifier) "fd"
(,) ","
(parameter_declaration) "int flag"
(primitive_type) "int"
(identifier) "flag"
()) ")"
(;) ";"
(declaration) "int lock_file(int fd, int cmd, int type, int whence, int start, int len);"
(primitive_type) "int"
(function_declarator) "lock_file(int fd, int cmd, int type, int whence, int start, int len)"
(identifier) "lock_file"
(parameter_list) "(int fd, int cmd, int type, int whence, int start, int len)"
(() "("
(parameter_declaration) "int fd"
(primitive_type) "int"
(identifier) "fd"
(,) ","
(parameter_declaration) "int cmd"
(primitive_type) "int"
(identifier) "cmd"
(,) ","
(parameter_declaration) "int type"
(primitive_type) "int"
(identifier) "type"
(,) ","
(parameter_declaration) "int whence"
(primitive_type) "int"
(identifier) "whence"
(,) ","
(parameter_declaration) "int start"
(primitive_type) "int"
(identifier) "start"
(,) ","
(parameter_declaration) "int len"
(primitive_type) "int"
(identifier) "len"
()) ")"
(;) ";"
(comment) "// 共享读锁(非阻塞)\n#define READ_"
(preproc_function_def) "OCK(fd, whence, start, len) lock_file(fd, F_SETLK, F_RDLCK, whence, start, len)\n\n// 共享读锁(阻塞)\n#"
(#define) "OCK(fd,"
(identifier) "whence, s"
(preproc_params) "tart, len) lock_file(fd,"
(() "t"
(identifier) "ar"
(,) "t"
(identifier) " len) "
(,) "l"
(identifier) "ck_fi"
(,) "l"
(identifier) "(fd"
()) ","
(preproc_arg) "F_SETLK, F_RDLCK, whence, start, len)\n\n// 共享读锁(阻塞)\n"
(comment) "efine READ_LOCKW(fd, wh"
(preproc_function_def) "nce, start, len) lock_file(fd, F_SETLKW, F_RDLCK, whence, start, len)\n\n// 独占写锁(非阻塞)\n#define WRIT"
(#define) "nce, st"
(identifier) "rt, len) l"
(preproc_params) "ock_file(fd, F_SETLKW, F"
(() "o"
(identifier) "ck"
(,) "_"
(identifier) "ile(fd"
(,) ","
(identifier) "F_SET"
(,) "L"
(identifier) "W, "
()) "F"
(preproc_arg) "RDLCK, whence, start, len)\n\n// 独占写锁(非阻塞)\n#define WRI"
(comment) "_LOCK(fd, whence, start, l"
(preproc_function_def) "n) lock_file(fd, F_SETLK, F_WRLCK, whence, start, len)\n\n// 独占写锁(阻塞)\n#define WRITE_LOCKW(fd, whe"
(#define) "n) lock"
(identifier) "file(fd, F"
(preproc_params) "_SETLK, F_WRLCK, whence,"
(() "_"
(identifier) "SE"
(,) "T"
(identifier) "K, F_W"
(,) "R"
(identifier) "CK, w"
(,) "h"
(identifier) "nce"
()) ","
(preproc_arg) "start, len)\n\n// 独占写锁(阻塞)\n#define WRITE_LOCKW(fd, wh"
(comment) "ce, start, len) lock_fi"
(preproc_function_def) "e(fd, F_SETLKW, F_WRLCK, whence, start, len)\n\n// 解锁\n#define UN_LOCK(fd, whence, start, len) lock_"
(#define) "e(fd, F"
(identifier) "SETLKW, F_W"
(preproc_params) "RLCK, whence, start, len"
(() "R"
(identifier) "LC"
(,) "K"
(identifier) " whenc"
(,) "e"
(identifier) " star"
(,) "t"
(identifier) " le"
()) "n"
(preproc_arg) "\n\n// 解锁\n#define UN_LOCK(fd, whence, start, len) lock"
(comment) "ile(fd, F"
(preproc_function_def) "SETLKW, F_UNLCK, whence, start, len)\n\n#endif"
(#define) "SETLKW,"
(identifier) "F_UNLCK"
(preproc_params) ", whence, start, len)\n\n#"
(() ","
(identifier) " w"
(,) "h"
(identifier) "nce, s"
(,) "t"
(identifier) "rt, l"
(,) "e"
(identifier) ")\n\n"
()) "#"
(preproc_arg) "ndif"
(#endif) ""
| 187
| 0
|
{"language": "c", "success": true, "metadata": {"lines": 21, "avg_line_length": 39.81, "nodes": 126, "errors": 0, "source_hash": "e6c719d161f3e5757f1d2f14f73c6fb03143a326ccd41949e0e2b85474f3cda5", "categorized_nodes": 82}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef FILE_IO_H\n#define FILE_IO_H\n\nint copy(int fd_src, int fd_des);\n\nint get_size(int fd);\n\nint set_flag(int fd, int flag);\n\nint add_flag(int fd, int flag);\n\nint rm_flag(int fd, int flag);\n\nint lock_file(int fd, int cmd, int type, int whence, int start, int len);\n\n// \u5171\u4eab\u8bfb\u9501(\u975e\u963b\u585e)\n#define READ_LOCK(fd, whence, start, len) lock_file(fd, F_SETLK, F_RDLCK, whence, start, len)\n\n// \u5171\u4eab\u8bfb\u9501(\u963b\u585e)\n#define READ_LOCKW(fd, whence, start, len) lock_file(fd, F_SETLKW, F_RDLCK, whence, start, len)\n\n// \u72ec\u5360\u5199\u9501(\u975e\u963b\u585e)\n#define WRITE_LOCK(fd, whence, start, len) lock_file(fd, F_SETLK, F_WRLCK, whence, start, len)\n\n// \u72ec\u5360\u5199\u9501(\u963b\u585e)\n#define WRITE_LOCKW(fd, whence, start, len) lock_file(fd, F_SETLKW, F_WRLCK, whence, start, len)\n\n// \u89e3\u9501\n#define UN_LOCK(fd, whence, start, len) lock_file(fd, F_SETLKW, F_UNLCK, whence, start, len)\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 17, 25, 36, 47, 58, 81, 90, 99, 108, 117, 125], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 33, "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": "FILE_IO_H", "parent": 0, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 17}}, {"id": 3, "type": "preproc_def", "text": "#define FILE_IO_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 5, "type": "identifier", "text": "FILE_IO_H", "parent": 3, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 17}}, {"id": 6, "type": "declaration", "text": "int copy(int fd_src, int fd_des);", "parent": 0, "children": [7, 8], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 33}}, {"id": 7, "type": "primitive_type", "text": "int", "parent": 6, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 3}}, {"id": 8, "type": "function_declarator", "text": "copy(int fd_src, int fd_des)", "parent": 6, "children": [9, 10], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 32}}, {"id": 9, "type": "identifier", "text": "copy", "parent": 8, "children": [], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 8}}, {"id": 10, "type": "parameter_list", "text": "(int fd_src, int fd_des)", "parent": 8, "children": [11, 14], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 32}}, {"id": 11, "type": "parameter_declaration", "text": "int fd_src", "parent": 10, "children": [12, 13], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 19}}, {"id": 12, "type": "primitive_type", "text": "int", "parent": 11, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 12}}, {"id": 13, "type": "identifier", "text": "fd_src", "parent": 11, "children": [], "start_point": {"row": 6, "column": 13}, "end_point": {"row": 6, "column": 19}}, {"id": 14, "type": "parameter_declaration", "text": "int fd_des", "parent": 10, "children": [15, 16], "start_point": {"row": 6, "column": 21}, "end_point": {"row": 6, "column": 31}}, {"id": 15, "type": "primitive_type", "text": "int", "parent": 14, "children": [], "start_point": {"row": 6, "column": 21}, "end_point": {"row": 6, "column": 24}}, {"id": 16, "type": "identifier", "text": "fd_des", "parent": 14, "children": [], "start_point": {"row": 6, "column": 25}, "end_point": {"row": 6, "column": 31}}, {"id": 17, "type": "declaration", "text": "int get_size(int fd);", "parent": 0, "children": [18, 19], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 21}}, {"id": 18, "type": "primitive_type", "text": "int", "parent": 17, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 3}}, {"id": 19, "type": "function_declarator", "text": "get_size(int fd)", "parent": 17, "children": [20, 21], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 20}}, {"id": 20, "type": "identifier", "text": "get_size", "parent": 19, "children": [], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 12}}, {"id": 21, "type": "parameter_list", "text": "(int fd)", "parent": 19, "children": [22], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 8, "column": 20}}, {"id": 22, "type": "parameter_declaration", "text": "int fd", "parent": 21, "children": [23, 24], "start_point": {"row": 8, "column": 13}, "end_point": {"row": 8, "column": 19}}, {"id": 23, "type": "primitive_type", "text": "int", "parent": 22, "children": [], "start_point": {"row": 8, "column": 13}, "end_point": {"row": 8, "column": 16}}, {"id": 24, "type": "identifier", "text": "fd", "parent": 22, "children": [], "start_point": {"row": 8, "column": 17}, "end_point": {"row": 8, "column": 19}}, {"id": 25, "type": "declaration", "text": "int set_flag(int fd, int flag);", "parent": 0, "children": [26, 27], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 31}}, {"id": 26, "type": "primitive_type", "text": "int", "parent": 25, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 3}}, {"id": 27, "type": "function_declarator", "text": "set_flag(int fd, int flag)", "parent": 25, "children": [28, 29], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 30}}, {"id": 28, "type": "identifier", "text": "set_flag", "parent": 27, "children": [], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 12}}, {"id": 29, "type": "parameter_list", "text": "(int fd, int flag)", "parent": 27, "children": [30, 33], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 30}}, {"id": 30, "type": "parameter_declaration", "text": "int fd", "parent": 29, "children": [31, 32], "start_point": {"row": 10, "column": 13}, "end_point": {"row": 10, "column": 19}}, {"id": 31, "type": "primitive_type", "text": "int", "parent": 30, "children": [], "start_point": {"row": 10, "column": 13}, "end_point": {"row": 10, "column": 16}}, {"id": 32, "type": "identifier", "text": "fd", "parent": 30, "children": [], "start_point": {"row": 10, "column": 17}, "end_point": {"row": 10, "column": 19}}, {"id": 33, "type": "parameter_declaration", "text": "int flag", "parent": 29, "children": [34, 35], "start_point": {"row": 10, "column": 21}, "end_point": {"row": 10, "column": 29}}, {"id": 34, "type": "primitive_type", "text": "int", "parent": 33, "children": [], "start_point": {"row": 10, "column": 21}, "end_point": {"row": 10, "column": 24}}, {"id": 35, "type": "identifier", "text": "flag", "parent": 33, "children": [], "start_point": {"row": 10, "column": 25}, "end_point": {"row": 10, "column": 29}}, {"id": 36, "type": "declaration", "text": "int add_flag(int fd, int flag);", "parent": 0, "children": [37, 38], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 31}}, {"id": 37, "type": "primitive_type", "text": "int", "parent": 36, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 3}}, {"id": 38, "type": "function_declarator", "text": "add_flag(int fd, int flag)", "parent": 36, "children": [39, 40], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 30}}, {"id": 39, "type": "identifier", "text": "add_flag", "parent": 38, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 12}}, {"id": 40, "type": "parameter_list", "text": "(int fd, int flag)", "parent": 38, "children": [41, 44], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 30}}, {"id": 41, "type": "parameter_declaration", "text": "int fd", "parent": 40, "children": [42, 43], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 19}}, {"id": 42, "type": "primitive_type", "text": "int", "parent": 41, "children": [], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 16}}, {"id": 43, "type": "identifier", "text": "fd", "parent": 41, "children": [], "start_point": {"row": 12, "column": 17}, "end_point": {"row": 12, "column": 19}}, {"id": 44, "type": "parameter_declaration", "text": "int flag", "parent": 40, "children": [45, 46], "start_point": {"row": 12, "column": 21}, "end_point": {"row": 12, "column": 29}}, {"id": 45, "type": "primitive_type", "text": "int", "parent": 44, "children": [], "start_point": {"row": 12, "column": 21}, "end_point": {"row": 12, "column": 24}}, {"id": 46, "type": "identifier", "text": "flag", "parent": 44, "children": [], "start_point": {"row": 12, "column": 25}, "end_point": {"row": 12, "column": 29}}, {"id": 47, "type": "declaration", "text": "int rm_flag(int fd, int flag);", "parent": 0, "children": [48, 49], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 30}}, {"id": 48, "type": "primitive_type", "text": "int", "parent": 47, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 3}}, {"id": 49, "type": "function_declarator", "text": "rm_flag(int fd, int flag)", "parent": 47, "children": [50, 51], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 29}}, {"id": 50, "type": "identifier", "text": "rm_flag", "parent": 49, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 11}}, {"id": 51, "type": "parameter_list", "text": "(int fd, int flag)", "parent": 49, "children": [52, 55], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 29}}, {"id": 52, "type": "parameter_declaration", "text": "int fd", "parent": 51, "children": [53, 54], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 18}}, {"id": 53, "type": "primitive_type", "text": "int", "parent": 52, "children": [], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 15}}, {"id": 54, "type": "identifier", "text": "fd", "parent": 52, "children": [], "start_point": {"row": 14, "column": 16}, "end_point": {"row": 14, "column": 18}}, {"id": 55, "type": "parameter_declaration", "text": "int flag", "parent": 51, "children": [56, 57], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 28}}, {"id": 56, "type": "primitive_type", "text": "int", "parent": 55, "children": [], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 23}}, {"id": 57, "type": "identifier", "text": "flag", "parent": 55, "children": [], "start_point": {"row": 14, "column": 24}, "end_point": {"row": 14, "column": 28}}, {"id": 58, "type": "declaration", "text": "int lock_file(int fd, int cmd, int type, int whence, int start, int len);", "parent": 0, "children": [59, 60], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 73}}, {"id": 59, "type": "primitive_type", "text": "int", "parent": 58, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 3}}, {"id": 60, "type": "function_declarator", "text": "lock_file(int fd, int cmd, int type, int whence, int start, int len)", "parent": 58, "children": [61, 62], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 72}}, {"id": 61, "type": "identifier", "text": "lock_file", "parent": 60, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 13}}, {"id": 62, "type": "parameter_list", "text": "(int fd, int cmd, int type, int whence, int start, int len)", "parent": 60, "children": [63, 66, 69, 72, 75, 78], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 72}}, {"id": 63, "type": "parameter_declaration", "text": "int fd", "parent": 62, "children": [64, 65], "start_point": {"row": 16, "column": 14}, "end_point": {"row": 16, "column": 20}}, {"id": 64, "type": "primitive_type", "text": "int", "parent": 63, "children": [], "start_point": {"row": 16, "column": 14}, "end_point": {"row": 16, "column": 17}}, {"id": 65, "type": "identifier", "text": "fd", "parent": 63, "children": [], "start_point": {"row": 16, "column": 18}, "end_point": {"row": 16, "column": 20}}, {"id": 66, "type": "parameter_declaration", "text": "int cmd", "parent": 62, "children": [67, 68], "start_point": {"row": 16, "column": 22}, "end_point": {"row": 16, "column": 29}}, {"id": 67, "type": "primitive_type", "text": "int", "parent": 66, "children": [], "start_point": {"row": 16, "column": 22}, "end_point": {"row": 16, "column": 25}}, {"id": 68, "type": "identifier", "text": "cmd", "parent": 66, "children": [], "start_point": {"row": 16, "column": 26}, "end_point": {"row": 16, "column": 29}}, {"id": 69, "type": "parameter_declaration", "text": "int type", "parent": 62, "children": [70, 71], "start_point": {"row": 16, "column": 31}, "end_point": {"row": 16, "column": 39}}, {"id": 70, "type": "primitive_type", "text": "int", "parent": 69, "children": [], "start_point": {"row": 16, "column": 31}, "end_point": {"row": 16, "column": 34}}, {"id": 71, "type": "identifier", "text": "type", "parent": 69, "children": [], "start_point": {"row": 16, "column": 35}, "end_point": {"row": 16, "column": 39}}, {"id": 72, "type": "parameter_declaration", "text": "int whence", "parent": 62, "children": [73, 74], "start_point": {"row": 16, "column": 41}, "end_point": {"row": 16, "column": 51}}, {"id": 73, "type": "primitive_type", "text": "int", "parent": 72, "children": [], "start_point": {"row": 16, "column": 41}, "end_point": {"row": 16, "column": 44}}, {"id": 74, "type": "identifier", "text": "whence", "parent": 72, "children": [], "start_point": {"row": 16, "column": 45}, "end_point": {"row": 16, "column": 51}}, {"id": 75, "type": "parameter_declaration", "text": "int start", "parent": 62, "children": [76, 77], "start_point": {"row": 16, "column": 53}, "end_point": {"row": 16, "column": 62}}, {"id": 76, "type": "primitive_type", "text": "int", "parent": 75, "children": [], "start_point": {"row": 16, "column": 53}, "end_point": {"row": 16, "column": 56}}, {"id": 77, "type": "identifier", "text": "start", "parent": 75, "children": [], "start_point": {"row": 16, "column": 57}, "end_point": {"row": 16, "column": 62}}, {"id": 78, "type": "parameter_declaration", "text": "int len", "parent": 62, "children": [79, 80], "start_point": {"row": 16, "column": 64}, "end_point": {"row": 16, "column": 71}}, {"id": 79, "type": "primitive_type", "text": "int", "parent": 78, "children": [], "start_point": {"row": 16, "column": 64}, "end_point": {"row": 16, "column": 67}}, {"id": 80, "type": "identifier", "text": "len", "parent": 78, "children": [], "start_point": {"row": 16, "column": 68}, "end_point": {"row": 16, "column": 71}}, {"id": 81, "type": "preproc_function_def", "text": "OCK(fd, whence, start, len) lock_file(fd, F_SETLK, F_RDLCK, whence, start, len)\n\n// \u5171\u4eab\u8bfb\u9501(\u963b\u585e)\n#", "parent": 0, "children": [82, 83, 84, 89], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 82, "type": "#define", "text": "OCK(fd,", "parent": 81, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 7}}, {"id": 83, "type": "identifier", "text": "whence, s", "parent": 81, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 17}}, {"id": 84, "type": "preproc_params", "text": "tart, len) lock_file(fd,", "parent": 81, "children": [85, 86, 87, 88], "start_point": {"row": 19, "column": 17}, "end_point": {"row": 19, "column": 41}}, {"id": 85, "type": "identifier", "text": "ar", "parent": 84, "children": [], "start_point": {"row": 19, "column": 18}, "end_point": {"row": 19, "column": 20}}, {"id": 86, "type": "identifier", "text": " len) ", "parent": 84, "children": [], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 28}}, {"id": 87, "type": "identifier", "text": "ck_fi", "parent": 84, "children": [], "start_point": {"row": 19, "column": 30}, "end_point": {"row": 19, "column": 35}}, {"id": 88, "type": "identifier", "text": "(fd", "parent": 84, "children": [], "start_point": {"row": 19, "column": 37}, "end_point": {"row": 19, "column": 40}}, {"id": 89, "type": "preproc_arg", "text": "F_SETLK, F_RDLCK, whence, start, len)\n\n// \u5171\u4eab\u8bfb\u9501(\u963b\u585e)\n", "parent": 81, "children": [], "start_point": {"row": 19, "column": 42}, "end_point": {"row": 19, "column": 93}}, {"id": 90, "type": "preproc_function_def", "text": "nce, start, len) lock_file(fd, F_SETLKW, F_RDLCK, whence, start, len)\n\n// \u72ec\u5360\u5199\u9501(\u975e\u963b\u585e)\n#define WRIT", "parent": 0, "children": [91, 92, 93, 98], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 91, "type": "#define", "text": "nce, st", "parent": 90, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 7}}, {"id": 92, "type": "identifier", "text": "rt, len) l", "parent": 90, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 18}}, {"id": 93, "type": "preproc_params", "text": "ock_file(fd, F_SETLKW, F", "parent": 90, "children": [94, 95, 96, 97], "start_point": {"row": 22, "column": 18}, "end_point": {"row": 22, "column": 42}}, {"id": 94, "type": "identifier", "text": "ck", "parent": 93, "children": [], "start_point": {"row": 22, "column": 19}, "end_point": {"row": 22, "column": 21}}, {"id": 95, "type": "identifier", "text": "ile(fd", "parent": 93, "children": [], "start_point": {"row": 22, "column": 23}, "end_point": {"row": 22, "column": 29}}, {"id": 96, "type": "identifier", "text": "F_SET", "parent": 93, "children": [], "start_point": {"row": 22, "column": 31}, "end_point": {"row": 22, "column": 36}}, {"id": 97, "type": "identifier", "text": "W, ", "parent": 93, "children": [], "start_point": {"row": 22, "column": 38}, "end_point": {"row": 22, "column": 41}}, {"id": 98, "type": "preproc_arg", "text": "RDLCK, whence, start, len)\n\n// \u72ec\u5360\u5199\u9501(\u975e\u963b\u585e)\n#define WRI", "parent": 90, "children": [], "start_point": {"row": 22, "column": 43}, "end_point": {"row": 22, "column": 95}}, {"id": 99, "type": "preproc_function_def", "text": "n) lock_file(fd, F_SETLK, F_WRLCK, whence, start, len)\n\n// \u72ec\u5360\u5199\u9501(\u963b\u585e)\n#define WRITE_LOCKW(fd, whe", "parent": 0, "children": [100, 101, 102, 107], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 100, "type": "#define", "text": "n) lock", "parent": 99, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 7}}, {"id": 101, "type": "identifier", "text": "file(fd, F", "parent": 99, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 18}}, {"id": 102, "type": "preproc_params", "text": "_SETLK, F_WRLCK, whence,", "parent": 99, "children": [103, 104, 105, 106], "start_point": {"row": 25, "column": 18}, "end_point": {"row": 25, "column": 42}}, {"id": 103, "type": "identifier", "text": "SE", "parent": 102, "children": [], "start_point": {"row": 25, "column": 19}, "end_point": {"row": 25, "column": 21}}, {"id": 104, "type": "identifier", "text": "K, F_W", "parent": 102, "children": [], "start_point": {"row": 25, "column": 23}, "end_point": {"row": 25, "column": 29}}, {"id": 105, "type": "identifier", "text": "CK, w", "parent": 102, "children": [], "start_point": {"row": 25, "column": 31}, "end_point": {"row": 25, "column": 36}}, {"id": 106, "type": "identifier", "text": "nce", "parent": 102, "children": [], "start_point": {"row": 25, "column": 38}, "end_point": {"row": 25, "column": 41}}, {"id": 107, "type": "preproc_arg", "text": "start, len)\n\n// \u72ec\u5360\u5199\u9501(\u963b\u585e)\n#define WRITE_LOCKW(fd, wh", "parent": 99, "children": [], "start_point": {"row": 25, "column": 43}, "end_point": {"row": 25, "column": 94}}, {"id": 108, "type": "preproc_function_def", "text": "e(fd, F_SETLKW, F_WRLCK, whence, start, len)\n\n// \u89e3\u9501\n#define UN_LOCK(fd, whence, start, len) lock_", "parent": 0, "children": [109, 110, 111, 116], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 0}}, {"id": 109, "type": "#define", "text": "e(fd, F", "parent": 108, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 7}}, {"id": 110, "type": "identifier", "text": "SETLKW, F_W", "parent": 108, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 19}}, {"id": 111, "type": "preproc_params", "text": "RLCK, whence, start, len", "parent": 108, "children": [112, 113, 114, 115], "start_point": {"row": 28, "column": 19}, "end_point": {"row": 28, "column": 43}}, {"id": 112, "type": "identifier", "text": "LC", "parent": 111, "children": [], "start_point": {"row": 28, "column": 20}, "end_point": {"row": 28, "column": 22}}, {"id": 113, "type": "identifier", "text": " whenc", "parent": 111, "children": [], "start_point": {"row": 28, "column": 24}, "end_point": {"row": 28, "column": 30}}, {"id": 114, "type": "identifier", "text": " star", "parent": 111, "children": [], "start_point": {"row": 28, "column": 32}, "end_point": {"row": 28, "column": 37}}, {"id": 115, "type": "identifier", "text": " le", "parent": 111, "children": [], "start_point": {"row": 28, "column": 39}, "end_point": {"row": 28, "column": 42}}, {"id": 116, "type": "preproc_arg", "text": "\n\n// \u89e3\u9501\n#define UN_LOCK(fd, whence, start, len) lock", "parent": 108, "children": [], "start_point": {"row": 28, "column": 44}, "end_point": {"row": 28, "column": 96}}, {"id": 117, "type": "preproc_function_def", "text": "SETLKW, F_UNLCK, whence, start, len)\n\n#endif", "parent": 0, "children": [118, 119, 120, 124], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 118, "type": "#define", "text": "SETLKW,", "parent": 117, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 7}}, {"id": 119, "type": "identifier", "text": "F_UNLCK", "parent": 117, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 15}}, {"id": 120, "type": "preproc_params", "text": ", whence, start, len)\n\n#", "parent": 117, "children": [121, 122, 123], "start_point": {"row": 31, "column": 15}, "end_point": {"row": 31, "column": 39}}, {"id": 121, "type": "identifier", "text": " w", "parent": 120, "children": [], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 31, "column": 18}}, {"id": 122, "type": "identifier", "text": "nce, s", "parent": 120, "children": [], "start_point": {"row": 31, "column": 20}, "end_point": {"row": 31, "column": 26}}, {"id": 123, "type": "identifier", "text": "rt, l", "parent": 120, "children": [], "start_point": {"row": 31, "column": 28}, "end_point": {"row": 31, "column": 33}}, {"id": 124, "type": "preproc_arg", "text": "ndif", "parent": 117, "children": [], "start_point": {"row": 31, "column": 40}, "end_point": {"row": 31, "column": 92}}, {"id": 125, "type": "#endif", "text": "", "parent": 0, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 6}}]}, "node_categories": {"declarations": {"functions": [8, 19, 27, 38, 49, 60, 81, 90, 99, 108, 117], "variables": [6, 11, 14, 17, 22, 25, 30, 33, 36, 41, 44, 47, 52, 55, 58, 63, 66, 69, 72, 75, 78], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 9, 13, 16, 20, 24, 28, 32, 35, 39, 43, 46, 50, 54, 57, 61, 65, 68, 71, 74, 77, 80, 83, 85, 86, 87, 88, 92, 94, 95, 96, 97, 101, 103, 104, 105, 106, 110, 112, 113, 114, 115, 119, 121, 122, 123, 125], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 8, "universal_type": "function", "name": "fd_des)", "text_snippet": "copy(int fd_src, int fd_des)"}, {"node_id": 19, "universal_type": "function", "name": "unknown", "text_snippet": "get_size(int fd)"}, {"node_id": 27, "universal_type": "function", "name": "flag)", "text_snippet": "set_flag(int fd, int flag)"}, {"node_id": 38, "universal_type": "function", "name": "flag)", "text_snippet": "add_flag(int fd, int flag)"}, {"node_id": 49, "universal_type": "function", "name": "flag)", "text_snippet": "rm_flag(int fd, int flag)"}, {"node_id": 60, "universal_type": "function", "name": "cmd,", "text_snippet": "lock_file(int fd, int cmd, int type, int whence, int start, int len)"}, {"node_id": 81, "universal_type": "function", "name": "unknown", "text_snippet": "OCK(fd, whence, start, len) lock_file(fd, F_SETLK, F_RDLCK, whence, start, len)\n\n// \u5171\u4eab\u8bfb\u9501(\u963b\u585e)\n#"}, {"node_id": 90, "universal_type": "function", "name": "unknown", "text_snippet": "nce, start, len) lock_file(fd, F_SETLKW, F_RDLCK, whence, start, len)\n\n// \u72ec\u5360\u5199\u9501(\u975e\u963b\u585e)\n#define WRIT"}, {"node_id": 99, "universal_type": "function", "name": "unknown", "text_snippet": "n) lock_file(fd, F_SETLK, F_WRLCK, whence, start, len)\n\n// \u72ec\u5360\u5199\u9501(\u963b\u585e)\n#define WRITE_LOCKW(fd, whe"}, {"node_id": 108, "universal_type": "function", "name": "unknown", "text_snippet": "e(fd, F_SETLKW, F_WRLCK, whence, start, len)\n\n// \u89e3\u9501\n#define UN_LOCK(fd, whence, start, len) lock_"}, {"node_id": 117, "universal_type": "function", "name": "unknown", "text_snippet": "SETLKW, F_UNLCK, whence, start, len)\n\n#endif"}], "class_declarations": [], "import_statements": []}, "original_source_code": "// Copyright (c) 2020, devgo.club\n// All rights reserved.\n\n#ifndef FILE_IO_H\n#define FILE_IO_H\n\nint copy(int fd_src, int fd_des);\n\nint get_size(int fd);\n\nint set_flag(int fd, int flag);\n\nint add_flag(int fd, int flag);\n\nint rm_flag(int fd, int flag);\n\nint lock_file(int fd, int cmd, int type, int whence, int start, int len);\n\n// \u5171\u4eab\u8bfb\u9501(\u975e\u963b\u585e)\n#define READ_LOCK(fd, whence, start, len) lock_file(fd, F_SETLK, F_RDLCK, whence, start, len)\n\n// \u5171\u4eab\u8bfb\u9501(\u963b\u585e)\n#define READ_LOCKW(fd, whence, start, len) lock_file(fd, F_SETLKW, F_RDLCK, whence, start, len)\n\n// \u72ec\u5360\u5199\u9501(\u975e\u963b\u585e)\n#define WRITE_LOCK(fd, whence, start, len) lock_file(fd, F_SETLK, F_WRLCK, whence, start, len)\n\n// \u72ec\u5360\u5199\u9501(\u963b\u585e)\n#define WRITE_LOCKW(fd, whence, start, len) lock_file(fd, F_SETLKW, F_WRLCK, whence, start, len)\n\n// \u89e3\u9501\n#define UN_LOCK(fd, whence, start, len) lock_file(fd, F_SETLKW, F_UNLCK, whence, start, len)\n\n#endif"}
| 81,233
|
c
|
#include <sys/types.h>
#include <sys/wait.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#define TOKEN_DELIMETERS " \t\r\n\a"
#define DEFAULT_SIZE 64
char *history[DEFAULT_SIZE];
char *argv[DEFAULT_SIZE];
int hist_count = 0;
int hist_num = 0;
int position = 0;
short isHistNum = 0;
void read_line(char *line){
if(isHistNum){
line = memcpy(line,history[hist_num-1],DEFAULT_SIZE);
printf("\n");
}
else{
gets(line);
}
isHistNum = 0;
memcpy(history[hist_count],line,DEFAULT_SIZE);
hist_count++;
}
void parse_line(char *line,char *argv[]){
char *token;
position = 0;
token = strtok(line,TOKEN_DELIMETERS);
while(token!=NULL){
argv[position] = token;
position++;
token =strtok(NULL,TOKEN_DELIMETERS);
}
}
int nat_history(char *argv[]){
if(position==2){
hist_num = atoi(argv[1]);
for(int k = 1; k<=hist_count;k++){
if(hist_num == k){
isHistNum = 1;
}
}
}
if(isHistNum==0){
for(int i =0; i <hist_count;i++)
printf(" %d %s\n",(i+1),history[i]);
}
return 1;
}
void help(){
printf("Shell Basic Commands\n");
printf("cd <path> - Change Directory to the one specified in <path>\n");
printf("history - Show list of previous commands executed\n");
printf("history <n> - Execute the nth command in the history\n");
printf("ls - Show the contents of the current directory\n");
printf("ls -l - Show the contents of the current directory with more detail\n");
printf("exit - Terminate the current CLI\n");
}
void execute(char *argv[]){
// Check if command is valid as a native command
char exit_[10]; strcpy(exit_, "exit");
char hist[10]; strcpy(hist, "history");
char cd[10]; strcpy(cd, "cd");
char help_[10]; strcpy(help_, "help");
//Native commands
if(argv[0] != NULL) {
if (strcmp(argv[0], exit_) == 0) {
exit(0);
} else if (strcmp(argv[0], hist) == 0) {
nat_history(argv);
} else if (strcmp(argv[0], cd) == 0) {
if(argv[1] == NULL)
chdir("/");
else
chdir(argv[1]);
} else if (strcmp(argv[0], help_) == 0) {
help();
} else {
//Execute any other command. Uses child process.
pid_t pid = fork();
if (pid == -1) {
printf("ERORR on fork\n");
exit(EXIT_FAILURE);
} else if (pid == 0) {
execvp(argv[0], argv);
exit(0);
} else {
while(waitpid(-1, NULL, 0) > 0);
}
}
}
}
int main(int argc, char *argv[]){
int valid = 0;
char *line = (char*)malloc(DEFAULT_SIZE);
for(int i = 0;i<DEFAULT_SIZE;i++)
history[i] = (char*)malloc(DEFAULT_SIZE);
long size;
char *buf;
char *ptr;
bzero(argv, DEFAULT_SIZE); //Clear argument array
while(1){
printf("Shell->");
read_line(line);
parse_line(line,argv);
execute(argv);
for(int j = 0; j < argc;j++){
argv[j] = NULL;
}
}
}
| 27.57
| 113
|
(translation_unit) "#include <sys/types.h>\n#include <sys/wait.h>\n#include <stdio.h>\n#include <unistd.h>\n#include <string.h>\n#include <stdlib.h>\n\n#define TOKEN_DELIMETERS " \t\r\n\a"\n#define DEFAULT_SIZE 64\n\nchar *history[DEFAULT_SIZE];\nchar *argv[DEFAULT_SIZE];\nint hist_count = 0;\nint hist_num = 0;\nint position = 0;\nshort isHistNum = 0;\n\nvoid read_line(char *line){\n if(isHistNum){\n line = memcpy(line,history[hist_num-1],DEFAULT_SIZE);\n printf("\n");\n }\n else{\n gets(line);\n }\n isHistNum = 0;\n memcpy(history[hist_count],line,DEFAULT_SIZE);\n hist_count++;\n}\n\nvoid parse_line(char *line,char *argv[]){\n char *token;\n position = 0;\n token = strtok(line,TOKEN_DELIMETERS);\n while(token!=NULL){\n argv[position] = token;\n position++;\n token =strtok(NULL,TOKEN_DELIMETERS);\n }\n}\n\nint nat_history(char *argv[]){\n if(position==2){\n hist_num = atoi(argv[1]);\n for(int k = 1; k<=hist_count;k++){\n if(hist_num == k){\n isHistNum = 1;\n }\n }\n }\n if(isHistNum==0){\n for(int i =0; i <hist_count;i++)\n printf(" %d %s\n",(i+1),history[i]);\n }\n return 1;\n}\n\nvoid help(){\n printf("Shell Basic Commands\n");\n printf("cd <path> - Change Directory to the one specified in <path>\n");\n printf("history - Show list of previous commands executed\n");\n printf("history <n> - Execute the nth command in the history\n");\n printf("ls - Show the contents of the current directory\n");\n printf("ls -l - Show the contents of the current directory with more detail\n");\n printf("exit - Terminate the current CLI\n");\n}\n\nvoid execute(char *argv[]){\n\n // Check if command is valid as a native command\n char exit_[10]; strcpy(exit_, "exit");\n char hist[10]; strcpy(hist, "history");\n char cd[10]; strcpy(cd, "cd");\n char help_[10]; strcpy(help_, "help");\n\n //Native commands\n if(argv[0] != NULL) {\n if (strcmp(argv[0], exit_) == 0) {\n exit(0);\n } else if (strcmp(argv[0], hist) == 0) {\n nat_history(argv);\n } else if (strcmp(argv[0], cd) == 0) {\n if(argv[1] == NULL)\n chdir("/");\n else\n chdir(argv[1]);\n } else if (strcmp(argv[0], help_) == 0) {\n help();\n } else {\n //Execute any other command. Uses child process.\n pid_t pid = fork();\n if (pid == -1) {\n printf("ERORR on fork\n");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }\n }\n }\n}\n\nint main(int argc, char *argv[]){\n int valid = 0;\n char *line = (char*)malloc(DEFAULT_SIZE);\n for(int i = 0;i<DEFAULT_SIZE;i++)\n history[i] = (char*)malloc(DEFAULT_SIZE);\n long size;\n char *buf;\n char *ptr;\n bzero(argv, DEFAULT_SIZE); //Clear argument array\n while(1){\n printf("Shell->");\n read_line(line);\n parse_line(line,argv);\n execute(argv);\n for(int j = 0; j < argc;j++){\n argv[j] = NULL;\n }\n }\n}\n"
(preproc_include) "#include <sys/types.h>\n"
(#include) "#include"
(system_lib_string) "<sys/types.h>"
(preproc_include) "#include <sys/wait.h>\n"
(#include) "#include"
(system_lib_string) "<sys/wait.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 <string.h>\n"
(#include) "#include"
(system_lib_string) "<string.h>"
(preproc_include) "#include <stdlib.h>\n"
(#include) "#include"
(system_lib_string) "<stdlib.h>"
(preproc_def) "#define TOKEN_DELIMETERS " \t\r\n\a"\n"
(#define) "#define"
(identifier) "TOKEN_DELIMETERS"
(preproc_arg) "" \t\r\n\a""
(preproc_def) "#define DEFAULT_SIZE 64\n"
(#define) "#define"
(identifier) "DEFAULT_SIZE"
(preproc_arg) "64"
(declaration) "char *history[DEFAULT_SIZE];"
(primitive_type) "char"
(pointer_declarator) "*history[DEFAULT_SIZE]"
(*) "*"
(array_declarator) "history[DEFAULT_SIZE]"
(identifier) "history"
([) "["
(identifier) "DEFAULT_SIZE"
(]) "]"
(;) ";"
(declaration) "char *argv[DEFAULT_SIZE];"
(primitive_type) "char"
(pointer_declarator) "*argv[DEFAULT_SIZE]"
(*) "*"
(array_declarator) "argv[DEFAULT_SIZE]"
(identifier) "argv"
([) "["
(identifier) "DEFAULT_SIZE"
(]) "]"
(;) ";"
(declaration) "int hist_count = 0;"
(primitive_type) "int"
(init_declarator) "hist_count = 0"
(identifier) "hist_count"
(=) "="
(number_literal) "0"
(;) ";"
(declaration) "int hist_num = 0;"
(primitive_type) "int"
(init_declarator) "hist_num = 0"
(identifier) "hist_num"
(=) "="
(number_literal) "0"
(;) ";"
(declaration) "int position = 0;"
(primitive_type) "int"
(init_declarator) "position = 0"
(identifier) "position"
(=) "="
(number_literal) "0"
(;) ";"
(declaration) "short isHistNum = 0;"
(sized_type_specifier) "short"
(short) "short"
(init_declarator) "isHistNum = 0"
(identifier) "isHistNum"
(=) "="
(number_literal) "0"
(;) ";"
(function_definition) "void read_line(char *line){\n if(isHistNum){\n line = memcpy(line,history[hist_num-1],DEFAULT_SIZE);\n printf("\n");\n }\n else{\n gets(line);\n }\n isHistNum = 0;\n memcpy(history[hist_count],line,DEFAULT_SIZE);\n hist_count++;\n}"
(primitive_type) "void"
(function_declarator) "read_line(char *line)"
(identifier) "read_line"
(parameter_list) "(char *line)"
(() "("
(parameter_declaration) "char *line"
(primitive_type) "char"
(pointer_declarator) "*line"
(*) "*"
(identifier) "line"
()) ")"
(compound_statement) "{\n if(isHistNum){\n line = memcpy(line,history[hist_num-1],DEFAULT_SIZE);\n printf("\n");\n }\n else{\n gets(line);\n }\n isHistNum = 0;\n memcpy(history[hist_count],line,DEFAULT_SIZE);\n hist_count++;\n}"
({) "{"
(if_statement) "if(isHistNum){\n line = memcpy(line,history[hist_num-1],DEFAULT_SIZE);\n printf("\n");\n }\n else{\n gets(line);\n }"
(if) "if"
(parenthesized_expression) "(isHistNum)"
(() "("
(identifier) "isHistNum"
()) ")"
(compound_statement) "{\n line = memcpy(line,history[hist_num-1],DEFAULT_SIZE);\n printf("\n");\n }"
({) "{"
(expression_statement) "line = memcpy(line,history[hist_num-1],DEFAULT_SIZE);"
(assignment_expression) "line = memcpy(line,history[hist_num-1],DEFAULT_SIZE)"
(identifier) "line"
(=) "="
(call_expression) "memcpy(line,history[hist_num-1],DEFAULT_SIZE)"
(identifier) "memcpy"
(argument_list) "(line,history[hist_num-1],DEFAULT_SIZE)"
(() "("
(identifier) "line"
(,) ","
(subscript_expression) "history[hist_num-1]"
(identifier) "history"
([) "["
(binary_expression) "hist_num-1"
(identifier) "hist_num"
(-) "-"
(number_literal) "1"
(]) "]"
(,) ","
(identifier) "DEFAULT_SIZE"
()) ")"
(;) ";"
(expression_statement) "printf("\n");"
(call_expression) "printf("\n")"
(identifier) "printf"
(argument_list) "("\n")"
(() "("
(string_literal) ""\n""
(") """
(escape_sequence) "\n"
(") """
()) ")"
(;) ";"
(}) "}"
(else_clause) "else{\n gets(line);\n }"
(else) "else"
(compound_statement) "{\n gets(line);\n }"
({) "{"
(expression_statement) "gets(line);"
(call_expression) "gets(line)"
(identifier) "gets"
(argument_list) "(line)"
(() "("
(identifier) "line"
()) ")"
(;) ";"
(}) "}"
(expression_statement) "isHistNum = 0;"
(assignment_expression) "isHistNum = 0"
(identifier) "isHistNum"
(=) "="
(number_literal) "0"
(;) ";"
(expression_statement) "memcpy(history[hist_count],line,DEFAULT_SIZE);"
(call_expression) "memcpy(history[hist_count],line,DEFAULT_SIZE)"
(identifier) "memcpy"
(argument_list) "(history[hist_count],line,DEFAULT_SIZE)"
(() "("
(subscript_expression) "history[hist_count]"
(identifier) "history"
([) "["
(identifier) "hist_count"
(]) "]"
(,) ","
(identifier) "line"
(,) ","
(identifier) "DEFAULT_SIZE"
()) ")"
(;) ";"
(expression_statement) "hist_count++;"
(update_expression) "hist_count++"
(identifier) "hist_count"
(++) "++"
(;) ";"
(}) "}"
(function_definition) "void parse_line(char *line,char *argv[]){\n char *token;\n position = 0;\n token = strtok(line,TOKEN_DELIMETERS);\n while(token!=NULL){\n argv[position] = token;\n position++;\n token =strtok(NULL,TOKEN_DELIMETERS);\n }\n}"
(primitive_type) "void"
(function_declarator) "parse_line(char *line,char *argv[])"
(identifier) "parse_line"
(parameter_list) "(char *line,char *argv[])"
(() "("
(parameter_declaration) "char *line"
(primitive_type) "char"
(pointer_declarator) "*line"
(*) "*"
(identifier) "line"
(,) ","
(parameter_declaration) "char *argv[]"
(primitive_type) "char"
(pointer_declarator) "*argv[]"
(*) "*"
(array_declarator) "argv[]"
(identifier) "argv"
([) "["
(]) "]"
()) ")"
(compound_statement) "{\n char *token;\n position = 0;\n token = strtok(line,TOKEN_DELIMETERS);\n while(token!=NULL){\n argv[position] = token;\n position++;\n token =strtok(NULL,TOKEN_DELIMETERS);\n }\n}"
({) "{"
(declaration) "char *token;"
(primitive_type) "char"
(pointer_declarator) "*token"
(*) "*"
(identifier) "token"
(;) ";"
(expression_statement) "position = 0;"
(assignment_expression) "position = 0"
(identifier) "position"
(=) "="
(number_literal) "0"
(;) ";"
(expression_statement) "token = strtok(line,TOKEN_DELIMETERS);"
(assignment_expression) "token = strtok(line,TOKEN_DELIMETERS)"
(identifier) "token"
(=) "="
(call_expression) "strtok(line,TOKEN_DELIMETERS)"
(identifier) "strtok"
(argument_list) "(line,TOKEN_DELIMETERS)"
(() "("
(identifier) "line"
(,) ","
(identifier) "TOKEN_DELIMETERS"
()) ")"
(;) ";"
(while_statement) "while(token!=NULL){\n argv[position] = token;\n position++;\n token =strtok(NULL,TOKEN_DELIMETERS);\n }"
(while) "while"
(parenthesized_expression) "(token!=NULL)"
(() "("
(binary_expression) "token!=NULL"
(identifier) "token"
(!=) "!="
(null) "NULL"
(NULL) "NULL"
()) ")"
(compound_statement) "{\n argv[position] = token;\n position++;\n token =strtok(NULL,TOKEN_DELIMETERS);\n }"
({) "{"
(expression_statement) "argv[position] = token;"
(assignment_expression) "argv[position] = token"
(subscript_expression) "argv[position]"
(identifier) "argv"
([) "["
(identifier) "position"
(]) "]"
(=) "="
(identifier) "token"
(;) ";"
(expression_statement) "position++;"
(update_expression) "position++"
(identifier) "position"
(++) "++"
(;) ";"
(expression_statement) "token =strtok(NULL,TOKEN_DELIMETERS);"
(assignment_expression) "token =strtok(NULL,TOKEN_DELIMETERS)"
(identifier) "token"
(=) "="
(call_expression) "strtok(NULL,TOKEN_DELIMETERS)"
(identifier) "strtok"
(argument_list) "(NULL,TOKEN_DELIMETERS)"
(() "("
(null) "NULL"
(NULL) "NULL"
(,) ","
(identifier) "TOKEN_DELIMETERS"
()) ")"
(;) ";"
(}) "}"
(}) "}"
(function_definition) "int nat_history(char *argv[]){\n if(position==2){\n hist_num = atoi(argv[1]);\n for(int k = 1; k<=hist_count;k++){\n if(hist_num == k){\n isHistNum = 1;\n }\n }\n }\n if(isHistNum==0){\n for(int i =0; i <hist_count;i++)\n printf(" %d %s\n",(i+1),history[i]);\n }\n return 1;\n}"
(primitive_type) "int"
(function_declarator) "nat_history(char *argv[])"
(identifier) "nat_history"
(parameter_list) "(char *argv[])"
(() "("
(parameter_declaration) "char *argv[]"
(primitive_type) "char"
(pointer_declarator) "*argv[]"
(*) "*"
(array_declarator) "argv[]"
(identifier) "argv"
([) "["
(]) "]"
()) ")"
(compound_statement) "{\n if(position==2){\n hist_num = atoi(argv[1]);\n for(int k = 1; k<=hist_count;k++){\n if(hist_num == k){\n isHistNum = 1;\n }\n }\n }\n if(isHistNum==0){\n for(int i =0; i <hist_count;i++)\n printf(" %d %s\n",(i+1),history[i]);\n }\n return 1;\n}"
({) "{"
(if_statement) "if(position==2){\n hist_num = atoi(argv[1]);\n for(int k = 1; k<=hist_count;k++){\n if(hist_num == k){\n isHistNum = 1;\n }\n }\n }"
(if) "if"
(parenthesized_expression) "(position==2)"
(() "("
(binary_expression) "position==2"
(identifier) "position"
(==) "=="
(number_literal) "2"
()) ")"
(compound_statement) "{\n hist_num = atoi(argv[1]);\n for(int k = 1; k<=hist_count;k++){\n if(hist_num == k){\n isHistNum = 1;\n }\n }\n }"
({) "{"
(expression_statement) "hist_num = atoi(argv[1]);"
(assignment_expression) "hist_num = atoi(argv[1])"
(identifier) "hist_num"
(=) "="
(call_expression) "atoi(argv[1])"
(identifier) "atoi"
(argument_list) "(argv[1])"
(() "("
(subscript_expression) "argv[1]"
(identifier) "argv"
([) "["
(number_literal) "1"
(]) "]"
()) ")"
(;) ";"
(for_statement) "for(int k = 1; k<=hist_count;k++){\n if(hist_num == k){\n isHistNum = 1;\n }\n }"
(for) "for"
(() "("
(declaration) "int k = 1;"
(primitive_type) "int"
(init_declarator) "k = 1"
(identifier) "k"
(=) "="
(number_literal) "1"
(;) ";"
(binary_expression) "k<=hist_count"
(identifier) "k"
(<=) "<="
(identifier) "hist_count"
(;) ";"
(update_expression) "k++"
(identifier) "k"
(++) "++"
()) ")"
(compound_statement) "{\n if(hist_num == k){\n isHistNum = 1;\n }\n }"
({) "{"
(if_statement) "if(hist_num == k){\n isHistNum = 1;\n }"
(if) "if"
(parenthesized_expression) "(hist_num == k)"
(() "("
(binary_expression) "hist_num == k"
(identifier) "hist_num"
(==) "=="
(identifier) "k"
()) ")"
(compound_statement) "{\n isHistNum = 1;\n }"
({) "{"
(expression_statement) "isHistNum = 1;"
(assignment_expression) "isHistNum = 1"
(identifier) "isHistNum"
(=) "="
(number_literal) "1"
(;) ";"
(}) "}"
(}) "}"
(}) "}"
(if_statement) "if(isHistNum==0){\n for(int i =0; i <hist_count;i++)\n printf(" %d %s\n",(i+1),history[i]);\n }"
(if) "if"
(parenthesized_expression) "(isHistNum==0)"
(() "("
(binary_expression) "isHistNum==0"
(identifier) "isHistNum"
(==) "=="
(number_literal) "0"
()) ")"
(compound_statement) "{\n for(int i =0; i <hist_count;i++)\n printf(" %d %s\n",(i+1),history[i]);\n }"
({) "{"
(for_statement) "for(int i =0; i <hist_count;i++)\n printf(" %d %s\n",(i+1),history[i]);"
(for) "for"
(() "("
(declaration) "int i =0;"
(primitive_type) "int"
(init_declarator) "i =0"
(identifier) "i"
(=) "="
(number_literal) "0"
(;) ";"
(binary_expression) "i <hist_count"
(identifier) "i"
(<) "<"
(identifier) "hist_count"
(;) ";"
(update_expression) "i++"
(identifier) "i"
(++) "++"
()) ")"
(expression_statement) "printf(" %d %s\n",(i+1),history[i]);"
(call_expression) "printf(" %d %s\n",(i+1),history[i])"
(identifier) "printf"
(argument_list) "(" %d %s\n",(i+1),history[i])"
(() "("
(string_literal) "" %d %s\n""
(") """
(string_content) " %d %s"
(escape_sequence) "\n"
(") """
(,) ","
(parenthesized_expression) "(i+1)"
(() "("
(binary_expression) "i+1"
(identifier) "i"
(+) "+"
(number_literal) "1"
()) ")"
(,) ","
(subscript_expression) "history[i]"
(identifier) "history"
([) "["
(identifier) "i"
(]) "]"
()) ")"
(;) ";"
(}) "}"
(return_statement) "return 1;"
(return) "return"
(number_literal) "1"
(;) ";"
(}) "}"
(function_definition) "void help(){\n printf("Shell Basic Commands\n");\n printf("cd <path> - Change Directory to the one specified in <path>\n");\n printf("history - Show list of previous commands executed\n");\n printf("history <n> - Execute the nth command in the history\n");\n printf("ls - Show the contents of the current directory\n");\n printf("ls -l - Show the contents of the current directory with more detail\n");\n printf("exit - Terminate the current CLI\n");\n}"
(primitive_type) "void"
(function_declarator) "help()"
(identifier) "help"
(parameter_list) "()"
(() "("
()) ")"
(compound_statement) "{\n printf("Shell Basic Commands\n");\n printf("cd <path> - Change Directory to the one specified in <path>\n");\n printf("history - Show list of previous commands executed\n");\n printf("history <n> - Execute the nth command in the history\n");\n printf("ls - Show the contents of the current directory\n");\n printf("ls -l - Show the contents of the current directory with more detail\n");\n printf("exit - Terminate the current CLI\n");\n}"
({) "{"
(expression_statement) "printf("Shell Basic Commands\n");"
(call_expression) "printf("Shell Basic Commands\n")"
(identifier) "printf"
(argument_list) "("Shell Basic Commands\n")"
(() "("
(string_literal) ""Shell Basic Commands\n""
(") """
(string_content) "Shell Basic Commands"
(escape_sequence) "\n"
(") """
()) ")"
(;) ";"
(expression_statement) "printf("cd <path> - Change Directory to the one specified in <path>\n");"
(call_expression) "printf("cd <path> - Change Directory to the one specified in <path>\n")"
(identifier) "printf"
(argument_list) "("cd <path> - Change Directory to the one specified in <path>\n")"
(() "("
(string_literal) ""cd <path> - Change Directory to the one specified in <path>\n""
(") """
(string_content) "cd <path> - Change Directory to the one specified in <path>"
(escape_sequence) "\n"
(") """
()) ")"
(;) ";"
(expression_statement) "printf("history - Show list of previous commands executed\n");"
(call_expression) "printf("history - Show list of previous commands executed\n")"
(identifier) "printf"
(argument_list) "("history - Show list of previous commands executed\n")"
(() "("
(string_literal) ""history - Show list of previous commands executed\n""
(") """
(string_content) "history - Show list of previous commands executed"
(escape_sequence) "\n"
(") """
()) ")"
(;) ";"
(expression_statement) "printf("history <n> - Execute the nth command in the history\n");"
(call_expression) "printf("history <n> - Execute the nth command in the history\n")"
(identifier) "printf"
(argument_list) "("history <n> - Execute the nth command in the history\n")"
(() "("
(string_literal) ""history <n> - Execute the nth command in the history\n""
(") """
(string_content) "history <n> - Execute the nth command in the history"
(escape_sequence) "\n"
(") """
()) ")"
(;) ";"
(expression_statement) "printf("ls - Show the contents of the current directory\n");"
(call_expression) "printf("ls - Show the contents of the current directory\n")"
(identifier) "printf"
(argument_list) "("ls - Show the contents of the current directory\n")"
(() "("
(string_literal) ""ls - Show the contents of the current directory\n""
(") """
(string_content) "ls - Show the contents of the current directory"
(escape_sequence) "\n"
(") """
()) ")"
(;) ";"
(expression_statement) "printf("ls -l - Show the contents of the current directory with more detail\n");"
(call_expression) "printf("ls -l - Show the contents of the current directory with more detail\n")"
(identifier) "printf"
(argument_list) "("ls -l - Show the contents of the current directory with more detail\n")"
(() "("
(string_literal) ""ls -l - Show the contents of the current directory with more detail\n""
(") """
(string_content) "ls -l - Show the contents of the current directory with more detail"
(escape_sequence) "\n"
(") """
()) ")"
(;) ";"
(expression_statement) "printf("exit - Terminate the current CLI\n");"
(call_expression) "printf("exit - Terminate the current CLI\n")"
(identifier) "printf"
(argument_list) "("exit - Terminate the current CLI\n")"
(() "("
(string_literal) ""exit - Terminate the current CLI\n""
(") """
(string_content) "exit - Terminate the current CLI"
(escape_sequence) "\n"
(") """
()) ")"
(;) ";"
(}) "}"
(function_definition) "void execute(char *argv[]){\n\n // Check if command is valid as a native command\n char exit_[10]; strcpy(exit_, "exit");\n char hist[10]; strcpy(hist, "history");\n char cd[10]; strcpy(cd, "cd");\n char help_[10]; strcpy(help_, "help");\n\n //Native commands\n if(argv[0] != NULL) {\n if (strcmp(argv[0], exit_) == 0) {\n exit(0);\n } else if (strcmp(argv[0], hist) == 0) {\n nat_history(argv);\n } else if (strcmp(argv[0], cd) == 0) {\n if(argv[1] == NULL)\n chdir("/");\n else\n chdir(argv[1]);\n } else if (strcmp(argv[0], help_) == 0) {\n help();\n } else {\n //Execute any other command. Uses child process.\n pid_t pid = fork();\n if (pid == -1) {\n printf("ERORR on fork\n");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }\n }\n }\n}"
(primitive_type) "void"
(function_declarator) "execute(char *argv[])"
(identifier) "execute"
(parameter_list) "(char *argv[])"
(() "("
(parameter_declaration) "char *argv[]"
(primitive_type) "char"
(pointer_declarator) "*argv[]"
(*) "*"
(array_declarator) "argv[]"
(identifier) "argv"
([) "["
(]) "]"
()) ")"
(compound_statement) "{\n\n // Check if command is valid as a native command\n char exit_[10]; strcpy(exit_, "exit");\n char hist[10]; strcpy(hist, "history");\n char cd[10]; strcpy(cd, "cd");\n char help_[10]; strcpy(help_, "help");\n\n //Native commands\n if(argv[0] != NULL) {\n if (strcmp(argv[0], exit_) == 0) {\n exit(0);\n } else if (strcmp(argv[0], hist) == 0) {\n nat_history(argv);\n } else if (strcmp(argv[0], cd) == 0) {\n if(argv[1] == NULL)\n chdir("/");\n else\n chdir(argv[1]);\n } else if (strcmp(argv[0], help_) == 0) {\n help();\n } else {\n //Execute any other command. Uses child process.\n pid_t pid = fork();\n if (pid == -1) {\n printf("ERORR on fork\n");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }\n }\n }\n}"
({) "{"
(comment) "// Check if command is valid as a native command"
(declaration) "char exit_[10];"
(primitive_type) "char"
(array_declarator) "exit_[10]"
(identifier) "exit_"
([) "["
(number_literal) "10"
(]) "]"
(;) ";"
(expression_statement) "strcpy(exit_, "exit");"
(call_expression) "strcpy(exit_, "exit")"
(identifier) "strcpy"
(argument_list) "(exit_, "exit")"
(() "("
(identifier) "exit_"
(,) ","
(string_literal) ""exit""
(") """
(string_content) "exit"
(") """
()) ")"
(;) ";"
(declaration) "char hist[10];"
(primitive_type) "char"
(array_declarator) "hist[10]"
(identifier) "hist"
([) "["
(number_literal) "10"
(]) "]"
(;) ";"
(expression_statement) "strcpy(hist, "history");"
(call_expression) "strcpy(hist, "history")"
(identifier) "strcpy"
(argument_list) "(hist, "history")"
(() "("
(identifier) "hist"
(,) ","
(string_literal) ""history""
(") """
(string_content) "history"
(") """
()) ")"
(;) ";"
(declaration) "char cd[10];"
(primitive_type) "char"
(array_declarator) "cd[10]"
(identifier) "cd"
([) "["
(number_literal) "10"
(]) "]"
(;) ";"
(expression_statement) "strcpy(cd, "cd");"
(call_expression) "strcpy(cd, "cd")"
(identifier) "strcpy"
(argument_list) "(cd, "cd")"
(() "("
(identifier) "cd"
(,) ","
(string_literal) ""cd""
(") """
(string_content) "cd"
(") """
()) ")"
(;) ";"
(declaration) "char help_[10];"
(primitive_type) "char"
(array_declarator) "help_[10]"
(identifier) "help_"
([) "["
(number_literal) "10"
(]) "]"
(;) ";"
(expression_statement) "strcpy(help_, "help");"
(call_expression) "strcpy(help_, "help")"
(identifier) "strcpy"
(argument_list) "(help_, "help")"
(() "("
(identifier) "help_"
(,) ","
(string_literal) ""help""
(") """
(string_content) "help"
(") """
()) ")"
(;) ";"
(comment) "//Native commands"
(if_statement) "if(argv[0] != NULL) {\n if (strcmp(argv[0], exit_) == 0) {\n exit(0);\n } else if (strcmp(argv[0], hist) == 0) {\n nat_history(argv);\n } else if (strcmp(argv[0], cd) == 0) {\n if(argv[1] == NULL)\n chdir("/");\n else\n chdir(argv[1]);\n } else if (strcmp(argv[0], help_) == 0) {\n help();\n } else {\n //Execute any other command. Uses child process.\n pid_t pid = fork();\n if (pid == -1) {\n printf("ERORR on fork\n");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }\n }\n }"
(if) "if"
(parenthesized_expression) "(argv[0] != NULL)"
(() "("
(binary_expression) "argv[0] != NULL"
(subscript_expression) "argv[0]"
(identifier) "argv"
([) "["
(number_literal) "0"
(]) "]"
(!=) "!="
(null) "NULL"
(NULL) "NULL"
()) ")"
(compound_statement) "{\n if (strcmp(argv[0], exit_) == 0) {\n exit(0);\n } else if (strcmp(argv[0], hist) == 0) {\n nat_history(argv);\n } else if (strcmp(argv[0], cd) == 0) {\n if(argv[1] == NULL)\n chdir("/");\n else\n chdir(argv[1]);\n } else if (strcmp(argv[0], help_) == 0) {\n help();\n } else {\n //Execute any other command. Uses child process.\n pid_t pid = fork();\n if (pid == -1) {\n printf("ERORR on fork\n");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }\n }\n }"
({) "{"
(if_statement) "if (strcmp(argv[0], exit_) == 0) {\n exit(0);\n } else if (strcmp(argv[0], hist) == 0) {\n nat_history(argv);\n } else if (strcmp(argv[0], cd) == 0) {\n if(argv[1] == NULL)\n chdir("/");\n else\n chdir(argv[1]);\n } else if (strcmp(argv[0], help_) == 0) {\n help();\n } else {\n //Execute any other command. Uses child process.\n pid_t pid = fork();\n if (pid == -1) {\n printf("ERORR on fork\n");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }\n }"
(if) "if"
(parenthesized_expression) "(strcmp(argv[0], exit_) == 0)"
(() "("
(binary_expression) "strcmp(argv[0], exit_) == 0"
(call_expression) "strcmp(argv[0], exit_)"
(identifier) "strcmp"
(argument_list) "(argv[0], exit_)"
(() "("
(subscript_expression) "argv[0]"
(identifier) "argv"
([) "["
(number_literal) "0"
(]) "]"
(,) ","
(identifier) "exit_"
()) ")"
(==) "=="
(number_literal) "0"
()) ")"
(compound_statement) "{\n exit(0);\n }"
({) "{"
(expression_statement) "exit(0);"
(call_expression) "exit(0)"
(identifier) "exit"
(argument_list) "(0)"
(() "("
(number_literal) "0"
()) ")"
(;) ";"
(}) "}"
(else_clause) "else if (strcmp(argv[0], hist) == 0) {\n nat_history(argv);\n } else if (strcmp(argv[0], cd) == 0) {\n if(argv[1] == NULL)\n chdir("/");\n else\n chdir(argv[1]);\n } else if (strcmp(argv[0], help_) == 0) {\n help();\n } else {\n //Execute any other command. Uses child process.\n pid_t pid = fork();\n if (pid == -1) {\n printf("ERORR on fork\n");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }\n }"
(else) "else"
(if_statement) "if (strcmp(argv[0], hist) == 0) {\n nat_history(argv);\n } else if (strcmp(argv[0], cd) == 0) {\n if(argv[1] == NULL)\n chdir("/");\n else\n chdir(argv[1]);\n } else if (strcmp(argv[0], help_) == 0) {\n help();\n } else {\n //Execute any other command. Uses child process.\n pid_t pid = fork();\n if (pid == -1) {\n printf("ERORR on fork\n");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }\n }"
(if) "if"
(parenthesized_expression) "(strcmp(argv[0], hist) == 0)"
(() "("
(binary_expression) "strcmp(argv[0], hist) == 0"
(call_expression) "strcmp(argv[0], hist)"
(identifier) "strcmp"
(argument_list) "(argv[0], hist)"
(() "("
(subscript_expression) "argv[0]"
(identifier) "argv"
([) "["
(number_literal) "0"
(]) "]"
(,) ","
(identifier) "hist"
()) ")"
(==) "=="
(number_literal) "0"
()) ")"
(compound_statement) "{\n nat_history(argv);\n }"
({) "{"
(expression_statement) "nat_history(argv);"
(call_expression) "nat_history(argv)"
(identifier) "nat_history"
(argument_list) "(argv)"
(() "("
(identifier) "argv"
()) ")"
(;) ";"
(}) "}"
(else_clause) "else if (strcmp(argv[0], cd) == 0) {\n if(argv[1] == NULL)\n chdir("/");\n else\n chdir(argv[1]);\n } else if (strcmp(argv[0], help_) == 0) {\n help();\n } else {\n //Execute any other command. Uses child process.\n pid_t pid = fork();\n if (pid == -1) {\n printf("ERORR on fork\n");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }\n }"
(else) "else"
(if_statement) "if (strcmp(argv[0], cd) == 0) {\n if(argv[1] == NULL)\n chdir("/");\n else\n chdir(argv[1]);\n } else if (strcmp(argv[0], help_) == 0) {\n help();\n } else {\n //Execute any other command. Uses child process.\n pid_t pid = fork();\n if (pid == -1) {\n printf("ERORR on fork\n");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }\n }"
(if) "if"
(parenthesized_expression) "(strcmp(argv[0], cd) == 0)"
(() "("
(binary_expression) "strcmp(argv[0], cd) == 0"
(call_expression) "strcmp(argv[0], cd)"
(identifier) "strcmp"
(argument_list) "(argv[0], cd)"
(() "("
(subscript_expression) "argv[0]"
(identifier) "argv"
([) "["
(number_literal) "0"
(]) "]"
(,) ","
(identifier) "cd"
()) ")"
(==) "=="
(number_literal) "0"
()) ")"
(compound_statement) "{\n if(argv[1] == NULL)\n chdir("/");\n else\n chdir(argv[1]);\n }"
({) "{"
(if_statement) "if(argv[1] == NULL)\n chdir("/");\n else\n chdir(argv[1]);"
(if) "if"
(parenthesized_expression) "(argv[1] == NULL)"
(() "("
(binary_expression) "argv[1] == NULL"
(subscript_expression) "argv[1]"
(identifier) "argv"
([) "["
(number_literal) "1"
(]) "]"
(==) "=="
(null) "NULL"
(NULL) "NULL"
()) ")"
(expression_statement) "chdir("/");"
(call_expression) "chdir("/")"
(identifier) "chdir"
(argument_list) "("/")"
(() "("
(string_literal) ""/""
(") """
(string_content) "/"
(") """
()) ")"
(;) ";"
(else_clause) "else\n chdir(argv[1]);"
(else) "else"
(expression_statement) "chdir(argv[1]);"
(call_expression) "chdir(argv[1])"
(identifier) "chdir"
(argument_list) "(argv[1])"
(() "("
(subscript_expression) "argv[1]"
(identifier) "argv"
([) "["
(number_literal) "1"
(]) "]"
()) ")"
(;) ";"
(}) "}"
(else_clause) "else if (strcmp(argv[0], help_) == 0) {\n help();\n } else {\n //Execute any other command. Uses child process.\n pid_t pid = fork();\n if (pid == -1) {\n printf("ERORR on fork\n");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }\n }"
(else) "else"
(if_statement) "if (strcmp(argv[0], help_) == 0) {\n help();\n } else {\n //Execute any other command. Uses child process.\n pid_t pid = fork();\n if (pid == -1) {\n printf("ERORR on fork\n");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }\n }"
(if) "if"
(parenthesized_expression) "(strcmp(argv[0], help_) == 0)"
(() "("
(binary_expression) "strcmp(argv[0], help_) == 0"
(call_expression) "strcmp(argv[0], help_)"
(identifier) "strcmp"
(argument_list) "(argv[0], help_)"
(() "("
(subscript_expression) "argv[0]"
(identifier) "argv"
([) "["
(number_literal) "0"
(]) "]"
(,) ","
(identifier) "help_"
()) ")"
(==) "=="
(number_literal) "0"
()) ")"
(compound_statement) "{\n help();\n }"
({) "{"
(expression_statement) "help();"
(call_expression) "help()"
(identifier) "help"
(argument_list) "()"
(() "("
()) ")"
(;) ";"
(}) "}"
(else_clause) "else {\n //Execute any other command. Uses child process.\n pid_t pid = fork();\n if (pid == -1) {\n printf("ERORR on fork\n");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }\n }"
(else) "else"
(compound_statement) "{\n //Execute any other command. Uses child process.\n pid_t pid = fork();\n if (pid == -1) {\n printf("ERORR on fork\n");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }\n }"
({) "{"
(comment) "//Execute any other command. Uses child process."
(declaration) "pid_t pid = fork();"
(type_identifier) "pid_t"
(init_declarator) "pid = fork()"
(identifier) "pid"
(=) "="
(call_expression) "fork()"
(identifier) "fork"
(argument_list) "()"
(() "("
()) ")"
(;) ";"
(if_statement) "if (pid == -1) {\n printf("ERORR on fork\n");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }"
(if) "if"
(parenthesized_expression) "(pid == -1)"
(() "("
(binary_expression) "pid == -1"
(identifier) "pid"
(==) "=="
(number_literal) "-1"
()) ")"
(compound_statement) "{\n printf("ERORR on fork\n");\n exit(EXIT_FAILURE);\n }"
({) "{"
(expression_statement) "printf("ERORR on fork\n");"
(call_expression) "printf("ERORR on fork\n")"
(identifier) "printf"
(argument_list) "("ERORR on fork\n")"
(() "("
(string_literal) ""ERORR on fork\n""
(") """
(string_content) "ERORR on fork"
(escape_sequence) "\n"
(") """
()) ")"
(;) ";"
(expression_statement) "exit(EXIT_FAILURE);"
(call_expression) "exit(EXIT_FAILURE)"
(identifier) "exit"
(argument_list) "(EXIT_FAILURE)"
(() "("
(identifier) "EXIT_FAILURE"
()) ")"
(;) ";"
(}) "}"
(else_clause) "else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }"
(else) "else"
(if_statement) "if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }"
(if) "if"
(parenthesized_expression) "(pid == 0)"
(() "("
(binary_expression) "pid == 0"
(identifier) "pid"
(==) "=="
(number_literal) "0"
()) ")"
(compound_statement) "{\n execvp(argv[0], argv);\n exit(0);\n }"
({) "{"
(expression_statement) "execvp(argv[0], argv);"
(call_expression) "execvp(argv[0], argv)"
(identifier) "execvp"
(argument_list) "(argv[0], argv)"
(() "("
(subscript_expression) "argv[0]"
(identifier) "argv"
([) "["
(number_literal) "0"
(]) "]"
(,) ","
(identifier) "argv"
()) ")"
(;) ";"
(expression_statement) "exit(0);"
(call_expression) "exit(0)"
(identifier) "exit"
(argument_list) "(0)"
(() "("
(number_literal) "0"
()) ")"
(;) ";"
(}) "}"
(else_clause) "else {\n while(waitpid(-1, NULL, 0) > 0);\n }"
(else) "else"
(compound_statement) "{\n while(waitpid(-1, NULL, 0) > 0);\n }"
({) "{"
(while_statement) "while(waitpid(-1, NULL, 0) > 0);"
(while) "while"
(parenthesized_expression) "(waitpid(-1, NULL, 0) > 0)"
(() "("
(binary_expression) "waitpid(-1, NULL, 0) > 0"
(call_expression) "waitpid(-1, NULL, 0)"
(identifier) "waitpid"
(argument_list) "(-1, NULL, 0)"
(() "("
(number_literal) "-1"
(,) ","
(null) "NULL"
(NULL) "NULL"
(,) ","
(number_literal) "0"
()) ")"
(>) ">"
(number_literal) "0"
()) ")"
(expression_statement) ";"
(;) ";"
(}) "}"
(}) "}"
(}) "}"
(}) "}"
(function_definition) "int main(int argc, char *argv[]){\n int valid = 0;\n char *line = (char*)malloc(DEFAULT_SIZE);\n for(int i = 0;i<DEFAULT_SIZE;i++)\n history[i] = (char*)malloc(DEFAULT_SIZE);\n long size;\n char *buf;\n char *ptr;\n bzero(argv, DEFAULT_SIZE); //Clear argument array\n while(1){\n printf("Shell->");\n read_line(line);\n parse_line(line,argv);\n execute(argv);\n for(int j = 0; j < argc;j++){\n argv[j] = NULL;\n }\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 int valid = 0;\n char *line = (char*)malloc(DEFAULT_SIZE);\n for(int i = 0;i<DEFAULT_SIZE;i++)\n history[i] = (char*)malloc(DEFAULT_SIZE);\n long size;\n char *buf;\n char *ptr;\n bzero(argv, DEFAULT_SIZE); //Clear argument array\n while(1){\n printf("Shell->");\n read_line(line);\n parse_line(line,argv);\n execute(argv);\n for(int j = 0; j < argc;j++){\n argv[j] = NULL;\n }\n }\n}"
({) "{"
(declaration) "int valid = 0;"
(primitive_type) "int"
(init_declarator) "valid = 0"
(identifier) "valid"
(=) "="
(number_literal) "0"
(;) ";"
(declaration) "char *line = (char*)malloc(DEFAULT_SIZE);"
(primitive_type) "char"
(init_declarator) "*line = (char*)malloc(DEFAULT_SIZE)"
(pointer_declarator) "*line"
(*) "*"
(identifier) "line"
(=) "="
(cast_expression) "(char*)malloc(DEFAULT_SIZE)"
(() "("
(type_descriptor) "char*"
(primitive_type) "char"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(call_expression) "malloc(DEFAULT_SIZE)"
(identifier) "malloc"
(argument_list) "(DEFAULT_SIZE)"
(() "("
(identifier) "DEFAULT_SIZE"
()) ")"
(;) ";"
(for_statement) "for(int i = 0;i<DEFAULT_SIZE;i++)\n history[i] = (char*)malloc(DEFAULT_SIZE);"
(for) "for"
(() "("
(declaration) "int i = 0;"
(primitive_type) "int"
(init_declarator) "i = 0"
(identifier) "i"
(=) "="
(number_literal) "0"
(;) ";"
(binary_expression) "i<DEFAULT_SIZE"
(identifier) "i"
(<) "<"
(identifier) "DEFAULT_SIZE"
(;) ";"
(update_expression) "i++"
(identifier) "i"
(++) "++"
()) ")"
(expression_statement) "history[i] = (char*)malloc(DEFAULT_SIZE);"
(assignment_expression) "history[i] = (char*)malloc(DEFAULT_SIZE)"
(subscript_expression) "history[i]"
(identifier) "history"
([) "["
(identifier) "i"
(]) "]"
(=) "="
(cast_expression) "(char*)malloc(DEFAULT_SIZE)"
(() "("
(type_descriptor) "char*"
(primitive_type) "char"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(call_expression) "malloc(DEFAULT_SIZE)"
(identifier) "malloc"
(argument_list) "(DEFAULT_SIZE)"
(() "("
(identifier) "DEFAULT_SIZE"
()) ")"
(;) ";"
(declaration) "long size;"
(sized_type_specifier) "long"
(long) "long"
(identifier) "size"
(;) ";"
(declaration) "char *buf;"
(primitive_type) "char"
(pointer_declarator) "*buf"
(*) "*"
(identifier) "buf"
(;) ";"
(declaration) "char *ptr;"
(primitive_type) "char"
(pointer_declarator) "*ptr"
(*) "*"
(identifier) "ptr"
(;) ";"
(expression_statement) "bzero(argv, DEFAULT_SIZE);"
(call_expression) "bzero(argv, DEFAULT_SIZE)"
(identifier) "bzero"
(argument_list) "(argv, DEFAULT_SIZE)"
(() "("
(identifier) "argv"
(,) ","
(identifier) "DEFAULT_SIZE"
()) ")"
(;) ";"
(comment) "//Clear argument array"
(while_statement) "while(1){\n printf("Shell->");\n read_line(line);\n parse_line(line,argv);\n execute(argv);\n for(int j = 0; j < argc;j++){\n argv[j] = NULL;\n }\n }"
(while) "while"
(parenthesized_expression) "(1)"
(() "("
(number_literal) "1"
()) ")"
(compound_statement) "{\n printf("Shell->");\n read_line(line);\n parse_line(line,argv);\n execute(argv);\n for(int j = 0; j < argc;j++){\n argv[j] = NULL;\n }\n }"
({) "{"
(expression_statement) "printf("Shell->");"
(call_expression) "printf("Shell->")"
(identifier) "printf"
(argument_list) "("Shell->")"
(() "("
(string_literal) ""Shell->""
(") """
(string_content) "Shell->"
(") """
()) ")"
(;) ";"
(expression_statement) "read_line(line);"
(call_expression) "read_line(line)"
(identifier) "read_line"
(argument_list) "(line)"
(() "("
(identifier) "line"
()) ")"
(;) ";"
(expression_statement) "parse_line(line,argv);"
(call_expression) "parse_line(line,argv)"
(identifier) "parse_line"
(argument_list) "(line,argv)"
(() "("
(identifier) "line"
(,) ","
(identifier) "argv"
()) ")"
(;) ";"
(expression_statement) "execute(argv);"
(call_expression) "execute(argv)"
(identifier) "execute"
(argument_list) "(argv)"
(() "("
(identifier) "argv"
()) ")"
(;) ";"
(for_statement) "for(int j = 0; j < argc;j++){\n argv[j] = NULL;\n }"
(for) "for"
(() "("
(declaration) "int j = 0;"
(primitive_type) "int"
(init_declarator) "j = 0"
(identifier) "j"
(=) "="
(number_literal) "0"
(;) ";"
(binary_expression) "j < argc"
(identifier) "j"
(<) "<"
(identifier) "argc"
(;) ";"
(update_expression) "j++"
(identifier) "j"
(++) "++"
()) ")"
(compound_statement) "{\n argv[j] = NULL;\n }"
({) "{"
(expression_statement) "argv[j] = NULL;"
(assignment_expression) "argv[j] = NULL"
(subscript_expression) "argv[j]"
(identifier) "argv"
([) "["
(identifier) "j"
(]) "]"
(=) "="
(null) "NULL"
(NULL) "NULL"
(;) ";"
(}) "}"
(}) "}"
(}) "}"
| 1,094
| 0
|
{"language": "c", "success": true, "metadata": {"lines": 113, "avg_line_length": 27.57, "nodes": 621, "errors": 0, "source_hash": "5325eb1239175e0e0a6d7b4bc9e3bcf83b9b1c143d519a85803f07cc03a95dde", "categorized_nodes": 406}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <sys/types.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": "<sys/types.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 22}}, {"id": 3, "type": "preproc_include", "text": "#include <sys/wait.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": "<sys/wait.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 21}}, {"id": 6, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [7, 8], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<stdio.h>", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 18}}, {"id": 9, "type": "preproc_include", "text": "#include <unistd.h>\n", "parent": null, "children": [10, 11], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<unistd.h>", "parent": 9, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 19}}, {"id": 12, "type": "preproc_include", "text": "#include <string.h>\n", "parent": null, "children": [13, 14], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<string.h>", "parent": 12, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 19}}, {"id": 15, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": null, "children": [16, 17], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 15, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 19}}, {"id": 18, "type": "preproc_def", "text": "#define TOKEN_DELIMETERS \" \\t\\r\\n\\a\"\n", "parent": null, "children": [19, 20, 21], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 19, "type": "#define", "text": "#define", "parent": 18, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 20, "type": "identifier", "text": "TOKEN_DELIMETERS", "parent": 18, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 24}}, {"id": 21, "type": "preproc_arg", "text": "\" \\t\\r\\n\\a\"", "parent": 18, "children": [], "start_point": {"row": 7, "column": 25}, "end_point": {"row": 7, "column": 36}}, {"id": 22, "type": "preproc_def", "text": "#define DEFAULT_SIZE 64\n", "parent": null, "children": [23, 24, 25], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 23, "type": "#define", "text": "#define", "parent": 22, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 24, "type": "identifier", "text": "DEFAULT_SIZE", "parent": 22, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 20}}, {"id": 25, "type": "preproc_arg", "text": "64", "parent": 22, "children": [], "start_point": {"row": 8, "column": 21}, "end_point": {"row": 8, "column": 23}}, {"id": 26, "type": "declaration", "text": "char *history[DEFAULT_SIZE];", "parent": null, "children": [27, 28], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 28}}, {"id": 27, "type": "primitive_type", "text": "char", "parent": 26, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 4}}, {"id": 28, "type": "pointer_declarator", "text": "*history[DEFAULT_SIZE]", "parent": 26, "children": [29, 30], "start_point": {"row": 10, "column": 5}, "end_point": {"row": 10, "column": 27}}, {"id": 29, "type": "*", "text": "*", "parent": 28, "children": [], "start_point": {"row": 10, "column": 5}, "end_point": {"row": 10, "column": 6}}, {"id": 30, "type": "array_declarator", "text": "history[DEFAULT_SIZE]", "parent": 28, "children": [31, 32], "start_point": {"row": 10, "column": 6}, "end_point": {"row": 10, "column": 27}}, {"id": 31, "type": "identifier", "text": "history", "parent": 30, "children": [], "start_point": {"row": 10, "column": 6}, "end_point": {"row": 10, "column": 13}}, {"id": 32, "type": "identifier", "text": "DEFAULT_SIZE", "parent": 30, "children": [], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 10, "column": 26}}, {"id": 33, "type": "declaration", "text": "char *argv[DEFAULT_SIZE];", "parent": null, "children": [34, 35], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 25}}, {"id": 34, "type": "primitive_type", "text": "char", "parent": 33, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 4}}, {"id": 35, "type": "pointer_declarator", "text": "*argv[DEFAULT_SIZE]", "parent": 33, "children": [36, 37], "start_point": {"row": 11, "column": 5}, "end_point": {"row": 11, "column": 24}}, {"id": 36, "type": "*", "text": "*", "parent": 35, "children": [], "start_point": {"row": 11, "column": 5}, "end_point": {"row": 11, "column": 6}}, {"id": 37, "type": "array_declarator", "text": "argv[DEFAULT_SIZE]", "parent": 35, "children": [38, 39], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 24}}, {"id": 38, "type": "identifier", "text": "argv", "parent": 37, "children": [], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 10}}, {"id": 39, "type": "identifier", "text": "DEFAULT_SIZE", "parent": 37, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 23}}, {"id": 40, "type": "declaration", "text": "int hist_count = 0;", "parent": null, "children": [41, 42], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 19}}, {"id": 41, "type": "primitive_type", "text": "int", "parent": 40, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 3}}, {"id": 42, "type": "init_declarator", "text": "hist_count = 0", "parent": 40, "children": [43, 44, 45], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 18}}, {"id": 43, "type": "identifier", "text": "hist_count", "parent": 42, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 14}}, {"id": 44, "type": "=", "text": "=", "parent": 42, "children": [], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 16}}, {"id": 45, "type": "number_literal", "text": "0", "parent": 42, "children": [], "start_point": {"row": 12, "column": 17}, "end_point": {"row": 12, "column": 18}}, {"id": 46, "type": "declaration", "text": "int hist_num = 0;", "parent": null, "children": [47, 48], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 17}}, {"id": 47, "type": "primitive_type", "text": "int", "parent": 46, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 3}}, {"id": 48, "type": "init_declarator", "text": "hist_num = 0", "parent": 46, "children": [49, 50, 51], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 16}}, {"id": 49, "type": "identifier", "text": "hist_num", "parent": 48, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 12}}, {"id": 50, "type": "=", "text": "=", "parent": 48, "children": [], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 14}}, {"id": 51, "type": "number_literal", "text": "0", "parent": 48, "children": [], "start_point": {"row": 13, "column": 15}, "end_point": {"row": 13, "column": 16}}, {"id": 52, "type": "declaration", "text": "int position = 0;", "parent": null, "children": [53, 54], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 17}}, {"id": 53, "type": "primitive_type", "text": "int", "parent": 52, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 3}}, {"id": 54, "type": "init_declarator", "text": "position = 0", "parent": 52, "children": [55, 56, 57], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 16}}, {"id": 55, "type": "identifier", "text": "position", "parent": 54, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 12}}, {"id": 56, "type": "=", "text": "=", "parent": 54, "children": [], "start_point": {"row": 14, "column": 13}, "end_point": {"row": 14, "column": 14}}, {"id": 57, "type": "number_literal", "text": "0", "parent": 54, "children": [], "start_point": {"row": 14, "column": 15}, "end_point": {"row": 14, "column": 16}}, {"id": 58, "type": "declaration", "text": "short isHistNum = 0;", "parent": null, "children": [59, 61], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 20}}, {"id": 59, "type": "sized_type_specifier", "text": "short", "parent": 58, "children": [60], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 5}}, {"id": 60, "type": "short", "text": "short", "parent": 59, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 5}}, {"id": 61, "type": "init_declarator", "text": "isHistNum = 0", "parent": 58, "children": [62, 63, 64], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 19}}, {"id": 62, "type": "identifier", "text": "isHistNum", "parent": 61, "children": [], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 15}}, {"id": 63, "type": "=", "text": "=", "parent": 61, "children": [], "start_point": {"row": 15, "column": 16}, "end_point": {"row": 15, "column": 17}}, {"id": 64, "type": "number_literal", "text": "0", "parent": 61, "children": [], "start_point": {"row": 15, "column": 18}, "end_point": {"row": 15, "column": 19}}, {"id": 65, "type": "function_definition", "text": "void read_line(char *line){\n if(isHistNum){\n line = memcpy(line,history[hist_num-1],DEFAULT_SIZE);\n printf(\"\\n\");\n }\n else{\n gets(line);\n }\n isHistNum = 0;\n memcpy(history[hist_count],line,DEFAULT_SIZE);\n hist_count++;\n}", "parent": null, "children": [66, 67], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 28, "column": 1}}, {"id": 66, "type": "primitive_type", "text": "void", "parent": 65, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 4}}, {"id": 67, "type": "function_declarator", "text": "read_line(char *line)", "parent": 65, "children": [68, 69], "start_point": {"row": 17, "column": 5}, "end_point": {"row": 17, "column": 26}}, {"id": 68, "type": "identifier", "text": "read_line", "parent": 67, "children": [], "start_point": {"row": 17, "column": 5}, "end_point": {"row": 17, "column": 14}}, {"id": 69, "type": "parameter_list", "text": "(char *line)", "parent": 67, "children": [70], "start_point": {"row": 17, "column": 14}, "end_point": {"row": 17, "column": 26}}, {"id": 70, "type": "parameter_declaration", "text": "char *line", "parent": 69, "children": [71, 72], "start_point": {"row": 17, "column": 15}, "end_point": {"row": 17, "column": 25}}, {"id": 71, "type": "primitive_type", "text": "char", "parent": 70, "children": [], "start_point": {"row": 17, "column": 15}, "end_point": {"row": 17, "column": 19}}, {"id": 72, "type": "pointer_declarator", "text": "*line", "parent": 70, "children": [73, 74], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 25}}, {"id": 73, "type": "*", "text": "*", "parent": 72, "children": [], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 21}}, {"id": 74, "type": "identifier", "text": "line", "parent": 72, "children": [], "start_point": {"row": 17, "column": 21}, "end_point": {"row": 17, "column": 25}}, {"id": 75, "type": "if_statement", "text": "if(isHistNum){\n line = memcpy(line,history[hist_num-1],DEFAULT_SIZE);\n printf(\"\\n\");\n }\n else{\n gets(line);\n }", "parent": 65, "children": [76, 97], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 24, "column": 5}}, {"id": 76, "type": "parenthesized_expression", "text": "(isHistNum)", "parent": 75, "children": [77], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 17}}, {"id": 77, "type": "identifier", "text": "isHistNum", "parent": 76, "children": [], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 16}}, {"id": 78, "type": "assignment_expression", "text": "line = memcpy(line,history[hist_num-1],DEFAULT_SIZE)", "parent": 75, "children": [79, 80, 81], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 60}}, {"id": 79, "type": "identifier", "text": "line", "parent": 78, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 12}}, {"id": 80, "type": "=", "text": "=", "parent": 78, "children": [], "start_point": {"row": 19, "column": 13}, "end_point": {"row": 19, "column": 14}}, {"id": 81, "type": "call_expression", "text": "memcpy(line,history[hist_num-1],DEFAULT_SIZE)", "parent": 78, "children": [82, 83], "start_point": {"row": 19, "column": 15}, "end_point": {"row": 19, "column": 60}}, {"id": 82, "type": "identifier", "text": "memcpy", "parent": 81, "children": [], "start_point": {"row": 19, "column": 15}, "end_point": {"row": 19, "column": 21}}, {"id": 83, "type": "argument_list", "text": "(line,history[hist_num-1],DEFAULT_SIZE)", "parent": 81, "children": [84, 85, 91], "start_point": {"row": 19, "column": 21}, "end_point": {"row": 19, "column": 60}}, {"id": 84, "type": "identifier", "text": "line", "parent": 83, "children": [], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 26}}, {"id": 85, "type": "subscript_expression", "text": "history[hist_num-1]", "parent": 83, "children": [86, 87], "start_point": {"row": 19, "column": 27}, "end_point": {"row": 19, "column": 46}}, {"id": 86, "type": "identifier", "text": "history", "parent": 85, "children": [], "start_point": {"row": 19, "column": 27}, "end_point": {"row": 19, "column": 34}}, {"id": 87, "type": "binary_expression", "text": "hist_num-1", "parent": 85, "children": [88, 89, 90], "start_point": {"row": 19, "column": 35}, "end_point": {"row": 19, "column": 45}}, {"id": 88, "type": "identifier", "text": "hist_num", "parent": 87, "children": [], "start_point": {"row": 19, "column": 35}, "end_point": {"row": 19, "column": 43}}, {"id": 89, "type": "-", "text": "-", "parent": 87, "children": [], "start_point": {"row": 19, "column": 43}, "end_point": {"row": 19, "column": 44}}, {"id": 90, "type": "number_literal", "text": "1", "parent": 87, "children": [], "start_point": {"row": 19, "column": 44}, "end_point": {"row": 19, "column": 45}}, {"id": 91, "type": "identifier", "text": "DEFAULT_SIZE", "parent": 83, "children": [], "start_point": {"row": 19, "column": 47}, "end_point": {"row": 19, "column": 59}}, {"id": 92, "type": "call_expression", "text": "printf(\"\\n\")", "parent": 75, "children": [93, 94], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 20}}, {"id": 93, "type": "identifier", "text": "printf", "parent": 92, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 14}}, {"id": 94, "type": "argument_list", "text": "(\"\\n\")", "parent": 92, "children": [95], "start_point": {"row": 20, "column": 14}, "end_point": {"row": 20, "column": 20}}, {"id": 95, "type": "string_literal", "text": "\"\\n\"", "parent": 94, "children": [96], "start_point": {"row": 20, "column": 15}, "end_point": {"row": 20, "column": 19}}, {"id": 96, "type": "escape_sequence", "text": "\\n", "parent": 95, "children": [], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 18}}, {"id": 97, "type": "else_clause", "text": "else{\n gets(line);\n }", "parent": 75, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 24, "column": 5}}, {"id": 98, "type": "call_expression", "text": "gets(line)", "parent": 97, "children": [99, 100], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 18}}, {"id": 99, "type": "identifier", "text": "gets", "parent": 98, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 12}}, {"id": 100, "type": "argument_list", "text": "(line)", "parent": 98, "children": [101], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 18}}, {"id": 101, "type": "identifier", "text": "line", "parent": 100, "children": [], "start_point": {"row": 23, "column": 13}, "end_point": {"row": 23, "column": 17}}, {"id": 102, "type": "assignment_expression", "text": "isHistNum = 0", "parent": 65, "children": [103, 104, 105], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 17}}, {"id": 103, "type": "identifier", "text": "isHistNum", "parent": 102, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 13}}, {"id": 104, "type": "=", "text": "=", "parent": 102, "children": [], "start_point": {"row": 25, "column": 14}, "end_point": {"row": 25, "column": 15}}, {"id": 105, "type": "number_literal", "text": "0", "parent": 102, "children": [], "start_point": {"row": 25, "column": 16}, "end_point": {"row": 25, "column": 17}}, {"id": 106, "type": "call_expression", "text": "memcpy(history[hist_count],line,DEFAULT_SIZE)", "parent": 65, "children": [107, 108], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 49}}, {"id": 107, "type": "identifier", "text": "memcpy", "parent": 106, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 10}}, {"id": 108, "type": "argument_list", "text": "(history[hist_count],line,DEFAULT_SIZE)", "parent": 106, "children": [109, 112, 113], "start_point": {"row": 26, "column": 10}, "end_point": {"row": 26, "column": 49}}, {"id": 109, "type": "subscript_expression", "text": "history[hist_count]", "parent": 108, "children": [110, 111], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 30}}, {"id": 110, "type": "identifier", "text": "history", "parent": 109, "children": [], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 18}}, {"id": 111, "type": "identifier", "text": "hist_count", "parent": 109, "children": [], "start_point": {"row": 26, "column": 19}, "end_point": {"row": 26, "column": 29}}, {"id": 112, "type": "identifier", "text": "line", "parent": 108, "children": [], "start_point": {"row": 26, "column": 31}, "end_point": {"row": 26, "column": 35}}, {"id": 113, "type": "identifier", "text": "DEFAULT_SIZE", "parent": 108, "children": [], "start_point": {"row": 26, "column": 36}, "end_point": {"row": 26, "column": 48}}, {"id": 114, "type": "update_expression", "text": "hist_count++", "parent": 65, "children": [115, 116], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 16}}, {"id": 115, "type": "identifier", "text": "hist_count", "parent": 114, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 14}}, {"id": 116, "type": "++", "text": "++", "parent": 114, "children": [], "start_point": {"row": 27, "column": 14}, "end_point": {"row": 27, "column": 16}}, {"id": 117, "type": "function_definition", "text": "void parse_line(char *line,char *argv[]){\n char *token;\n position = 0;\n token = strtok(line,TOKEN_DELIMETERS);\n while(token!=NULL){\n argv[position] = token;\n position++;\n token =strtok(NULL,TOKEN_DELIMETERS);\n }\n}", "parent": null, "children": [118, 119], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 39, "column": 1}}, {"id": 118, "type": "primitive_type", "text": "void", "parent": 117, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 4}}, {"id": 119, "type": "function_declarator", "text": "parse_line(char *line,char *argv[])", "parent": 117, "children": [120, 121], "start_point": {"row": 30, "column": 5}, "end_point": {"row": 30, "column": 40}}, {"id": 120, "type": "identifier", "text": "parse_line", "parent": 119, "children": [], "start_point": {"row": 30, "column": 5}, "end_point": {"row": 30, "column": 15}}, {"id": 121, "type": "parameter_list", "text": "(char *line,char *argv[])", "parent": 119, "children": [122, 127], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 30, "column": 40}}, {"id": 122, "type": "parameter_declaration", "text": "char *line", "parent": 121, "children": [123, 124], "start_point": {"row": 30, "column": 16}, "end_point": {"row": 30, "column": 26}}, {"id": 123, "type": "primitive_type", "text": "char", "parent": 122, "children": [], "start_point": {"row": 30, "column": 16}, "end_point": {"row": 30, "column": 20}}, {"id": 124, "type": "pointer_declarator", "text": "*line", "parent": 122, "children": [125, 126], "start_point": {"row": 30, "column": 21}, "end_point": {"row": 30, "column": 26}}, {"id": 125, "type": "*", "text": "*", "parent": 124, "children": [], "start_point": {"row": 30, "column": 21}, "end_point": {"row": 30, "column": 22}}, {"id": 126, "type": "identifier", "text": "line", "parent": 124, "children": [], "start_point": {"row": 30, "column": 22}, "end_point": {"row": 30, "column": 26}}, {"id": 127, "type": "parameter_declaration", "text": "char *argv[]", "parent": 121, "children": [128, 129], "start_point": {"row": 30, "column": 27}, "end_point": {"row": 30, "column": 39}}, {"id": 128, "type": "primitive_type", "text": "char", "parent": 127, "children": [], "start_point": {"row": 30, "column": 27}, "end_point": {"row": 30, "column": 31}}, {"id": 129, "type": "pointer_declarator", "text": "*argv[]", "parent": 127, "children": [130, 131], "start_point": {"row": 30, "column": 32}, "end_point": {"row": 30, "column": 39}}, {"id": 130, "type": "*", "text": "*", "parent": 129, "children": [], "start_point": {"row": 30, "column": 32}, "end_point": {"row": 30, "column": 33}}, {"id": 131, "type": "array_declarator", "text": "argv[]", "parent": 129, "children": [132], "start_point": {"row": 30, "column": 33}, "end_point": {"row": 30, "column": 39}}, {"id": 132, "type": "identifier", "text": "argv", "parent": 131, "children": [], "start_point": {"row": 30, "column": 33}, "end_point": {"row": 30, "column": 37}}, {"id": 133, "type": "declaration", "text": "char *token;", "parent": 117, "children": [134, 135], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 16}}, {"id": 134, "type": "primitive_type", "text": "char", "parent": 133, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 8}}, {"id": 135, "type": "pointer_declarator", "text": "*token", "parent": 133, "children": [136, 137], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 15}}, {"id": 136, "type": "*", "text": "*", "parent": 135, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 10}}, {"id": 137, "type": "identifier", "text": "token", "parent": 135, "children": [], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 31, "column": 15}}, {"id": 138, "type": "assignment_expression", "text": "position = 0", "parent": 117, "children": [139, 140, 141], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 16}}, {"id": 139, "type": "identifier", "text": "position", "parent": 138, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 12}}, {"id": 140, "type": "=", "text": "=", "parent": 138, "children": [], "start_point": {"row": 32, "column": 13}, "end_point": {"row": 32, "column": 14}}, {"id": 141, "type": "number_literal", "text": "0", "parent": 138, "children": [], "start_point": {"row": 32, "column": 15}, "end_point": {"row": 32, "column": 16}}, {"id": 142, "type": "assignment_expression", "text": "token = strtok(line,TOKEN_DELIMETERS)", "parent": 117, "children": [143, 144, 145], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 41}}, {"id": 143, "type": "identifier", "text": "token", "parent": 142, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 9}}, {"id": 144, "type": "=", "text": "=", "parent": 142, "children": [], "start_point": {"row": 33, "column": 10}, "end_point": {"row": 33, "column": 11}}, {"id": 145, "type": "call_expression", "text": "strtok(line,TOKEN_DELIMETERS)", "parent": 142, "children": [146, 147], "start_point": {"row": 33, "column": 12}, "end_point": {"row": 33, "column": 41}}, {"id": 146, "type": "identifier", "text": "strtok", "parent": 145, "children": [], "start_point": {"row": 33, "column": 12}, "end_point": {"row": 33, "column": 18}}, {"id": 147, "type": "argument_list", "text": "(line,TOKEN_DELIMETERS)", "parent": 145, "children": [148, 149], "start_point": {"row": 33, "column": 18}, "end_point": {"row": 33, "column": 41}}, {"id": 148, "type": "identifier", "text": "line", "parent": 147, "children": [], "start_point": {"row": 33, "column": 19}, "end_point": {"row": 33, "column": 23}}, {"id": 149, "type": "identifier", "text": "TOKEN_DELIMETERS", "parent": 147, "children": [], "start_point": {"row": 33, "column": 24}, "end_point": {"row": 33, "column": 40}}, {"id": 150, "type": "while_statement", "text": "while(token!=NULL){\n argv[position] = token;\n position++;\n token =strtok(NULL,TOKEN_DELIMETERS);\n }", "parent": 117, "children": [151], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 38, "column": 5}}, {"id": 151, "type": "parenthesized_expression", "text": "(token!=NULL)", "parent": 150, "children": [152], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 22}}, {"id": 152, "type": "binary_expression", "text": "token!=NULL", "parent": 151, "children": [153, 154, 155], "start_point": {"row": 34, "column": 10}, "end_point": {"row": 34, "column": 21}}, {"id": 153, "type": "identifier", "text": "token", "parent": 152, "children": [], "start_point": {"row": 34, "column": 10}, "end_point": {"row": 34, "column": 15}}, {"id": 154, "type": "!=", "text": "!=", "parent": 152, "children": [], "start_point": {"row": 34, "column": 15}, "end_point": {"row": 34, "column": 17}}, {"id": 155, "type": "null", "text": "NULL", "parent": 152, "children": [156], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 21}}, {"id": 156, "type": "NULL", "text": "NULL", "parent": 155, "children": [], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 21}}, {"id": 157, "type": "assignment_expression", "text": "argv[position] = token", "parent": 150, "children": [158, 161, 162], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 30}}, {"id": 158, "type": "subscript_expression", "text": "argv[position]", "parent": 157, "children": [159, 160], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 22}}, {"id": 159, "type": "identifier", "text": "argv", "parent": 158, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 12}}, {"id": 160, "type": "identifier", "text": "position", "parent": 158, "children": [], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 21}}, {"id": 161, "type": "=", "text": "=", "parent": 157, "children": [], "start_point": {"row": 35, "column": 23}, "end_point": {"row": 35, "column": 24}}, {"id": 162, "type": "identifier", "text": "token", "parent": 157, "children": [], "start_point": {"row": 35, "column": 25}, "end_point": {"row": 35, "column": 30}}, {"id": 163, "type": "update_expression", "text": "position++", "parent": 150, "children": [164, 165], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 18}}, {"id": 164, "type": "identifier", "text": "position", "parent": 163, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 16}}, {"id": 165, "type": "++", "text": "++", "parent": 163, "children": [], "start_point": {"row": 36, "column": 16}, "end_point": {"row": 36, "column": 18}}, {"id": 166, "type": "assignment_expression", "text": "token =strtok(NULL,TOKEN_DELIMETERS)", "parent": 150, "children": [167, 168, 169], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 44}}, {"id": 167, "type": "identifier", "text": "token", "parent": 166, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 13}}, {"id": 168, "type": "=", "text": "=", "parent": 166, "children": [], "start_point": {"row": 37, "column": 14}, "end_point": {"row": 37, "column": 15}}, {"id": 169, "type": "call_expression", "text": "strtok(NULL,TOKEN_DELIMETERS)", "parent": 166, "children": [170, 171], "start_point": {"row": 37, "column": 15}, "end_point": {"row": 37, "column": 44}}, {"id": 170, "type": "identifier", "text": "strtok", "parent": 169, "children": [], "start_point": {"row": 37, "column": 15}, "end_point": {"row": 37, "column": 21}}, {"id": 171, "type": "argument_list", "text": "(NULL,TOKEN_DELIMETERS)", "parent": 169, "children": [172, 174], "start_point": {"row": 37, "column": 21}, "end_point": {"row": 37, "column": 44}}, {"id": 172, "type": "null", "text": "NULL", "parent": 171, "children": [173], "start_point": {"row": 37, "column": 22}, "end_point": {"row": 37, "column": 26}}, {"id": 173, "type": "NULL", "text": "NULL", "parent": 172, "children": [], "start_point": {"row": 37, "column": 22}, "end_point": {"row": 37, "column": 26}}, {"id": 174, "type": "identifier", "text": "TOKEN_DELIMETERS", "parent": 171, "children": [], "start_point": {"row": 37, "column": 27}, "end_point": {"row": 37, "column": 43}}, {"id": 175, "type": "function_definition", "text": "int nat_history(char *argv[]){\n if(position==2){\n hist_num = atoi(argv[1]);\n for(int k = 1; k<=hist_count;k++){\n if(hist_num == k){\n isHistNum = 1;\n }\n }\n }\n if(isHistNum==0){\n for(int i =0; i <hist_count;i++)\n printf(\" %d %s\\n\",(i+1),history[i]);\n }\n return 1;\n}", "parent": null, "children": [176, 177], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 55, "column": 1}}, {"id": 176, "type": "primitive_type", "text": "int", "parent": 175, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 3}}, {"id": 177, "type": "function_declarator", "text": "nat_history(char *argv[])", "parent": 175, "children": [178, 179], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 29}}, {"id": 178, "type": "identifier", "text": "nat_history", "parent": 177, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 15}}, {"id": 179, "type": "parameter_list", "text": "(char *argv[])", "parent": 177, "children": [180], "start_point": {"row": 41, "column": 15}, "end_point": {"row": 41, "column": 29}}, {"id": 180, "type": "parameter_declaration", "text": "char *argv[]", "parent": 179, "children": [181, 182], "start_point": {"row": 41, "column": 16}, "end_point": {"row": 41, "column": 28}}, {"id": 181, "type": "primitive_type", "text": "char", "parent": 180, "children": [], "start_point": {"row": 41, "column": 16}, "end_point": {"row": 41, "column": 20}}, {"id": 182, "type": "pointer_declarator", "text": "*argv[]", "parent": 180, "children": [183, 184], "start_point": {"row": 41, "column": 21}, "end_point": {"row": 41, "column": 28}}, {"id": 183, "type": "*", "text": "*", "parent": 182, "children": [], "start_point": {"row": 41, "column": 21}, "end_point": {"row": 41, "column": 22}}, {"id": 184, "type": "array_declarator", "text": "argv[]", "parent": 182, "children": [185], "start_point": {"row": 41, "column": 22}, "end_point": {"row": 41, "column": 28}}, {"id": 185, "type": "identifier", "text": "argv", "parent": 184, "children": [], "start_point": {"row": 41, "column": 22}, "end_point": {"row": 41, "column": 26}}, {"id": 186, "type": "if_statement", "text": "if(position==2){\n hist_num = atoi(argv[1]);\n for(int k = 1; k<=hist_count;k++){\n if(hist_num == k){\n isHistNum = 1;\n }\n }\n }", "parent": 175, "children": [187], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 49, "column": 5}}, {"id": 187, "type": "parenthesized_expression", "text": "(position==2)", "parent": 186, "children": [188], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 19}}, {"id": 188, "type": "binary_expression", "text": "position==2", "parent": 187, "children": [189, 190, 191], "start_point": {"row": 42, "column": 7}, "end_point": {"row": 42, "column": 18}}, {"id": 189, "type": "identifier", "text": "position", "parent": 188, "children": [], "start_point": {"row": 42, "column": 7}, "end_point": {"row": 42, "column": 15}}, {"id": 190, "type": "==", "text": "==", "parent": 188, "children": [], "start_point": {"row": 42, "column": 15}, "end_point": {"row": 42, "column": 17}}, {"id": 191, "type": "number_literal", "text": "2", "parent": 188, "children": [], "start_point": {"row": 42, "column": 17}, "end_point": {"row": 42, "column": 18}}, {"id": 192, "type": "assignment_expression", "text": "hist_num = atoi(argv[1])", "parent": 186, "children": [193, 194, 195], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 32}}, {"id": 193, "type": "identifier", "text": "hist_num", "parent": 192, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 16}}, {"id": 194, "type": "=", "text": "=", "parent": 192, "children": [], "start_point": {"row": 43, "column": 17}, "end_point": {"row": 43, "column": 18}}, {"id": 195, "type": "call_expression", "text": "atoi(argv[1])", "parent": 192, "children": [196, 197], "start_point": {"row": 43, "column": 19}, "end_point": {"row": 43, "column": 32}}, {"id": 196, "type": "identifier", "text": "atoi", "parent": 195, "children": [], "start_point": {"row": 43, "column": 19}, "end_point": {"row": 43, "column": 23}}, {"id": 197, "type": "argument_list", "text": "(argv[1])", "parent": 195, "children": [198], "start_point": {"row": 43, "column": 23}, "end_point": {"row": 43, "column": 32}}, {"id": 198, "type": "subscript_expression", "text": "argv[1]", "parent": 197, "children": [199, 200], "start_point": {"row": 43, "column": 24}, "end_point": {"row": 43, "column": 31}}, {"id": 199, "type": "identifier", "text": "argv", "parent": 198, "children": [], "start_point": {"row": 43, "column": 24}, "end_point": {"row": 43, "column": 28}}, {"id": 200, "type": "number_literal", "text": "1", "parent": 198, "children": [], "start_point": {"row": 43, "column": 29}, "end_point": {"row": 43, "column": 30}}, {"id": 201, "type": "for_statement", "text": "for(int k = 1; k<=hist_count;k++){\n if(hist_num == k){\n isHistNum = 1;\n }\n }", "parent": 186, "children": [202, 208, 212], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 48, "column": 9}}, {"id": 202, "type": "declaration", "text": "int k = 1;", "parent": 201, "children": [203, 204], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 22}}, {"id": 203, "type": "primitive_type", "text": "int", "parent": 202, "children": [], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 15}}, {"id": 204, "type": "init_declarator", "text": "k = 1", "parent": 202, "children": [205, 206, 207], "start_point": {"row": 44, "column": 16}, "end_point": {"row": 44, "column": 21}}, {"id": 205, "type": "identifier", "text": "k", "parent": 204, "children": [], "start_point": {"row": 44, "column": 16}, "end_point": {"row": 44, "column": 17}}, {"id": 206, "type": "=", "text": "=", "parent": 204, "children": [], "start_point": {"row": 44, "column": 18}, "end_point": {"row": 44, "column": 19}}, {"id": 207, "type": "number_literal", "text": "1", "parent": 204, "children": [], "start_point": {"row": 44, "column": 20}, "end_point": {"row": 44, "column": 21}}, {"id": 208, "type": "binary_expression", "text": "k<=hist_count", "parent": 201, "children": [209, 210, 211], "start_point": {"row": 44, "column": 23}, "end_point": {"row": 44, "column": 36}}, {"id": 209, "type": "identifier", "text": "k", "parent": 208, "children": [], "start_point": {"row": 44, "column": 23}, "end_point": {"row": 44, "column": 24}}, {"id": 210, "type": "<=", "text": "<=", "parent": 208, "children": [], "start_point": {"row": 44, "column": 24}, "end_point": {"row": 44, "column": 26}}, {"id": 211, "type": "identifier", "text": "hist_count", "parent": 208, "children": [], "start_point": {"row": 44, "column": 26}, "end_point": {"row": 44, "column": 36}}, {"id": 212, "type": "update_expression", "text": "k++", "parent": 201, "children": [213, 214], "start_point": {"row": 44, "column": 37}, "end_point": {"row": 44, "column": 40}}, {"id": 213, "type": "identifier", "text": "k", "parent": 212, "children": [], "start_point": {"row": 44, "column": 37}, "end_point": {"row": 44, "column": 38}}, {"id": 214, "type": "++", "text": "++", "parent": 212, "children": [], "start_point": {"row": 44, "column": 38}, "end_point": {"row": 44, "column": 40}}, {"id": 215, "type": "if_statement", "text": "if(hist_num == k){\n isHistNum = 1;\n }", "parent": 201, "children": [216], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 47, "column": 13}}, {"id": 216, "type": "parenthesized_expression", "text": "(hist_num == k)", "parent": 215, "children": [217], "start_point": {"row": 45, "column": 14}, "end_point": {"row": 45, "column": 29}}, {"id": 217, "type": "binary_expression", "text": "hist_num == k", "parent": 216, "children": [218, 219, 220], "start_point": {"row": 45, "column": 15}, "end_point": {"row": 45, "column": 28}}, {"id": 218, "type": "identifier", "text": "hist_num", "parent": 217, "children": [], "start_point": {"row": 45, "column": 15}, "end_point": {"row": 45, "column": 23}}, {"id": 219, "type": "==", "text": "==", "parent": 217, "children": [], "start_point": {"row": 45, "column": 24}, "end_point": {"row": 45, "column": 26}}, {"id": 220, "type": "identifier", "text": "k", "parent": 217, "children": [], "start_point": {"row": 45, "column": 27}, "end_point": {"row": 45, "column": 28}}, {"id": 221, "type": "assignment_expression", "text": "isHistNum = 1", "parent": 215, "children": [222, 223, 224], "start_point": {"row": 46, "column": 16}, "end_point": {"row": 46, "column": 29}}, {"id": 222, "type": "identifier", "text": "isHistNum", "parent": 221, "children": [], "start_point": {"row": 46, "column": 16}, "end_point": {"row": 46, "column": 25}}, {"id": 223, "type": "=", "text": "=", "parent": 221, "children": [], "start_point": {"row": 46, "column": 26}, "end_point": {"row": 46, "column": 27}}, {"id": 224, "type": "number_literal", "text": "1", "parent": 221, "children": [], "start_point": {"row": 46, "column": 28}, "end_point": {"row": 46, "column": 29}}, {"id": 225, "type": "if_statement", "text": "if(isHistNum==0){\n for(int i =0; i <hist_count;i++)\n printf(\" %d %s\\n\",(i+1),history[i]);\n }", "parent": 175, "children": [226], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 53, "column": 5}}, {"id": 226, "type": "parenthesized_expression", "text": "(isHistNum==0)", "parent": 225, "children": [227], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 20}}, {"id": 227, "type": "binary_expression", "text": "isHistNum==0", "parent": 226, "children": [228, 229, 230], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 19}}, {"id": 228, "type": "identifier", "text": "isHistNum", "parent": 227, "children": [], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 16}}, {"id": 229, "type": "==", "text": "==", "parent": 227, "children": [], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 18}}, {"id": 230, "type": "number_literal", "text": "0", "parent": 227, "children": [], "start_point": {"row": 50, "column": 18}, "end_point": {"row": 50, "column": 19}}, {"id": 231, "type": "for_statement", "text": "for(int i =0; i <hist_count;i++)\n printf(\" %d %s\\n\",(i+1),history[i]);", "parent": 225, "children": [232, 238, 242], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 52, "column": 48}}, {"id": 232, "type": "declaration", "text": "int i =0;", "parent": 231, "children": [233, 234], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 21}}, {"id": 233, "type": "primitive_type", "text": "int", "parent": 232, "children": [], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 15}}, {"id": 234, "type": "init_declarator", "text": "i =0", "parent": 232, "children": [235, 236, 237], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 20}}, {"id": 235, "type": "identifier", "text": "i", "parent": 234, "children": [], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 17}}, {"id": 236, "type": "=", "text": "=", "parent": 234, "children": [], "start_point": {"row": 51, "column": 18}, "end_point": {"row": 51, "column": 19}}, {"id": 237, "type": "number_literal", "text": "0", "parent": 234, "children": [], "start_point": {"row": 51, "column": 19}, "end_point": {"row": 51, "column": 20}}, {"id": 238, "type": "binary_expression", "text": "i <hist_count", "parent": 231, "children": [239, 240, 241], "start_point": {"row": 51, "column": 22}, "end_point": {"row": 51, "column": 35}}, {"id": 239, "type": "identifier", "text": "i", "parent": 238, "children": [], "start_point": {"row": 51, "column": 22}, "end_point": {"row": 51, "column": 23}}, {"id": 240, "type": "<", "text": "<", "parent": 238, "children": [], "start_point": {"row": 51, "column": 24}, "end_point": {"row": 51, "column": 25}}, {"id": 241, "type": "identifier", "text": "hist_count", "parent": 238, "children": [], "start_point": {"row": 51, "column": 25}, "end_point": {"row": 51, "column": 35}}, {"id": 242, "type": "update_expression", "text": "i++", "parent": 231, "children": [243, 244], "start_point": {"row": 51, "column": 36}, "end_point": {"row": 51, "column": 39}}, {"id": 243, "type": "identifier", "text": "i", "parent": 242, "children": [], "start_point": {"row": 51, "column": 36}, "end_point": {"row": 51, "column": 37}}, {"id": 244, "type": "++", "text": "++", "parent": 242, "children": [], "start_point": {"row": 51, "column": 37}, "end_point": {"row": 51, "column": 39}}, {"id": 245, "type": "call_expression", "text": "printf(\" %d %s\\n\",(i+1),history[i])", "parent": 231, "children": [246, 247], "start_point": {"row": 52, "column": 12}, "end_point": {"row": 52, "column": 47}}, {"id": 246, "type": "identifier", "text": "printf", "parent": 245, "children": [], "start_point": {"row": 52, "column": 12}, "end_point": {"row": 52, "column": 18}}, {"id": 247, "type": "argument_list", "text": "(\" %d %s\\n\",(i+1),history[i])", "parent": 245, "children": [248, 250, 255], "start_point": {"row": 52, "column": 18}, "end_point": {"row": 52, "column": 47}}, {"id": 248, "type": "string_literal", "text": "\" %d %s\\n\"", "parent": 247, "children": [249], "start_point": {"row": 52, "column": 19}, "end_point": {"row": 52, "column": 29}}, {"id": 249, "type": "escape_sequence", "text": "\\n", "parent": 248, "children": [], "start_point": {"row": 52, "column": 26}, "end_point": {"row": 52, "column": 28}}, {"id": 250, "type": "parenthesized_expression", "text": "(i+1)", "parent": 247, "children": [251], "start_point": {"row": 52, "column": 30}, "end_point": {"row": 52, "column": 35}}, {"id": 251, "type": "binary_expression", "text": "i+1", "parent": 250, "children": [252, 253, 254], "start_point": {"row": 52, "column": 31}, "end_point": {"row": 52, "column": 34}}, {"id": 252, "type": "identifier", "text": "i", "parent": 251, "children": [], "start_point": {"row": 52, "column": 31}, "end_point": {"row": 52, "column": 32}}, {"id": 253, "type": "+", "text": "+", "parent": 251, "children": [], "start_point": {"row": 52, "column": 32}, "end_point": {"row": 52, "column": 33}}, {"id": 254, "type": "number_literal", "text": "1", "parent": 251, "children": [], "start_point": {"row": 52, "column": 33}, "end_point": {"row": 52, "column": 34}}, {"id": 255, "type": "subscript_expression", "text": "history[i]", "parent": 247, "children": [256, 257], "start_point": {"row": 52, "column": 36}, "end_point": {"row": 52, "column": 46}}, {"id": 256, "type": "identifier", "text": "history", "parent": 255, "children": [], "start_point": {"row": 52, "column": 36}, "end_point": {"row": 52, "column": 43}}, {"id": 257, "type": "identifier", "text": "i", "parent": 255, "children": [], "start_point": {"row": 52, "column": 44}, "end_point": {"row": 52, "column": 45}}, {"id": 258, "type": "return_statement", "text": "return 1;", "parent": 175, "children": [259], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 13}}, {"id": 259, "type": "number_literal", "text": "1", "parent": 258, "children": [], "start_point": {"row": 54, "column": 11}, "end_point": {"row": 54, "column": 12}}, {"id": 260, "type": "function_definition", "text": "void help(){\n printf(\"Shell Basic Commands\\n\");\n printf(\"cd <path> - Change Directory to the one specified in <path>\\n\");\n printf(\"history - Show list of previous commands executed\\n\");\n printf(\"history <n> - Execute the nth command in the history\\n\");\n printf(\"ls - Show the contents of the current directory\\n\");\n printf(\"ls -l - Show the contents of the current directory with more detail\\n\");\n printf(\"exit - Terminate the current CLI\\n\");\n}", "parent": null, "children": [261, 262], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 65, "column": 1}}, {"id": 261, "type": "primitive_type", "text": "void", "parent": 260, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 4}}, {"id": 262, "type": "function_declarator", "text": "help()", "parent": 260, "children": [263, 264], "start_point": {"row": 57, "column": 5}, "end_point": {"row": 57, "column": 11}}, {"id": 263, "type": "identifier", "text": "help", "parent": 262, "children": [], "start_point": {"row": 57, "column": 5}, "end_point": {"row": 57, "column": 9}}, {"id": 264, "type": "parameter_list", "text": "()", "parent": 262, "children": [], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 11}}, {"id": 265, "type": "call_expression", "text": "printf(\"Shell Basic Commands\\n\")", "parent": 260, "children": [266, 267], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 36}}, {"id": 266, "type": "identifier", "text": "printf", "parent": 265, "children": [], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 10}}, {"id": 267, "type": "argument_list", "text": "(\"Shell Basic Commands\\n\")", "parent": 265, "children": [268], "start_point": {"row": 58, "column": 10}, "end_point": {"row": 58, "column": 36}}, {"id": 268, "type": "string_literal", "text": "\"Shell Basic Commands\\n\"", "parent": 267, "children": [269], "start_point": {"row": 58, "column": 11}, "end_point": {"row": 58, "column": 35}}, {"id": 269, "type": "escape_sequence", "text": "\\n", "parent": 268, "children": [], "start_point": {"row": 58, "column": 32}, "end_point": {"row": 58, "column": 34}}, {"id": 270, "type": "call_expression", "text": "printf(\"cd <path> - Change Directory to the one specified in <path>\\n\")", "parent": 260, "children": [271, 272], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 75}}, {"id": 271, "type": "identifier", "text": "printf", "parent": 270, "children": [], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 10}}, {"id": 272, "type": "argument_list", "text": "(\"cd <path> - Change Directory to the one specified in <path>\\n\")", "parent": 270, "children": [273], "start_point": {"row": 59, "column": 10}, "end_point": {"row": 59, "column": 75}}, {"id": 273, "type": "string_literal", "text": "\"cd <path> - Change Directory to the one specified in <path>\\n\"", "parent": 272, "children": [274], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 74}}, {"id": 274, "type": "escape_sequence", "text": "\\n", "parent": 273, "children": [], "start_point": {"row": 59, "column": 71}, "end_point": {"row": 59, "column": 73}}, {"id": 275, "type": "call_expression", "text": "printf(\"history - Show list of previous commands executed\\n\")", "parent": 260, "children": [276, 277], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 65}}, {"id": 276, "type": "identifier", "text": "printf", "parent": 275, "children": [], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 10}}, {"id": 277, "type": "argument_list", "text": "(\"history - Show list of previous commands executed\\n\")", "parent": 275, "children": [278], "start_point": {"row": 60, "column": 10}, "end_point": {"row": 60, "column": 65}}, {"id": 278, "type": "string_literal", "text": "\"history - Show list of previous commands executed\\n\"", "parent": 277, "children": [279], "start_point": {"row": 60, "column": 11}, "end_point": {"row": 60, "column": 64}}, {"id": 279, "type": "escape_sequence", "text": "\\n", "parent": 278, "children": [], "start_point": {"row": 60, "column": 61}, "end_point": {"row": 60, "column": 63}}, {"id": 280, "type": "call_expression", "text": "printf(\"history <n> - Execute the nth command in the history\\n\")", "parent": 260, "children": [281, 282], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 68}}, {"id": 281, "type": "identifier", "text": "printf", "parent": 280, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 10}}, {"id": 282, "type": "argument_list", "text": "(\"history <n> - Execute the nth command in the history\\n\")", "parent": 280, "children": [283], "start_point": {"row": 61, "column": 10}, "end_point": {"row": 61, "column": 68}}, {"id": 283, "type": "string_literal", "text": "\"history <n> - Execute the nth command in the history\\n\"", "parent": 282, "children": [284], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 67}}, {"id": 284, "type": "escape_sequence", "text": "\\n", "parent": 283, "children": [], "start_point": {"row": 61, "column": 64}, "end_point": {"row": 61, "column": 66}}, {"id": 285, "type": "call_expression", "text": "printf(\"ls - Show the contents of the current directory\\n\")", "parent": 260, "children": [286, 287], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 63}}, {"id": 286, "type": "identifier", "text": "printf", "parent": 285, "children": [], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 10}}, {"id": 287, "type": "argument_list", "text": "(\"ls - Show the contents of the current directory\\n\")", "parent": 285, "children": [288], "start_point": {"row": 62, "column": 10}, "end_point": {"row": 62, "column": 63}}, {"id": 288, "type": "string_literal", "text": "\"ls - Show the contents of the current directory\\n\"", "parent": 287, "children": [289], "start_point": {"row": 62, "column": 11}, "end_point": {"row": 62, "column": 62}}, {"id": 289, "type": "escape_sequence", "text": "\\n", "parent": 288, "children": [], "start_point": {"row": 62, "column": 59}, "end_point": {"row": 62, "column": 61}}, {"id": 290, "type": "call_expression", "text": "printf(\"ls -l - Show the contents of the current directory with more detail\\n\")", "parent": 260, "children": [291, 292], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 83}}, {"id": 291, "type": "identifier", "text": "printf", "parent": 290, "children": [], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 10}}, {"id": 292, "type": "argument_list", "text": "(\"ls -l - Show the contents of the current directory with more detail\\n\")", "parent": 290, "children": [293], "start_point": {"row": 63, "column": 10}, "end_point": {"row": 63, "column": 83}}, {"id": 293, "type": "string_literal", "text": "\"ls -l - Show the contents of the current directory with more detail\\n\"", "parent": 292, "children": [294], "start_point": {"row": 63, "column": 11}, "end_point": {"row": 63, "column": 82}}, {"id": 294, "type": "escape_sequence", "text": "\\n", "parent": 293, "children": [], "start_point": {"row": 63, "column": 79}, "end_point": {"row": 63, "column": 81}}, {"id": 295, "type": "call_expression", "text": "printf(\"exit - Terminate the current CLI\\n\")", "parent": 260, "children": [296, 297], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 48}}, {"id": 296, "type": "identifier", "text": "printf", "parent": 295, "children": [], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 10}}, {"id": 297, "type": "argument_list", "text": "(\"exit - Terminate the current CLI\\n\")", "parent": 295, "children": [298], "start_point": {"row": 64, "column": 10}, "end_point": {"row": 64, "column": 48}}, {"id": 298, "type": "string_literal", "text": "\"exit - Terminate the current CLI\\n\"", "parent": 297, "children": [299], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 47}}, {"id": 299, "type": "escape_sequence", "text": "\\n", "parent": 298, "children": [], "start_point": {"row": 64, "column": 44}, "end_point": {"row": 64, "column": 46}}, {"id": 300, "type": "function_definition", "text": "void execute(char *argv[]){\n\n // Check if command is valid as a native command\n char exit_[10]; strcpy(exit_, \"exit\");\n char hist[10]; strcpy(hist, \"history\");\n char cd[10]; strcpy(cd, \"cd\");\n char help_[10]; strcpy(help_, \"help\");\n\n //Native commands\n if(argv[0] != NULL) {\n if (strcmp(argv[0], exit_) == 0) {\n exit(0);\n } else if (strcmp(argv[0], hist) == 0) {\n nat_history(argv);\n } else if (strcmp(argv[0], cd) == 0) {\n if(argv[1] == NULL)\n chdir(\"/\");\n else\n chdir(argv[1]);\n } else if (strcmp(argv[0], help_) == 0) {\n help();\n } else {\n //Execute any other command. Uses child process.\n pid_t pid = fork();\n if (pid == -1) {\n printf(\"ERORR on fork\\n\");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }\n }\n }\n}", "parent": null, "children": [301, 302], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 102, "column": 1}}, {"id": 301, "type": "primitive_type", "text": "void", "parent": 300, "children": [], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 4}}, {"id": 302, "type": "function_declarator", "text": "execute(char *argv[])", "parent": 300, "children": [303, 304], "start_point": {"row": 67, "column": 5}, "end_point": {"row": 67, "column": 26}}, {"id": 303, "type": "identifier", "text": "execute", "parent": 302, "children": [], "start_point": {"row": 67, "column": 5}, "end_point": {"row": 67, "column": 12}}, {"id": 304, "type": "parameter_list", "text": "(char *argv[])", "parent": 302, "children": [305], "start_point": {"row": 67, "column": 12}, "end_point": {"row": 67, "column": 26}}, {"id": 305, "type": "parameter_declaration", "text": "char *argv[]", "parent": 304, "children": [306, 307], "start_point": {"row": 67, "column": 13}, "end_point": {"row": 67, "column": 25}}, {"id": 306, "type": "primitive_type", "text": "char", "parent": 305, "children": [], "start_point": {"row": 67, "column": 13}, "end_point": {"row": 67, "column": 17}}, {"id": 307, "type": "pointer_declarator", "text": "*argv[]", "parent": 305, "children": [308, 309], "start_point": {"row": 67, "column": 18}, "end_point": {"row": 67, "column": 25}}, {"id": 308, "type": "*", "text": "*", "parent": 307, "children": [], "start_point": {"row": 67, "column": 18}, "end_point": {"row": 67, "column": 19}}, {"id": 309, "type": "array_declarator", "text": "argv[]", "parent": 307, "children": [310], "start_point": {"row": 67, "column": 19}, "end_point": {"row": 67, "column": 25}}, {"id": 310, "type": "identifier", "text": "argv", "parent": 309, "children": [], "start_point": {"row": 67, "column": 19}, "end_point": {"row": 67, "column": 23}}, {"id": 311, "type": "declaration", "text": "char exit_[10];", "parent": 300, "children": [312, 313], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 19}}, {"id": 312, "type": "primitive_type", "text": "char", "parent": 311, "children": [], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 8}}, {"id": 313, "type": "array_declarator", "text": "exit_[10]", "parent": 311, "children": [314, 315], "start_point": {"row": 70, "column": 9}, "end_point": {"row": 70, "column": 18}}, {"id": 314, "type": "identifier", "text": "exit_", "parent": 313, "children": [], "start_point": {"row": 70, "column": 9}, "end_point": {"row": 70, "column": 14}}, {"id": 315, "type": "number_literal", "text": "10", "parent": 313, "children": [], "start_point": {"row": 70, "column": 15}, "end_point": {"row": 70, "column": 17}}, {"id": 316, "type": "call_expression", "text": "strcpy(exit_, \"exit\")", "parent": 300, "children": [317, 318], "start_point": {"row": 70, "column": 23}, "end_point": {"row": 70, "column": 44}}, {"id": 317, "type": "identifier", "text": "strcpy", "parent": 316, "children": [], "start_point": {"row": 70, "column": 23}, "end_point": {"row": 70, "column": 29}}, {"id": 318, "type": "argument_list", "text": "(exit_, \"exit\")", "parent": 316, "children": [319, 320], "start_point": {"row": 70, "column": 29}, "end_point": {"row": 70, "column": 44}}, {"id": 319, "type": "identifier", "text": "exit_", "parent": 318, "children": [], "start_point": {"row": 70, "column": 30}, "end_point": {"row": 70, "column": 35}}, {"id": 320, "type": "string_literal", "text": "\"exit\"", "parent": 318, "children": [], "start_point": {"row": 70, "column": 37}, "end_point": {"row": 70, "column": 43}}, {"id": 321, "type": "declaration", "text": "char hist[10];", "parent": 300, "children": [322, 323], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 18}}, {"id": 322, "type": "primitive_type", "text": "char", "parent": 321, "children": [], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 8}}, {"id": 323, "type": "array_declarator", "text": "hist[10]", "parent": 321, "children": [324, 325], "start_point": {"row": 71, "column": 9}, "end_point": {"row": 71, "column": 17}}, {"id": 324, "type": "identifier", "text": "hist", "parent": 323, "children": [], "start_point": {"row": 71, "column": 9}, "end_point": {"row": 71, "column": 13}}, {"id": 325, "type": "number_literal", "text": "10", "parent": 323, "children": [], "start_point": {"row": 71, "column": 14}, "end_point": {"row": 71, "column": 16}}, {"id": 326, "type": "call_expression", "text": "strcpy(hist, \"history\")", "parent": 300, "children": [327, 328], "start_point": {"row": 71, "column": 19}, "end_point": {"row": 71, "column": 42}}, {"id": 327, "type": "identifier", "text": "strcpy", "parent": 326, "children": [], "start_point": {"row": 71, "column": 19}, "end_point": {"row": 71, "column": 25}}, {"id": 328, "type": "argument_list", "text": "(hist, \"history\")", "parent": 326, "children": [329, 330], "start_point": {"row": 71, "column": 25}, "end_point": {"row": 71, "column": 42}}, {"id": 329, "type": "identifier", "text": "hist", "parent": 328, "children": [], "start_point": {"row": 71, "column": 26}, "end_point": {"row": 71, "column": 30}}, {"id": 330, "type": "string_literal", "text": "\"history\"", "parent": 328, "children": [], "start_point": {"row": 71, "column": 32}, "end_point": {"row": 71, "column": 41}}, {"id": 331, "type": "declaration", "text": "char cd[10];", "parent": 300, "children": [332, 333], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 16}}, {"id": 332, "type": "primitive_type", "text": "char", "parent": 331, "children": [], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 8}}, {"id": 333, "type": "array_declarator", "text": "cd[10]", "parent": 331, "children": [334, 335], "start_point": {"row": 72, "column": 9}, "end_point": {"row": 72, "column": 15}}, {"id": 334, "type": "identifier", "text": "cd", "parent": 333, "children": [], "start_point": {"row": 72, "column": 9}, "end_point": {"row": 72, "column": 11}}, {"id": 335, "type": "number_literal", "text": "10", "parent": 333, "children": [], "start_point": {"row": 72, "column": 12}, "end_point": {"row": 72, "column": 14}}, {"id": 336, "type": "call_expression", "text": "strcpy(cd, \"cd\")", "parent": 300, "children": [337, 338], "start_point": {"row": 72, "column": 17}, "end_point": {"row": 72, "column": 33}}, {"id": 337, "type": "identifier", "text": "strcpy", "parent": 336, "children": [], "start_point": {"row": 72, "column": 17}, "end_point": {"row": 72, "column": 23}}, {"id": 338, "type": "argument_list", "text": "(cd, \"cd\")", "parent": 336, "children": [339, 340], "start_point": {"row": 72, "column": 23}, "end_point": {"row": 72, "column": 33}}, {"id": 339, "type": "identifier", "text": "cd", "parent": 338, "children": [], "start_point": {"row": 72, "column": 24}, "end_point": {"row": 72, "column": 26}}, {"id": 340, "type": "string_literal", "text": "\"cd\"", "parent": 338, "children": [], "start_point": {"row": 72, "column": 28}, "end_point": {"row": 72, "column": 32}}, {"id": 341, "type": "declaration", "text": "char help_[10];", "parent": 300, "children": [342, 343], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 19}}, {"id": 342, "type": "primitive_type", "text": "char", "parent": 341, "children": [], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 8}}, {"id": 343, "type": "array_declarator", "text": "help_[10]", "parent": 341, "children": [344, 345], "start_point": {"row": 73, "column": 9}, "end_point": {"row": 73, "column": 18}}, {"id": 344, "type": "identifier", "text": "help_", "parent": 343, "children": [], "start_point": {"row": 73, "column": 9}, "end_point": {"row": 73, "column": 14}}, {"id": 345, "type": "number_literal", "text": "10", "parent": 343, "children": [], "start_point": {"row": 73, "column": 15}, "end_point": {"row": 73, "column": 17}}, {"id": 346, "type": "call_expression", "text": "strcpy(help_, \"help\")", "parent": 300, "children": [347, 348], "start_point": {"row": 73, "column": 20}, "end_point": {"row": 73, "column": 41}}, {"id": 347, "type": "identifier", "text": "strcpy", "parent": 346, "children": [], "start_point": {"row": 73, "column": 20}, "end_point": {"row": 73, "column": 26}}, {"id": 348, "type": "argument_list", "text": "(help_, \"help\")", "parent": 346, "children": [349, 350], "start_point": {"row": 73, "column": 26}, "end_point": {"row": 73, "column": 41}}, {"id": 349, "type": "identifier", "text": "help_", "parent": 348, "children": [], "start_point": {"row": 73, "column": 27}, "end_point": {"row": 73, "column": 32}}, {"id": 350, "type": "string_literal", "text": "\"help\"", "parent": 348, "children": [], "start_point": {"row": 73, "column": 34}, "end_point": {"row": 73, "column": 40}}, {"id": 351, "type": "if_statement", "text": "if(argv[0] != NULL) {\n if (strcmp(argv[0], exit_) == 0) {\n exit(0);\n } else if (strcmp(argv[0], hist) == 0) {\n nat_history(argv);\n } else if (strcmp(argv[0], cd) == 0) {\n if(argv[1] == NULL)\n chdir(\"/\");\n else\n chdir(argv[1]);\n } else if (strcmp(argv[0], help_) == 0) {\n help();\n } else {\n //Execute any other command. Uses child process.\n pid_t pid = fork();\n if (pid == -1) {\n printf(\"ERORR on fork\\n\");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }\n }\n }", "parent": 300, "children": [352], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 101, "column": 5}}, {"id": 352, "type": "parenthesized_expression", "text": "(argv[0] != NULL)", "parent": 351, "children": [353], "start_point": {"row": 76, "column": 6}, "end_point": {"row": 76, "column": 23}}, {"id": 353, "type": "binary_expression", "text": "argv[0] != NULL", "parent": 352, "children": [354, 357, 358], "start_point": {"row": 76, "column": 7}, "end_point": {"row": 76, "column": 22}}, {"id": 354, "type": "subscript_expression", "text": "argv[0]", "parent": 353, "children": [355, 356], "start_point": {"row": 76, "column": 7}, "end_point": {"row": 76, "column": 14}}, {"id": 355, "type": "identifier", "text": "argv", "parent": 354, "children": [], "start_point": {"row": 76, "column": 7}, "end_point": {"row": 76, "column": 11}}, {"id": 356, "type": "number_literal", "text": "0", "parent": 354, "children": [], "start_point": {"row": 76, "column": 12}, "end_point": {"row": 76, "column": 13}}, {"id": 357, "type": "!=", "text": "!=", "parent": 353, "children": [], "start_point": {"row": 76, "column": 15}, "end_point": {"row": 76, "column": 17}}, {"id": 358, "type": "null", "text": "NULL", "parent": 353, "children": [359], "start_point": {"row": 76, "column": 18}, "end_point": {"row": 76, "column": 22}}, {"id": 359, "type": "NULL", "text": "NULL", "parent": 358, "children": [], "start_point": {"row": 76, "column": 18}, "end_point": {"row": 76, "column": 22}}, {"id": 360, "type": "if_statement", "text": "if (strcmp(argv[0], exit_) == 0) {\n exit(0);\n } else if (strcmp(argv[0], hist) == 0) {\n nat_history(argv);\n } else if (strcmp(argv[0], cd) == 0) {\n if(argv[1] == NULL)\n chdir(\"/\");\n else\n chdir(argv[1]);\n } else if (strcmp(argv[0], help_) == 0) {\n help();\n } else {\n //Execute any other command. Uses child process.\n pid_t pid = fork();\n if (pid == -1) {\n printf(\"ERORR on fork\\n\");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }\n }", "parent": 351, "children": [361, 376], "start_point": {"row": 77, "column": 8}, "end_point": {"row": 100, "column": 9}}, {"id": 361, "type": "parenthesized_expression", "text": "(strcmp(argv[0], exit_) == 0)", "parent": 360, "children": [362], "start_point": {"row": 77, "column": 11}, "end_point": {"row": 77, "column": 40}}, {"id": 362, "type": "binary_expression", "text": "strcmp(argv[0], exit_) == 0", "parent": 361, "children": [363, 370, 371], "start_point": {"row": 77, "column": 12}, "end_point": {"row": 77, "column": 39}}, {"id": 363, "type": "call_expression", "text": "strcmp(argv[0], exit_)", "parent": 362, "children": [364, 365], "start_point": {"row": 77, "column": 12}, "end_point": {"row": 77, "column": 34}}, {"id": 364, "type": "identifier", "text": "strcmp", "parent": 363, "children": [], "start_point": {"row": 77, "column": 12}, "end_point": {"row": 77, "column": 18}}, {"id": 365, "type": "argument_list", "text": "(argv[0], exit_)", "parent": 363, "children": [366, 369], "start_point": {"row": 77, "column": 18}, "end_point": {"row": 77, "column": 34}}, {"id": 366, "type": "subscript_expression", "text": "argv[0]", "parent": 365, "children": [367, 368], "start_point": {"row": 77, "column": 19}, "end_point": {"row": 77, "column": 26}}, {"id": 367, "type": "identifier", "text": "argv", "parent": 366, "children": [], "start_point": {"row": 77, "column": 19}, "end_point": {"row": 77, "column": 23}}, {"id": 368, "type": "number_literal", "text": "0", "parent": 366, "children": [], "start_point": {"row": 77, "column": 24}, "end_point": {"row": 77, "column": 25}}, {"id": 369, "type": "identifier", "text": "exit_", "parent": 365, "children": [], "start_point": {"row": 77, "column": 28}, "end_point": {"row": 77, "column": 33}}, {"id": 370, "type": "==", "text": "==", "parent": 362, "children": [], "start_point": {"row": 77, "column": 35}, "end_point": {"row": 77, "column": 37}}, {"id": 371, "type": "number_literal", "text": "0", "parent": 362, "children": [], "start_point": {"row": 77, "column": 38}, "end_point": {"row": 77, "column": 39}}, {"id": 372, "type": "call_expression", "text": "exit(0)", "parent": 360, "children": [373, 374], "start_point": {"row": 78, "column": 12}, "end_point": {"row": 78, "column": 19}}, {"id": 373, "type": "identifier", "text": "exit", "parent": 372, "children": [], "start_point": {"row": 78, "column": 12}, "end_point": {"row": 78, "column": 16}}, {"id": 374, "type": "argument_list", "text": "(0)", "parent": 372, "children": [375], "start_point": {"row": 78, "column": 16}, "end_point": {"row": 78, "column": 19}}, {"id": 375, "type": "number_literal", "text": "0", "parent": 374, "children": [], "start_point": {"row": 78, "column": 17}, "end_point": {"row": 78, "column": 18}}, {"id": 376, "type": "else_clause", "text": "else if (strcmp(argv[0], hist) == 0) {\n nat_history(argv);\n } else if (strcmp(argv[0], cd) == 0) {\n if(argv[1] == NULL)\n chdir(\"/\");\n else\n chdir(argv[1]);\n } else if (strcmp(argv[0], help_) == 0) {\n help();\n } else {\n //Execute any other command. Uses child process.\n pid_t pid = fork();\n if (pid == -1) {\n printf(\"ERORR on fork\\n\");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }\n }", "parent": 360, "children": [377], "start_point": {"row": 79, "column": 10}, "end_point": {"row": 100, "column": 9}}, {"id": 377, "type": "if_statement", "text": "if (strcmp(argv[0], hist) == 0) {\n nat_history(argv);\n } else if (strcmp(argv[0], cd) == 0) {\n if(argv[1] == NULL)\n chdir(\"/\");\n else\n chdir(argv[1]);\n } else if (strcmp(argv[0], help_) == 0) {\n help();\n } else {\n //Execute any other command. Uses child process.\n pid_t pid = fork();\n if (pid == -1) {\n printf(\"ERORR on fork\\n\");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }\n }", "parent": 376, "children": [378, 393], "start_point": {"row": 79, "column": 15}, "end_point": {"row": 100, "column": 9}}, {"id": 378, "type": "parenthesized_expression", "text": "(strcmp(argv[0], hist) == 0)", "parent": 377, "children": [379], "start_point": {"row": 79, "column": 18}, "end_point": {"row": 79, "column": 46}}, {"id": 379, "type": "binary_expression", "text": "strcmp(argv[0], hist) == 0", "parent": 378, "children": [380, 387, 388], "start_point": {"row": 79, "column": 19}, "end_point": {"row": 79, "column": 45}}, {"id": 380, "type": "call_expression", "text": "strcmp(argv[0], hist)", "parent": 379, "children": [381, 382], "start_point": {"row": 79, "column": 19}, "end_point": {"row": 79, "column": 40}}, {"id": 381, "type": "identifier", "text": "strcmp", "parent": 380, "children": [], "start_point": {"row": 79, "column": 19}, "end_point": {"row": 79, "column": 25}}, {"id": 382, "type": "argument_list", "text": "(argv[0], hist)", "parent": 380, "children": [383, 386], "start_point": {"row": 79, "column": 25}, "end_point": {"row": 79, "column": 40}}, {"id": 383, "type": "subscript_expression", "text": "argv[0]", "parent": 382, "children": [384, 385], "start_point": {"row": 79, "column": 26}, "end_point": {"row": 79, "column": 33}}, {"id": 384, "type": "identifier", "text": "argv", "parent": 383, "children": [], "start_point": {"row": 79, "column": 26}, "end_point": {"row": 79, "column": 30}}, {"id": 385, "type": "number_literal", "text": "0", "parent": 383, "children": [], "start_point": {"row": 79, "column": 31}, "end_point": {"row": 79, "column": 32}}, {"id": 386, "type": "identifier", "text": "hist", "parent": 382, "children": [], "start_point": {"row": 79, "column": 35}, "end_point": {"row": 79, "column": 39}}, {"id": 387, "type": "==", "text": "==", "parent": 379, "children": [], "start_point": {"row": 79, "column": 41}, "end_point": {"row": 79, "column": 43}}, {"id": 388, "type": "number_literal", "text": "0", "parent": 379, "children": [], "start_point": {"row": 79, "column": 44}, "end_point": {"row": 79, "column": 45}}, {"id": 389, "type": "call_expression", "text": "nat_history(argv)", "parent": 377, "children": [390, 391], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 29}}, {"id": 390, "type": "identifier", "text": "nat_history", "parent": 389, "children": [], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 23}}, {"id": 391, "type": "argument_list", "text": "(argv)", "parent": 389, "children": [392], "start_point": {"row": 80, "column": 23}, "end_point": {"row": 80, "column": 29}}, {"id": 392, "type": "identifier", "text": "argv", "parent": 391, "children": [], "start_point": {"row": 80, "column": 24}, "end_point": {"row": 80, "column": 28}}, {"id": 393, "type": "else_clause", "text": "else if (strcmp(argv[0], cd) == 0) {\n if(argv[1] == NULL)\n chdir(\"/\");\n else\n chdir(argv[1]);\n } else if (strcmp(argv[0], help_) == 0) {\n help();\n } else {\n //Execute any other command. Uses child process.\n pid_t pid = fork();\n if (pid == -1) {\n printf(\"ERORR on fork\\n\");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }\n }", "parent": 377, "children": [394], "start_point": {"row": 81, "column": 10}, "end_point": {"row": 100, "column": 9}}, {"id": 394, "type": "if_statement", "text": "if (strcmp(argv[0], cd) == 0) {\n if(argv[1] == NULL)\n chdir(\"/\");\n else\n chdir(argv[1]);\n } else if (strcmp(argv[0], help_) == 0) {\n help();\n } else {\n //Execute any other command. Uses child process.\n pid_t pid = fork();\n if (pid == -1) {\n printf(\"ERORR on fork\\n\");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }\n }", "parent": 393, "children": [395, 426], "start_point": {"row": 81, "column": 15}, "end_point": {"row": 100, "column": 9}}, {"id": 395, "type": "parenthesized_expression", "text": "(strcmp(argv[0], cd) == 0)", "parent": 394, "children": [396], "start_point": {"row": 81, "column": 18}, "end_point": {"row": 81, "column": 44}}, {"id": 396, "type": "binary_expression", "text": "strcmp(argv[0], cd) == 0", "parent": 395, "children": [397, 404, 405], "start_point": {"row": 81, "column": 19}, "end_point": {"row": 81, "column": 43}}, {"id": 397, "type": "call_expression", "text": "strcmp(argv[0], cd)", "parent": 396, "children": [398, 399], "start_point": {"row": 81, "column": 19}, "end_point": {"row": 81, "column": 38}}, {"id": 398, "type": "identifier", "text": "strcmp", "parent": 397, "children": [], "start_point": {"row": 81, "column": 19}, "end_point": {"row": 81, "column": 25}}, {"id": 399, "type": "argument_list", "text": "(argv[0], cd)", "parent": 397, "children": [400, 403], "start_point": {"row": 81, "column": 25}, "end_point": {"row": 81, "column": 38}}, {"id": 400, "type": "subscript_expression", "text": "argv[0]", "parent": 399, "children": [401, 402], "start_point": {"row": 81, "column": 26}, "end_point": {"row": 81, "column": 33}}, {"id": 401, "type": "identifier", "text": "argv", "parent": 400, "children": [], "start_point": {"row": 81, "column": 26}, "end_point": {"row": 81, "column": 30}}, {"id": 402, "type": "number_literal", "text": "0", "parent": 400, "children": [], "start_point": {"row": 81, "column": 31}, "end_point": {"row": 81, "column": 32}}, {"id": 403, "type": "identifier", "text": "cd", "parent": 399, "children": [], "start_point": {"row": 81, "column": 35}, "end_point": {"row": 81, "column": 37}}, {"id": 404, "type": "==", "text": "==", "parent": 396, "children": [], "start_point": {"row": 81, "column": 39}, "end_point": {"row": 81, "column": 41}}, {"id": 405, "type": "number_literal", "text": "0", "parent": 396, "children": [], "start_point": {"row": 81, "column": 42}, "end_point": {"row": 81, "column": 43}}, {"id": 406, "type": "if_statement", "text": "if(argv[1] == NULL)\n chdir(\"/\");\n else\n chdir(argv[1]);", "parent": 394, "children": [407, 419], "start_point": {"row": 82, "column": 12}, "end_point": {"row": 85, "column": 31}}, {"id": 407, "type": "parenthesized_expression", "text": "(argv[1] == NULL)", "parent": 406, "children": [408], "start_point": {"row": 82, "column": 14}, "end_point": {"row": 82, "column": 31}}, {"id": 408, "type": "binary_expression", "text": "argv[1] == NULL", "parent": 407, "children": [409, 412, 413], "start_point": {"row": 82, "column": 15}, "end_point": {"row": 82, "column": 30}}, {"id": 409, "type": "subscript_expression", "text": "argv[1]", "parent": 408, "children": [410, 411], "start_point": {"row": 82, "column": 15}, "end_point": {"row": 82, "column": 22}}, {"id": 410, "type": "identifier", "text": "argv", "parent": 409, "children": [], "start_point": {"row": 82, "column": 15}, "end_point": {"row": 82, "column": 19}}, {"id": 411, "type": "number_literal", "text": "1", "parent": 409, "children": [], "start_point": {"row": 82, "column": 20}, "end_point": {"row": 82, "column": 21}}, {"id": 412, "type": "==", "text": "==", "parent": 408, "children": [], "start_point": {"row": 82, "column": 23}, "end_point": {"row": 82, "column": 25}}, {"id": 413, "type": "null", "text": "NULL", "parent": 408, "children": [414], "start_point": {"row": 82, "column": 26}, "end_point": {"row": 82, "column": 30}}, {"id": 414, "type": "NULL", "text": "NULL", "parent": 413, "children": [], "start_point": {"row": 82, "column": 26}, "end_point": {"row": 82, "column": 30}}, {"id": 415, "type": "call_expression", "text": "chdir(\"/\")", "parent": 406, "children": [416, 417], "start_point": {"row": 83, "column": 16}, "end_point": {"row": 83, "column": 26}}, {"id": 416, "type": "identifier", "text": "chdir", "parent": 415, "children": [], "start_point": {"row": 83, "column": 16}, "end_point": {"row": 83, "column": 21}}, {"id": 417, "type": "argument_list", "text": "(\"/\")", "parent": 415, "children": [418], "start_point": {"row": 83, "column": 21}, "end_point": {"row": 83, "column": 26}}, {"id": 418, "type": "string_literal", "text": "\"/\"", "parent": 417, "children": [], "start_point": {"row": 83, "column": 22}, "end_point": {"row": 83, "column": 25}}, {"id": 419, "type": "else_clause", "text": "else\n chdir(argv[1]);", "parent": 406, "children": [], "start_point": {"row": 84, "column": 12}, "end_point": {"row": 85, "column": 31}}, {"id": 420, "type": "call_expression", "text": "chdir(argv[1])", "parent": 419, "children": [421, 422], "start_point": {"row": 85, "column": 16}, "end_point": {"row": 85, "column": 30}}, {"id": 421, "type": "identifier", "text": "chdir", "parent": 420, "children": [], "start_point": {"row": 85, "column": 16}, "end_point": {"row": 85, "column": 21}}, {"id": 422, "type": "argument_list", "text": "(argv[1])", "parent": 420, "children": [423], "start_point": {"row": 85, "column": 21}, "end_point": {"row": 85, "column": 30}}, {"id": 423, "type": "subscript_expression", "text": "argv[1]", "parent": 422, "children": [424, 425], "start_point": {"row": 85, "column": 22}, "end_point": {"row": 85, "column": 29}}, {"id": 424, "type": "identifier", "text": "argv", "parent": 423, "children": [], "start_point": {"row": 85, "column": 22}, "end_point": {"row": 85, "column": 26}}, {"id": 425, "type": "number_literal", "text": "1", "parent": 423, "children": [], "start_point": {"row": 85, "column": 27}, "end_point": {"row": 85, "column": 28}}, {"id": 426, "type": "else_clause", "text": "else if (strcmp(argv[0], help_) == 0) {\n help();\n } else {\n //Execute any other command. Uses child process.\n pid_t pid = fork();\n if (pid == -1) {\n printf(\"ERORR on fork\\n\");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }\n }", "parent": 394, "children": [427], "start_point": {"row": 86, "column": 10}, "end_point": {"row": 100, "column": 9}}, {"id": 427, "type": "if_statement", "text": "if (strcmp(argv[0], help_) == 0) {\n help();\n } else {\n //Execute any other command. Uses child process.\n pid_t pid = fork();\n if (pid == -1) {\n printf(\"ERORR on fork\\n\");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }\n }", "parent": 426, "children": [428, 442], "start_point": {"row": 86, "column": 15}, "end_point": {"row": 100, "column": 9}}, {"id": 428, "type": "parenthesized_expression", "text": "(strcmp(argv[0], help_) == 0)", "parent": 427, "children": [429], "start_point": {"row": 86, "column": 18}, "end_point": {"row": 86, "column": 47}}, {"id": 429, "type": "binary_expression", "text": "strcmp(argv[0], help_) == 0", "parent": 428, "children": [430, 437, 438], "start_point": {"row": 86, "column": 19}, "end_point": {"row": 86, "column": 46}}, {"id": 430, "type": "call_expression", "text": "strcmp(argv[0], help_)", "parent": 429, "children": [431, 432], "start_point": {"row": 86, "column": 19}, "end_point": {"row": 86, "column": 41}}, {"id": 431, "type": "identifier", "text": "strcmp", "parent": 430, "children": [], "start_point": {"row": 86, "column": 19}, "end_point": {"row": 86, "column": 25}}, {"id": 432, "type": "argument_list", "text": "(argv[0], help_)", "parent": 430, "children": [433, 436], "start_point": {"row": 86, "column": 25}, "end_point": {"row": 86, "column": 41}}, {"id": 433, "type": "subscript_expression", "text": "argv[0]", "parent": 432, "children": [434, 435], "start_point": {"row": 86, "column": 26}, "end_point": {"row": 86, "column": 33}}, {"id": 434, "type": "identifier", "text": "argv", "parent": 433, "children": [], "start_point": {"row": 86, "column": 26}, "end_point": {"row": 86, "column": 30}}, {"id": 435, "type": "number_literal", "text": "0", "parent": 433, "children": [], "start_point": {"row": 86, "column": 31}, "end_point": {"row": 86, "column": 32}}, {"id": 436, "type": "identifier", "text": "help_", "parent": 432, "children": [], "start_point": {"row": 86, "column": 35}, "end_point": {"row": 86, "column": 40}}, {"id": 437, "type": "==", "text": "==", "parent": 429, "children": [], "start_point": {"row": 86, "column": 42}, "end_point": {"row": 86, "column": 44}}, {"id": 438, "type": "number_literal", "text": "0", "parent": 429, "children": [], "start_point": {"row": 86, "column": 45}, "end_point": {"row": 86, "column": 46}}, {"id": 439, "type": "call_expression", "text": "help()", "parent": 427, "children": [440, 441], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 87, "column": 18}}, {"id": 440, "type": "identifier", "text": "help", "parent": 439, "children": [], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 87, "column": 16}}, {"id": 441, "type": "argument_list", "text": "()", "parent": 439, "children": [], "start_point": {"row": 87, "column": 16}, "end_point": {"row": 87, "column": 18}}, {"id": 442, "type": "else_clause", "text": "else {\n //Execute any other command. Uses child process.\n pid_t pid = fork();\n if (pid == -1) {\n printf(\"ERORR on fork\\n\");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }\n }", "parent": 427, "children": [], "start_point": {"row": 88, "column": 10}, "end_point": {"row": 100, "column": 9}}, {"id": 443, "type": "declaration", "text": "pid_t pid = fork();", "parent": 442, "children": [444, 445], "start_point": {"row": 90, "column": 12}, "end_point": {"row": 90, "column": 31}}, {"id": 444, "type": "type_identifier", "text": "pid_t", "parent": 443, "children": [], "start_point": {"row": 90, "column": 12}, "end_point": {"row": 90, "column": 17}}, {"id": 445, "type": "init_declarator", "text": "pid = fork()", "parent": 443, "children": [446, 447, 448], "start_point": {"row": 90, "column": 18}, "end_point": {"row": 90, "column": 30}}, {"id": 446, "type": "identifier", "text": "pid", "parent": 445, "children": [], "start_point": {"row": 90, "column": 18}, "end_point": {"row": 90, "column": 21}}, {"id": 447, "type": "=", "text": "=", "parent": 445, "children": [], "start_point": {"row": 90, "column": 22}, "end_point": {"row": 90, "column": 23}}, {"id": 448, "type": "call_expression", "text": "fork()", "parent": 445, "children": [449, 450], "start_point": {"row": 90, "column": 24}, "end_point": {"row": 90, "column": 30}}, {"id": 449, "type": "identifier", "text": "fork", "parent": 448, "children": [], "start_point": {"row": 90, "column": 24}, "end_point": {"row": 90, "column": 28}}, {"id": 450, "type": "argument_list", "text": "()", "parent": 448, "children": [], "start_point": {"row": 90, "column": 28}, "end_point": {"row": 90, "column": 30}}, {"id": 451, "type": "if_statement", "text": "if (pid == -1) {\n printf(\"ERORR on fork\\n\");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }", "parent": 442, "children": [452, 466], "start_point": {"row": 91, "column": 12}, "end_point": {"row": 99, "column": 13}}, {"id": 452, "type": "parenthesized_expression", "text": "(pid == -1)", "parent": 451, "children": [453], "start_point": {"row": 91, "column": 15}, "end_point": {"row": 91, "column": 26}}, {"id": 453, "type": "binary_expression", "text": "pid == -1", "parent": 452, "children": [454, 455, 456], "start_point": {"row": 91, "column": 16}, "end_point": {"row": 91, "column": 25}}, {"id": 454, "type": "identifier", "text": "pid", "parent": 453, "children": [], "start_point": {"row": 91, "column": 16}, "end_point": {"row": 91, "column": 19}}, {"id": 455, "type": "==", "text": "==", "parent": 453, "children": [], "start_point": {"row": 91, "column": 20}, "end_point": {"row": 91, "column": 22}}, {"id": 456, "type": "number_literal", "text": "-1", "parent": 453, "children": [], "start_point": {"row": 91, "column": 23}, "end_point": {"row": 91, "column": 25}}, {"id": 457, "type": "call_expression", "text": "printf(\"ERORR on fork\\n\")", "parent": 451, "children": [458, 459], "start_point": {"row": 92, "column": 16}, "end_point": {"row": 92, "column": 41}}, {"id": 458, "type": "identifier", "text": "printf", "parent": 457, "children": [], "start_point": {"row": 92, "column": 16}, "end_point": {"row": 92, "column": 22}}, {"id": 459, "type": "argument_list", "text": "(\"ERORR on fork\\n\")", "parent": 457, "children": [460], "start_point": {"row": 92, "column": 22}, "end_point": {"row": 92, "column": 41}}, {"id": 460, "type": "string_literal", "text": "\"ERORR on fork\\n\"", "parent": 459, "children": [461], "start_point": {"row": 92, "column": 23}, "end_point": {"row": 92, "column": 40}}, {"id": 461, "type": "escape_sequence", "text": "\\n", "parent": 460, "children": [], "start_point": {"row": 92, "column": 37}, "end_point": {"row": 92, "column": 39}}, {"id": 462, "type": "call_expression", "text": "exit(EXIT_FAILURE)", "parent": 451, "children": [463, 464], "start_point": {"row": 93, "column": 16}, "end_point": {"row": 93, "column": 34}}, {"id": 463, "type": "identifier", "text": "exit", "parent": 462, "children": [], "start_point": {"row": 93, "column": 16}, "end_point": {"row": 93, "column": 20}}, {"id": 464, "type": "argument_list", "text": "(EXIT_FAILURE)", "parent": 462, "children": [465], "start_point": {"row": 93, "column": 20}, "end_point": {"row": 93, "column": 34}}, {"id": 465, "type": "identifier", "text": "EXIT_FAILURE", "parent": 464, "children": [], "start_point": {"row": 93, "column": 21}, "end_point": {"row": 93, "column": 33}}, {"id": 466, "type": "else_clause", "text": "else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }", "parent": 451, "children": [467], "start_point": {"row": 94, "column": 14}, "end_point": {"row": 99, "column": 13}}, {"id": 467, "type": "if_statement", "text": "if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }", "parent": 466, "children": [468, 484], "start_point": {"row": 94, "column": 19}, "end_point": {"row": 99, "column": 13}}, {"id": 468, "type": "parenthesized_expression", "text": "(pid == 0)", "parent": 467, "children": [469], "start_point": {"row": 94, "column": 22}, "end_point": {"row": 94, "column": 32}}, {"id": 469, "type": "binary_expression", "text": "pid == 0", "parent": 468, "children": [470, 471, 472], "start_point": {"row": 94, "column": 23}, "end_point": {"row": 94, "column": 31}}, {"id": 470, "type": "identifier", "text": "pid", "parent": 469, "children": [], "start_point": {"row": 94, "column": 23}, "end_point": {"row": 94, "column": 26}}, {"id": 471, "type": "==", "text": "==", "parent": 469, "children": [], "start_point": {"row": 94, "column": 27}, "end_point": {"row": 94, "column": 29}}, {"id": 472, "type": "number_literal", "text": "0", "parent": 469, "children": [], "start_point": {"row": 94, "column": 30}, "end_point": {"row": 94, "column": 31}}, {"id": 473, "type": "call_expression", "text": "execvp(argv[0], argv)", "parent": 467, "children": [474, 475], "start_point": {"row": 95, "column": 16}, "end_point": {"row": 95, "column": 37}}, {"id": 474, "type": "identifier", "text": "execvp", "parent": 473, "children": [], "start_point": {"row": 95, "column": 16}, "end_point": {"row": 95, "column": 22}}, {"id": 475, "type": "argument_list", "text": "(argv[0], argv)", "parent": 473, "children": [476, 479], "start_point": {"row": 95, "column": 22}, "end_point": {"row": 95, "column": 37}}, {"id": 476, "type": "subscript_expression", "text": "argv[0]", "parent": 475, "children": [477, 478], "start_point": {"row": 95, "column": 23}, "end_point": {"row": 95, "column": 30}}, {"id": 477, "type": "identifier", "text": "argv", "parent": 476, "children": [], "start_point": {"row": 95, "column": 23}, "end_point": {"row": 95, "column": 27}}, {"id": 478, "type": "number_literal", "text": "0", "parent": 476, "children": [], "start_point": {"row": 95, "column": 28}, "end_point": {"row": 95, "column": 29}}, {"id": 479, "type": "identifier", "text": "argv", "parent": 475, "children": [], "start_point": {"row": 95, "column": 32}, "end_point": {"row": 95, "column": 36}}, {"id": 480, "type": "call_expression", "text": "exit(0)", "parent": 467, "children": [481, 482], "start_point": {"row": 96, "column": 16}, "end_point": {"row": 96, "column": 23}}, {"id": 481, "type": "identifier", "text": "exit", "parent": 480, "children": [], "start_point": {"row": 96, "column": 16}, "end_point": {"row": 96, "column": 20}}, {"id": 482, "type": "argument_list", "text": "(0)", "parent": 480, "children": [483], "start_point": {"row": 96, "column": 20}, "end_point": {"row": 96, "column": 23}}, {"id": 483, "type": "number_literal", "text": "0", "parent": 482, "children": [], "start_point": {"row": 96, "column": 21}, "end_point": {"row": 96, "column": 22}}, {"id": 484, "type": "else_clause", "text": "else {\n while(waitpid(-1, NULL, 0) > 0);\n }", "parent": 467, "children": [], "start_point": {"row": 97, "column": 14}, "end_point": {"row": 99, "column": 13}}, {"id": 485, "type": "while_statement", "text": "while(waitpid(-1, NULL, 0) > 0);", "parent": 484, "children": [486], "start_point": {"row": 98, "column": 16}, "end_point": {"row": 98, "column": 48}}, {"id": 486, "type": "parenthesized_expression", "text": "(waitpid(-1, NULL, 0) > 0)", "parent": 485, "children": [487], "start_point": {"row": 98, "column": 21}, "end_point": {"row": 98, "column": 47}}, {"id": 487, "type": "binary_expression", "text": "waitpid(-1, NULL, 0) > 0", "parent": 486, "children": [488, 495, 496], "start_point": {"row": 98, "column": 22}, "end_point": {"row": 98, "column": 46}}, {"id": 488, "type": "call_expression", "text": "waitpid(-1, NULL, 0)", "parent": 487, "children": [489, 490], "start_point": {"row": 98, "column": 22}, "end_point": {"row": 98, "column": 42}}, {"id": 489, "type": "identifier", "text": "waitpid", "parent": 488, "children": [], "start_point": {"row": 98, "column": 22}, "end_point": {"row": 98, "column": 29}}, {"id": 490, "type": "argument_list", "text": "(-1, NULL, 0)", "parent": 488, "children": [491, 492, 494], "start_point": {"row": 98, "column": 29}, "end_point": {"row": 98, "column": 42}}, {"id": 491, "type": "number_literal", "text": "-1", "parent": 490, "children": [], "start_point": {"row": 98, "column": 30}, "end_point": {"row": 98, "column": 32}}, {"id": 492, "type": "null", "text": "NULL", "parent": 490, "children": [493], "start_point": {"row": 98, "column": 34}, "end_point": {"row": 98, "column": 38}}, {"id": 493, "type": "NULL", "text": "NULL", "parent": 492, "children": [], "start_point": {"row": 98, "column": 34}, "end_point": {"row": 98, "column": 38}}, {"id": 494, "type": "number_literal", "text": "0", "parent": 490, "children": [], "start_point": {"row": 98, "column": 40}, "end_point": {"row": 98, "column": 41}}, {"id": 495, "type": ">", "text": ">", "parent": 487, "children": [], "start_point": {"row": 98, "column": 43}, "end_point": {"row": 98, "column": 44}}, {"id": 496, "type": "number_literal", "text": "0", "parent": 487, "children": [], "start_point": {"row": 98, "column": 45}, "end_point": {"row": 98, "column": 46}}, {"id": 497, "type": "function_definition", "text": "int main(int argc, char *argv[]){\n int valid = 0;\n char *line = (char*)malloc(DEFAULT_SIZE);\n for(int i = 0;i<DEFAULT_SIZE;i++)\n history[i] = (char*)malloc(DEFAULT_SIZE);\n long size;\n char *buf;\n char *ptr;\n bzero(argv, DEFAULT_SIZE); //Clear argument array\n while(1){\n printf(\"Shell->\");\n read_line(line);\n parse_line(line,argv);\n execute(argv);\n for(int j = 0; j < argc;j++){\n argv[j] = NULL;\n }\n }\n}", "parent": null, "children": [498, 499], "start_point": {"row": 104, "column": 0}, "end_point": {"row": 122, "column": 1}}, {"id": 498, "type": "primitive_type", "text": "int", "parent": 497, "children": [], "start_point": {"row": 104, "column": 0}, "end_point": {"row": 104, "column": 3}}, {"id": 499, "type": "function_declarator", "text": "main(int argc, char *argv[])", "parent": 497, "children": [500, 501], "start_point": {"row": 104, "column": 4}, "end_point": {"row": 104, "column": 32}}, {"id": 500, "type": "identifier", "text": "main", "parent": 499, "children": [], "start_point": {"row": 104, "column": 4}, "end_point": {"row": 104, "column": 8}}, {"id": 501, "type": "parameter_list", "text": "(int argc, char *argv[])", "parent": 499, "children": [502, 505], "start_point": {"row": 104, "column": 8}, "end_point": {"row": 104, "column": 32}}, {"id": 502, "type": "parameter_declaration", "text": "int argc", "parent": 501, "children": [503, 504], "start_point": {"row": 104, "column": 9}, "end_point": {"row": 104, "column": 17}}, {"id": 503, "type": "primitive_type", "text": "int", "parent": 502, "children": [], "start_point": {"row": 104, "column": 9}, "end_point": {"row": 104, "column": 12}}, {"id": 504, "type": "identifier", "text": "argc", "parent": 502, "children": [], "start_point": {"row": 104, "column": 13}, "end_point": {"row": 104, "column": 17}}, {"id": 505, "type": "parameter_declaration", "text": "char *argv[]", "parent": 501, "children": [506, 507], "start_point": {"row": 104, "column": 19}, "end_point": {"row": 104, "column": 31}}, {"id": 506, "type": "primitive_type", "text": "char", "parent": 505, "children": [], "start_point": {"row": 104, "column": 19}, "end_point": {"row": 104, "column": 23}}, {"id": 507, "type": "pointer_declarator", "text": "*argv[]", "parent": 505, "children": [508, 509], "start_point": {"row": 104, "column": 24}, "end_point": {"row": 104, "column": 31}}, {"id": 508, "type": "*", "text": "*", "parent": 507, "children": [], "start_point": {"row": 104, "column": 24}, "end_point": {"row": 104, "column": 25}}, {"id": 509, "type": "array_declarator", "text": "argv[]", "parent": 507, "children": [510], "start_point": {"row": 104, "column": 25}, "end_point": {"row": 104, "column": 31}}, {"id": 510, "type": "identifier", "text": "argv", "parent": 509, "children": [], "start_point": {"row": 104, "column": 25}, "end_point": {"row": 104, "column": 29}}, {"id": 511, "type": "declaration", "text": "int valid = 0;", "parent": 497, "children": [512, 513], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 18}}, {"id": 512, "type": "primitive_type", "text": "int", "parent": 511, "children": [], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 7}}, {"id": 513, "type": "init_declarator", "text": "valid = 0", "parent": 511, "children": [514, 515, 516], "start_point": {"row": 105, "column": 8}, "end_point": {"row": 105, "column": 17}}, {"id": 514, "type": "identifier", "text": "valid", "parent": 513, "children": [], "start_point": {"row": 105, "column": 8}, "end_point": {"row": 105, "column": 13}}, {"id": 515, "type": "=", "text": "=", "parent": 513, "children": [], "start_point": {"row": 105, "column": 14}, "end_point": {"row": 105, "column": 15}}, {"id": 516, "type": "number_literal", "text": "0", "parent": 513, "children": [], "start_point": {"row": 105, "column": 16}, "end_point": {"row": 105, "column": 17}}, {"id": 517, "type": "declaration", "text": "char *line = (char*)malloc(DEFAULT_SIZE);", "parent": 497, "children": [518, 519], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 45}}, {"id": 518, "type": "primitive_type", "text": "char", "parent": 517, "children": [], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 8}}, {"id": 519, "type": "init_declarator", "text": "*line = (char*)malloc(DEFAULT_SIZE)", "parent": 517, "children": [520, 523, 524], "start_point": {"row": 106, "column": 9}, "end_point": {"row": 106, "column": 44}}, {"id": 520, "type": "pointer_declarator", "text": "*line", "parent": 519, "children": [521, 522], "start_point": {"row": 106, "column": 9}, "end_point": {"row": 106, "column": 14}}, {"id": 521, "type": "*", "text": "*", "parent": 520, "children": [], "start_point": {"row": 106, "column": 9}, "end_point": {"row": 106, "column": 10}}, {"id": 522, "type": "identifier", "text": "line", "parent": 520, "children": [], "start_point": {"row": 106, "column": 10}, "end_point": {"row": 106, "column": 14}}, {"id": 523, "type": "=", "text": "=", "parent": 519, "children": [], "start_point": {"row": 106, "column": 15}, "end_point": {"row": 106, "column": 16}}, {"id": 524, "type": "cast_expression", "text": "(char*)malloc(DEFAULT_SIZE)", "parent": 519, "children": [525, 529], "start_point": {"row": 106, "column": 17}, "end_point": {"row": 106, "column": 44}}, {"id": 525, "type": "type_descriptor", "text": "char*", "parent": 524, "children": [526, 527], "start_point": {"row": 106, "column": 18}, "end_point": {"row": 106, "column": 23}}, {"id": 526, "type": "primitive_type", "text": "char", "parent": 525, "children": [], "start_point": {"row": 106, "column": 18}, "end_point": {"row": 106, "column": 22}}, {"id": 527, "type": "abstract_pointer_declarator", "text": "*", "parent": 525, "children": [528], "start_point": {"row": 106, "column": 22}, "end_point": {"row": 106, "column": 23}}, {"id": 528, "type": "*", "text": "*", "parent": 527, "children": [], "start_point": {"row": 106, "column": 22}, "end_point": {"row": 106, "column": 23}}, {"id": 529, "type": "call_expression", "text": "malloc(DEFAULT_SIZE)", "parent": 524, "children": [530, 531], "start_point": {"row": 106, "column": 24}, "end_point": {"row": 106, "column": 44}}, {"id": 530, "type": "identifier", "text": "malloc", "parent": 529, "children": [], "start_point": {"row": 106, "column": 24}, "end_point": {"row": 106, "column": 30}}, {"id": 531, "type": "argument_list", "text": "(DEFAULT_SIZE)", "parent": 529, "children": [532], "start_point": {"row": 106, "column": 30}, "end_point": {"row": 106, "column": 44}}, {"id": 532, "type": "identifier", "text": "DEFAULT_SIZE", "parent": 531, "children": [], "start_point": {"row": 106, "column": 31}, "end_point": {"row": 106, "column": 43}}, {"id": 533, "type": "for_statement", "text": "for(int i = 0;i<DEFAULT_SIZE;i++)\n history[i] = (char*)malloc(DEFAULT_SIZE);", "parent": 497, "children": [534, 540, 544], "start_point": {"row": 107, "column": 4}, "end_point": {"row": 108, "column": 49}}, {"id": 534, "type": "declaration", "text": "int i = 0;", "parent": 533, "children": [535, 536], "start_point": {"row": 107, "column": 8}, "end_point": {"row": 107, "column": 18}}, {"id": 535, "type": "primitive_type", "text": "int", "parent": 534, "children": [], "start_point": {"row": 107, "column": 8}, "end_point": {"row": 107, "column": 11}}, {"id": 536, "type": "init_declarator", "text": "i = 0", "parent": 534, "children": [537, 538, 539], "start_point": {"row": 107, "column": 12}, "end_point": {"row": 107, "column": 17}}, {"id": 537, "type": "identifier", "text": "i", "parent": 536, "children": [], "start_point": {"row": 107, "column": 12}, "end_point": {"row": 107, "column": 13}}, {"id": 538, "type": "=", "text": "=", "parent": 536, "children": [], "start_point": {"row": 107, "column": 14}, "end_point": {"row": 107, "column": 15}}, {"id": 539, "type": "number_literal", "text": "0", "parent": 536, "children": [], "start_point": {"row": 107, "column": 16}, "end_point": {"row": 107, "column": 17}}, {"id": 540, "type": "binary_expression", "text": "i<DEFAULT_SIZE", "parent": 533, "children": [541, 542, 543], "start_point": {"row": 107, "column": 18}, "end_point": {"row": 107, "column": 32}}, {"id": 541, "type": "identifier", "text": "i", "parent": 540, "children": [], "start_point": {"row": 107, "column": 18}, "end_point": {"row": 107, "column": 19}}, {"id": 542, "type": "<", "text": "<", "parent": 540, "children": [], "start_point": {"row": 107, "column": 19}, "end_point": {"row": 107, "column": 20}}, {"id": 543, "type": "identifier", "text": "DEFAULT_SIZE", "parent": 540, "children": [], "start_point": {"row": 107, "column": 20}, "end_point": {"row": 107, "column": 32}}, {"id": 544, "type": "update_expression", "text": "i++", "parent": 533, "children": [545, 546], "start_point": {"row": 107, "column": 33}, "end_point": {"row": 107, "column": 36}}, {"id": 545, "type": "identifier", "text": "i", "parent": 544, "children": [], "start_point": {"row": 107, "column": 33}, "end_point": {"row": 107, "column": 34}}, {"id": 546, "type": "++", "text": "++", "parent": 544, "children": [], "start_point": {"row": 107, "column": 34}, "end_point": {"row": 107, "column": 36}}, {"id": 547, "type": "assignment_expression", "text": "history[i] = (char*)malloc(DEFAULT_SIZE)", "parent": 533, "children": [548, 551, 552], "start_point": {"row": 108, "column": 8}, "end_point": {"row": 108, "column": 48}}, {"id": 548, "type": "subscript_expression", "text": "history[i]", "parent": 547, "children": [549, 550], "start_point": {"row": 108, "column": 8}, "end_point": {"row": 108, "column": 18}}, {"id": 549, "type": "identifier", "text": "history", "parent": 548, "children": [], "start_point": {"row": 108, "column": 8}, "end_point": {"row": 108, "column": 15}}, {"id": 550, "type": "identifier", "text": "i", "parent": 548, "children": [], "start_point": {"row": 108, "column": 16}, "end_point": {"row": 108, "column": 17}}, {"id": 551, "type": "=", "text": "=", "parent": 547, "children": [], "start_point": {"row": 108, "column": 19}, "end_point": {"row": 108, "column": 20}}, {"id": 552, "type": "cast_expression", "text": "(char*)malloc(DEFAULT_SIZE)", "parent": 547, "children": [553, 557], "start_point": {"row": 108, "column": 21}, "end_point": {"row": 108, "column": 48}}, {"id": 553, "type": "type_descriptor", "text": "char*", "parent": 552, "children": [554, 555], "start_point": {"row": 108, "column": 22}, "end_point": {"row": 108, "column": 27}}, {"id": 554, "type": "primitive_type", "text": "char", "parent": 553, "children": [], "start_point": {"row": 108, "column": 22}, "end_point": {"row": 108, "column": 26}}, {"id": 555, "type": "abstract_pointer_declarator", "text": "*", "parent": 553, "children": [556], "start_point": {"row": 108, "column": 26}, "end_point": {"row": 108, "column": 27}}, {"id": 556, "type": "*", "text": "*", "parent": 555, "children": [], "start_point": {"row": 108, "column": 26}, "end_point": {"row": 108, "column": 27}}, {"id": 557, "type": "call_expression", "text": "malloc(DEFAULT_SIZE)", "parent": 552, "children": [558, 559], "start_point": {"row": 108, "column": 28}, "end_point": {"row": 108, "column": 48}}, {"id": 558, "type": "identifier", "text": "malloc", "parent": 557, "children": [], "start_point": {"row": 108, "column": 28}, "end_point": {"row": 108, "column": 34}}, {"id": 559, "type": "argument_list", "text": "(DEFAULT_SIZE)", "parent": 557, "children": [560], "start_point": {"row": 108, "column": 34}, "end_point": {"row": 108, "column": 48}}, {"id": 560, "type": "identifier", "text": "DEFAULT_SIZE", "parent": 559, "children": [], "start_point": {"row": 108, "column": 35}, "end_point": {"row": 108, "column": 47}}, {"id": 561, "type": "declaration", "text": "long size;", "parent": 497, "children": [562, 564], "start_point": {"row": 109, "column": 4}, "end_point": {"row": 109, "column": 14}}, {"id": 562, "type": "sized_type_specifier", "text": "long", "parent": 561, "children": [563], "start_point": {"row": 109, "column": 4}, "end_point": {"row": 109, "column": 8}}, {"id": 563, "type": "long", "text": "long", "parent": 562, "children": [], "start_point": {"row": 109, "column": 4}, "end_point": {"row": 109, "column": 8}}, {"id": 564, "type": "identifier", "text": "size", "parent": 561, "children": [], "start_point": {"row": 109, "column": 9}, "end_point": {"row": 109, "column": 13}}, {"id": 565, "type": "declaration", "text": "char *buf;", "parent": 497, "children": [566, 567], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 110, "column": 14}}, {"id": 566, "type": "primitive_type", "text": "char", "parent": 565, "children": [], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 110, "column": 8}}, {"id": 567, "type": "pointer_declarator", "text": "*buf", "parent": 565, "children": [568, 569], "start_point": {"row": 110, "column": 9}, "end_point": {"row": 110, "column": 13}}, {"id": 568, "type": "*", "text": "*", "parent": 567, "children": [], "start_point": {"row": 110, "column": 9}, "end_point": {"row": 110, "column": 10}}, {"id": 569, "type": "identifier", "text": "buf", "parent": 567, "children": [], "start_point": {"row": 110, "column": 10}, "end_point": {"row": 110, "column": 13}}, {"id": 570, "type": "declaration", "text": "char *ptr;", "parent": 497, "children": [571, 572], "start_point": {"row": 111, "column": 4}, "end_point": {"row": 111, "column": 14}}, {"id": 571, "type": "primitive_type", "text": "char", "parent": 570, "children": [], "start_point": {"row": 111, "column": 4}, "end_point": {"row": 111, "column": 8}}, {"id": 572, "type": "pointer_declarator", "text": "*ptr", "parent": 570, "children": [573, 574], "start_point": {"row": 111, "column": 9}, "end_point": {"row": 111, "column": 13}}, {"id": 573, "type": "*", "text": "*", "parent": 572, "children": [], "start_point": {"row": 111, "column": 9}, "end_point": {"row": 111, "column": 10}}, {"id": 574, "type": "identifier", "text": "ptr", "parent": 572, "children": [], "start_point": {"row": 111, "column": 10}, "end_point": {"row": 111, "column": 13}}, {"id": 575, "type": "call_expression", "text": "bzero(argv, DEFAULT_SIZE)", "parent": 497, "children": [576, 577], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 29}}, {"id": 576, "type": "identifier", "text": "bzero", "parent": 575, "children": [], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 9}}, {"id": 577, "type": "argument_list", "text": "(argv, DEFAULT_SIZE)", "parent": 575, "children": [578, 579], "start_point": {"row": 112, "column": 9}, "end_point": {"row": 112, "column": 29}}, {"id": 578, "type": "identifier", "text": "argv", "parent": 577, "children": [], "start_point": {"row": 112, "column": 10}, "end_point": {"row": 112, "column": 14}}, {"id": 579, "type": "identifier", "text": "DEFAULT_SIZE", "parent": 577, "children": [], "start_point": {"row": 112, "column": 16}, "end_point": {"row": 112, "column": 28}}, {"id": 580, "type": "while_statement", "text": "while(1){\n printf(\"Shell->\");\n read_line(line);\n parse_line(line,argv);\n execute(argv);\n for(int j = 0; j < argc;j++){\n argv[j] = NULL;\n }\n }", "parent": 497, "children": [581], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 121, "column": 5}}, {"id": 581, "type": "parenthesized_expression", "text": "(1)", "parent": 580, "children": [582], "start_point": {"row": 113, "column": 9}, "end_point": {"row": 113, "column": 12}}, {"id": 582, "type": "number_literal", "text": "1", "parent": 581, "children": [], "start_point": {"row": 113, "column": 10}, "end_point": {"row": 113, "column": 11}}, {"id": 583, "type": "call_expression", "text": "printf(\"Shell->\")", "parent": 580, "children": [584, 585], "start_point": {"row": 114, "column": 8}, "end_point": {"row": 114, "column": 25}}, {"id": 584, "type": "identifier", "text": "printf", "parent": 583, "children": [], "start_point": {"row": 114, "column": 8}, "end_point": {"row": 114, "column": 14}}, {"id": 585, "type": "argument_list", "text": "(\"Shell->\")", "parent": 583, "children": [586], "start_point": {"row": 114, "column": 14}, "end_point": {"row": 114, "column": 25}}, {"id": 586, "type": "string_literal", "text": "\"Shell->\"", "parent": 585, "children": [], "start_point": {"row": 114, "column": 15}, "end_point": {"row": 114, "column": 24}}, {"id": 587, "type": "call_expression", "text": "read_line(line)", "parent": 580, "children": [588, 589], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 23}}, {"id": 588, "type": "identifier", "text": "read_line", "parent": 587, "children": [], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 17}}, {"id": 589, "type": "argument_list", "text": "(line)", "parent": 587, "children": [590], "start_point": {"row": 115, "column": 17}, "end_point": {"row": 115, "column": 23}}, {"id": 590, "type": "identifier", "text": "line", "parent": 589, "children": [], "start_point": {"row": 115, "column": 18}, "end_point": {"row": 115, "column": 22}}, {"id": 591, "type": "call_expression", "text": "parse_line(line,argv)", "parent": 580, "children": [592, 593], "start_point": {"row": 116, "column": 8}, "end_point": {"row": 116, "column": 29}}, {"id": 592, "type": "identifier", "text": "parse_line", "parent": 591, "children": [], "start_point": {"row": 116, "column": 8}, "end_point": {"row": 116, "column": 18}}, {"id": 593, "type": "argument_list", "text": "(line,argv)", "parent": 591, "children": [594, 595], "start_point": {"row": 116, "column": 18}, "end_point": {"row": 116, "column": 29}}, {"id": 594, "type": "identifier", "text": "line", "parent": 593, "children": [], "start_point": {"row": 116, "column": 19}, "end_point": {"row": 116, "column": 23}}, {"id": 595, "type": "identifier", "text": "argv", "parent": 593, "children": [], "start_point": {"row": 116, "column": 24}, "end_point": {"row": 116, "column": 28}}, {"id": 596, "type": "call_expression", "text": "execute(argv)", "parent": 580, "children": [597, 598], "start_point": {"row": 117, "column": 8}, "end_point": {"row": 117, "column": 21}}, {"id": 597, "type": "identifier", "text": "execute", "parent": 596, "children": [], "start_point": {"row": 117, "column": 8}, "end_point": {"row": 117, "column": 15}}, {"id": 598, "type": "argument_list", "text": "(argv)", "parent": 596, "children": [599], "start_point": {"row": 117, "column": 15}, "end_point": {"row": 117, "column": 21}}, {"id": 599, "type": "identifier", "text": "argv", "parent": 598, "children": [], "start_point": {"row": 117, "column": 16}, "end_point": {"row": 117, "column": 20}}, {"id": 600, "type": "for_statement", "text": "for(int j = 0; j < argc;j++){\n argv[j] = NULL;\n }", "parent": 580, "children": [601, 607, 611], "start_point": {"row": 118, "column": 8}, "end_point": {"row": 120, "column": 9}}, {"id": 601, "type": "declaration", "text": "int j = 0;", "parent": 600, "children": [602, 603], "start_point": {"row": 118, "column": 12}, "end_point": {"row": 118, "column": 22}}, {"id": 602, "type": "primitive_type", "text": "int", "parent": 601, "children": [], "start_point": {"row": 118, "column": 12}, "end_point": {"row": 118, "column": 15}}, {"id": 603, "type": "init_declarator", "text": "j = 0", "parent": 601, "children": [604, 605, 606], "start_point": {"row": 118, "column": 16}, "end_point": {"row": 118, "column": 21}}, {"id": 604, "type": "identifier", "text": "j", "parent": 603, "children": [], "start_point": {"row": 118, "column": 16}, "end_point": {"row": 118, "column": 17}}, {"id": 605, "type": "=", "text": "=", "parent": 603, "children": [], "start_point": {"row": 118, "column": 18}, "end_point": {"row": 118, "column": 19}}, {"id": 606, "type": "number_literal", "text": "0", "parent": 603, "children": [], "start_point": {"row": 118, "column": 20}, "end_point": {"row": 118, "column": 21}}, {"id": 607, "type": "binary_expression", "text": "j < argc", "parent": 600, "children": [608, 609, 610], "start_point": {"row": 118, "column": 23}, "end_point": {"row": 118, "column": 31}}, {"id": 608, "type": "identifier", "text": "j", "parent": 607, "children": [], "start_point": {"row": 118, "column": 23}, "end_point": {"row": 118, "column": 24}}, {"id": 609, "type": "<", "text": "<", "parent": 607, "children": [], "start_point": {"row": 118, "column": 25}, "end_point": {"row": 118, "column": 26}}, {"id": 610, "type": "identifier", "text": "argc", "parent": 607, "children": [], "start_point": {"row": 118, "column": 27}, "end_point": {"row": 118, "column": 31}}, {"id": 611, "type": "update_expression", "text": "j++", "parent": 600, "children": [612, 613], "start_point": {"row": 118, "column": 32}, "end_point": {"row": 118, "column": 35}}, {"id": 612, "type": "identifier", "text": "j", "parent": 611, "children": [], "start_point": {"row": 118, "column": 32}, "end_point": {"row": 118, "column": 33}}, {"id": 613, "type": "++", "text": "++", "parent": 611, "children": [], "start_point": {"row": 118, "column": 33}, "end_point": {"row": 118, "column": 35}}, {"id": 614, "type": "assignment_expression", "text": "argv[j] = NULL", "parent": 600, "children": [615, 618, 619], "start_point": {"row": 119, "column": 12}, "end_point": {"row": 119, "column": 26}}, {"id": 615, "type": "subscript_expression", "text": "argv[j]", "parent": 614, "children": [616, 617], "start_point": {"row": 119, "column": 12}, "end_point": {"row": 119, "column": 19}}, {"id": 616, "type": "identifier", "text": "argv", "parent": 615, "children": [], "start_point": {"row": 119, "column": 12}, "end_point": {"row": 119, "column": 16}}, {"id": 617, "type": "identifier", "text": "j", "parent": 615, "children": [], "start_point": {"row": 119, "column": 17}, "end_point": {"row": 119, "column": 18}}, {"id": 618, "type": "=", "text": "=", "parent": 614, "children": [], "start_point": {"row": 119, "column": 20}, "end_point": {"row": 119, "column": 21}}, {"id": 619, "type": "null", "text": "NULL", "parent": 614, "children": [620], "start_point": {"row": 119, "column": 22}, "end_point": {"row": 119, "column": 26}}, {"id": 620, "type": "NULL", "text": "NULL", "parent": 619, "children": [], "start_point": {"row": 119, "column": 22}, "end_point": {"row": 119, "column": 26}}]}, "node_categories": {"declarations": {"functions": [65, 67, 117, 119, 175, 177, 260, 262, 300, 302, 497, 499], "variables": [26, 33, 40, 46, 52, 58, 70, 122, 127, 133, 180, 202, 232, 305, 311, 321, 331, 341, 443, 502, 505, 511, 517, 534, 561, 565, 570, 601], "classes": [], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16], "modules": [], "enums": []}, "statements": {"expressions": [76, 81, 85, 87, 92, 98, 106, 109, 114, 145, 151, 152, 158, 163, 169, 187, 188, 195, 198, 208, 212, 216, 217, 226, 227, 238, 242, 245, 250, 251, 255, 265, 270, 275, 280, 285, 290, 295, 316, 326, 336, 346, 352, 353, 354, 361, 362, 363, 366, 372, 378, 379, 380, 383, 389, 395, 396, 397, 400, 407, 408, 409, 415, 420, 423, 428, 429, 430, 433, 439, 448, 452, 453, 457, 462, 468, 469, 473, 476, 480, 486, 487, 488, 524, 529, 540, 544, 548, 552, 557, 575, 581, 583, 587, 591, 596, 607, 611, 615], "assignments": [78, 102, 138, 142, 157, 166, 192, 221, 547, 614], "loops": [150, 201, 231, 485, 533, 580, 600], "conditionals": [20, 24, 31, 32, 38, 39, 43, 49, 55, 59, 62, 68, 74, 75, 77, 79, 82, 84, 86, 88, 91, 93, 99, 101, 103, 107, 110, 111, 112, 113, 115, 120, 126, 132, 137, 139, 143, 146, 148, 149, 153, 159, 160, 162, 164, 167, 170, 174, 178, 185, 186, 189, 193, 196, 199, 205, 209, 211, 213, 215, 218, 220, 222, 225, 228, 235, 239, 241, 243, 246, 252, 256, 257, 263, 266, 271, 276, 281, 286, 291, 296, 303, 310, 314, 317, 319, 324, 327, 329, 334, 337, 339, 344, 347, 349, 351, 355, 360, 364, 367, 369, 373, 377, 381, 384, 386, 390, 392, 394, 398, 401, 403, 406, 410, 416, 421, 424, 427, 431, 434, 436, 440, 444, 446, 449, 451, 454, 458, 463, 465, 467, 470, 474, 477, 479, 481, 489, 500, 504, 510, 514, 522, 530, 532, 537, 541, 543, 545, 549, 550, 558, 560, 562, 564, 569, 574, 576, 578, 579, 584, 588, 590, 592, 594, 595, 597, 599, 604, 608, 610, 612, 616, 617], "returns": [258], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 45, 51, 57, 64, 90, 95, 105, 141, 191, 200, 207, 224, 230, 237, 248, 254, 259, 268, 273, 278, 283, 288, 293, 298, 315, 320, 325, 330, 335, 340, 345, 350, 356, 368, 371, 375, 385, 388, 402, 405, 411, 418, 425, 435, 438, 456, 460, 472, 478, 483, 491, 494, 496, 516, 539, 582, 586, 606], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 65, "universal_type": "function", "name": "read_line", "text_snippet": "void read_line(char *line){\n if(isHistNum){\n line = memcpy(line,history[hist_num-1],DEFAUL"}, {"node_id": 67, "universal_type": "function", "name": "unknown", "text_snippet": "read_line(char *line)"}, {"node_id": 117, "universal_type": "function", "name": "parse_line", "text_snippet": "void parse_line(char *line,char *argv[]){\n char *token;\n position = 0;\n token = strtok(line"}, {"node_id": 119, "universal_type": "function", "name": "unknown", "text_snippet": "parse_line(char *line,char *argv[])"}, {"node_id": 175, "universal_type": "function", "name": "nat_history", "text_snippet": "int nat_history(char *argv[]){\n if(position==2){\n hist_num = atoi(argv[1]);\n for(in"}, {"node_id": 177, "universal_type": "function", "name": "unknown", "text_snippet": "nat_history(char *argv[])"}, {"node_id": 260, "universal_type": "function", "name": "help", "text_snippet": "void help(){\n printf(\"Shell Basic Commands\\n\");\n printf(\"cd <path> - Change Directory to the o"}, {"node_id": 262, "universal_type": "function", "name": "unknown", "text_snippet": "help()"}, {"node_id": 300, "universal_type": "function", "name": "execute", "text_snippet": "void execute(char *argv[]){\n\n // Check if command is valid as a native command\n char exit_[10]"}, {"node_id": 302, "universal_type": "function", "name": "unknown", "text_snippet": "execute(char *argv[])"}, {"node_id": 497, "universal_type": "function", "name": "main", "text_snippet": "int main(int argc, char *argv[]){\n int valid = 0;\n char *line = (char*)malloc(DEFAULT_SIZE);\n "}, {"node_id": 499, "universal_type": "function", "name": "unknown", "text_snippet": "main(int argc, char *argv[])"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <sys/types.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <sys/wait.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 <string.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <stdlib.h>\n"}, {"node_id": 16, "text": "#include"}]}, "original_source_code": "#include <sys/types.h>\n#include <sys/wait.h>\n#include <stdio.h>\n#include <unistd.h>\n#include <string.h>\n#include <stdlib.h>\n\n#define TOKEN_DELIMETERS \" \\t\\r\\n\\a\"\n#define DEFAULT_SIZE 64\n\nchar *history[DEFAULT_SIZE];\nchar *argv[DEFAULT_SIZE];\nint hist_count = 0;\nint hist_num = 0;\nint position = 0;\nshort isHistNum = 0;\n\nvoid read_line(char *line){\n if(isHistNum){\n line = memcpy(line,history[hist_num-1],DEFAULT_SIZE);\n printf(\"\\n\");\n }\n else{\n gets(line);\n }\n isHistNum = 0;\n memcpy(history[hist_count],line,DEFAULT_SIZE);\n hist_count++;\n}\n\nvoid parse_line(char *line,char *argv[]){\n char *token;\n position = 0;\n token = strtok(line,TOKEN_DELIMETERS);\n while(token!=NULL){\n argv[position] = token;\n position++;\n token =strtok(NULL,TOKEN_DELIMETERS);\n }\n}\n\nint nat_history(char *argv[]){\n if(position==2){\n hist_num = atoi(argv[1]);\n for(int k = 1; k<=hist_count;k++){\n if(hist_num == k){\n isHistNum = 1;\n }\n }\n }\n if(isHistNum==0){\n for(int i =0; i <hist_count;i++)\n printf(\" %d %s\\n\",(i+1),history[i]);\n }\n return 1;\n}\n\nvoid help(){\n printf(\"Shell Basic Commands\\n\");\n printf(\"cd <path> - Change Directory to the one specified in <path>\\n\");\n printf(\"history - Show list of previous commands executed\\n\");\n printf(\"history <n> - Execute the nth command in the history\\n\");\n printf(\"ls - Show the contents of the current directory\\n\");\n printf(\"ls -l - Show the contents of the current directory with more detail\\n\");\n printf(\"exit - Terminate the current CLI\\n\");\n}\n\nvoid execute(char *argv[]){\n\n // Check if command is valid as a native command\n char exit_[10]; strcpy(exit_, \"exit\");\n char hist[10]; strcpy(hist, \"history\");\n char cd[10]; strcpy(cd, \"cd\");\n char help_[10]; strcpy(help_, \"help\");\n\n //Native commands\n if(argv[0] != NULL) {\n if (strcmp(argv[0], exit_) == 0) {\n exit(0);\n } else if (strcmp(argv[0], hist) == 0) {\n nat_history(argv);\n } else if (strcmp(argv[0], cd) == 0) {\n if(argv[1] == NULL)\n chdir(\"/\");\n else\n chdir(argv[1]);\n } else if (strcmp(argv[0], help_) == 0) {\n help();\n } else {\n //Execute any other command. Uses child process.\n pid_t pid = fork();\n if (pid == -1) {\n printf(\"ERORR on fork\\n\");\n exit(EXIT_FAILURE);\n } else if (pid == 0) {\n execvp(argv[0], argv);\n exit(0);\n } else {\n while(waitpid(-1, NULL, 0) > 0);\n }\n }\n }\n}\n\nint main(int argc, char *argv[]){\n int valid = 0;\n char *line = (char*)malloc(DEFAULT_SIZE);\n for(int i = 0;i<DEFAULT_SIZE;i++)\n history[i] = (char*)malloc(DEFAULT_SIZE);\n long size;\n char *buf;\n char *ptr;\n bzero(argv, DEFAULT_SIZE); //Clear argument array\n while(1){\n printf(\"Shell->\");\n read_line(line);\n parse_line(line,argv);\n execute(argv);\n for(int j = 0; j < argc;j++){\n argv[j] = NULL;\n }\n }\n}\n"}
| 81,234
|
c
|
/*
* Academic License - for use in teaching, academic research, and meeting
* course requirements at degree granting institutions only. Not for
* government, commercial, or other organizational use.
*
* mtimes.h
*
* Code generation for function 'mtimes'
*
*/
#ifndef MTIMES_H
#define MTIMES_H
/* Include files */
#include <cstddef>
#include <cstdlib>
#include "rtwtypes.h"
#include "ADMMGainDesign3D_types.h"
/* Function Declarations */
extern void b_sparse_mtimes(const emxArray_real_T *a_d, const emxArray_int32_T
*a_colidx, const emxArray_int32_T *a_rowidx, int a_m, const emxArray_real_T
*b_d, const emxArray_int32_T *b_colidx, const emxArray_int32_T *b_rowidx,
coder_internal_sparse_1 *c);
extern void sparse_mtimes(const emxArray_real_T *a_d, const emxArray_int32_T
*a_colidx, const emxArray_int32_T *a_rowidx, int a_m, const emxArray_real_T
*b_d, const emxArray_int32_T *b_colidx, const emxArray_int32_T *b_rowidx, int
b_n, coder_internal_sparse *c);
#endif
/* End of code generation (mtimes.h) */
| 35.68
| 28
|
(translation_unit) "/*\n * Academic License - for use in teaching, academic research, and meeting\n * course requirements at degree granting institutions only. Not for\n * government, commercial, or other organizational use.\n *\n * mtimes.h\n *\n * Code generation for function 'mtimes'\n *\n */\n\n#ifndef MTIMES_H\n#define MTIMES_H\n\n/* Include files */\n#include <cstddef>\n#include <cstdlib>\n#include "rtwtypes.h"\n#include "ADMMGainDesign3D_types.h"\n\n/* Function Declarations */\nextern void b_sparse_mtimes(const emxArray_real_T *a_d, const emxArray_int32_T\n *a_colidx, const emxArray_int32_T *a_rowidx, int a_m, const emxArray_real_T\n *b_d, const emxArray_int32_T *b_colidx, const emxArray_int32_T *b_rowidx,\n coder_internal_sparse_1 *c);\nextern void sparse_mtimes(const emxArray_real_T *a_d, const emxArray_int32_T\n *a_colidx, const emxArray_int32_T *a_rowidx, int a_m, const emxArray_real_T\n *b_d, const emxArray_int32_T *b_colidx, const emxArray_int32_T *b_rowidx, int\n b_n, coder_internal_sparse *c);\n\n#endif\n\n/* End of code generation (mtimes.h) */\n"
(comment) "/*\n * Academic License - for use in teaching, academic research, and meeting\n * course requirements at degree granting institutions only. Not for\n * government, commercial, or other organizational use.\n *\n * mtimes.h\n *\n * Code generation for function 'mtimes'\n *\n */"
(preproc_ifdef) "#ifndef MTIMES_H\n#define MTIMES_H\n\n/* Include files */\n#include <cstddef>\n#include <cstdlib>\n#include "rtwtypes.h"\n#include "ADMMGainDesign3D_types.h"\n\n/* Function Declarations */\nextern void b_sparse_mtimes(const emxArray_real_T *a_d, const emxArray_int32_T\n *a_colidx, const emxArray_int32_T *a_rowidx, int a_m, const emxArray_real_T\n *b_d, const emxArray_int32_T *b_colidx, const emxArray_int32_T *b_rowidx,\n coder_internal_sparse_1 *c);\nextern void sparse_mtimes(const emxArray_real_T *a_d, const emxArray_int32_T\n *a_colidx, const emxArray_int32_T *a_rowidx, int a_m, const emxArray_real_T\n *b_d, const emxArray_int32_T *b_colidx, const emxArray_int32_T *b_rowidx, int\n b_n, coder_internal_sparse *c);\n\n#endif"
(#ifndef) "#ifndef"
(identifier) "MTIMES_H"
(preproc_def) "#define MTIMES_H\n"
(#define) "#define"
(identifier) "MTIMES_H"
(comment) "/* Include files */"
(preproc_include) "#include <cstddef>\n"
(#include) "#include"
(system_lib_string) "<cstddef>"
(preproc_include) "#include <cstdlib>\n"
(#include) "#include"
(system_lib_string) "<cstdlib>"
(preproc_include) "#include "rtwtypes.h"\n"
(#include) "#include"
(string_literal) ""rtwtypes.h""
(") """
(string_content) "rtwtypes.h"
(") """
(preproc_include) "#include "ADMMGainDesign3D_types.h"\n"
(#include) "#include"
(string_literal) ""ADMMGainDesign3D_types.h""
(") """
(string_content) "ADMMGainDesign3D_types.h"
(") """
(comment) "/* Function Declarations */"
(declaration) "extern void b_sparse_mtimes(const emxArray_real_T *a_d, const emxArray_int32_T\n *a_colidx, const emxArray_int32_T *a_rowidx, int a_m, const emxArray_real_T\n *b_d, const emxArray_int32_T *b_colidx, const emxArray_int32_T *b_rowidx,\n coder_internal_sparse_1 *c);"
(storage_class_specifier) "extern"
(extern) "extern"
(primitive_type) "void"
(function_declarator) "b_sparse_mtimes(const emxArray_real_T *a_d, const emxArray_int32_T\n *a_colidx, const emxArray_int32_T *a_rowidx, int a_m, const emxArray_real_T\n *b_d, const emxArray_int32_T *b_colidx, const emxArray_int32_T *b_rowidx,\n coder_internal_sparse_1 *c)"
(identifier) "b_sparse_mtimes"
(parameter_list) "(const emxArray_real_T *a_d, const emxArray_int32_T\n *a_colidx, const emxArray_int32_T *a_rowidx, int a_m, const emxArray_real_T\n *b_d, const emxArray_int32_T *b_colidx, const emxArray_int32_T *b_rowidx,\n coder_internal_sparse_1 *c)"
(() "("
(parameter_declaration) "const emxArray_real_T *a_d"
(type_qualifier) "const"
(const) "const"
(type_identifier) "emxArray_real_T"
(pointer_declarator) "*a_d"
(*) "*"
(identifier) "a_d"
(,) ","
(parameter_declaration) "const emxArray_int32_T\n *a_colidx"
(type_qualifier) "const"
(const) "const"
(type_identifier) "emxArray_int32_T"
(pointer_declarator) "*a_colidx"
(*) "*"
(identifier) "a_colidx"
(,) ","
(parameter_declaration) "const emxArray_int32_T *a_rowidx"
(type_qualifier) "const"
(const) "const"
(type_identifier) "emxArray_int32_T"
(pointer_declarator) "*a_rowidx"
(*) "*"
(identifier) "a_rowidx"
(,) ","
(parameter_declaration) "int a_m"
(primitive_type) "int"
(identifier) "a_m"
(,) ","
(parameter_declaration) "const emxArray_real_T\n *b_d"
(type_qualifier) "const"
(const) "const"
(type_identifier) "emxArray_real_T"
(pointer_declarator) "*b_d"
(*) "*"
(identifier) "b_d"
(,) ","
(parameter_declaration) "const emxArray_int32_T *b_colidx"
(type_qualifier) "const"
(const) "const"
(type_identifier) "emxArray_int32_T"
(pointer_declarator) "*b_colidx"
(*) "*"
(identifier) "b_colidx"
(,) ","
(parameter_declaration) "const emxArray_int32_T *b_rowidx"
(type_qualifier) "const"
(const) "const"
(type_identifier) "emxArray_int32_T"
(pointer_declarator) "*b_rowidx"
(*) "*"
(identifier) "b_rowidx"
(,) ","
(parameter_declaration) "coder_internal_sparse_1 *c"
(type_identifier) "coder_internal_sparse_1"
(pointer_declarator) "*c"
(*) "*"
(identifier) "c"
()) ")"
(;) ";"
(declaration) "extern void sparse_mtimes(const emxArray_real_T *a_d, const emxArray_int32_T\n *a_colidx, const emxArray_int32_T *a_rowidx, int a_m, const emxArray_real_T\n *b_d, const emxArray_int32_T *b_colidx, const emxArray_int32_T *b_rowidx, int\n b_n, coder_internal_sparse *c);"
(storage_class_specifier) "extern"
(extern) "extern"
(primitive_type) "void"
(function_declarator) "sparse_mtimes(const emxArray_real_T *a_d, const emxArray_int32_T\n *a_colidx, const emxArray_int32_T *a_rowidx, int a_m, const emxArray_real_T\n *b_d, const emxArray_int32_T *b_colidx, const emxArray_int32_T *b_rowidx, int\n b_n, coder_internal_sparse *c)"
(identifier) "sparse_mtimes"
(parameter_list) "(const emxArray_real_T *a_d, const emxArray_int32_T\n *a_colidx, const emxArray_int32_T *a_rowidx, int a_m, const emxArray_real_T\n *b_d, const emxArray_int32_T *b_colidx, const emxArray_int32_T *b_rowidx, int\n b_n, coder_internal_sparse *c)"
(() "("
(parameter_declaration) "const emxArray_real_T *a_d"
(type_qualifier) "const"
(const) "const"
(type_identifier) "emxArray_real_T"
(pointer_declarator) "*a_d"
(*) "*"
(identifier) "a_d"
(,) ","
(parameter_declaration) "const emxArray_int32_T\n *a_colidx"
(type_qualifier) "const"
(const) "const"
(type_identifier) "emxArray_int32_T"
(pointer_declarator) "*a_colidx"
(*) "*"
(identifier) "a_colidx"
(,) ","
(parameter_declaration) "const emxArray_int32_T *a_rowidx"
(type_qualifier) "const"
(const) "const"
(type_identifier) "emxArray_int32_T"
(pointer_declarator) "*a_rowidx"
(*) "*"
(identifier) "a_rowidx"
(,) ","
(parameter_declaration) "int a_m"
(primitive_type) "int"
(identifier) "a_m"
(,) ","
(parameter_declaration) "const emxArray_real_T\n *b_d"
(type_qualifier) "const"
(const) "const"
(type_identifier) "emxArray_real_T"
(pointer_declarator) "*b_d"
(*) "*"
(identifier) "b_d"
(,) ","
(parameter_declaration) "const emxArray_int32_T *b_colidx"
(type_qualifier) "const"
(const) "const"
(type_identifier) "emxArray_int32_T"
(pointer_declarator) "*b_colidx"
(*) "*"
(identifier) "b_colidx"
(,) ","
(parameter_declaration) "const emxArray_int32_T *b_rowidx"
(type_qualifier) "const"
(const) "const"
(type_identifier) "emxArray_int32_T"
(pointer_declarator) "*b_rowidx"
(*) "*"
(identifier) "b_rowidx"
(,) ","
(parameter_declaration) "int\n b_n"
(primitive_type) "int"
(identifier) "b_n"
(,) ","
(parameter_declaration) "coder_internal_sparse *c"
(type_identifier) "coder_internal_sparse"
(pointer_declarator) "*c"
(*) "*"
(identifier) "c"
()) ")"
(;) ";"
(#endif) "#endif"
(comment) "/* End of code generation (mtimes.h) */"
| 168
| 0
|
{"language": "c", "success": true, "metadata": {"lines": 28, "avg_line_length": 35.68, "nodes": 112, "errors": 0, "source_hash": "dea40b9625164e23c2648fb514f30d7a5f1c39ac8b85a1dfab38c8d7c63e89ff", "categorized_nodes": 73}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef MTIMES_H\n#define MTIMES_H\n\n/* Include files */\n#include <cstddef>\n#include <cstdlib>\n#include \"rtwtypes.h\"\n#include \"ADMMGainDesign3D_types.h\"\n\n/* Function Declarations */\nextern void b_sparse_mtimes(const emxArray_real_T *a_d, const emxArray_int32_T\n *a_colidx, const emxArray_int32_T *a_rowidx, int a_m, const emxArray_real_T\n *b_d, const emxArray_int32_T *b_colidx, const emxArray_int32_T *b_rowidx,\n coder_internal_sparse_1 *c);\nextern void sparse_mtimes(const emxArray_real_T *a_d, const emxArray_int32_T\n *a_colidx, const emxArray_int32_T *a_rowidx, int a_m, const emxArray_real_T\n *b_d, const emxArray_int32_T *b_colidx, const emxArray_int32_T *b_rowidx, int\n b_n, coder_internal_sparse *c);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 63, 111], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 30, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 2, "type": "identifier", "text": "MTIMES_H", "parent": 0, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 16}}, {"id": 3, "type": "preproc_def", "text": "#define MTIMES_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 5, "type": "identifier", "text": "MTIMES_H", "parent": 3, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 16}}, {"id": 6, "type": "preproc_include", "text": "#include <cstddef>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<cstddef>", "parent": 6, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 18}}, {"id": 9, "type": "preproc_include", "text": "#include <cstdlib>\n", "parent": 0, "children": [10, 11], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<cstdlib>", "parent": 9, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 18}}, {"id": 12, "type": "preproc_include", "text": "#include \"rtwtypes.h\"\n", "parent": 0, "children": [13, 14], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"rtwtypes.h\"", "parent": 12, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 21}}, {"id": 15, "type": "preproc_include", "text": "#include \"ADMMGainDesign3D_types.h\"\n", "parent": 0, "children": [16, 17], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"ADMMGainDesign3D_types.h\"", "parent": 15, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 35}}, {"id": 18, "type": "declaration", "text": "extern void b_sparse_mtimes(const emxArray_real_T *a_d, const emxArray_int32_T\n *a_colidx, const emxArray_int32_T *a_rowidx, int a_m, const emxArray_real_T\n *b_d, const emxArray_int32_T *b_colidx, const emxArray_int32_T *b_rowidx,\n coder_internal_sparse_1 *c);", "parent": 0, "children": [19, 21, 22], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 24, "column": 30}}, {"id": 19, "type": "storage_class_specifier", "text": "extern", "parent": 18, "children": [20], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 6}}, {"id": 20, "type": "extern", "text": "extern", "parent": 19, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 6}}, {"id": 21, "type": "primitive_type", "text": "void", "parent": 18, "children": [], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 11}}, {"id": 22, "type": "function_declarator", "text": "b_sparse_mtimes(const emxArray_real_T *a_d, const emxArray_int32_T\n *a_colidx, const emxArray_int32_T *a_rowidx, int a_m, const emxArray_real_T\n *b_d, const emxArray_int32_T *b_colidx, const emxArray_int32_T *b_rowidx,\n coder_internal_sparse_1 *c)", "parent": 18, "children": [23, 24], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 24, "column": 29}}, {"id": 23, "type": "identifier", "text": "b_sparse_mtimes", "parent": 22, "children": [], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 21, "column": 27}}, {"id": 24, "type": "parameter_list", "text": "(const emxArray_real_T *a_d, const emxArray_int32_T\n *a_colidx, const emxArray_int32_T *a_rowidx, int a_m, const emxArray_real_T\n *b_d, const emxArray_int32_T *b_colidx, const emxArray_int32_T *b_rowidx,\n coder_internal_sparse_1 *c)", "parent": 22, "children": [25, 30, 35, 40, 43, 48, 53, 58], "start_point": {"row": 21, "column": 27}, "end_point": {"row": 24, "column": 29}}, {"id": 25, "type": "parameter_declaration", "text": "const emxArray_real_T *a_d", "parent": 24, "children": [26, 27], "start_point": {"row": 21, "column": 28}, "end_point": {"row": 21, "column": 54}}, {"id": 26, "type": "type_identifier", "text": "emxArray_real_T", "parent": 25, "children": [], "start_point": {"row": 21, "column": 34}, "end_point": {"row": 21, "column": 49}}, {"id": 27, "type": "pointer_declarator", "text": "*a_d", "parent": 25, "children": [28, 29], "start_point": {"row": 21, "column": 50}, "end_point": {"row": 21, "column": 54}}, {"id": 28, "type": "*", "text": "*", "parent": 27, "children": [], "start_point": {"row": 21, "column": 50}, "end_point": {"row": 21, "column": 51}}, {"id": 29, "type": "identifier", "text": "a_d", "parent": 27, "children": [], "start_point": {"row": 21, "column": 51}, "end_point": {"row": 21, "column": 54}}, {"id": 30, "type": "parameter_declaration", "text": "const emxArray_int32_T\n *a_colidx", "parent": 24, "children": [31, 32], "start_point": {"row": 21, "column": 56}, "end_point": {"row": 22, "column": 11}}, {"id": 31, "type": "type_identifier", "text": "emxArray_int32_T", "parent": 30, "children": [], "start_point": {"row": 21, "column": 62}, "end_point": {"row": 21, "column": 78}}, {"id": 32, "type": "pointer_declarator", "text": "*a_colidx", "parent": 30, "children": [33, 34], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 11}}, {"id": 33, "type": "*", "text": "*", "parent": 32, "children": [], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 3}}, {"id": 34, "type": "identifier", "text": "a_colidx", "parent": 32, "children": [], "start_point": {"row": 22, "column": 3}, "end_point": {"row": 22, "column": 11}}, {"id": 35, "type": "parameter_declaration", "text": "const emxArray_int32_T *a_rowidx", "parent": 24, "children": [36, 37], "start_point": {"row": 22, "column": 13}, "end_point": {"row": 22, "column": 45}}, {"id": 36, "type": "type_identifier", "text": "emxArray_int32_T", "parent": 35, "children": [], "start_point": {"row": 22, "column": 19}, "end_point": {"row": 22, "column": 35}}, {"id": 37, "type": "pointer_declarator", "text": "*a_rowidx", "parent": 35, "children": [38, 39], "start_point": {"row": 22, "column": 36}, "end_point": {"row": 22, "column": 45}}, {"id": 38, "type": "*", "text": "*", "parent": 37, "children": [], "start_point": {"row": 22, "column": 36}, "end_point": {"row": 22, "column": 37}}, {"id": 39, "type": "identifier", "text": "a_rowidx", "parent": 37, "children": [], "start_point": {"row": 22, "column": 37}, "end_point": {"row": 22, "column": 45}}, {"id": 40, "type": "parameter_declaration", "text": "int a_m", "parent": 24, "children": [41, 42], "start_point": {"row": 22, "column": 47}, "end_point": {"row": 22, "column": 54}}, {"id": 41, "type": "primitive_type", "text": "int", "parent": 40, "children": [], "start_point": {"row": 22, "column": 47}, "end_point": {"row": 22, "column": 50}}, {"id": 42, "type": "identifier", "text": "a_m", "parent": 40, "children": [], "start_point": {"row": 22, "column": 51}, "end_point": {"row": 22, "column": 54}}, {"id": 43, "type": "parameter_declaration", "text": "const emxArray_real_T\n *b_d", "parent": 24, "children": [44, 45], "start_point": {"row": 22, "column": 56}, "end_point": {"row": 23, "column": 6}}, {"id": 44, "type": "type_identifier", "text": "emxArray_real_T", "parent": 43, "children": [], "start_point": {"row": 22, "column": 62}, "end_point": {"row": 22, "column": 77}}, {"id": 45, "type": "pointer_declarator", "text": "*b_d", "parent": 43, "children": [46, 47], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 6}}, {"id": 46, "type": "*", "text": "*", "parent": 45, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 3}}, {"id": 47, "type": "identifier", "text": "b_d", "parent": 45, "children": [], "start_point": {"row": 23, "column": 3}, "end_point": {"row": 23, "column": 6}}, {"id": 48, "type": "parameter_declaration", "text": "const emxArray_int32_T *b_colidx", "parent": 24, "children": [49, 50], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 40}}, {"id": 49, "type": "type_identifier", "text": "emxArray_int32_T", "parent": 48, "children": [], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 30}}, {"id": 50, "type": "pointer_declarator", "text": "*b_colidx", "parent": 48, "children": [51, 52], "start_point": {"row": 23, "column": 31}, "end_point": {"row": 23, "column": 40}}, {"id": 51, "type": "*", "text": "*", "parent": 50, "children": [], "start_point": {"row": 23, "column": 31}, "end_point": {"row": 23, "column": 32}}, {"id": 52, "type": "identifier", "text": "b_colidx", "parent": 50, "children": [], "start_point": {"row": 23, "column": 32}, "end_point": {"row": 23, "column": 40}}, {"id": 53, "type": "parameter_declaration", "text": "const emxArray_int32_T *b_rowidx", "parent": 24, "children": [54, 55], "start_point": {"row": 23, "column": 42}, "end_point": {"row": 23, "column": 74}}, {"id": 54, "type": "type_identifier", "text": "emxArray_int32_T", "parent": 53, "children": [], "start_point": {"row": 23, "column": 48}, "end_point": {"row": 23, "column": 64}}, {"id": 55, "type": "pointer_declarator", "text": "*b_rowidx", "parent": 53, "children": [56, 57], "start_point": {"row": 23, "column": 65}, "end_point": {"row": 23, "column": 74}}, {"id": 56, "type": "*", "text": "*", "parent": 55, "children": [], "start_point": {"row": 23, "column": 65}, "end_point": {"row": 23, "column": 66}}, {"id": 57, "type": "identifier", "text": "b_rowidx", "parent": 55, "children": [], "start_point": {"row": 23, "column": 66}, "end_point": {"row": 23, "column": 74}}, {"id": 58, "type": "parameter_declaration", "text": "coder_internal_sparse_1 *c", "parent": 24, "children": [59, 60], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 28}}, {"id": 59, "type": "type_identifier", "text": "coder_internal_sparse_1", "parent": 58, "children": [], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 25}}, {"id": 60, "type": "pointer_declarator", "text": "*c", "parent": 58, "children": [61, 62], "start_point": {"row": 24, "column": 26}, "end_point": {"row": 24, "column": 28}}, {"id": 61, "type": "*", "text": "*", "parent": 60, "children": [], "start_point": {"row": 24, "column": 26}, "end_point": {"row": 24, "column": 27}}, {"id": 62, "type": "identifier", "text": "c", "parent": 60, "children": [], "start_point": {"row": 24, "column": 27}, "end_point": {"row": 24, "column": 28}}, {"id": 63, "type": "declaration", "text": "extern void sparse_mtimes(const emxArray_real_T *a_d, const emxArray_int32_T\n *a_colidx, const emxArray_int32_T *a_rowidx, int a_m, const emxArray_real_T\n *b_d, const emxArray_int32_T *b_colidx, const emxArray_int32_T *b_rowidx, int\n b_n, coder_internal_sparse *c);", "parent": 0, "children": [64, 66, 67], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 28, "column": 33}}, {"id": 64, "type": "storage_class_specifier", "text": "extern", "parent": 63, "children": [65], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 6}}, {"id": 65, "type": "extern", "text": "extern", "parent": 64, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 6}}, {"id": 66, "type": "primitive_type", "text": "void", "parent": 63, "children": [], "start_point": {"row": 25, "column": 7}, "end_point": {"row": 25, "column": 11}}, {"id": 67, "type": "function_declarator", "text": "sparse_mtimes(const emxArray_real_T *a_d, const emxArray_int32_T\n *a_colidx, const emxArray_int32_T *a_rowidx, int a_m, const emxArray_real_T\n *b_d, const emxArray_int32_T *b_colidx, const emxArray_int32_T *b_rowidx, int\n b_n, coder_internal_sparse *c)", "parent": 63, "children": [68, 69], "start_point": {"row": 25, "column": 12}, "end_point": {"row": 28, "column": 32}}, {"id": 68, "type": "identifier", "text": "sparse_mtimes", "parent": 67, "children": [], "start_point": {"row": 25, "column": 12}, "end_point": {"row": 25, "column": 25}}, {"id": 69, "type": "parameter_list", "text": "(const emxArray_real_T *a_d, const emxArray_int32_T\n *a_colidx, const emxArray_int32_T *a_rowidx, int a_m, const emxArray_real_T\n *b_d, const emxArray_int32_T *b_colidx, const emxArray_int32_T *b_rowidx, int\n b_n, coder_internal_sparse *c)", "parent": 67, "children": [70, 75, 80, 85, 88, 93, 98, 103, 106], "start_point": {"row": 25, "column": 25}, "end_point": {"row": 28, "column": 32}}, {"id": 70, "type": "parameter_declaration", "text": "const emxArray_real_T *a_d", "parent": 69, "children": [71, 72], "start_point": {"row": 25, "column": 26}, "end_point": {"row": 25, "column": 52}}, {"id": 71, "type": "type_identifier", "text": "emxArray_real_T", "parent": 70, "children": [], "start_point": {"row": 25, "column": 32}, "end_point": {"row": 25, "column": 47}}, {"id": 72, "type": "pointer_declarator", "text": "*a_d", "parent": 70, "children": [73, 74], "start_point": {"row": 25, "column": 48}, "end_point": {"row": 25, "column": 52}}, {"id": 73, "type": "*", "text": "*", "parent": 72, "children": [], "start_point": {"row": 25, "column": 48}, "end_point": {"row": 25, "column": 49}}, {"id": 74, "type": "identifier", "text": "a_d", "parent": 72, "children": [], "start_point": {"row": 25, "column": 49}, "end_point": {"row": 25, "column": 52}}, {"id": 75, "type": "parameter_declaration", "text": "const emxArray_int32_T\n *a_colidx", "parent": 69, "children": [76, 77], "start_point": {"row": 25, "column": 54}, "end_point": {"row": 26, "column": 11}}, {"id": 76, "type": "type_identifier", "text": "emxArray_int32_T", "parent": 75, "children": [], "start_point": {"row": 25, "column": 60}, "end_point": {"row": 25, "column": 76}}, {"id": 77, "type": "pointer_declarator", "text": "*a_colidx", "parent": 75, "children": [78, 79], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 11}}, {"id": 78, "type": "*", "text": "*", "parent": 77, "children": [], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 3}}, {"id": 79, "type": "identifier", "text": "a_colidx", "parent": 77, "children": [], "start_point": {"row": 26, "column": 3}, "end_point": {"row": 26, "column": 11}}, {"id": 80, "type": "parameter_declaration", "text": "const emxArray_int32_T *a_rowidx", "parent": 69, "children": [81, 82], "start_point": {"row": 26, "column": 13}, "end_point": {"row": 26, "column": 45}}, {"id": 81, "type": "type_identifier", "text": "emxArray_int32_T", "parent": 80, "children": [], "start_point": {"row": 26, "column": 19}, "end_point": {"row": 26, "column": 35}}, {"id": 82, "type": "pointer_declarator", "text": "*a_rowidx", "parent": 80, "children": [83, 84], "start_point": {"row": 26, "column": 36}, "end_point": {"row": 26, "column": 45}}, {"id": 83, "type": "*", "text": "*", "parent": 82, "children": [], "start_point": {"row": 26, "column": 36}, "end_point": {"row": 26, "column": 37}}, {"id": 84, "type": "identifier", "text": "a_rowidx", "parent": 82, "children": [], "start_point": {"row": 26, "column": 37}, "end_point": {"row": 26, "column": 45}}, {"id": 85, "type": "parameter_declaration", "text": "int a_m", "parent": 69, "children": [86, 87], "start_point": {"row": 26, "column": 47}, "end_point": {"row": 26, "column": 54}}, {"id": 86, "type": "primitive_type", "text": "int", "parent": 85, "children": [], "start_point": {"row": 26, "column": 47}, "end_point": {"row": 26, "column": 50}}, {"id": 87, "type": "identifier", "text": "a_m", "parent": 85, "children": [], "start_point": {"row": 26, "column": 51}, "end_point": {"row": 26, "column": 54}}, {"id": 88, "type": "parameter_declaration", "text": "const emxArray_real_T\n *b_d", "parent": 69, "children": [89, 90], "start_point": {"row": 26, "column": 56}, "end_point": {"row": 27, "column": 6}}, {"id": 89, "type": "type_identifier", "text": "emxArray_real_T", "parent": 88, "children": [], "start_point": {"row": 26, "column": 62}, "end_point": {"row": 26, "column": 77}}, {"id": 90, "type": "pointer_declarator", "text": "*b_d", "parent": 88, "children": [91, 92], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 6}}, {"id": 91, "type": "*", "text": "*", "parent": 90, "children": [], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 3}}, {"id": 92, "type": "identifier", "text": "b_d", "parent": 90, "children": [], "start_point": {"row": 27, "column": 3}, "end_point": {"row": 27, "column": 6}}, {"id": 93, "type": "parameter_declaration", "text": "const emxArray_int32_T *b_colidx", "parent": 69, "children": [94, 95], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 40}}, {"id": 94, "type": "type_identifier", "text": "emxArray_int32_T", "parent": 93, "children": [], "start_point": {"row": 27, "column": 14}, "end_point": {"row": 27, "column": 30}}, {"id": 95, "type": "pointer_declarator", "text": "*b_colidx", "parent": 93, "children": [96, 97], "start_point": {"row": 27, "column": 31}, "end_point": {"row": 27, "column": 40}}, {"id": 96, "type": "*", "text": "*", "parent": 95, "children": [], "start_point": {"row": 27, "column": 31}, "end_point": {"row": 27, "column": 32}}, {"id": 97, "type": "identifier", "text": "b_colidx", "parent": 95, "children": [], "start_point": {"row": 27, "column": 32}, "end_point": {"row": 27, "column": 40}}, {"id": 98, "type": "parameter_declaration", "text": "const emxArray_int32_T *b_rowidx", "parent": 69, "children": [99, 100], "start_point": {"row": 27, "column": 42}, "end_point": {"row": 27, "column": 74}}, {"id": 99, "type": "type_identifier", "text": "emxArray_int32_T", "parent": 98, "children": [], "start_point": {"row": 27, "column": 48}, "end_point": {"row": 27, "column": 64}}, {"id": 100, "type": "pointer_declarator", "text": "*b_rowidx", "parent": 98, "children": [101, 102], "start_point": {"row": 27, "column": 65}, "end_point": {"row": 27, "column": 74}}, {"id": 101, "type": "*", "text": "*", "parent": 100, "children": [], "start_point": {"row": 27, "column": 65}, "end_point": {"row": 27, "column": 66}}, {"id": 102, "type": "identifier", "text": "b_rowidx", "parent": 100, "children": [], "start_point": {"row": 27, "column": 66}, "end_point": {"row": 27, "column": 74}}, {"id": 103, "type": "parameter_declaration", "text": "int\n b_n", "parent": 69, "children": [104, 105], "start_point": {"row": 27, "column": 76}, "end_point": {"row": 28, "column": 5}}, {"id": 104, "type": "primitive_type", "text": "int", "parent": 103, "children": [], "start_point": {"row": 27, "column": 76}, "end_point": {"row": 27, "column": 79}}, {"id": 105, "type": "identifier", "text": "b_n", "parent": 103, "children": [], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 5}}, {"id": 106, "type": "parameter_declaration", "text": "coder_internal_sparse *c", "parent": 69, "children": [107, 108], "start_point": {"row": 28, "column": 7}, "end_point": {"row": 28, "column": 31}}, {"id": 107, "type": "type_identifier", "text": "coder_internal_sparse", "parent": 106, "children": [], "start_point": {"row": 28, "column": 7}, "end_point": {"row": 28, "column": 28}}, {"id": 108, "type": "pointer_declarator", "text": "*c", "parent": 106, "children": [109, 110], "start_point": {"row": 28, "column": 29}, "end_point": {"row": 28, "column": 31}}, {"id": 109, "type": "*", "text": "*", "parent": 108, "children": [], "start_point": {"row": 28, "column": 29}, "end_point": {"row": 28, "column": 30}}, {"id": 110, "type": "identifier", "text": "c", "parent": 108, "children": [], "start_point": {"row": 28, "column": 30}, "end_point": {"row": 28, "column": 31}}, {"id": 111, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 6}}]}, "node_categories": {"declarations": {"functions": [22, 67], "variables": [18, 25, 30, 35, 40, 43, 48, 53, 58, 63, 70, 75, 80, 85, 88, 93, 98, 103, 106], "classes": [19, 64], "imports": [6, 7, 9, 10, 12, 13, 15, 16], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 23, 26, 29, 31, 34, 36, 39, 42, 44, 47, 49, 52, 54, 57, 59, 62, 68, 71, 74, 76, 79, 81, 84, 87, 89, 92, 94, 97, 99, 102, 105, 107, 110, 111], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 22, "universal_type": "function", "name": "a_m,", "text_snippet": "b_sparse_mtimes(const emxArray_real_T *a_d, const emxArray_int32_T\n *a_colidx, const emxArray_int32"}, {"node_id": 67, "universal_type": "function", "name": "a_m,", "text_snippet": "sparse_mtimes(const emxArray_real_T *a_d, const emxArray_int32_T\n *a_colidx, const emxArray_int32_T"}], "class_declarations": [{"node_id": 19, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 64, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}], "import_statements": [{"node_id": 6, "text": "#include <cstddef>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <cstdlib>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"rtwtypes.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"ADMMGainDesign3D_types.h\"\n"}, {"node_id": 16, "text": "#include"}]}, "original_source_code": "/*\n * Academic License - for use in teaching, academic research, and meeting\n * course requirements at degree granting institutions only. Not for\n * government, commercial, or other organizational use.\n *\n * mtimes.h\n *\n * Code generation for function 'mtimes'\n *\n */\n\n#ifndef MTIMES_H\n#define MTIMES_H\n\n/* Include files */\n#include <cstddef>\n#include <cstdlib>\n#include \"rtwtypes.h\"\n#include \"ADMMGainDesign3D_types.h\"\n\n/* Function Declarations */\nextern void b_sparse_mtimes(const emxArray_real_T *a_d, const emxArray_int32_T\n *a_colidx, const emxArray_int32_T *a_rowidx, int a_m, const emxArray_real_T\n *b_d, const emxArray_int32_T *b_colidx, const emxArray_int32_T *b_rowidx,\n coder_internal_sparse_1 *c);\nextern void sparse_mtimes(const emxArray_real_T *a_d, const emxArray_int32_T\n *a_colidx, const emxArray_int32_T *a_rowidx, int a_m, const emxArray_real_T\n *b_d, const emxArray_int32_T *b_colidx, const emxArray_int32_T *b_rowidx, int\n b_n, coder_internal_sparse *c);\n\n#endif\n\n/* End of code generation (mtimes.h) */\n"}
| 81,235
|
c
|
// SPDX-FileCopyrightText: 2021 Open Energy Solutions Inc
//
// SPDX-License-Identifier: Apache-2.0
#ifndef OPENFMB_ADAPTER_GOOSE_PUB_PUBLISHINGPROFILEREADER_H
#define OPENFMB_ADAPTER_GOOSE_PUB_PUBLISHINGPROFILEREADER_H
#include "adapter-util/config/generated/TypedModelVisitors.h"
#include "pub/IPublishConfigBuilder.h"
#include "pub/PubGooseStructureConfigReader.h"
#include "pub/PublishingConfigReadVisitor.h"
#include "yaml-cpp/yaml.h"
#include <adapter-api/IMessageBus.h>
namespace adapter {
namespace goose {
template <typename T>
class PublishingProfileReader {
public:
static void handle(const YAML::Node& node, api::message_bus_t bus, PubGooseStructureConfigReader& builder)
{
PublishingConfigReadVisitor<T> visitor(node, std::move(bus), builder);
visit(visitor);
}
};
} // namespace goose
} // namespace adapter
#endif //OPENFMB_ADAPTER_GOOSE_PUB_PUBLISHINGPROFILEREADER_H
| 36.88
| 25
|
(translation_unit) "// SPDX-FileCopyrightText: 2021 Open Energy Solutions Inc\n//\n// SPDX-License-Identifier: Apache-2.0\n\n#ifndef OPENFMB_ADAPTER_GOOSE_PUB_PUBLISHINGPROFILEREADER_H\n#define OPENFMB_ADAPTER_GOOSE_PUB_PUBLISHINGPROFILEREADER_H\n\n#include "adapter-util/config/generated/TypedModelVisitors.h"\n#include "pub/IPublishConfigBuilder.h"\n#include "pub/PubGooseStructureConfigReader.h"\n#include "pub/PublishingConfigReadVisitor.h"\n#include "yaml-cpp/yaml.h"\n#include <adapter-api/IMessageBus.h>\n\nnamespace adapter {\nnamespace goose {\n\n template <typename T>\n class PublishingProfileReader {\n public:\n static void handle(const YAML::Node& node, api::message_bus_t bus, PubGooseStructureConfigReader& builder)\n {\n PublishingConfigReadVisitor<T> visitor(node, std::move(bus), builder);\n visit(visitor);\n }\n };\n\n} // namespace goose\n} // namespace adapter\n\n#endif //OPENFMB_ADAPTER_GOOSE_PUB_PUBLISHINGPROFILEREADER_H\n"
(comment) "// SPDX-FileCopyrightText: 2021 Open Energy Solutions Inc"
(comment) "//"
(comment) "// SPDX-License-Identifier: Apache-2.0"
(preproc_ifdef) "#ifndef OPENFMB_ADAPTER_GOOSE_PUB_PUBLISHINGPROFILEREADER_H\n#define OPENFMB_ADAPTER_GOOSE_PUB_PUBLISHINGPROFILEREADER_H\n\n#include "adapter-util/config/generated/TypedModelVisitors.h"\n#include "pub/IPublishConfigBuilder.h"\n#include "pub/PubGooseStructureConfigReader.h"\n#include "pub/PublishingConfigReadVisitor.h"\n#include "yaml-cpp/yaml.h"\n#include <adapter-api/IMessageBus.h>\n\nnamespace adapter {\nnamespace goose {\n\n template <typename T>\n class PublishingProfileReader {\n public:\n static void handle(const YAML::Node& node, api::message_bus_t bus, PubGooseStructureConfigReader& builder)\n {\n PublishingConfigReadVisitor<T> visitor(node, std::move(bus), builder);\n visit(visitor);\n }\n };\n\n} // namespace goose\n} // namespace adapter\n\n#endif"
(#ifndef) "#ifndef"
(identifier) "OPENFMB_ADAPTER_GOOSE_PUB_PUBLISHINGPROFILEREADER_H"
(preproc_def) "#define OPENFMB_ADAPTER_GOOSE_PUB_PUBLISHINGPROFILEREADER_H\n"
(#define) "#define"
(identifier) "OPENFMB_ADAPTER_GOOSE_PUB_PUBLISHINGPROFILEREADER_H"
(preproc_include) "#include "adapter-util/config/generated/TypedModelVisitors.h"\n"
(#include) "#include"
(string_literal) ""adapter-util/config/generated/TypedModelVisitors.h""
(") """
(string_content) "adapter-util/config/generated/TypedModelVisitors.h"
(") """
(preproc_include) "#include "pub/IPublishConfigBuilder.h"\n"
(#include) "#include"
(string_literal) ""pub/IPublishConfigBuilder.h""
(") """
(string_content) "pub/IPublishConfigBuilder.h"
(") """
(preproc_include) "#include "pub/PubGooseStructureConfigReader.h"\n"
(#include) "#include"
(string_literal) ""pub/PubGooseStructureConfigReader.h""
(") """
(string_content) "pub/PubGooseStructureConfigReader.h"
(") """
(preproc_include) "#include "pub/PublishingConfigReadVisitor.h"\n"
(#include) "#include"
(string_literal) ""pub/PublishingConfigReadVisitor.h""
(") """
(string_content) "pub/PublishingConfigReadVisitor.h"
(") """
(preproc_include) "#include "yaml-cpp/yaml.h"\n"
(#include) "#include"
(string_literal) ""yaml-cpp/yaml.h""
(") """
(string_content) "yaml-cpp/yaml.h"
(") """
(preproc_include) "#include <adapter-api/IMessageBus.h>\n"
(#include) "#include"
(system_lib_string) "<adapter-api/IMessageBus.h>"
(function_definition) "namespace adapter {\nnamespace goose {\n\n template <typename T>\n class PublishingProfileReader {\n public:\n static void handle(const YAML::Node& node, api::message_bus_t bus, PubGooseStructureConfigReader& builder)\n {\n PublishingConfigReadVisitor<T> visitor(node, std::move(bus), builder);\n visit(visitor);\n }\n };\n\n} // namespace goose\n}"
(type_identifier) "namespace"
(identifier) "adapter"
(compound_statement) "{\nnamespace goose {\n\n template <typename T>\n class PublishingProfileReader {\n public:\n static void handle(const YAML::Node& node, api::message_bus_t bus, PubGooseStructureConfigReader& builder)\n {\n PublishingConfigReadVisitor<T> visitor(node, std::move(bus), builder);\n visit(visitor);\n }\n };\n\n} // namespace goose\n}"
({) "{"
(function_definition) "namespace goose {\n\n template <typename T>\n class PublishingProfileReader {\n public:\n static void handle(const YAML::Node& node, api::message_bus_t bus, PubGooseStructureConfigReader& builder)\n {\n PublishingConfigReadVisitor<T> visitor(node, std::move(bus), builder);\n visit(visitor);\n }\n };\n\n}"
(type_identifier) "namespace"
(identifier) "goose"
(compound_statement) "{\n\n template <typename T>\n class PublishingProfileReader {\n public:\n static void handle(const YAML::Node& node, api::message_bus_t bus, PubGooseStructureConfigReader& builder)\n {\n PublishingConfigReadVisitor<T> visitor(node, std::move(bus), builder);\n visit(visitor);\n }\n };\n\n}"
({) "{"
(ERROR) "template <typename T>\n class PublishingProfileReader"
(binary_expression) "template <typename T>\n class"
(binary_expression) "template <typename"
(identifier) "template"
(<) "<"
(identifier) "typename"
(ERROR) "T"
(identifier) "T"
(>) ">"
(identifier) "class"
(identifier) "PublishingProfileReader"
(compound_statement) "{\n public:\n static void handle(const YAML::Node& node, api::message_bus_t bus, PubGooseStructureConfigReader& builder)\n {\n PublishingConfigReadVisitor<T> visitor(node, std::move(bus), builder);\n visit(visitor);\n }\n }"
({) "{"
(labeled_statement) "public:\n static void handle(const YAML::Node& node, api::message_bus_t bus, PubGooseStructureConfigReader& builder)\n {\n PublishingConfigReadVisitor<T> visitor(node, std::move(bus), builder);\n visit(visitor);\n }"
(statement_identifier) "public"
(:) ":"
(ERROR) "static void handle(const YAML::Node& node, api::message_bus_t bus, PubGooseStructureConfigReader& builder)"
(storage_class_specifier) "static"
(static) "static"
(primitive_type) "void"
(function_declarator) "handle(const YAML::Node& node, api::message_bus_t bus, PubGooseStructureConfigReader& builder)"
(identifier) "handle"
(parameter_list) "(const YAML::Node& node, api::message_bus_t bus, PubGooseStructureConfigReader& builder)"
(() "("
(parameter_declaration) "const YAML::Node& node"
(type_qualifier) "const"
(const) "const"
(type_identifier) "YAML"
(ERROR) "::Node&"
(:) ":"
(:) ":"
(identifier) "Node"
(&) "&"
(identifier) "node"
(,) ","
(parameter_declaration) "api::message_bus_t bus"
(type_identifier) "api"
(ERROR) "::message_bus_t"
(:) ":"
(:) ":"
(identifier) "message_bus_t"
(identifier) "bus"
(,) ","
(parameter_declaration) "PubGooseStructureConfigReader& builder"
(type_identifier) "PubGooseStructureConfigReader"
(ERROR) "&"
(&) "&"
(identifier) "builder"
()) ")"
(compound_statement) "{\n PublishingConfigReadVisitor<T> visitor(node, std::move(bus), builder);\n visit(visitor);\n }"
({) "{"
(expression_statement) "PublishingConfigReadVisitor<T> visitor(node, std::move(bus), builder);"
(binary_expression) "PublishingConfigReadVisitor<T> visitor(node, std::move(bus), builder)"
(binary_expression) "PublishingConfigReadVisitor<T"
(identifier) "PublishingConfigReadVisitor"
(<) "<"
(identifier) "T"
(>) ">"
(call_expression) "visitor(node, std::move(bus), builder)"
(identifier) "visitor"
(argument_list) "(node, std::move(bus), builder)"
(() "("
(identifier) "node"
(,) ","
(ERROR) "std::"
(identifier) "std"
(:) ":"
(:) ":"
(call_expression) "move(bus)"
(identifier) "move"
(argument_list) "(bus)"
(() "("
(identifier) "bus"
()) ")"
(,) ","
(identifier) "builder"
()) ")"
(;) ";"
(expression_statement) "visit(visitor);"
(call_expression) "visit(visitor)"
(identifier) "visit"
(argument_list) "(visitor)"
(() "("
(identifier) "visitor"
()) ")"
(;) ";"
(}) "}"
(}) "}"
(expression_statement) ";"
(;) ";"
(}) "}"
(comment) "// namespace goose"
(}) "}"
(comment) "// namespace adapter"
(#endif) "#endif"
(comment) "//OPENFMB_ADAPTER_GOOSE_PUB_PUBLISHINGPROFILEREADER_H"
| 149
| 7
|
{"language": "c", "success": true, "metadata": {"lines": 25, "avg_line_length": 36.88, "nodes": 81, "errors": 0, "source_hash": "edae5cd285238f25cbd710f9bd3babac5a8128be810f19339d56baa830ba4da4", "categorized_nodes": 63}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef OPENFMB_ADAPTER_GOOSE_PUB_PUBLISHINGPROFILEREADER_H\n#define OPENFMB_ADAPTER_GOOSE_PUB_PUBLISHINGPROFILEREADER_H\n\n#include \"adapter-util/config/generated/TypedModelVisitors.h\"\n#include \"pub/IPublishConfigBuilder.h\"\n#include \"pub/PubGooseStructureConfigReader.h\"\n#include \"pub/PublishingConfigReadVisitor.h\"\n#include \"yaml-cpp/yaml.h\"\n#include <adapter-api/IMessageBus.h>\n\nnamespace adapter {\nnamespace goose {\n\n template <typename T>\n class PublishingProfileReader {\n public:\n static void handle(const YAML::Node& node, api::message_bus_t bus, PubGooseStructureConfigReader& builder)\n {\n PublishingConfigReadVisitor<T> visitor(node, std::move(bus), builder);\n visit(visitor);\n }\n };\n\n} // namespace goose\n} // namespace adapter\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 80], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 30, "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": "OPENFMB_ADAPTER_GOOSE_PUB_PUBLISHINGPROFILEREADER_H", "parent": 0, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 59}}, {"id": 3, "type": "preproc_def", "text": "#define OPENFMB_ADAPTER_GOOSE_PUB_PUBLISHINGPROFILEREADER_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": "OPENFMB_ADAPTER_GOOSE_PUB_PUBLISHINGPROFILEREADER_H", "parent": 3, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 59}}, {"id": 6, "type": "preproc_include", "text": "#include \"adapter-util/config/generated/TypedModelVisitors.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"adapter-util/config/generated/TypedModelVisitors.h\"", "parent": 6, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 61}}, {"id": 9, "type": "preproc_include", "text": "#include \"pub/IPublishConfigBuilder.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": "\"pub/IPublishConfigBuilder.h\"", "parent": 9, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 38}}, {"id": 12, "type": "preproc_include", "text": "#include \"pub/PubGooseStructureConfigReader.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": "\"pub/PubGooseStructureConfigReader.h\"", "parent": 12, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 46}}, {"id": 15, "type": "preproc_include", "text": "#include \"pub/PublishingConfigReadVisitor.h\"\n", "parent": 0, "children": [16, 17], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"pub/PublishingConfigReadVisitor.h\"", "parent": 15, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 44}}, {"id": 18, "type": "preproc_include", "text": "#include \"yaml-cpp/yaml.h\"\n", "parent": 0, "children": [19, 20], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 20, "type": "string_literal", "text": "\"yaml-cpp/yaml.h\"", "parent": 18, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 26}}, {"id": 21, "type": "preproc_include", "text": "#include <adapter-api/IMessageBus.h>\n", "parent": 0, "children": [22, 23], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 23, "type": "system_lib_string", "text": "<adapter-api/IMessageBus.h>", "parent": 21, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 36}}, {"id": 24, "type": "function_definition", "text": "namespace adapter {\nnamespace goose {\n\n template <typename T>\n class PublishingProfileReader {\n public:\n static void handle(const YAML::Node& node, api::message_bus_t bus, PubGooseStructureConfigReader& builder)\n {\n PublishingConfigReadVisitor<T> visitor(node, std::move(bus), builder);\n visit(visitor);\n }\n };\n\n} // namespace goose\n}", "parent": 0, "children": [25, 26], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 28, "column": 1}}, {"id": 25, "type": "type_identifier", "text": "namespace", "parent": 24, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 9}}, {"id": 26, "type": "identifier", "text": "adapter", "parent": 24, "children": [], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 17}}, {"id": 27, "type": "function_definition", "text": "namespace goose {\n\n template <typename T>\n class PublishingProfileReader {\n public:\n static void handle(const YAML::Node& node, api::message_bus_t bus, PubGooseStructureConfigReader& builder)\n {\n PublishingConfigReadVisitor<T> visitor(node, std::move(bus), builder);\n visit(visitor);\n }\n };\n\n}", "parent": 24, "children": [28, 29], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 27, "column": 1}}, {"id": 28, "type": "type_identifier", "text": "namespace", "parent": 27, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 9}}, {"id": 29, "type": "identifier", "text": "goose", "parent": 27, "children": [], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 15}}, {"id": 30, "type": "ERROR", "text": "template <typename T>\n class PublishingProfileReader", "parent": 27, "children": [31, 39], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 18, "column": 33}}, {"id": 31, "type": "binary_expression", "text": "template <typename T>\n class", "parent": 30, "children": [32, 36, 38], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 18, "column": 9}}, {"id": 32, "type": "binary_expression", "text": "template <typename", "parent": 31, "children": [33, 34, 35], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 22}}, {"id": 33, "type": "identifier", "text": "template", "parent": 32, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 12}}, {"id": 34, "type": "<", "text": "<", "parent": 32, "children": [], "start_point": {"row": 17, "column": 13}, "end_point": {"row": 17, "column": 14}}, {"id": 35, "type": "identifier", "text": "typename", "parent": 32, "children": [], "start_point": {"row": 17, "column": 14}, "end_point": {"row": 17, "column": 22}}, {"id": 36, "type": "ERROR", "text": "T", "parent": 31, "children": [37], "start_point": {"row": 17, "column": 23}, "end_point": {"row": 17, "column": 24}}, {"id": 37, "type": "identifier", "text": "T", "parent": 36, "children": [], "start_point": {"row": 17, "column": 23}, "end_point": {"row": 17, "column": 24}}, {"id": 38, "type": ">", "text": ">", "parent": 31, "children": [], "start_point": {"row": 17, "column": 24}, "end_point": {"row": 17, "column": 25}}, {"id": 39, "type": "identifier", "text": "PublishingProfileReader", "parent": 30, "children": [], "start_point": {"row": 18, "column": 10}, "end_point": {"row": 18, "column": 33}}, {"id": 40, "type": "labeled_statement", "text": "public:\n static void handle(const YAML::Node& node, api::message_bus_t bus, PubGooseStructureConfigReader& builder)\n {\n PublishingConfigReadVisitor<T> visitor(node, std::move(bus), builder);\n visit(visitor);\n }", "parent": 27, "children": [41], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 24, "column": 9}}, {"id": 41, "type": "ERROR", "text": "static void handle(const YAML::Node& node, api::message_bus_t bus, PubGooseStructureConfigReader& builder)", "parent": 40, "children": [42, 43], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 114}}, {"id": 42, "type": "primitive_type", "text": "void", "parent": 41, "children": [], "start_point": {"row": 20, "column": 15}, "end_point": {"row": 20, "column": 19}}, {"id": 43, "type": "function_declarator", "text": "handle(const YAML::Node& node, api::message_bus_t bus, PubGooseStructureConfigReader& builder)", "parent": 41, "children": [44, 45], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 20, "column": 114}}, {"id": 44, "type": "identifier", "text": "handle", "parent": 43, "children": [], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 20, "column": 26}}, {"id": 45, "type": "parameter_list", "text": "(const YAML::Node& node, api::message_bus_t bus, PubGooseStructureConfigReader& builder)", "parent": 43, "children": [46, 51, 56], "start_point": {"row": 20, "column": 26}, "end_point": {"row": 20, "column": 114}}, {"id": 46, "type": "parameter_declaration", "text": "const YAML::Node& node", "parent": 45, "children": [47, 48, 50], "start_point": {"row": 20, "column": 27}, "end_point": {"row": 20, "column": 49}}, {"id": 47, "type": "type_identifier", "text": "YAML", "parent": 46, "children": [], "start_point": {"row": 20, "column": 33}, "end_point": {"row": 20, "column": 37}}, {"id": 48, "type": "ERROR", "text": "::Node&", "parent": 46, "children": [49], "start_point": {"row": 20, "column": 37}, "end_point": {"row": 20, "column": 44}}, {"id": 49, "type": "identifier", "text": "Node", "parent": 48, "children": [], "start_point": {"row": 20, "column": 39}, "end_point": {"row": 20, "column": 43}}, {"id": 50, "type": "identifier", "text": "node", "parent": 46, "children": [], "start_point": {"row": 20, "column": 45}, "end_point": {"row": 20, "column": 49}}, {"id": 51, "type": "parameter_declaration", "text": "api::message_bus_t bus", "parent": 45, "children": [52, 53, 55], "start_point": {"row": 20, "column": 51}, "end_point": {"row": 20, "column": 73}}, {"id": 52, "type": "type_identifier", "text": "api", "parent": 51, "children": [], "start_point": {"row": 20, "column": 51}, "end_point": {"row": 20, "column": 54}}, {"id": 53, "type": "ERROR", "text": "::message_bus_t", "parent": 51, "children": [54], "start_point": {"row": 20, "column": 54}, "end_point": {"row": 20, "column": 69}}, {"id": 54, "type": "identifier", "text": "message_bus_t", "parent": 53, "children": [], "start_point": {"row": 20, "column": 56}, "end_point": {"row": 20, "column": 69}}, {"id": 55, "type": "identifier", "text": "bus", "parent": 51, "children": [], "start_point": {"row": 20, "column": 70}, "end_point": {"row": 20, "column": 73}}, {"id": 56, "type": "parameter_declaration", "text": "PubGooseStructureConfigReader& builder", "parent": 45, "children": [57, 58], "start_point": {"row": 20, "column": 75}, "end_point": {"row": 20, "column": 113}}, {"id": 57, "type": "type_identifier", "text": "PubGooseStructureConfigReader", "parent": 56, "children": [], "start_point": {"row": 20, "column": 75}, "end_point": {"row": 20, "column": 104}}, {"id": 58, "type": "identifier", "text": "builder", "parent": 56, "children": [], "start_point": {"row": 20, "column": 106}, "end_point": {"row": 20, "column": 113}}, {"id": 59, "type": "binary_expression", "text": "PublishingConfigReadVisitor<T> visitor(node, std::move(bus), builder)", "parent": 40, "children": [60, 64, 65], "start_point": {"row": 22, "column": 12}, "end_point": {"row": 22, "column": 81}}, {"id": 60, "type": "binary_expression", "text": "PublishingConfigReadVisitor<T", "parent": 59, "children": [61, 62, 63], "start_point": {"row": 22, "column": 12}, "end_point": {"row": 22, "column": 41}}, {"id": 61, "type": "identifier", "text": "PublishingConfigReadVisitor", "parent": 60, "children": [], "start_point": {"row": 22, "column": 12}, "end_point": {"row": 22, "column": 39}}, {"id": 62, "type": "<", "text": "<", "parent": 60, "children": [], "start_point": {"row": 22, "column": 39}, "end_point": {"row": 22, "column": 40}}, {"id": 63, "type": "identifier", "text": "T", "parent": 60, "children": [], "start_point": {"row": 22, "column": 40}, "end_point": {"row": 22, "column": 41}}, {"id": 64, "type": ">", "text": ">", "parent": 59, "children": [], "start_point": {"row": 22, "column": 41}, "end_point": {"row": 22, "column": 42}}, {"id": 65, "type": "call_expression", "text": "visitor(node, std::move(bus), builder)", "parent": 59, "children": [66, 67], "start_point": {"row": 22, "column": 43}, "end_point": {"row": 22, "column": 81}}, {"id": 66, "type": "identifier", "text": "visitor", "parent": 65, "children": [], "start_point": {"row": 22, "column": 43}, "end_point": {"row": 22, "column": 50}}, {"id": 67, "type": "argument_list", "text": "(node, std::move(bus), builder)", "parent": 65, "children": [68, 69, 71, 75], "start_point": {"row": 22, "column": 50}, "end_point": {"row": 22, "column": 81}}, {"id": 68, "type": "identifier", "text": "node", "parent": 67, "children": [], "start_point": {"row": 22, "column": 51}, "end_point": {"row": 22, "column": 55}}, {"id": 69, "type": "ERROR", "text": "std::", "parent": 67, "children": [70], "start_point": {"row": 22, "column": 57}, "end_point": {"row": 22, "column": 62}}, {"id": 70, "type": "identifier", "text": "std", "parent": 69, "children": [], "start_point": {"row": 22, "column": 57}, "end_point": {"row": 22, "column": 60}}, {"id": 71, "type": "call_expression", "text": "move(bus)", "parent": 67, "children": [72, 73], "start_point": {"row": 22, "column": 62}, "end_point": {"row": 22, "column": 71}}, {"id": 72, "type": "identifier", "text": "move", "parent": 71, "children": [], "start_point": {"row": 22, "column": 62}, "end_point": {"row": 22, "column": 66}}, {"id": 73, "type": "argument_list", "text": "(bus)", "parent": 71, "children": [74], "start_point": {"row": 22, "column": 66}, "end_point": {"row": 22, "column": 71}}, {"id": 74, "type": "identifier", "text": "bus", "parent": 73, "children": [], "start_point": {"row": 22, "column": 67}, "end_point": {"row": 22, "column": 70}}, {"id": 75, "type": "identifier", "text": "builder", "parent": 67, "children": [], "start_point": {"row": 22, "column": 73}, "end_point": {"row": 22, "column": 80}}, {"id": 76, "type": "call_expression", "text": "visit(visitor)", "parent": 40, "children": [77, 78], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 26}}, {"id": 77, "type": "identifier", "text": "visit", "parent": 76, "children": [], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 17}}, {"id": 78, "type": "argument_list", "text": "(visitor)", "parent": 76, "children": [79], "start_point": {"row": 23, "column": 17}, "end_point": {"row": 23, "column": 26}}, {"id": 79, "type": "identifier", "text": "visitor", "parent": 78, "children": [], "start_point": {"row": 23, "column": 18}, "end_point": {"row": 23, "column": 25}}, {"id": 80, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 6}}]}, "node_categories": {"declarations": {"functions": [24, 27, 43], "variables": [46, 51, 56], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22], "modules": [], "enums": []}, "statements": {"expressions": [31, 32, 59, 60, 65, 71, 76], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 25, 26, 28, 29, 33, 35, 37, 39, 44, 47, 49, 50, 52, 54, 55, 57, 58, 61, 63, 66, 68, 70, 72, 74, 75, 77, 79, 80], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 24, "universal_type": "function", "name": "PublishingProfileReader", "text_snippet": "namespace adapter {\nnamespace goose {\n\n template <typename T>\n class PublishingProfileReader {"}, {"node_id": 27, "universal_type": "function", "name": "PublishingProfileReader", "text_snippet": "namespace goose {\n\n template <typename T>\n class PublishingProfileReader {\n public:\n "}, {"node_id": 43, "universal_type": "function", "name": "unknown", "text_snippet": "handle(const YAML::Node& node, api::message_bus_t bus, PubGooseStructureConfigReader& builder)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"adapter-util/config/generated/TypedModelVisitors.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"pub/IPublishConfigBuilder.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"pub/PubGooseStructureConfigReader.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"pub/PublishingConfigReadVisitor.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"yaml-cpp/yaml.h\"\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <adapter-api/IMessageBus.h>\n"}, {"node_id": 22, "text": "#include"}]}, "original_source_code": "// SPDX-FileCopyrightText: 2021 Open Energy Solutions Inc\n//\n// SPDX-License-Identifier: Apache-2.0\n\n#ifndef OPENFMB_ADAPTER_GOOSE_PUB_PUBLISHINGPROFILEREADER_H\n#define OPENFMB_ADAPTER_GOOSE_PUB_PUBLISHINGPROFILEREADER_H\n\n#include \"adapter-util/config/generated/TypedModelVisitors.h\"\n#include \"pub/IPublishConfigBuilder.h\"\n#include \"pub/PubGooseStructureConfigReader.h\"\n#include \"pub/PublishingConfigReadVisitor.h\"\n#include \"yaml-cpp/yaml.h\"\n#include <adapter-api/IMessageBus.h>\n\nnamespace adapter {\nnamespace goose {\n\n template <typename T>\n class PublishingProfileReader {\n public:\n static void handle(const YAML::Node& node, api::message_bus_t bus, PubGooseStructureConfigReader& builder)\n {\n PublishingConfigReadVisitor<T> visitor(node, std::move(bus), builder);\n visit(visitor);\n }\n };\n\n} // namespace goose\n} // namespace adapter\n\n#endif //OPENFMB_ADAPTER_GOOSE_PUB_PUBLISHINGPROFILEREADER_H\n"}
| 81,236
|
c
|
#include <FlexCAN.h>
uint8_t bitSize(uint64_t v) {
static const uint8_t lookup[64] = {
0, // change to 1 if you want bitSize(0) = 1
1, 2, 53, 3, 7, 54, 27, 4, 38, 41, 8, 34, 55, 48, 28,
62, 5, 39, 46, 44, 42, 22, 9, 24, 35, 59, 56, 49, 18, 29, 11,
63, 52, 6, 26, 37, 40, 33, 47, 61, 45, 43, 21, 23, 58, 17, 10,
51, 25, 36, 32, 60, 20, 57, 16, 50, 31, 19, 15, 30, 14, 13, 12
};
static const uint64_t multiplicator = 0x022fdd63cc95386dUL;
v |= v >> 1;
v |= v >> 2;
v |= v >> 4;
v |= v >> 8;
v |= v >> 16;
v |= v >> 32;
v++;
return lookup[(uint64_t)(v * multiplicator) >> 58];
}
uint8_t reverse8(uint8_t inputData) {
inputData = ((inputData * 0x0802LU & 0x22110LU) | (inputData * 0x8020LU & 0x88440LU)) * 0x10101LU >> 16;
return inputData;
}
uint64_t reverse64(uint64_t inputData) {
//reverse bytes
//Efficient knuth 64 bit reverse
static const uint64_t m0 = 0x5555555555555555LLU;
static const uint64_t m1 = 0x0300c0303030c303LLU;
static const uint64_t m2 = 0x00c0300c03f0003fLLU;
static const uint64_t m3 = 0x00000ffc00003fffLLU;
inputData = ((inputData >> 1) & m0) | (inputData & m0) << 1;
inputData = inputData ^ (((inputData >> 4) ^ inputData) & m1) ^ ((((inputData >> 4) ^ inputData) & m1) << 4);
inputData = inputData ^ (((inputData >> 8) ^ inputData) & m2) ^ ((((inputData >> 8) ^ inputData) & m2) << 8);
inputData = inputData ^ (((inputData >> 20) ^ inputData) & m3) ^ ((((inputData >> 20) ^ inputData) & m3) << 20);
inputData = (inputData >> 34) | (inputData << 30);
return inputData;
}
void CAN_encode(CAN_message_t *msg, double inputDataDouble, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias) { //byteOrder is 1 for MSB, 0 for LSB. Signed is 1 for signed, 0 for unsigned
uint64_t inputData = 0x0000000000000000LU;
//scale and bias
inputDataDouble = (1/Scale) * (inputDataDouble - bias);
uint64_t maxVal = 1;
for(int i=0; i<bitLength; i++) {
maxVal *= 2;
}
//Sign value if appropriate
if(sign) {
if(inputDataDouble < 0) {
inputDataDouble += maxVal;
}
inputData = inputDataDouble;
}
else
inputData = inputDataDouble;
if(inputData > (maxVal-1)) {
inputData = (maxVal-1);
}
else if(inputData < 0){
inputData = 0;
}
//access input as byte array and evaluate length of array
//take advantage of endianness
uint8_t *bytePointer = (uint8_t *)&inputData;
if(byteOrder) {
//locate MSB
uint8_t trueLen = bitSize(inputData);
//if more bits are present than can be accomodated cut them off
if(trueLen > bitLength) {
inputData = inputData >> (trueLen - bitLength);
}
//Shift buf to 64th position
inputData = inputData << (64 - bitLength);
//Reverse int
inputData = reverse64(inputData);
//calculate altered start position and move
uint8_t calcStartbit = (7 - startBit%8) + 8*(startBit/8);
inputData = inputData << calcStartbit;
//reverse each byte and move to appropriate place
for(int i=0; i<8; i++) {
msg->buf[i] |= reverse8(bytePointer[i]);
}
}else {
//Shift buf to appropriate place
inputData = inputData << startBit;
//push to message struct
for(int i=0; i<8; i++) {
msg->buf[i] |= bytePointer[i];
}
}
}
void CAN_encode(CAN_message_t *msg, int inputDataInt, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias) { //byteOrder is 1 for MSB, 0 for LSB. Signed is 1 for signed, 0 for unsigned
uint64_t inputData = 0x0000000000000000LU;
//scale and bias
inputDataInt = (1/Scale) * (inputDataInt - bias);
//Sign value if appropriate
uint64_t maxVal = 1;
for(int i=0; i<bitLength; i++) {
maxVal *= 2;
}
if(sign) {
if(inputDataInt < 0) {
inputDataInt += maxVal;
}
inputData = inputDataInt;
}
else
inputData = inputDataInt;
if(inputData > (maxVal-1)) {
inputData = (maxVal-1);
}
else if(inputData < 0){
inputData = 0;
}
//access input as byte array
//take advantage of endianness
uint8_t *bytePointer = (uint8_t *)&inputData;
if(byteOrder) {
//locate MSB
uint8_t trueLen = bitSize(inputData);
//if more bits are present than can be accomodated cut them off
if(trueLen > bitLength) {
inputData = inputData >> (trueLen - bitLength);
}
//Shift buf to 64th position
inputData = inputData << (64 - bitLength);
//Reverse int
inputData = reverse64(inputData);
uint8_t calcStartbit = (7 - startBit%8) + 8*(startBit/8);
inputData = inputData << calcStartbit;
//reverse each byte and push to message struct
for(int i=0; i<8; i++) {
msg->buf[i] |= reverse8(bytePointer[i]);
}
}else {
//Shift buf to appropriate place
inputData = inputData << startBit;
//push to message struct
for(int i=0; i<8; i++) {
msg->buf[i] |= bytePointer[i];
}
}
}
double CAN_decode(CAN_message_t *msg, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias) { //byteOrder is 1 for MSB, 0 for LSB. Signed is 1 for signed, 0 for unsigned
//Create uint64
uint64_t dataOut;
if(byteOrder) {
uint8_t Bytes[8];
//reverse all bytes
for(int i=0; i<8; i++) {
Bytes[i] = reverse8(msg->buf[i]);
}
//assemble to a uint64
dataOut = *(uint64_t *)Bytes;
//reverse to typical lsbfirst
dataOut = reverse64(dataOut);
//shift to isolate data
uint8_t calcStartbit = (7 - (startBit%8)) + 8*(startBit/8);
dataOut = dataOut << calcStartbit;
//shift bits back
dataOut = dataOut >> (64 - (bitLength));
} else {
//send message into uint64
dataOut = *(uint64_t *)msg->buf;
//Shift left then right to isolate the buf
dataOut = dataOut << (64 - (startBit+bitLength));
dataOut = dataOut >> (64 - bitLength);
}
double returnData = 0;
//Adjust if signed and scale and bias
if(sign) {
uint64_t maxVal = 1;
for(int i=0; i<bitLength; i++) {
maxVal *= 2;
}
if(dataOut > (maxVal/2)) {
returnData = (double) dataOut - maxVal;
returnData = bias + (Scale * returnData);
}
else {
returnData = bias + (Scale * dataOut);
}
}
else {
returnData = bias + (Scale * dataOut);
}
return(returnData);
}
| 31.97
| 191
|
(translation_unit) "#include <FlexCAN.h>\n\nuint8_t bitSize(uint64_t v) {\n static const uint8_t lookup[64] = {\n 0, // change to 1 if you want bitSize(0) = 1\n 1, 2, 53, 3, 7, 54, 27, 4, 38, 41, 8, 34, 55, 48, 28,\n 62, 5, 39, 46, 44, 42, 22, 9, 24, 35, 59, 56, 49, 18, 29, 11,\n 63, 52, 6, 26, 37, 40, 33, 47, 61, 45, 43, 21, 23, 58, 17, 10,\n 51, 25, 36, 32, 60, 20, 57, 16, 50, 31, 19, 15, 30, 14, 13, 12\n};\n static const uint64_t multiplicator = 0x022fdd63cc95386dUL;\n v |= v >> 1;\n v |= v >> 2;\n v |= v >> 4;\n v |= v >> 8;\n v |= v >> 16;\n v |= v >> 32;\n v++;\n\n return lookup[(uint64_t)(v * multiplicator) >> 58];\n}\n\nuint8_t reverse8(uint8_t inputData) {\n inputData = ((inputData * 0x0802LU & 0x22110LU) | (inputData * 0x8020LU & 0x88440LU)) * 0x10101LU >> 16; \n return inputData;\n}\n\nuint64_t reverse64(uint64_t inputData) {\n //reverse bytes\n //Efficient knuth 64 bit reverse\n static const uint64_t m0 = 0x5555555555555555LLU;\n static const uint64_t m1 = 0x0300c0303030c303LLU;\n static const uint64_t m2 = 0x00c0300c03f0003fLLU;\n static const uint64_t m3 = 0x00000ffc00003fffLLU;\n inputData = ((inputData >> 1) & m0) | (inputData & m0) << 1;\n inputData = inputData ^ (((inputData >> 4) ^ inputData) & m1) ^ ((((inputData >> 4) ^ inputData) & m1) << 4);\n inputData = inputData ^ (((inputData >> 8) ^ inputData) & m2) ^ ((((inputData >> 8) ^ inputData) & m2) << 8);\n inputData = inputData ^ (((inputData >> 20) ^ inputData) & m3) ^ ((((inputData >> 20) ^ inputData) & m3) << 20);\n inputData = (inputData >> 34) | (inputData << 30);\n return inputData;\n}\n\nvoid CAN_encode(CAN_message_t *msg, double inputDataDouble, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias) { //byteOrder is 1 for MSB, 0 for LSB. Signed is 1 for signed, 0 for unsigned\n\n uint64_t inputData = 0x0000000000000000LU;\n //scale and bias\n inputDataDouble = (1/Scale) * (inputDataDouble - bias);\n uint64_t maxVal = 1;\n for(int i=0; i<bitLength; i++) {\n maxVal *= 2;\n }\n //Sign value if appropriate\n if(sign) {\n if(inputDataDouble < 0) {\n inputDataDouble += maxVal;\n }\n inputData = inputDataDouble;\n }\n else\n inputData = inputDataDouble;\n\n if(inputData > (maxVal-1)) {\n inputData = (maxVal-1);\n }\n else if(inputData < 0){\n inputData = 0;\n }\n //access input as byte array and evaluate length of array\n //take advantage of endianness\n uint8_t *bytePointer = (uint8_t *)&inputData;\n\n if(byteOrder) {\n //locate MSB\n uint8_t trueLen = bitSize(inputData);\n //if more bits are present than can be accomodated cut them off\n if(trueLen > bitLength) {\n inputData = inputData >> (trueLen - bitLength);\n }\n //Shift buf to 64th position\n inputData = inputData << (64 - bitLength);\n\n //Reverse int\n inputData = reverse64(inputData);\n //calculate altered start position and move\n uint8_t calcStartbit = (7 - startBit%8) + 8*(startBit/8);\n inputData = inputData << calcStartbit;\n \n //reverse each byte and move to appropriate place\n for(int i=0; i<8; i++) {\n msg->buf[i] |= reverse8(bytePointer[i]);\n }\n }else {\n //Shift buf to appropriate place\n inputData = inputData << startBit;\n //push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= bytePointer[i];\n }\n }\n}\n\nvoid CAN_encode(CAN_message_t *msg, int inputDataInt, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias) { //byteOrder is 1 for MSB, 0 for LSB. Signed is 1 for signed, 0 for unsigned\n\n uint64_t inputData = 0x0000000000000000LU;\n //scale and bias\n inputDataInt = (1/Scale) * (inputDataInt - bias);\n //Sign value if appropriate\n uint64_t maxVal = 1;\n for(int i=0; i<bitLength; i++) {\n maxVal *= 2;\n }\n \n if(sign) {\n\n if(inputDataInt < 0) {\n inputDataInt += maxVal;\n }\n inputData = inputDataInt;\n }\n else\n inputData = inputDataInt;\n\n if(inputData > (maxVal-1)) {\n inputData = (maxVal-1);\n }\n else if(inputData < 0){\n inputData = 0;\n }\n //access input as byte array\n //take advantage of endianness\n uint8_t *bytePointer = (uint8_t *)&inputData;\n\n if(byteOrder) {\n //locate MSB\n uint8_t trueLen = bitSize(inputData);\n //if more bits are present than can be accomodated cut them off\n if(trueLen > bitLength) {\n inputData = inputData >> (trueLen - bitLength);\n }\n //Shift buf to 64th position\n inputData = inputData << (64 - bitLength);\n\n //Reverse int\n inputData = reverse64(inputData);\n uint8_t calcStartbit = (7 - startBit%8) + 8*(startBit/8);\n inputData = inputData << calcStartbit;\n //reverse each byte and push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= reverse8(bytePointer[i]);\n }\n }else {\n //Shift buf to appropriate place\n inputData = inputData << startBit;\n //push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= bytePointer[i];\n }\n }\n}\n\n\ndouble CAN_decode(CAN_message_t *msg, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias) { //byteOrder is 1 for MSB, 0 for LSB. Signed is 1 for signed, 0 for unsigned\n //Create uint64\nuint64_t dataOut;\n\n if(byteOrder) {\n uint8_t Bytes[8];\n \n //reverse all bytes\n for(int i=0; i<8; i++) {\n Bytes[i] = reverse8(msg->buf[i]);\n }\n //assemble to a uint64\n dataOut = *(uint64_t *)Bytes;\n //reverse to typical lsbfirst\n dataOut = reverse64(dataOut);\n //shift to isolate data\n uint8_t calcStartbit = (7 - (startBit%8)) + 8*(startBit/8);\n dataOut = dataOut << calcStartbit;\n //shift bits back\n dataOut = dataOut >> (64 - (bitLength));\n } else {\n //send message into uint64\n dataOut = *(uint64_t *)msg->buf;\n //Shift left then right to isolate the buf\n dataOut = dataOut << (64 - (startBit+bitLength));\n dataOut = dataOut >> (64 - bitLength);\n }\n double returnData = 0;\n //Adjust if signed and scale and bias\n if(sign) {\n uint64_t maxVal = 1;\n for(int i=0; i<bitLength; i++) {\n maxVal *= 2;\n }\n if(dataOut > (maxVal/2)) {\n returnData = (double) dataOut - maxVal;\n returnData = bias + (Scale * returnData);\n }\n else {\n returnData = bias + (Scale * dataOut);\n }\n }\n else {\n returnData = bias + (Scale * dataOut);\n }\n\n return(returnData);\n}\n"
(preproc_include) "#include <FlexCAN.h>\n"
(#include) "#include"
(system_lib_string) "<FlexCAN.h>"
(function_definition) "uint8_t bitSize(uint64_t v) {\n static const uint8_t lookup[64] = {\n 0, // change to 1 if you want bitSize(0) = 1\n 1, 2, 53, 3, 7, 54, 27, 4, 38, 41, 8, 34, 55, 48, 28,\n 62, 5, 39, 46, 44, 42, 22, 9, 24, 35, 59, 56, 49, 18, 29, 11,\n 63, 52, 6, 26, 37, 40, 33, 47, 61, 45, 43, 21, 23, 58, 17, 10,\n 51, 25, 36, 32, 60, 20, 57, 16, 50, 31, 19, 15, 30, 14, 13, 12\n};\n static const uint64_t multiplicator = 0x022fdd63cc95386dUL;\n v |= v >> 1;\n v |= v >> 2;\n v |= v >> 4;\n v |= v >> 8;\n v |= v >> 16;\n v |= v >> 32;\n v++;\n\n return lookup[(uint64_t)(v * multiplicator) >> 58];\n}"
(primitive_type) "uint8_t"
(function_declarator) "bitSize(uint64_t v)"
(identifier) "bitSize"
(parameter_list) "(uint64_t v)"
(() "("
(parameter_declaration) "uint64_t v"
(primitive_type) "uint64_t"
(identifier) "v"
()) ")"
(compound_statement) "{\n static const uint8_t lookup[64] = {\n 0, // change to 1 if you want bitSize(0) = 1\n 1, 2, 53, 3, 7, 54, 27, 4, 38, 41, 8, 34, 55, 48, 28,\n 62, 5, 39, 46, 44, 42, 22, 9, 24, 35, 59, 56, 49, 18, 29, 11,\n 63, 52, 6, 26, 37, 40, 33, 47, 61, 45, 43, 21, 23, 58, 17, 10,\n 51, 25, 36, 32, 60, 20, 57, 16, 50, 31, 19, 15, 30, 14, 13, 12\n};\n static const uint64_t multiplicator = 0x022fdd63cc95386dUL;\n v |= v >> 1;\n v |= v >> 2;\n v |= v >> 4;\n v |= v >> 8;\n v |= v >> 16;\n v |= v >> 32;\n v++;\n\n return lookup[(uint64_t)(v * multiplicator) >> 58];\n}"
({) "{"
(declaration) "static const uint8_t lookup[64] = {\n 0, // change to 1 if you want bitSize(0) = 1\n 1, 2, 53, 3, 7, 54, 27, 4, 38, 41, 8, 34, 55, 48, 28,\n 62, 5, 39, 46, 44, 42, 22, 9, 24, 35, 59, 56, 49, 18, 29, 11,\n 63, 52, 6, 26, 37, 40, 33, 47, 61, 45, 43, 21, 23, 58, 17, 10,\n 51, 25, 36, 32, 60, 20, 57, 16, 50, 31, 19, 15, 30, 14, 13, 12\n};"
(storage_class_specifier) "static"
(static) "static"
(type_qualifier) "const"
(const) "const"
(primitive_type) "uint8_t"
(init_declarator) "lookup[64] = {\n 0, // change to 1 if you want bitSize(0) = 1\n 1, 2, 53, 3, 7, 54, 27, 4, 38, 41, 8, 34, 55, 48, 28,\n 62, 5, 39, 46, 44, 42, 22, 9, 24, 35, 59, 56, 49, 18, 29, 11,\n 63, 52, 6, 26, 37, 40, 33, 47, 61, 45, 43, 21, 23, 58, 17, 10,\n 51, 25, 36, 32, 60, 20, 57, 16, 50, 31, 19, 15, 30, 14, 13, 12\n}"
(array_declarator) "lookup[64]"
(identifier) "lookup"
([) "["
(number_literal) "64"
(]) "]"
(=) "="
(initializer_list) "{\n 0, // change to 1 if you want bitSize(0) = 1\n 1, 2, 53, 3, 7, 54, 27, 4, 38, 41, 8, 34, 55, 48, 28,\n 62, 5, 39, 46, 44, 42, 22, 9, 24, 35, 59, 56, 49, 18, 29, 11,\n 63, 52, 6, 26, 37, 40, 33, 47, 61, 45, 43, 21, 23, 58, 17, 10,\n 51, 25, 36, 32, 60, 20, 57, 16, 50, 31, 19, 15, 30, 14, 13, 12\n}"
({) "{"
(number_literal) "0"
(,) ","
(comment) "// change to 1 if you want bitSize(0) = 1"
(number_literal) "1"
(,) ","
(number_literal) "2"
(,) ","
(number_literal) "53"
(,) ","
(number_literal) "3"
(,) ","
(number_literal) "7"
(,) ","
(number_literal) "54"
(,) ","
(number_literal) "27"
(,) ","
(number_literal) "4"
(,) ","
(number_literal) "38"
(,) ","
(number_literal) "41"
(,) ","
(number_literal) "8"
(,) ","
(number_literal) "34"
(,) ","
(number_literal) "55"
(,) ","
(number_literal) "48"
(,) ","
(number_literal) "28"
(,) ","
(number_literal) "62"
(,) ","
(number_literal) "5"
(,) ","
(number_literal) "39"
(,) ","
(number_literal) "46"
(,) ","
(number_literal) "44"
(,) ","
(number_literal) "42"
(,) ","
(number_literal) "22"
(,) ","
(number_literal) "9"
(,) ","
(number_literal) "24"
(,) ","
(number_literal) "35"
(,) ","
(number_literal) "59"
(,) ","
(number_literal) "56"
(,) ","
(number_literal) "49"
(,) ","
(number_literal) "18"
(,) ","
(number_literal) "29"
(,) ","
(number_literal) "11"
(,) ","
(number_literal) "63"
(,) ","
(number_literal) "52"
(,) ","
(number_literal) "6"
(,) ","
(number_literal) "26"
(,) ","
(number_literal) "37"
(,) ","
(number_literal) "40"
(,) ","
(number_literal) "33"
(,) ","
(number_literal) "47"
(,) ","
(number_literal) "61"
(,) ","
(number_literal) "45"
(,) ","
(number_literal) "43"
(,) ","
(number_literal) "21"
(,) ","
(number_literal) "23"
(,) ","
(number_literal) "58"
(,) ","
(number_literal) "17"
(,) ","
(number_literal) "10"
(,) ","
(number_literal) "51"
(,) ","
(number_literal) "25"
(,) ","
(number_literal) "36"
(,) ","
(number_literal) "32"
(,) ","
(number_literal) "60"
(,) ","
(number_literal) "20"
(,) ","
(number_literal) "57"
(,) ","
(number_literal) "16"
(,) ","
(number_literal) "50"
(,) ","
(number_literal) "31"
(,) ","
(number_literal) "19"
(,) ","
(number_literal) "15"
(,) ","
(number_literal) "30"
(,) ","
(number_literal) "14"
(,) ","
(number_literal) "13"
(,) ","
(number_literal) "12"
(}) "}"
(;) ";"
(declaration) "static const uint64_t multiplicator = 0x022fdd63cc95386dUL;"
(storage_class_specifier) "static"
(static) "static"
(type_qualifier) "const"
(const) "const"
(primitive_type) "uint64_t"
(init_declarator) "multiplicator = 0x022fdd63cc95386dUL"
(identifier) "multiplicator"
(=) "="
(number_literal) "0x022fdd63cc95386dUL"
(;) ";"
(expression_statement) "v |= v >> 1;"
(assignment_expression) "v |= v >> 1"
(identifier) "v"
(|=) "|="
(binary_expression) "v >> 1"
(identifier) "v"
(>>) ">>"
(number_literal) "1"
(;) ";"
(expression_statement) "v |= v >> 2;"
(assignment_expression) "v |= v >> 2"
(identifier) "v"
(|=) "|="
(binary_expression) "v >> 2"
(identifier) "v"
(>>) ">>"
(number_literal) "2"
(;) ";"
(expression_statement) "v |= v >> 4;"
(assignment_expression) "v |= v >> 4"
(identifier) "v"
(|=) "|="
(binary_expression) "v >> 4"
(identifier) "v"
(>>) ">>"
(number_literal) "4"
(;) ";"
(expression_statement) "v |= v >> 8;"
(assignment_expression) "v |= v >> 8"
(identifier) "v"
(|=) "|="
(binary_expression) "v >> 8"
(identifier) "v"
(>>) ">>"
(number_literal) "8"
(;) ";"
(expression_statement) "v |= v >> 16;"
(assignment_expression) "v |= v >> 16"
(identifier) "v"
(|=) "|="
(binary_expression) "v >> 16"
(identifier) "v"
(>>) ">>"
(number_literal) "16"
(;) ";"
(expression_statement) "v |= v >> 32;"
(assignment_expression) "v |= v >> 32"
(identifier) "v"
(|=) "|="
(binary_expression) "v >> 32"
(identifier) "v"
(>>) ">>"
(number_literal) "32"
(;) ";"
(expression_statement) "v++;"
(update_expression) "v++"
(identifier) "v"
(++) "++"
(;) ";"
(return_statement) "return lookup[(uint64_t)(v * multiplicator) >> 58];"
(return) "return"
(subscript_expression) "lookup[(uint64_t)(v * multiplicator) >> 58]"
(identifier) "lookup"
([) "["
(binary_expression) "(uint64_t)(v * multiplicator) >> 58"
(cast_expression) "(uint64_t)(v * multiplicator)"
(() "("
(type_descriptor) "uint64_t"
(primitive_type) "uint64_t"
()) ")"
(parenthesized_expression) "(v * multiplicator)"
(() "("
(binary_expression) "v * multiplicator"
(identifier) "v"
(*) "*"
(identifier) "multiplicator"
()) ")"
(>>) ">>"
(number_literal) "58"
(]) "]"
(;) ";"
(}) "}"
(function_definition) "uint8_t reverse8(uint8_t inputData) {\n inputData = ((inputData * 0x0802LU & 0x22110LU) | (inputData * 0x8020LU & 0x88440LU)) * 0x10101LU >> 16; \n return inputData;\n}"
(primitive_type) "uint8_t"
(function_declarator) "reverse8(uint8_t inputData)"
(identifier) "reverse8"
(parameter_list) "(uint8_t inputData)"
(() "("
(parameter_declaration) "uint8_t inputData"
(primitive_type) "uint8_t"
(identifier) "inputData"
()) ")"
(compound_statement) "{\n inputData = ((inputData * 0x0802LU & 0x22110LU) | (inputData * 0x8020LU & 0x88440LU)) * 0x10101LU >> 16; \n return inputData;\n}"
({) "{"
(expression_statement) "inputData = ((inputData * 0x0802LU & 0x22110LU) | (inputData * 0x8020LU & 0x88440LU)) * 0x10101LU >> 16;"
(assignment_expression) "inputData = ((inputData * 0x0802LU & 0x22110LU) | (inputData * 0x8020LU & 0x88440LU)) * 0x10101LU >> 16"
(identifier) "inputData"
(=) "="
(binary_expression) "((inputData * 0x0802LU & 0x22110LU) | (inputData * 0x8020LU & 0x88440LU)) * 0x10101LU >> 16"
(binary_expression) "((inputData * 0x0802LU & 0x22110LU) | (inputData * 0x8020LU & 0x88440LU)) * 0x10101LU"
(parenthesized_expression) "((inputData * 0x0802LU & 0x22110LU) | (inputData * 0x8020LU & 0x88440LU))"
(() "("
(binary_expression) "(inputData * 0x0802LU & 0x22110LU) | (inputData * 0x8020LU & 0x88440LU)"
(parenthesized_expression) "(inputData * 0x0802LU & 0x22110LU)"
(() "("
(binary_expression) "inputData * 0x0802LU & 0x22110LU"
(binary_expression) "inputData * 0x0802LU"
(identifier) "inputData"
(*) "*"
(number_literal) "0x0802LU"
(&) "&"
(number_literal) "0x22110LU"
()) ")"
(|) "|"
(parenthesized_expression) "(inputData * 0x8020LU & 0x88440LU)"
(() "("
(binary_expression) "inputData * 0x8020LU & 0x88440LU"
(binary_expression) "inputData * 0x8020LU"
(identifier) "inputData"
(*) "*"
(number_literal) "0x8020LU"
(&) "&"
(number_literal) "0x88440LU"
()) ")"
()) ")"
(*) "*"
(number_literal) "0x10101LU"
(>>) ">>"
(number_literal) "16"
(;) ";"
(return_statement) "return inputData;"
(return) "return"
(identifier) "inputData"
(;) ";"
(}) "}"
(function_definition) "uint64_t reverse64(uint64_t inputData) {\n //reverse bytes\n //Efficient knuth 64 bit reverse\n static const uint64_t m0 = 0x5555555555555555LLU;\n static const uint64_t m1 = 0x0300c0303030c303LLU;\n static const uint64_t m2 = 0x00c0300c03f0003fLLU;\n static const uint64_t m3 = 0x00000ffc00003fffLLU;\n inputData = ((inputData >> 1) & m0) | (inputData & m0) << 1;\n inputData = inputData ^ (((inputData >> 4) ^ inputData) & m1) ^ ((((inputData >> 4) ^ inputData) & m1) << 4);\n inputData = inputData ^ (((inputData >> 8) ^ inputData) & m2) ^ ((((inputData >> 8) ^ inputData) & m2) << 8);\n inputData = inputData ^ (((inputData >> 20) ^ inputData) & m3) ^ ((((inputData >> 20) ^ inputData) & m3) << 20);\n inputData = (inputData >> 34) | (inputData << 30);\n return inputData;\n}"
(primitive_type) "uint64_t"
(function_declarator) "reverse64(uint64_t inputData)"
(identifier) "reverse64"
(parameter_list) "(uint64_t inputData)"
(() "("
(parameter_declaration) "uint64_t inputData"
(primitive_type) "uint64_t"
(identifier) "inputData"
()) ")"
(compound_statement) "{\n //reverse bytes\n //Efficient knuth 64 bit reverse\n static const uint64_t m0 = 0x5555555555555555LLU;\n static const uint64_t m1 = 0x0300c0303030c303LLU;\n static const uint64_t m2 = 0x00c0300c03f0003fLLU;\n static const uint64_t m3 = 0x00000ffc00003fffLLU;\n inputData = ((inputData >> 1) & m0) | (inputData & m0) << 1;\n inputData = inputData ^ (((inputData >> 4) ^ inputData) & m1) ^ ((((inputData >> 4) ^ inputData) & m1) << 4);\n inputData = inputData ^ (((inputData >> 8) ^ inputData) & m2) ^ ((((inputData >> 8) ^ inputData) & m2) << 8);\n inputData = inputData ^ (((inputData >> 20) ^ inputData) & m3) ^ ((((inputData >> 20) ^ inputData) & m3) << 20);\n inputData = (inputData >> 34) | (inputData << 30);\n return inputData;\n}"
({) "{"
(comment) "//reverse bytes"
(comment) "//Efficient knuth 64 bit reverse"
(declaration) "static const uint64_t m0 = 0x5555555555555555LLU;"
(storage_class_specifier) "static"
(static) "static"
(type_qualifier) "const"
(const) "const"
(primitive_type) "uint64_t"
(init_declarator) "m0 = 0x5555555555555555LLU"
(identifier) "m0"
(=) "="
(number_literal) "0x5555555555555555LLU"
(;) ";"
(declaration) "static const uint64_t m1 = 0x0300c0303030c303LLU;"
(storage_class_specifier) "static"
(static) "static"
(type_qualifier) "const"
(const) "const"
(primitive_type) "uint64_t"
(init_declarator) "m1 = 0x0300c0303030c303LLU"
(identifier) "m1"
(=) "="
(number_literal) "0x0300c0303030c303LLU"
(;) ";"
(declaration) "static const uint64_t m2 = 0x00c0300c03f0003fLLU;"
(storage_class_specifier) "static"
(static) "static"
(type_qualifier) "const"
(const) "const"
(primitive_type) "uint64_t"
(init_declarator) "m2 = 0x00c0300c03f0003fLLU"
(identifier) "m2"
(=) "="
(number_literal) "0x00c0300c03f0003fLLU"
(;) ";"
(declaration) "static const uint64_t m3 = 0x00000ffc00003fffLLU;"
(storage_class_specifier) "static"
(static) "static"
(type_qualifier) "const"
(const) "const"
(primitive_type) "uint64_t"
(init_declarator) "m3 = 0x00000ffc00003fffLLU"
(identifier) "m3"
(=) "="
(number_literal) "0x00000ffc00003fffLLU"
(;) ";"
(expression_statement) "inputData = ((inputData >> 1) & m0) | (inputData & m0) << 1;"
(assignment_expression) "inputData = ((inputData >> 1) & m0) | (inputData & m0) << 1"
(identifier) "inputData"
(=) "="
(binary_expression) "((inputData >> 1) & m0) | (inputData & m0) << 1"
(parenthesized_expression) "((inputData >> 1) & m0)"
(() "("
(binary_expression) "(inputData >> 1) & m0"
(parenthesized_expression) "(inputData >> 1)"
(() "("
(binary_expression) "inputData >> 1"
(identifier) "inputData"
(>>) ">>"
(number_literal) "1"
()) ")"
(&) "&"
(identifier) "m0"
()) ")"
(|) "|"
(binary_expression) "(inputData & m0) << 1"
(parenthesized_expression) "(inputData & m0)"
(() "("
(binary_expression) "inputData & m0"
(identifier) "inputData"
(&) "&"
(identifier) "m0"
()) ")"
(<<) "<<"
(number_literal) "1"
(;) ";"
(expression_statement) "inputData = inputData ^ (((inputData >> 4) ^ inputData) & m1) ^ ((((inputData >> 4) ^ inputData) & m1) << 4);"
(assignment_expression) "inputData = inputData ^ (((inputData >> 4) ^ inputData) & m1) ^ ((((inputData >> 4) ^ inputData) & m1) << 4)"
(identifier) "inputData"
(=) "="
(binary_expression) "inputData ^ (((inputData >> 4) ^ inputData) & m1) ^ ((((inputData >> 4) ^ inputData) & m1) << 4)"
(binary_expression) "inputData ^ (((inputData >> 4) ^ inputData) & m1)"
(identifier) "inputData"
(^) "^"
(parenthesized_expression) "(((inputData >> 4) ^ inputData) & m1)"
(() "("
(binary_expression) "((inputData >> 4) ^ inputData) & m1"
(parenthesized_expression) "((inputData >> 4) ^ inputData)"
(() "("
(binary_expression) "(inputData >> 4) ^ inputData"
(parenthesized_expression) "(inputData >> 4)"
(() "("
(binary_expression) "inputData >> 4"
(identifier) "inputData"
(>>) ">>"
(number_literal) "4"
()) ")"
(^) "^"
(identifier) "inputData"
()) ")"
(&) "&"
(identifier) "m1"
()) ")"
(^) "^"
(parenthesized_expression) "((((inputData >> 4) ^ inputData) & m1) << 4)"
(() "("
(binary_expression) "(((inputData >> 4) ^ inputData) & m1) << 4"
(parenthesized_expression) "(((inputData >> 4) ^ inputData) & m1)"
(() "("
(binary_expression) "((inputData >> 4) ^ inputData) & m1"
(parenthesized_expression) "((inputData >> 4) ^ inputData)"
(() "("
(binary_expression) "(inputData >> 4) ^ inputData"
(parenthesized_expression) "(inputData >> 4)"
(() "("
(binary_expression) "inputData >> 4"
(identifier) "inputData"
(>>) ">>"
(number_literal) "4"
()) ")"
(^) "^"
(identifier) "inputData"
()) ")"
(&) "&"
(identifier) "m1"
()) ")"
(<<) "<<"
(number_literal) "4"
()) ")"
(;) ";"
(expression_statement) "inputData = inputData ^ (((inputData >> 8) ^ inputData) & m2) ^ ((((inputData >> 8) ^ inputData) & m2) << 8);"
(assignment_expression) "inputData = inputData ^ (((inputData >> 8) ^ inputData) & m2) ^ ((((inputData >> 8) ^ inputData) & m2) << 8)"
(identifier) "inputData"
(=) "="
(binary_expression) "inputData ^ (((inputData >> 8) ^ inputData) & m2) ^ ((((inputData >> 8) ^ inputData) & m2) << 8)"
(binary_expression) "inputData ^ (((inputData >> 8) ^ inputData) & m2)"
(identifier) "inputData"
(^) "^"
(parenthesized_expression) "(((inputData >> 8) ^ inputData) & m2)"
(() "("
(binary_expression) "((inputData >> 8) ^ inputData) & m2"
(parenthesized_expression) "((inputData >> 8) ^ inputData)"
(() "("
(binary_expression) "(inputData >> 8) ^ inputData"
(parenthesized_expression) "(inputData >> 8)"
(() "("
(binary_expression) "inputData >> 8"
(identifier) "inputData"
(>>) ">>"
(number_literal) "8"
()) ")"
(^) "^"
(identifier) "inputData"
()) ")"
(&) "&"
(identifier) "m2"
()) ")"
(^) "^"
(parenthesized_expression) "((((inputData >> 8) ^ inputData) & m2) << 8)"
(() "("
(binary_expression) "(((inputData >> 8) ^ inputData) & m2) << 8"
(parenthesized_expression) "(((inputData >> 8) ^ inputData) & m2)"
(() "("
(binary_expression) "((inputData >> 8) ^ inputData) & m2"
(parenthesized_expression) "((inputData >> 8) ^ inputData)"
(() "("
(binary_expression) "(inputData >> 8) ^ inputData"
(parenthesized_expression) "(inputData >> 8)"
(() "("
(binary_expression) "inputData >> 8"
(identifier) "inputData"
(>>) ">>"
(number_literal) "8"
()) ")"
(^) "^"
(identifier) "inputData"
()) ")"
(&) "&"
(identifier) "m2"
()) ")"
(<<) "<<"
(number_literal) "8"
()) ")"
(;) ";"
(expression_statement) "inputData = inputData ^ (((inputData >> 20) ^ inputData) & m3) ^ ((((inputData >> 20) ^ inputData) & m3) << 20);"
(assignment_expression) "inputData = inputData ^ (((inputData >> 20) ^ inputData) & m3) ^ ((((inputData >> 20) ^ inputData) & m3) << 20)"
(identifier) "inputData"
(=) "="
(binary_expression) "inputData ^ (((inputData >> 20) ^ inputData) & m3) ^ ((((inputData >> 20) ^ inputData) & m3) << 20)"
(binary_expression) "inputData ^ (((inputData >> 20) ^ inputData) & m3)"
(identifier) "inputData"
(^) "^"
(parenthesized_expression) "(((inputData >> 20) ^ inputData) & m3)"
(() "("
(binary_expression) "((inputData >> 20) ^ inputData) & m3"
(parenthesized_expression) "((inputData >> 20) ^ inputData)"
(() "("
(binary_expression) "(inputData >> 20) ^ inputData"
(parenthesized_expression) "(inputData >> 20)"
(() "("
(binary_expression) "inputData >> 20"
(identifier) "inputData"
(>>) ">>"
(number_literal) "20"
()) ")"
(^) "^"
(identifier) "inputData"
()) ")"
(&) "&"
(identifier) "m3"
()) ")"
(^) "^"
(parenthesized_expression) "((((inputData >> 20) ^ inputData) & m3) << 20)"
(() "("
(binary_expression) "(((inputData >> 20) ^ inputData) & m3) << 20"
(parenthesized_expression) "(((inputData >> 20) ^ inputData) & m3)"
(() "("
(binary_expression) "((inputData >> 20) ^ inputData) & m3"
(parenthesized_expression) "((inputData >> 20) ^ inputData)"
(() "("
(binary_expression) "(inputData >> 20) ^ inputData"
(parenthesized_expression) "(inputData >> 20)"
(() "("
(binary_expression) "inputData >> 20"
(identifier) "inputData"
(>>) ">>"
(number_literal) "20"
()) ")"
(^) "^"
(identifier) "inputData"
()) ")"
(&) "&"
(identifier) "m3"
()) ")"
(<<) "<<"
(number_literal) "20"
()) ")"
(;) ";"
(expression_statement) "inputData = (inputData >> 34) | (inputData << 30);"
(assignment_expression) "inputData = (inputData >> 34) | (inputData << 30)"
(identifier) "inputData"
(=) "="
(binary_expression) "(inputData >> 34) | (inputData << 30)"
(parenthesized_expression) "(inputData >> 34)"
(() "("
(binary_expression) "inputData >> 34"
(identifier) "inputData"
(>>) ">>"
(number_literal) "34"
()) ")"
(|) "|"
(parenthesized_expression) "(inputData << 30)"
(() "("
(binary_expression) "inputData << 30"
(identifier) "inputData"
(<<) "<<"
(number_literal) "30"
()) ")"
(;) ";"
(return_statement) "return inputData;"
(return) "return"
(identifier) "inputData"
(;) ";"
(}) "}"
(function_definition) "void CAN_encode(CAN_message_t *msg, double inputDataDouble, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias) { //byteOrder is 1 for MSB, 0 for LSB. Signed is 1 for signed, 0 for unsigned\n\n uint64_t inputData = 0x0000000000000000LU;\n //scale and bias\n inputDataDouble = (1/Scale) * (inputDataDouble - bias);\n uint64_t maxVal = 1;\n for(int i=0; i<bitLength; i++) {\n maxVal *= 2;\n }\n //Sign value if appropriate\n if(sign) {\n if(inputDataDouble < 0) {\n inputDataDouble += maxVal;\n }\n inputData = inputDataDouble;\n }\n else\n inputData = inputDataDouble;\n\n if(inputData > (maxVal-1)) {\n inputData = (maxVal-1);\n }\n else if(inputData < 0){\n inputData = 0;\n }\n //access input as byte array and evaluate length of array\n //take advantage of endianness\n uint8_t *bytePointer = (uint8_t *)&inputData;\n\n if(byteOrder) {\n //locate MSB\n uint8_t trueLen = bitSize(inputData);\n //if more bits are present than can be accomodated cut them off\n if(trueLen > bitLength) {\n inputData = inputData >> (trueLen - bitLength);\n }\n //Shift buf to 64th position\n inputData = inputData << (64 - bitLength);\n\n //Reverse int\n inputData = reverse64(inputData);\n //calculate altered start position and move\n uint8_t calcStartbit = (7 - startBit%8) + 8*(startBit/8);\n inputData = inputData << calcStartbit;\n \n //reverse each byte and move to appropriate place\n for(int i=0; i<8; i++) {\n msg->buf[i] |= reverse8(bytePointer[i]);\n }\n }else {\n //Shift buf to appropriate place\n inputData = inputData << startBit;\n //push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= bytePointer[i];\n }\n }\n}"
(primitive_type) "void"
(function_declarator) "CAN_encode(CAN_message_t *msg, double inputDataDouble, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias)"
(identifier) "CAN_encode"
(parameter_list) "(CAN_message_t *msg, double inputDataDouble, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias)"
(() "("
(parameter_declaration) "CAN_message_t *msg"
(type_identifier) "CAN_message_t"
(pointer_declarator) "*msg"
(*) "*"
(identifier) "msg"
(,) ","
(parameter_declaration) "double inputDataDouble"
(primitive_type) "double"
(identifier) "inputDataDouble"
(,) ","
(parameter_declaration) "uint8_t startBit"
(primitive_type) "uint8_t"
(identifier) "startBit"
(,) ","
(parameter_declaration) "uint8_t bitLength"
(primitive_type) "uint8_t"
(identifier) "bitLength"
(,) ","
(parameter_declaration) "bool byteOrder"
(primitive_type) "bool"
(identifier) "byteOrder"
(,) ","
(parameter_declaration) "bool sign"
(primitive_type) "bool"
(identifier) "sign"
(,) ","
(parameter_declaration) "double Scale"
(primitive_type) "double"
(identifier) "Scale"
(,) ","
(parameter_declaration) "double bias"
(primitive_type) "double"
(identifier) "bias"
()) ")"
(compound_statement) "{ //byteOrder is 1 for MSB, 0 for LSB. Signed is 1 for signed, 0 for unsigned\n\n uint64_t inputData = 0x0000000000000000LU;\n //scale and bias\n inputDataDouble = (1/Scale) * (inputDataDouble - bias);\n uint64_t maxVal = 1;\n for(int i=0; i<bitLength; i++) {\n maxVal *= 2;\n }\n //Sign value if appropriate\n if(sign) {\n if(inputDataDouble < 0) {\n inputDataDouble += maxVal;\n }\n inputData = inputDataDouble;\n }\n else\n inputData = inputDataDouble;\n\n if(inputData > (maxVal-1)) {\n inputData = (maxVal-1);\n }\n else if(inputData < 0){\n inputData = 0;\n }\n //access input as byte array and evaluate length of array\n //take advantage of endianness\n uint8_t *bytePointer = (uint8_t *)&inputData;\n\n if(byteOrder) {\n //locate MSB\n uint8_t trueLen = bitSize(inputData);\n //if more bits are present than can be accomodated cut them off\n if(trueLen > bitLength) {\n inputData = inputData >> (trueLen - bitLength);\n }\n //Shift buf to 64th position\n inputData = inputData << (64 - bitLength);\n\n //Reverse int\n inputData = reverse64(inputData);\n //calculate altered start position and move\n uint8_t calcStartbit = (7 - startBit%8) + 8*(startBit/8);\n inputData = inputData << calcStartbit;\n \n //reverse each byte and move to appropriate place\n for(int i=0; i<8; i++) {\n msg->buf[i] |= reverse8(bytePointer[i]);\n }\n }else {\n //Shift buf to appropriate place\n inputData = inputData << startBit;\n //push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= bytePointer[i];\n }\n }\n}"
({) "{"
(comment) "//byteOrder is 1 for MSB, 0 for LSB. Signed is 1 for signed, 0 for unsigned"
(declaration) "uint64_t inputData = 0x0000000000000000LU;"
(primitive_type) "uint64_t"
(init_declarator) "inputData = 0x0000000000000000LU"
(identifier) "inputData"
(=) "="
(number_literal) "0x0000000000000000LU"
(;) ";"
(comment) "//scale and bias"
(expression_statement) "inputDataDouble = (1/Scale) * (inputDataDouble - bias);"
(assignment_expression) "inputDataDouble = (1/Scale) * (inputDataDouble - bias)"
(identifier) "inputDataDouble"
(=) "="
(binary_expression) "(1/Scale) * (inputDataDouble - bias)"
(parenthesized_expression) "(1/Scale)"
(() "("
(binary_expression) "1/Scale"
(number_literal) "1"
(/) "/"
(identifier) "Scale"
()) ")"
(*) "*"
(parenthesized_expression) "(inputDataDouble - bias)"
(() "("
(binary_expression) "inputDataDouble - bias"
(identifier) "inputDataDouble"
(-) "-"
(identifier) "bias"
()) ")"
(;) ";"
(declaration) "uint64_t maxVal = 1;"
(primitive_type) "uint64_t"
(init_declarator) "maxVal = 1"
(identifier) "maxVal"
(=) "="
(number_literal) "1"
(;) ";"
(for_statement) "for(int i=0; i<bitLength; i++) {\n maxVal *= 2;\n }"
(for) "for"
(() "("
(declaration) "int i=0;"
(primitive_type) "int"
(init_declarator) "i=0"
(identifier) "i"
(=) "="
(number_literal) "0"
(;) ";"
(binary_expression) "i<bitLength"
(identifier) "i"
(<) "<"
(identifier) "bitLength"
(;) ";"
(update_expression) "i++"
(identifier) "i"
(++) "++"
()) ")"
(compound_statement) "{\n maxVal *= 2;\n }"
({) "{"
(expression_statement) "maxVal *= 2;"
(assignment_expression) "maxVal *= 2"
(identifier) "maxVal"
(*=) "*="
(number_literal) "2"
(;) ";"
(}) "}"
(comment) "//Sign value if appropriate"
(if_statement) "if(sign) {\n if(inputDataDouble < 0) {\n inputDataDouble += maxVal;\n }\n inputData = inputDataDouble;\n }\n else\n inputData = inputDataDouble;"
(if) "if"
(parenthesized_expression) "(sign)"
(() "("
(identifier) "sign"
()) ")"
(compound_statement) "{\n if(inputDataDouble < 0) {\n inputDataDouble += maxVal;\n }\n inputData = inputDataDouble;\n }"
({) "{"
(if_statement) "if(inputDataDouble < 0) {\n inputDataDouble += maxVal;\n }"
(if) "if"
(parenthesized_expression) "(inputDataDouble < 0)"
(() "("
(binary_expression) "inputDataDouble < 0"
(identifier) "inputDataDouble"
(<) "<"
(number_literal) "0"
()) ")"
(compound_statement) "{\n inputDataDouble += maxVal;\n }"
({) "{"
(expression_statement) "inputDataDouble += maxVal;"
(assignment_expression) "inputDataDouble += maxVal"
(identifier) "inputDataDouble"
(+=) "+="
(identifier) "maxVal"
(;) ";"
(}) "}"
(expression_statement) "inputData = inputDataDouble;"
(assignment_expression) "inputData = inputDataDouble"
(identifier) "inputData"
(=) "="
(identifier) "inputDataDouble"
(;) ";"
(}) "}"
(else_clause) "else\n inputData = inputDataDouble;"
(else) "else"
(expression_statement) "inputData = inputDataDouble;"
(assignment_expression) "inputData = inputDataDouble"
(identifier) "inputData"
(=) "="
(identifier) "inputDataDouble"
(;) ";"
(if_statement) "if(inputData > (maxVal-1)) {\n inputData = (maxVal-1);\n }\n else if(inputData < 0){\n inputData = 0;\n }"
(if) "if"
(parenthesized_expression) "(inputData > (maxVal-1))"
(() "("
(binary_expression) "inputData > (maxVal-1)"
(identifier) "inputData"
(>) ">"
(parenthesized_expression) "(maxVal-1)"
(() "("
(binary_expression) "maxVal-1"
(identifier) "maxVal"
(-) "-"
(number_literal) "1"
()) ")"
()) ")"
(compound_statement) "{\n inputData = (maxVal-1);\n }"
({) "{"
(expression_statement) "inputData = (maxVal-1);"
(assignment_expression) "inputData = (maxVal-1)"
(identifier) "inputData"
(=) "="
(parenthesized_expression) "(maxVal-1)"
(() "("
(binary_expression) "maxVal-1"
(identifier) "maxVal"
(-) "-"
(number_literal) "1"
()) ")"
(;) ";"
(}) "}"
(else_clause) "else if(inputData < 0){\n inputData = 0;\n }"
(else) "else"
(if_statement) "if(inputData < 0){\n inputData = 0;\n }"
(if) "if"
(parenthesized_expression) "(inputData < 0)"
(() "("
(binary_expression) "inputData < 0"
(identifier) "inputData"
(<) "<"
(number_literal) "0"
()) ")"
(compound_statement) "{\n inputData = 0;\n }"
({) "{"
(expression_statement) "inputData = 0;"
(assignment_expression) "inputData = 0"
(identifier) "inputData"
(=) "="
(number_literal) "0"
(;) ";"
(}) "}"
(comment) "//access input as byte array and evaluate length of array"
(comment) "//take advantage of endianness"
(declaration) "uint8_t *bytePointer = (uint8_t *)&inputData;"
(primitive_type) "uint8_t"
(init_declarator) "*bytePointer = (uint8_t *)&inputData"
(pointer_declarator) "*bytePointer"
(*) "*"
(identifier) "bytePointer"
(=) "="
(cast_expression) "(uint8_t *)&inputData"
(() "("
(type_descriptor) "uint8_t *"
(primitive_type) "uint8_t"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(pointer_expression) "&inputData"
(&) "&"
(identifier) "inputData"
(;) ";"
(if_statement) "if(byteOrder) {\n //locate MSB\n uint8_t trueLen = bitSize(inputData);\n //if more bits are present than can be accomodated cut them off\n if(trueLen > bitLength) {\n inputData = inputData >> (trueLen - bitLength);\n }\n //Shift buf to 64th position\n inputData = inputData << (64 - bitLength);\n\n //Reverse int\n inputData = reverse64(inputData);\n //calculate altered start position and move\n uint8_t calcStartbit = (7 - startBit%8) + 8*(startBit/8);\n inputData = inputData << calcStartbit;\n \n //reverse each byte and move to appropriate place\n for(int i=0; i<8; i++) {\n msg->buf[i] |= reverse8(bytePointer[i]);\n }\n }else {\n //Shift buf to appropriate place\n inputData = inputData << startBit;\n //push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= bytePointer[i];\n }\n }"
(if) "if"
(parenthesized_expression) "(byteOrder)"
(() "("
(identifier) "byteOrder"
()) ")"
(compound_statement) "{\n //locate MSB\n uint8_t trueLen = bitSize(inputData);\n //if more bits are present than can be accomodated cut them off\n if(trueLen > bitLength) {\n inputData = inputData >> (trueLen - bitLength);\n }\n //Shift buf to 64th position\n inputData = inputData << (64 - bitLength);\n\n //Reverse int\n inputData = reverse64(inputData);\n //calculate altered start position and move\n uint8_t calcStartbit = (7 - startBit%8) + 8*(startBit/8);\n inputData = inputData << calcStartbit;\n \n //reverse each byte and move to appropriate place\n for(int i=0; i<8; i++) {\n msg->buf[i] |= reverse8(bytePointer[i]);\n }\n }"
({) "{"
(comment) "//locate MSB"
(declaration) "uint8_t trueLen = bitSize(inputData);"
(primitive_type) "uint8_t"
(init_declarator) "trueLen = bitSize(inputData)"
(identifier) "trueLen"
(=) "="
(call_expression) "bitSize(inputData)"
(identifier) "bitSize"
(argument_list) "(inputData)"
(() "("
(identifier) "inputData"
()) ")"
(;) ";"
(comment) "//if more bits are present than can be accomodated cut them off"
(if_statement) "if(trueLen > bitLength) {\n inputData = inputData >> (trueLen - bitLength);\n }"
(if) "if"
(parenthesized_expression) "(trueLen > bitLength)"
(() "("
(binary_expression) "trueLen > bitLength"
(identifier) "trueLen"
(>) ">"
(identifier) "bitLength"
()) ")"
(compound_statement) "{\n inputData = inputData >> (trueLen - bitLength);\n }"
({) "{"
(expression_statement) "inputData = inputData >> (trueLen - bitLength);"
(assignment_expression) "inputData = inputData >> (trueLen - bitLength)"
(identifier) "inputData"
(=) "="
(binary_expression) "inputData >> (trueLen - bitLength)"
(identifier) "inputData"
(>>) ">>"
(parenthesized_expression) "(trueLen - bitLength)"
(() "("
(binary_expression) "trueLen - bitLength"
(identifier) "trueLen"
(-) "-"
(identifier) "bitLength"
()) ")"
(;) ";"
(}) "}"
(comment) "//Shift buf to 64th position"
(expression_statement) "inputData = inputData << (64 - bitLength);"
(assignment_expression) "inputData = inputData << (64 - bitLength)"
(identifier) "inputData"
(=) "="
(binary_expression) "inputData << (64 - bitLength)"
(identifier) "inputData"
(<<) "<<"
(parenthesized_expression) "(64 - bitLength)"
(() "("
(binary_expression) "64 - bitLength"
(number_literal) "64"
(-) "-"
(identifier) "bitLength"
()) ")"
(;) ";"
(comment) "//Reverse int"
(expression_statement) "inputData = reverse64(inputData);"
(assignment_expression) "inputData = reverse64(inputData)"
(identifier) "inputData"
(=) "="
(call_expression) "reverse64(inputData)"
(identifier) "reverse64"
(argument_list) "(inputData)"
(() "("
(identifier) "inputData"
()) ")"
(;) ";"
(comment) "//calculate altered start position and move"
(declaration) "uint8_t calcStartbit = (7 - startBit%8) + 8*(startBit/8);"
(primitive_type) "uint8_t"
(init_declarator) "calcStartbit = (7 - startBit%8) + 8*(startBit/8)"
(identifier) "calcStartbit"
(=) "="
(binary_expression) "(7 - startBit%8) + 8*(startBit/8)"
(parenthesized_expression) "(7 - startBit%8)"
(() "("
(binary_expression) "7 - startBit%8"
(number_literal) "7"
(-) "-"
(binary_expression) "startBit%8"
(identifier) "startBit"
(%) "%"
(number_literal) "8"
()) ")"
(+) "+"
(binary_expression) "8*(startBit/8)"
(number_literal) "8"
(*) "*"
(parenthesized_expression) "(startBit/8)"
(() "("
(binary_expression) "startBit/8"
(identifier) "startBit"
(/) "/"
(number_literal) "8"
()) ")"
(;) ";"
(expression_statement) "inputData = inputData << calcStartbit;"
(assignment_expression) "inputData = inputData << calcStartbit"
(identifier) "inputData"
(=) "="
(binary_expression) "inputData << calcStartbit"
(identifier) "inputData"
(<<) "<<"
(identifier) "calcStartbit"
(;) ";"
(comment) "//reverse each byte and move to appropriate place"
(for_statement) "for(int i=0; i<8; i++) {\n msg->buf[i] |= reverse8(bytePointer[i]);\n }"
(for) "for"
(() "("
(declaration) "int i=0;"
(primitive_type) "int"
(init_declarator) "i=0"
(identifier) "i"
(=) "="
(number_literal) "0"
(;) ";"
(binary_expression) "i<8"
(identifier) "i"
(<) "<"
(number_literal) "8"
(;) ";"
(update_expression) "i++"
(identifier) "i"
(++) "++"
()) ")"
(compound_statement) "{\n msg->buf[i] |= reverse8(bytePointer[i]);\n }"
({) "{"
(expression_statement) "msg->buf[i] |= reverse8(bytePointer[i]);"
(assignment_expression) "msg->buf[i] |= reverse8(bytePointer[i])"
(subscript_expression) "msg->buf[i]"
(field_expression) "msg->buf"
(identifier) "msg"
(->) "->"
(field_identifier) "buf"
([) "["
(identifier) "i"
(]) "]"
(|=) "|="
(call_expression) "reverse8(bytePointer[i])"
(identifier) "reverse8"
(argument_list) "(bytePointer[i])"
(() "("
(subscript_expression) "bytePointer[i]"
(identifier) "bytePointer"
([) "["
(identifier) "i"
(]) "]"
()) ")"
(;) ";"
(}) "}"
(}) "}"
(else_clause) "else {\n //Shift buf to appropriate place\n inputData = inputData << startBit;\n //push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= bytePointer[i];\n }\n }"
(else) "else"
(compound_statement) "{\n //Shift buf to appropriate place\n inputData = inputData << startBit;\n //push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= bytePointer[i];\n }\n }"
({) "{"
(comment) "//Shift buf to appropriate place"
(expression_statement) "inputData = inputData << startBit;"
(assignment_expression) "inputData = inputData << startBit"
(identifier) "inputData"
(=) "="
(binary_expression) "inputData << startBit"
(identifier) "inputData"
(<<) "<<"
(identifier) "startBit"
(;) ";"
(comment) "//push to message struct"
(for_statement) "for(int i=0; i<8; i++) {\n msg->buf[i] |= bytePointer[i];\n }"
(for) "for"
(() "("
(declaration) "int i=0;"
(primitive_type) "int"
(init_declarator) "i=0"
(identifier) "i"
(=) "="
(number_literal) "0"
(;) ";"
(binary_expression) "i<8"
(identifier) "i"
(<) "<"
(number_literal) "8"
(;) ";"
(update_expression) "i++"
(identifier) "i"
(++) "++"
()) ")"
(compound_statement) "{\n msg->buf[i] |= bytePointer[i];\n }"
({) "{"
(expression_statement) "msg->buf[i] |= bytePointer[i];"
(assignment_expression) "msg->buf[i] |= bytePointer[i]"
(subscript_expression) "msg->buf[i]"
(field_expression) "msg->buf"
(identifier) "msg"
(->) "->"
(field_identifier) "buf"
([) "["
(identifier) "i"
(]) "]"
(|=) "|="
(subscript_expression) "bytePointer[i]"
(identifier) "bytePointer"
([) "["
(identifier) "i"
(]) "]"
(;) ";"
(}) "}"
(}) "}"
(}) "}"
(function_definition) "void CAN_encode(CAN_message_t *msg, int inputDataInt, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias) { //byteOrder is 1 for MSB, 0 for LSB. Signed is 1 for signed, 0 for unsigned\n\n uint64_t inputData = 0x0000000000000000LU;\n //scale and bias\n inputDataInt = (1/Scale) * (inputDataInt - bias);\n //Sign value if appropriate\n uint64_t maxVal = 1;\n for(int i=0; i<bitLength; i++) {\n maxVal *= 2;\n }\n \n if(sign) {\n\n if(inputDataInt < 0) {\n inputDataInt += maxVal;\n }\n inputData = inputDataInt;\n }\n else\n inputData = inputDataInt;\n\n if(inputData > (maxVal-1)) {\n inputData = (maxVal-1);\n }\n else if(inputData < 0){\n inputData = 0;\n }\n //access input as byte array\n //take advantage of endianness\n uint8_t *bytePointer = (uint8_t *)&inputData;\n\n if(byteOrder) {\n //locate MSB\n uint8_t trueLen = bitSize(inputData);\n //if more bits are present than can be accomodated cut them off\n if(trueLen > bitLength) {\n inputData = inputData >> (trueLen - bitLength);\n }\n //Shift buf to 64th position\n inputData = inputData << (64 - bitLength);\n\n //Reverse int\n inputData = reverse64(inputData);\n uint8_t calcStartbit = (7 - startBit%8) + 8*(startBit/8);\n inputData = inputData << calcStartbit;\n //reverse each byte and push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= reverse8(bytePointer[i]);\n }\n }else {\n //Shift buf to appropriate place\n inputData = inputData << startBit;\n //push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= bytePointer[i];\n }\n }\n}"
(primitive_type) "void"
(function_declarator) "CAN_encode(CAN_message_t *msg, int inputDataInt, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias)"
(identifier) "CAN_encode"
(parameter_list) "(CAN_message_t *msg, int inputDataInt, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias)"
(() "("
(parameter_declaration) "CAN_message_t *msg"
(type_identifier) "CAN_message_t"
(pointer_declarator) "*msg"
(*) "*"
(identifier) "msg"
(,) ","
(parameter_declaration) "int inputDataInt"
(primitive_type) "int"
(identifier) "inputDataInt"
(,) ","
(parameter_declaration) "uint8_t startBit"
(primitive_type) "uint8_t"
(identifier) "startBit"
(,) ","
(parameter_declaration) "uint8_t bitLength"
(primitive_type) "uint8_t"
(identifier) "bitLength"
(,) ","
(parameter_declaration) "bool byteOrder"
(primitive_type) "bool"
(identifier) "byteOrder"
(,) ","
(parameter_declaration) "bool sign"
(primitive_type) "bool"
(identifier) "sign"
(,) ","
(parameter_declaration) "double Scale"
(primitive_type) "double"
(identifier) "Scale"
(,) ","
(parameter_declaration) "double bias"
(primitive_type) "double"
(identifier) "bias"
()) ")"
(compound_statement) "{ //byteOrder is 1 for MSB, 0 for LSB. Signed is 1 for signed, 0 for unsigned\n\n uint64_t inputData = 0x0000000000000000LU;\n //scale and bias\n inputDataInt = (1/Scale) * (inputDataInt - bias);\n //Sign value if appropriate\n uint64_t maxVal = 1;\n for(int i=0; i<bitLength; i++) {\n maxVal *= 2;\n }\n \n if(sign) {\n\n if(inputDataInt < 0) {\n inputDataInt += maxVal;\n }\n inputData = inputDataInt;\n }\n else\n inputData = inputDataInt;\n\n if(inputData > (maxVal-1)) {\n inputData = (maxVal-1);\n }\n else if(inputData < 0){\n inputData = 0;\n }\n //access input as byte array\n //take advantage of endianness\n uint8_t *bytePointer = (uint8_t *)&inputData;\n\n if(byteOrder) {\n //locate MSB\n uint8_t trueLen = bitSize(inputData);\n //if more bits are present than can be accomodated cut them off\n if(trueLen > bitLength) {\n inputData = inputData >> (trueLen - bitLength);\n }\n //Shift buf to 64th position\n inputData = inputData << (64 - bitLength);\n\n //Reverse int\n inputData = reverse64(inputData);\n uint8_t calcStartbit = (7 - startBit%8) + 8*(startBit/8);\n inputData = inputData << calcStartbit;\n //reverse each byte and push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= reverse8(bytePointer[i]);\n }\n }else {\n //Shift buf to appropriate place\n inputData = inputData << startBit;\n //push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= bytePointer[i];\n }\n }\n}"
({) "{"
(comment) "//byteOrder is 1 for MSB, 0 for LSB. Signed is 1 for signed, 0 for unsigned"
(declaration) "uint64_t inputData = 0x0000000000000000LU;"
(primitive_type) "uint64_t"
(init_declarator) "inputData = 0x0000000000000000LU"
(identifier) "inputData"
(=) "="
(number_literal) "0x0000000000000000LU"
(;) ";"
(comment) "//scale and bias"
(expression_statement) "inputDataInt = (1/Scale) * (inputDataInt - bias);"
(assignment_expression) "inputDataInt = (1/Scale) * (inputDataInt - bias)"
(identifier) "inputDataInt"
(=) "="
(binary_expression) "(1/Scale) * (inputDataInt - bias)"
(parenthesized_expression) "(1/Scale)"
(() "("
(binary_expression) "1/Scale"
(number_literal) "1"
(/) "/"
(identifier) "Scale"
()) ")"
(*) "*"
(parenthesized_expression) "(inputDataInt - bias)"
(() "("
(binary_expression) "inputDataInt - bias"
(identifier) "inputDataInt"
(-) "-"
(identifier) "bias"
()) ")"
(;) ";"
(comment) "//Sign value if appropriate"
(declaration) "uint64_t maxVal = 1;"
(primitive_type) "uint64_t"
(init_declarator) "maxVal = 1"
(identifier) "maxVal"
(=) "="
(number_literal) "1"
(;) ";"
(for_statement) "for(int i=0; i<bitLength; i++) {\n maxVal *= 2;\n }"
(for) "for"
(() "("
(declaration) "int i=0;"
(primitive_type) "int"
(init_declarator) "i=0"
(identifier) "i"
(=) "="
(number_literal) "0"
(;) ";"
(binary_expression) "i<bitLength"
(identifier) "i"
(<) "<"
(identifier) "bitLength"
(;) ";"
(update_expression) "i++"
(identifier) "i"
(++) "++"
()) ")"
(compound_statement) "{\n maxVal *= 2;\n }"
({) "{"
(expression_statement) "maxVal *= 2;"
(assignment_expression) "maxVal *= 2"
(identifier) "maxVal"
(*=) "*="
(number_literal) "2"
(;) ";"
(}) "}"
(if_statement) "if(sign) {\n\n if(inputDataInt < 0) {\n inputDataInt += maxVal;\n }\n inputData = inputDataInt;\n }\n else\n inputData = inputDataInt;"
(if) "if"
(parenthesized_expression) "(sign)"
(() "("
(identifier) "sign"
()) ")"
(compound_statement) "{\n\n if(inputDataInt < 0) {\n inputDataInt += maxVal;\n }\n inputData = inputDataInt;\n }"
({) "{"
(if_statement) "if(inputDataInt < 0) {\n inputDataInt += maxVal;\n }"
(if) "if"
(parenthesized_expression) "(inputDataInt < 0)"
(() "("
(binary_expression) "inputDataInt < 0"
(identifier) "inputDataInt"
(<) "<"
(number_literal) "0"
()) ")"
(compound_statement) "{\n inputDataInt += maxVal;\n }"
({) "{"
(expression_statement) "inputDataInt += maxVal;"
(assignment_expression) "inputDataInt += maxVal"
(identifier) "inputDataInt"
(+=) "+="
(identifier) "maxVal"
(;) ";"
(}) "}"
(expression_statement) "inputData = inputDataInt;"
(assignment_expression) "inputData = inputDataInt"
(identifier) "inputData"
(=) "="
(identifier) "inputDataInt"
(;) ";"
(}) "}"
(else_clause) "else\n inputData = inputDataInt;"
(else) "else"
(expression_statement) "inputData = inputDataInt;"
(assignment_expression) "inputData = inputDataInt"
(identifier) "inputData"
(=) "="
(identifier) "inputDataInt"
(;) ";"
(if_statement) "if(inputData > (maxVal-1)) {\n inputData = (maxVal-1);\n }\n else if(inputData < 0){\n inputData = 0;\n }"
(if) "if"
(parenthesized_expression) "(inputData > (maxVal-1))"
(() "("
(binary_expression) "inputData > (maxVal-1)"
(identifier) "inputData"
(>) ">"
(parenthesized_expression) "(maxVal-1)"
(() "("
(binary_expression) "maxVal-1"
(identifier) "maxVal"
(-) "-"
(number_literal) "1"
()) ")"
()) ")"
(compound_statement) "{\n inputData = (maxVal-1);\n }"
({) "{"
(expression_statement) "inputData = (maxVal-1);"
(assignment_expression) "inputData = (maxVal-1)"
(identifier) "inputData"
(=) "="
(parenthesized_expression) "(maxVal-1)"
(() "("
(binary_expression) "maxVal-1"
(identifier) "maxVal"
(-) "-"
(number_literal) "1"
()) ")"
(;) ";"
(}) "}"
(else_clause) "else if(inputData < 0){\n inputData = 0;\n }"
(else) "else"
(if_statement) "if(inputData < 0){\n inputData = 0;\n }"
(if) "if"
(parenthesized_expression) "(inputData < 0)"
(() "("
(binary_expression) "inputData < 0"
(identifier) "inputData"
(<) "<"
(number_literal) "0"
()) ")"
(compound_statement) "{\n inputData = 0;\n }"
({) "{"
(expression_statement) "inputData = 0;"
(assignment_expression) "inputData = 0"
(identifier) "inputData"
(=) "="
(number_literal) "0"
(;) ";"
(}) "}"
(comment) "//access input as byte array"
(comment) "//take advantage of endianness"
(declaration) "uint8_t *bytePointer = (uint8_t *)&inputData;"
(primitive_type) "uint8_t"
(init_declarator) "*bytePointer = (uint8_t *)&inputData"
(pointer_declarator) "*bytePointer"
(*) "*"
(identifier) "bytePointer"
(=) "="
(cast_expression) "(uint8_t *)&inputData"
(() "("
(type_descriptor) "uint8_t *"
(primitive_type) "uint8_t"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(pointer_expression) "&inputData"
(&) "&"
(identifier) "inputData"
(;) ";"
(if_statement) "if(byteOrder) {\n //locate MSB\n uint8_t trueLen = bitSize(inputData);\n //if more bits are present than can be accomodated cut them off\n if(trueLen > bitLength) {\n inputData = inputData >> (trueLen - bitLength);\n }\n //Shift buf to 64th position\n inputData = inputData << (64 - bitLength);\n\n //Reverse int\n inputData = reverse64(inputData);\n uint8_t calcStartbit = (7 - startBit%8) + 8*(startBit/8);\n inputData = inputData << calcStartbit;\n //reverse each byte and push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= reverse8(bytePointer[i]);\n }\n }else {\n //Shift buf to appropriate place\n inputData = inputData << startBit;\n //push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= bytePointer[i];\n }\n }"
(if) "if"
(parenthesized_expression) "(byteOrder)"
(() "("
(identifier) "byteOrder"
()) ")"
(compound_statement) "{\n //locate MSB\n uint8_t trueLen = bitSize(inputData);\n //if more bits are present than can be accomodated cut them off\n if(trueLen > bitLength) {\n inputData = inputData >> (trueLen - bitLength);\n }\n //Shift buf to 64th position\n inputData = inputData << (64 - bitLength);\n\n //Reverse int\n inputData = reverse64(inputData);\n uint8_t calcStartbit = (7 - startBit%8) + 8*(startBit/8);\n inputData = inputData << calcStartbit;\n //reverse each byte and push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= reverse8(bytePointer[i]);\n }\n }"
({) "{"
(comment) "//locate MSB"
(declaration) "uint8_t trueLen = bitSize(inputData);"
(primitive_type) "uint8_t"
(init_declarator) "trueLen = bitSize(inputData)"
(identifier) "trueLen"
(=) "="
(call_expression) "bitSize(inputData)"
(identifier) "bitSize"
(argument_list) "(inputData)"
(() "("
(identifier) "inputData"
()) ")"
(;) ";"
(comment) "//if more bits are present than can be accomodated cut them off"
(if_statement) "if(trueLen > bitLength) {\n inputData = inputData >> (trueLen - bitLength);\n }"
(if) "if"
(parenthesized_expression) "(trueLen > bitLength)"
(() "("
(binary_expression) "trueLen > bitLength"
(identifier) "trueLen"
(>) ">"
(identifier) "bitLength"
()) ")"
(compound_statement) "{\n inputData = inputData >> (trueLen - bitLength);\n }"
({) "{"
(expression_statement) "inputData = inputData >> (trueLen - bitLength);"
(assignment_expression) "inputData = inputData >> (trueLen - bitLength)"
(identifier) "inputData"
(=) "="
(binary_expression) "inputData >> (trueLen - bitLength)"
(identifier) "inputData"
(>>) ">>"
(parenthesized_expression) "(trueLen - bitLength)"
(() "("
(binary_expression) "trueLen - bitLength"
(identifier) "trueLen"
(-) "-"
(identifier) "bitLength"
()) ")"
(;) ";"
(}) "}"
(comment) "//Shift buf to 64th position"
(expression_statement) "inputData = inputData << (64 - bitLength);"
(assignment_expression) "inputData = inputData << (64 - bitLength)"
(identifier) "inputData"
(=) "="
(binary_expression) "inputData << (64 - bitLength)"
(identifier) "inputData"
(<<) "<<"
(parenthesized_expression) "(64 - bitLength)"
(() "("
(binary_expression) "64 - bitLength"
(number_literal) "64"
(-) "-"
(identifier) "bitLength"
()) ")"
(;) ";"
(comment) "//Reverse int"
(expression_statement) "inputData = reverse64(inputData);"
(assignment_expression) "inputData = reverse64(inputData)"
(identifier) "inputData"
(=) "="
(call_expression) "reverse64(inputData)"
(identifier) "reverse64"
(argument_list) "(inputData)"
(() "("
(identifier) "inputData"
()) ")"
(;) ";"
(declaration) "uint8_t calcStartbit = (7 - startBit%8) + 8*(startBit/8);"
(primitive_type) "uint8_t"
(init_declarator) "calcStartbit = (7 - startBit%8) + 8*(startBit/8)"
(identifier) "calcStartbit"
(=) "="
(binary_expression) "(7 - startBit%8) + 8*(startBit/8)"
(parenthesized_expression) "(7 - startBit%8)"
(() "("
(binary_expression) "7 - startBit%8"
(number_literal) "7"
(-) "-"
(binary_expression) "startBit%8"
(identifier) "startBit"
(%) "%"
(number_literal) "8"
()) ")"
(+) "+"
(binary_expression) "8*(startBit/8)"
(number_literal) "8"
(*) "*"
(parenthesized_expression) "(startBit/8)"
(() "("
(binary_expression) "startBit/8"
(identifier) "startBit"
(/) "/"
(number_literal) "8"
()) ")"
(;) ";"
(expression_statement) "inputData = inputData << calcStartbit;"
(assignment_expression) "inputData = inputData << calcStartbit"
(identifier) "inputData"
(=) "="
(binary_expression) "inputData << calcStartbit"
(identifier) "inputData"
(<<) "<<"
(identifier) "calcStartbit"
(;) ";"
(comment) "//reverse each byte and push to message struct"
(for_statement) "for(int i=0; i<8; i++) {\n msg->buf[i] |= reverse8(bytePointer[i]);\n }"
(for) "for"
(() "("
(declaration) "int i=0;"
(primitive_type) "int"
(init_declarator) "i=0"
(identifier) "i"
(=) "="
(number_literal) "0"
(;) ";"
(binary_expression) "i<8"
(identifier) "i"
(<) "<"
(number_literal) "8"
(;) ";"
(update_expression) "i++"
(identifier) "i"
(++) "++"
()) ")"
(compound_statement) "{\n msg->buf[i] |= reverse8(bytePointer[i]);\n }"
({) "{"
(expression_statement) "msg->buf[i] |= reverse8(bytePointer[i]);"
(assignment_expression) "msg->buf[i] |= reverse8(bytePointer[i])"
(subscript_expression) "msg->buf[i]"
(field_expression) "msg->buf"
(identifier) "msg"
(->) "->"
(field_identifier) "buf"
([) "["
(identifier) "i"
(]) "]"
(|=) "|="
(call_expression) "reverse8(bytePointer[i])"
(identifier) "reverse8"
(argument_list) "(bytePointer[i])"
(() "("
(subscript_expression) "bytePointer[i]"
(identifier) "bytePointer"
([) "["
(identifier) "i"
(]) "]"
()) ")"
(;) ";"
(}) "}"
(}) "}"
(else_clause) "else {\n //Shift buf to appropriate place\n inputData = inputData << startBit;\n //push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= bytePointer[i];\n }\n }"
(else) "else"
(compound_statement) "{\n //Shift buf to appropriate place\n inputData = inputData << startBit;\n //push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= bytePointer[i];\n }\n }"
({) "{"
(comment) "//Shift buf to appropriate place"
(expression_statement) "inputData = inputData << startBit;"
(assignment_expression) "inputData = inputData << startBit"
(identifier) "inputData"
(=) "="
(binary_expression) "inputData << startBit"
(identifier) "inputData"
(<<) "<<"
(identifier) "startBit"
(;) ";"
(comment) "//push to message struct"
(for_statement) "for(int i=0; i<8; i++) {\n msg->buf[i] |= bytePointer[i];\n }"
(for) "for"
(() "("
(declaration) "int i=0;"
(primitive_type) "int"
(init_declarator) "i=0"
(identifier) "i"
(=) "="
(number_literal) "0"
(;) ";"
(binary_expression) "i<8"
(identifier) "i"
(<) "<"
(number_literal) "8"
(;) ";"
(update_expression) "i++"
(identifier) "i"
(++) "++"
()) ")"
(compound_statement) "{\n msg->buf[i] |= bytePointer[i];\n }"
({) "{"
(expression_statement) "msg->buf[i] |= bytePointer[i];"
(assignment_expression) "msg->buf[i] |= bytePointer[i]"
(subscript_expression) "msg->buf[i]"
(field_expression) "msg->buf"
(identifier) "msg"
(->) "->"
(field_identifier) "buf"
([) "["
(identifier) "i"
(]) "]"
(|=) "|="
(subscript_expression) "bytePointer[i]"
(identifier) "bytePointer"
([) "["
(identifier) "i"
(]) "]"
(;) ";"
(}) "}"
(}) "}"
(}) "}"
(function_definition) "double CAN_decode(CAN_message_t *msg, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias) { //byteOrder is 1 for MSB, 0 for LSB. Signed is 1 for signed, 0 for unsigned\n //Create uint64\nuint64_t dataOut;\n\n if(byteOrder) {\n uint8_t Bytes[8];\n \n //reverse all bytes\n for(int i=0; i<8; i++) {\n Bytes[i] = reverse8(msg->buf[i]);\n }\n //assemble to a uint64\n dataOut = *(uint64_t *)Bytes;\n //reverse to typical lsbfirst\n dataOut = reverse64(dataOut);\n //shift to isolate data\n uint8_t calcStartbit = (7 - (startBit%8)) + 8*(startBit/8);\n dataOut = dataOut << calcStartbit;\n //shift bits back\n dataOut = dataOut >> (64 - (bitLength));\n } else {\n //send message into uint64\n dataOut = *(uint64_t *)msg->buf;\n //Shift left then right to isolate the buf\n dataOut = dataOut << (64 - (startBit+bitLength));\n dataOut = dataOut >> (64 - bitLength);\n }\n double returnData = 0;\n //Adjust if signed and scale and bias\n if(sign) {\n uint64_t maxVal = 1;\n for(int i=0; i<bitLength; i++) {\n maxVal *= 2;\n }\n if(dataOut > (maxVal/2)) {\n returnData = (double) dataOut - maxVal;\n returnData = bias + (Scale * returnData);\n }\n else {\n returnData = bias + (Scale * dataOut);\n }\n }\n else {\n returnData = bias + (Scale * dataOut);\n }\n\n return(returnData);\n}"
(primitive_type) "double"
(function_declarator) "CAN_decode(CAN_message_t *msg, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias)"
(identifier) "CAN_decode"
(parameter_list) "(CAN_message_t *msg, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias)"
(() "("
(parameter_declaration) "CAN_message_t *msg"
(type_identifier) "CAN_message_t"
(pointer_declarator) "*msg"
(*) "*"
(identifier) "msg"
(,) ","
(parameter_declaration) "uint8_t startBit"
(primitive_type) "uint8_t"
(identifier) "startBit"
(,) ","
(parameter_declaration) "uint8_t bitLength"
(primitive_type) "uint8_t"
(identifier) "bitLength"
(,) ","
(parameter_declaration) "bool byteOrder"
(primitive_type) "bool"
(identifier) "byteOrder"
(,) ","
(parameter_declaration) "bool sign"
(primitive_type) "bool"
(identifier) "sign"
(,) ","
(parameter_declaration) "double Scale"
(primitive_type) "double"
(identifier) "Scale"
(,) ","
(parameter_declaration) "double bias"
(primitive_type) "double"
(identifier) "bias"
()) ")"
(compound_statement) "{ //byteOrder is 1 for MSB, 0 for LSB. Signed is 1 for signed, 0 for unsigned\n //Create uint64\nuint64_t dataOut;\n\n if(byteOrder) {\n uint8_t Bytes[8];\n \n //reverse all bytes\n for(int i=0; i<8; i++) {\n Bytes[i] = reverse8(msg->buf[i]);\n }\n //assemble to a uint64\n dataOut = *(uint64_t *)Bytes;\n //reverse to typical lsbfirst\n dataOut = reverse64(dataOut);\n //shift to isolate data\n uint8_t calcStartbit = (7 - (startBit%8)) + 8*(startBit/8);\n dataOut = dataOut << calcStartbit;\n //shift bits back\n dataOut = dataOut >> (64 - (bitLength));\n } else {\n //send message into uint64\n dataOut = *(uint64_t *)msg->buf;\n //Shift left then right to isolate the buf\n dataOut = dataOut << (64 - (startBit+bitLength));\n dataOut = dataOut >> (64 - bitLength);\n }\n double returnData = 0;\n //Adjust if signed and scale and bias\n if(sign) {\n uint64_t maxVal = 1;\n for(int i=0; i<bitLength; i++) {\n maxVal *= 2;\n }\n if(dataOut > (maxVal/2)) {\n returnData = (double) dataOut - maxVal;\n returnData = bias + (Scale * returnData);\n }\n else {\n returnData = bias + (Scale * dataOut);\n }\n }\n else {\n returnData = bias + (Scale * dataOut);\n }\n\n return(returnData);\n}"
({) "{"
(comment) "//byteOrder is 1 for MSB, 0 for LSB. Signed is 1 for signed, 0 for unsigned"
(comment) "//Create uint64"
(declaration) "uint64_t dataOut;"
(primitive_type) "uint64_t"
(identifier) "dataOut"
(;) ";"
(if_statement) "if(byteOrder) {\n uint8_t Bytes[8];\n \n //reverse all bytes\n for(int i=0; i<8; i++) {\n Bytes[i] = reverse8(msg->buf[i]);\n }\n //assemble to a uint64\n dataOut = *(uint64_t *)Bytes;\n //reverse to typical lsbfirst\n dataOut = reverse64(dataOut);\n //shift to isolate data\n uint8_t calcStartbit = (7 - (startBit%8)) + 8*(startBit/8);\n dataOut = dataOut << calcStartbit;\n //shift bits back\n dataOut = dataOut >> (64 - (bitLength));\n } else {\n //send message into uint64\n dataOut = *(uint64_t *)msg->buf;\n //Shift left then right to isolate the buf\n dataOut = dataOut << (64 - (startBit+bitLength));\n dataOut = dataOut >> (64 - bitLength);\n }"
(if) "if"
(parenthesized_expression) "(byteOrder)"
(() "("
(identifier) "byteOrder"
()) ")"
(compound_statement) "{\n uint8_t Bytes[8];\n \n //reverse all bytes\n for(int i=0; i<8; i++) {\n Bytes[i] = reverse8(msg->buf[i]);\n }\n //assemble to a uint64\n dataOut = *(uint64_t *)Bytes;\n //reverse to typical lsbfirst\n dataOut = reverse64(dataOut);\n //shift to isolate data\n uint8_t calcStartbit = (7 - (startBit%8)) + 8*(startBit/8);\n dataOut = dataOut << calcStartbit;\n //shift bits back\n dataOut = dataOut >> (64 - (bitLength));\n }"
({) "{"
(declaration) "uint8_t Bytes[8];"
(primitive_type) "uint8_t"
(array_declarator) "Bytes[8]"
(identifier) "Bytes"
([) "["
(number_literal) "8"
(]) "]"
(;) ";"
(comment) "//reverse all bytes"
(for_statement) "for(int i=0; i<8; i++) {\n Bytes[i] = reverse8(msg->buf[i]);\n }"
(for) "for"
(() "("
(declaration) "int i=0;"
(primitive_type) "int"
(init_declarator) "i=0"
(identifier) "i"
(=) "="
(number_literal) "0"
(;) ";"
(binary_expression) "i<8"
(identifier) "i"
(<) "<"
(number_literal) "8"
(;) ";"
(update_expression) "i++"
(identifier) "i"
(++) "++"
()) ")"
(compound_statement) "{\n Bytes[i] = reverse8(msg->buf[i]);\n }"
({) "{"
(expression_statement) "Bytes[i] = reverse8(msg->buf[i]);"
(assignment_expression) "Bytes[i] = reverse8(msg->buf[i])"
(subscript_expression) "Bytes[i]"
(identifier) "Bytes"
([) "["
(identifier) "i"
(]) "]"
(=) "="
(call_expression) "reverse8(msg->buf[i])"
(identifier) "reverse8"
(argument_list) "(msg->buf[i])"
(() "("
(subscript_expression) "msg->buf[i]"
(field_expression) "msg->buf"
(identifier) "msg"
(->) "->"
(field_identifier) "buf"
([) "["
(identifier) "i"
(]) "]"
()) ")"
(;) ";"
(}) "}"
(comment) "//assemble to a uint64"
(expression_statement) "dataOut = *(uint64_t *)Bytes;"
(assignment_expression) "dataOut = *(uint64_t *)Bytes"
(identifier) "dataOut"
(=) "="
(pointer_expression) "*(uint64_t *)Bytes"
(*) "*"
(cast_expression) "(uint64_t *)Bytes"
(() "("
(type_descriptor) "uint64_t *"
(primitive_type) "uint64_t"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(identifier) "Bytes"
(;) ";"
(comment) "//reverse to typical lsbfirst"
(expression_statement) "dataOut = reverse64(dataOut);"
(assignment_expression) "dataOut = reverse64(dataOut)"
(identifier) "dataOut"
(=) "="
(call_expression) "reverse64(dataOut)"
(identifier) "reverse64"
(argument_list) "(dataOut)"
(() "("
(identifier) "dataOut"
()) ")"
(;) ";"
(comment) "//shift to isolate data"
(declaration) "uint8_t calcStartbit = (7 - (startBit%8)) + 8*(startBit/8);"
(primitive_type) "uint8_t"
(init_declarator) "calcStartbit = (7 - (startBit%8)) + 8*(startBit/8)"
(identifier) "calcStartbit"
(=) "="
(binary_expression) "(7 - (startBit%8)) + 8*(startBit/8)"
(parenthesized_expression) "(7 - (startBit%8))"
(() "("
(binary_expression) "7 - (startBit%8)"
(number_literal) "7"
(-) "-"
(parenthesized_expression) "(startBit%8)"
(() "("
(binary_expression) "startBit%8"
(identifier) "startBit"
(%) "%"
(number_literal) "8"
()) ")"
()) ")"
(+) "+"
(binary_expression) "8*(startBit/8)"
(number_literal) "8"
(*) "*"
(parenthesized_expression) "(startBit/8)"
(() "("
(binary_expression) "startBit/8"
(identifier) "startBit"
(/) "/"
(number_literal) "8"
()) ")"
(;) ";"
(expression_statement) "dataOut = dataOut << calcStartbit;"
(assignment_expression) "dataOut = dataOut << calcStartbit"
(identifier) "dataOut"
(=) "="
(binary_expression) "dataOut << calcStartbit"
(identifier) "dataOut"
(<<) "<<"
(identifier) "calcStartbit"
(;) ";"
(comment) "//shift bits back"
(expression_statement) "dataOut = dataOut >> (64 - (bitLength));"
(assignment_expression) "dataOut = dataOut >> (64 - (bitLength))"
(identifier) "dataOut"
(=) "="
(binary_expression) "dataOut >> (64 - (bitLength))"
(identifier) "dataOut"
(>>) ">>"
(parenthesized_expression) "(64 - (bitLength))"
(() "("
(binary_expression) "64 - (bitLength)"
(number_literal) "64"
(-) "-"
(parenthesized_expression) "(bitLength)"
(() "("
(identifier) "bitLength"
()) ")"
()) ")"
(;) ";"
(}) "}"
(else_clause) "else {\n //send message into uint64\n dataOut = *(uint64_t *)msg->buf;\n //Shift left then right to isolate the buf\n dataOut = dataOut << (64 - (startBit+bitLength));\n dataOut = dataOut >> (64 - bitLength);\n }"
(else) "else"
(compound_statement) "{\n //send message into uint64\n dataOut = *(uint64_t *)msg->buf;\n //Shift left then right to isolate the buf\n dataOut = dataOut << (64 - (startBit+bitLength));\n dataOut = dataOut >> (64 - bitLength);\n }"
({) "{"
(comment) "//send message into uint64"
(expression_statement) "dataOut = *(uint64_t *)msg->buf;"
(assignment_expression) "dataOut = *(uint64_t *)msg->buf"
(identifier) "dataOut"
(=) "="
(pointer_expression) "*(uint64_t *)msg->buf"
(*) "*"
(cast_expression) "(uint64_t *)msg->buf"
(() "("
(type_descriptor) "uint64_t *"
(primitive_type) "uint64_t"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(field_expression) "msg->buf"
(identifier) "msg"
(->) "->"
(field_identifier) "buf"
(;) ";"
(comment) "//Shift left then right to isolate the buf"
(expression_statement) "dataOut = dataOut << (64 - (startBit+bitLength));"
(assignment_expression) "dataOut = dataOut << (64 - (startBit+bitLength))"
(identifier) "dataOut"
(=) "="
(binary_expression) "dataOut << (64 - (startBit+bitLength))"
(identifier) "dataOut"
(<<) "<<"
(parenthesized_expression) "(64 - (startBit+bitLength))"
(() "("
(binary_expression) "64 - (startBit+bitLength)"
(number_literal) "64"
(-) "-"
(parenthesized_expression) "(startBit+bitLength)"
(() "("
(binary_expression) "startBit+bitLength"
(identifier) "startBit"
(+) "+"
(identifier) "bitLength"
()) ")"
()) ")"
(;) ";"
(expression_statement) "dataOut = dataOut >> (64 - bitLength);"
(assignment_expression) "dataOut = dataOut >> (64 - bitLength)"
(identifier) "dataOut"
(=) "="
(binary_expression) "dataOut >> (64 - bitLength)"
(identifier) "dataOut"
(>>) ">>"
(parenthesized_expression) "(64 - bitLength)"
(() "("
(binary_expression) "64 - bitLength"
(number_literal) "64"
(-) "-"
(identifier) "bitLength"
()) ")"
(;) ";"
(}) "}"
(declaration) "double returnData = 0;"
(primitive_type) "double"
(init_declarator) "returnData = 0"
(identifier) "returnData"
(=) "="
(number_literal) "0"
(;) ";"
(comment) "//Adjust if signed and scale and bias"
(if_statement) "if(sign) {\n uint64_t maxVal = 1;\n for(int i=0; i<bitLength; i++) {\n maxVal *= 2;\n }\n if(dataOut > (maxVal/2)) {\n returnData = (double) dataOut - maxVal;\n returnData = bias + (Scale * returnData);\n }\n else {\n returnData = bias + (Scale * dataOut);\n }\n }\n else {\n returnData = bias + (Scale * dataOut);\n }"
(if) "if"
(parenthesized_expression) "(sign)"
(() "("
(identifier) "sign"
()) ")"
(compound_statement) "{\n uint64_t maxVal = 1;\n for(int i=0; i<bitLength; i++) {\n maxVal *= 2;\n }\n if(dataOut > (maxVal/2)) {\n returnData = (double) dataOut - maxVal;\n returnData = bias + (Scale * returnData);\n }\n else {\n returnData = bias + (Scale * dataOut);\n }\n }"
({) "{"
(declaration) "uint64_t maxVal = 1;"
(primitive_type) "uint64_t"
(init_declarator) "maxVal = 1"
(identifier) "maxVal"
(=) "="
(number_literal) "1"
(;) ";"
(for_statement) "for(int i=0; i<bitLength; i++) {\n maxVal *= 2;\n }"
(for) "for"
(() "("
(declaration) "int i=0;"
(primitive_type) "int"
(init_declarator) "i=0"
(identifier) "i"
(=) "="
(number_literal) "0"
(;) ";"
(binary_expression) "i<bitLength"
(identifier) "i"
(<) "<"
(identifier) "bitLength"
(;) ";"
(update_expression) "i++"
(identifier) "i"
(++) "++"
()) ")"
(compound_statement) "{\n maxVal *= 2;\n }"
({) "{"
(expression_statement) "maxVal *= 2;"
(assignment_expression) "maxVal *= 2"
(identifier) "maxVal"
(*=) "*="
(number_literal) "2"
(;) ";"
(}) "}"
(if_statement) "if(dataOut > (maxVal/2)) {\n returnData = (double) dataOut - maxVal;\n returnData = bias + (Scale * returnData);\n }\n else {\n returnData = bias + (Scale * dataOut);\n }"
(if) "if"
(parenthesized_expression) "(dataOut > (maxVal/2))"
(() "("
(binary_expression) "dataOut > (maxVal/2)"
(identifier) "dataOut"
(>) ">"
(parenthesized_expression) "(maxVal/2)"
(() "("
(binary_expression) "maxVal/2"
(identifier) "maxVal"
(/) "/"
(number_literal) "2"
()) ")"
()) ")"
(compound_statement) "{\n returnData = (double) dataOut - maxVal;\n returnData = bias + (Scale * returnData);\n }"
({) "{"
(expression_statement) "returnData = (double) dataOut - maxVal;"
(assignment_expression) "returnData = (double) dataOut - maxVal"
(identifier) "returnData"
(=) "="
(binary_expression) "(double) dataOut - maxVal"
(cast_expression) "(double) dataOut"
(() "("
(type_descriptor) "double"
(primitive_type) "double"
()) ")"
(identifier) "dataOut"
(-) "-"
(identifier) "maxVal"
(;) ";"
(expression_statement) "returnData = bias + (Scale * returnData);"
(assignment_expression) "returnData = bias + (Scale * returnData)"
(identifier) "returnData"
(=) "="
(binary_expression) "bias + (Scale * returnData)"
(identifier) "bias"
(+) "+"
(parenthesized_expression) "(Scale * returnData)"
(() "("
(binary_expression) "Scale * returnData"
(identifier) "Scale"
(*) "*"
(identifier) "returnData"
()) ")"
(;) ";"
(}) "}"
(else_clause) "else {\n returnData = bias + (Scale * dataOut);\n }"
(else) "else"
(compound_statement) "{\n returnData = bias + (Scale * dataOut);\n }"
({) "{"
(expression_statement) "returnData = bias + (Scale * dataOut);"
(assignment_expression) "returnData = bias + (Scale * dataOut)"
(identifier) "returnData"
(=) "="
(binary_expression) "bias + (Scale * dataOut)"
(identifier) "bias"
(+) "+"
(parenthesized_expression) "(Scale * dataOut)"
(() "("
(binary_expression) "Scale * dataOut"
(identifier) "Scale"
(*) "*"
(identifier) "dataOut"
()) ")"
(;) ";"
(}) "}"
(}) "}"
(else_clause) "else {\n returnData = bias + (Scale * dataOut);\n }"
(else) "else"
(compound_statement) "{\n returnData = bias + (Scale * dataOut);\n }"
({) "{"
(expression_statement) "returnData = bias + (Scale * dataOut);"
(assignment_expression) "returnData = bias + (Scale * dataOut)"
(identifier) "returnData"
(=) "="
(binary_expression) "bias + (Scale * dataOut)"
(identifier) "bias"
(+) "+"
(parenthesized_expression) "(Scale * dataOut)"
(() "("
(binary_expression) "Scale * dataOut"
(identifier) "Scale"
(*) "*"
(identifier) "dataOut"
()) ")"
(;) ";"
(}) "}"
(return_statement) "return(returnData);"
(return) "return"
(parenthesized_expression) "(returnData)"
(() "("
(identifier) "returnData"
()) ")"
(;) ";"
(}) "}"
| 1,856
| 0
|
{"language": "c", "success": true, "metadata": {"lines": 191, "avg_line_length": 31.97, "nodes": 1170, "errors": 0, "source_hash": "8dd34eb7c585aed5332bc811e58381a50f2466956e69304d2a88b62f784da883", "categorized_nodes": 831}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <FlexCAN.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": "<FlexCAN.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 20}}, {"id": 3, "type": "function_definition", "text": "uint8_t bitSize(uint64_t v) {\n static const uint8_t lookup[64] = {\n 0, // change to 1 if you want bitSize(0) = 1\n 1, 2, 53, 3, 7, 54, 27, 4, 38, 41, 8, 34, 55, 48, 28,\n 62, 5, 39, 46, 44, 42, 22, 9, 24, 35, 59, 56, 49, 18, 29, 11,\n 63, 52, 6, 26, 37, 40, 33, 47, 61, 45, 43, 21, 23, 58, 17, 10,\n 51, 25, 36, 32, 60, 20, 57, 16, 50, 31, 19, 15, 30, 14, 13, 12\n};\n static const uint64_t multiplicator = 0x022fdd63cc95386dUL;\n v |= v >> 1;\n v |= v >> 2;\n v |= v >> 4;\n v |= v >> 8;\n v |= v >> 16;\n v |= v >> 32;\n v++;\n\n return lookup[(uint64_t)(v * multiplicator) >> 58];\n}", "parent": null, "children": [4, 5], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 4, "type": "primitive_type", "text": "uint8_t", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 7}}, {"id": 5, "type": "function_declarator", "text": "bitSize(uint64_t v)", "parent": 3, "children": [6, 7], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 27}}, {"id": 6, "type": "identifier", "text": "bitSize", "parent": 5, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 15}}, {"id": 7, "type": "parameter_list", "text": "(uint64_t v)", "parent": 5, "children": [8], "start_point": {"row": 2, "column": 15}, "end_point": {"row": 2, "column": 27}}, {"id": 8, "type": "parameter_declaration", "text": "uint64_t v", "parent": 7, "children": [9, 10], "start_point": {"row": 2, "column": 16}, "end_point": {"row": 2, "column": 26}}, {"id": 9, "type": "primitive_type", "text": "uint64_t", "parent": 8, "children": [], "start_point": {"row": 2, "column": 16}, "end_point": {"row": 2, "column": 24}}, {"id": 10, "type": "identifier", "text": "v", "parent": 8, "children": [], "start_point": {"row": 2, "column": 25}, "end_point": {"row": 2, "column": 26}}, {"id": 11, "type": "declaration", "text": "static const uint8_t lookup[64] = {\n 0, // change to 1 if you want bitSize(0) = 1\n 1, 2, 53, 3, 7, 54, 27, 4, 38, 41, 8, 34, 55, 48, 28,\n 62, 5, 39, 46, 44, 42, 22, 9, 24, 35, 59, 56, 49, 18, 29, 11,\n 63, 52, 6, 26, 37, 40, 33, 47, 61, 45, 43, 21, 23, 58, 17, 10,\n 51, 25, 36, 32, 60, 20, 57, 16, 50, 31, 19, 15, 30, 14, 13, 12\n};", "parent": 3, "children": [12, 13], "start_point": {"row": 3, "column": 2}, "end_point": {"row": 9, "column": 2}}, {"id": 12, "type": "primitive_type", "text": "uint8_t", "parent": 11, "children": [], "start_point": {"row": 3, "column": 15}, "end_point": {"row": 3, "column": 22}}, {"id": 13, "type": "init_declarator", "text": "lookup[64] = {\n 0, // change to 1 if you want bitSize(0) = 1\n 1, 2, 53, 3, 7, 54, 27, 4, 38, 41, 8, 34, 55, 48, 28,\n 62, 5, 39, 46, 44, 42, 22, 9, 24, 35, 59, 56, 49, 18, 29, 11,\n 63, 52, 6, 26, 37, 40, 33, 47, 61, 45, 43, 21, 23, 58, 17, 10,\n 51, 25, 36, 32, 60, 20, 57, 16, 50, 31, 19, 15, 30, 14, 13, 12\n}", "parent": 11, "children": [14, 17, 18], "start_point": {"row": 3, "column": 23}, "end_point": {"row": 9, "column": 1}}, {"id": 14, "type": "array_declarator", "text": "lookup[64]", "parent": 13, "children": [15, 16], "start_point": {"row": 3, "column": 23}, "end_point": {"row": 3, "column": 33}}, {"id": 15, "type": "identifier", "text": "lookup", "parent": 14, "children": [], "start_point": {"row": 3, "column": 23}, "end_point": {"row": 3, "column": 29}}, {"id": 16, "type": "number_literal", "text": "64", "parent": 14, "children": [], "start_point": {"row": 3, "column": 30}, "end_point": {"row": 3, "column": 32}}, {"id": 17, "type": "=", "text": "=", "parent": 13, "children": [], "start_point": {"row": 3, "column": 34}, "end_point": {"row": 3, "column": 35}}, {"id": 18, "type": "initializer_list", "text": "{\n 0, // change to 1 if you want bitSize(0) = 1\n 1, 2, 53, 3, 7, 54, 27, 4, 38, 41, 8, 34, 55, 48, 28,\n 62, 5, 39, 46, 44, 42, 22, 9, 24, 35, 59, 56, 49, 18, 29, 11,\n 63, 52, 6, 26, 37, 40, 33, 47, 61, 45, 43, 21, 23, 58, 17, 10,\n 51, 25, 36, 32, 60, 20, 57, 16, 50, 31, 19, 15, 30, 14, 13, 12\n}", "parent": 13, "children": [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], "start_point": {"row": 3, "column": 36}, "end_point": {"row": 9, "column": 1}}, {"id": 19, "type": "number_literal", "text": "0", "parent": 18, "children": [], "start_point": {"row": 4, "column": 2}, "end_point": {"row": 4, "column": 3}}, {"id": 20, "type": "number_literal", "text": "1", "parent": 18, "children": [], "start_point": {"row": 5, "column": 2}, "end_point": {"row": 5, "column": 3}}, {"id": 21, "type": "number_literal", "text": "2", "parent": 18, "children": [], "start_point": {"row": 5, "column": 6}, "end_point": {"row": 5, "column": 7}}, {"id": 22, "type": "number_literal", "text": "53", "parent": 18, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 11}}, {"id": 23, "type": "number_literal", "text": "3", "parent": 18, "children": [], "start_point": {"row": 5, "column": 14}, "end_point": {"row": 5, "column": 15}}, {"id": 24, "type": "number_literal", "text": "7", "parent": 18, "children": [], "start_point": {"row": 5, "column": 18}, "end_point": {"row": 5, "column": 19}}, {"id": 25, "type": "number_literal", "text": "54", "parent": 18, "children": [], "start_point": {"row": 5, "column": 21}, "end_point": {"row": 5, "column": 23}}, {"id": 26, "type": "number_literal", "text": "27", "parent": 18, "children": [], "start_point": {"row": 5, "column": 25}, "end_point": {"row": 5, "column": 27}}, {"id": 27, "type": "number_literal", "text": "4", "parent": 18, "children": [], "start_point": {"row": 5, "column": 29}, "end_point": {"row": 5, "column": 30}}, {"id": 28, "type": "number_literal", "text": "38", "parent": 18, "children": [], "start_point": {"row": 5, "column": 32}, "end_point": {"row": 5, "column": 34}}, {"id": 29, "type": "number_literal", "text": "41", "parent": 18, "children": [], "start_point": {"row": 5, "column": 36}, "end_point": {"row": 5, "column": 38}}, {"id": 30, "type": "number_literal", "text": "8", "parent": 18, "children": [], "start_point": {"row": 5, "column": 41}, "end_point": {"row": 5, "column": 42}}, {"id": 31, "type": "number_literal", "text": "34", "parent": 18, "children": [], "start_point": {"row": 5, "column": 44}, "end_point": {"row": 5, "column": 46}}, {"id": 32, "type": "number_literal", "text": "55", "parent": 18, "children": [], "start_point": {"row": 5, "column": 48}, "end_point": {"row": 5, "column": 50}}, {"id": 33, "type": "number_literal", "text": "48", "parent": 18, "children": [], "start_point": {"row": 5, "column": 52}, "end_point": {"row": 5, "column": 54}}, {"id": 34, "type": "number_literal", "text": "28", "parent": 18, "children": [], "start_point": {"row": 5, "column": 56}, "end_point": {"row": 5, "column": 58}}, {"id": 35, "type": "number_literal", "text": "62", "parent": 18, "children": [], "start_point": {"row": 6, "column": 2}, "end_point": {"row": 6, "column": 4}}, {"id": 36, "type": "number_literal", "text": "5", "parent": 18, "children": [], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 8}}, {"id": 37, "type": "number_literal", "text": "39", "parent": 18, "children": [], "start_point": {"row": 6, "column": 10}, "end_point": {"row": 6, "column": 12}}, {"id": 38, "type": "number_literal", "text": "46", "parent": 18, "children": [], "start_point": {"row": 6, "column": 14}, "end_point": {"row": 6, "column": 16}}, {"id": 39, "type": "number_literal", "text": "44", "parent": 18, "children": [], "start_point": {"row": 6, "column": 18}, "end_point": {"row": 6, "column": 20}}, {"id": 40, "type": "number_literal", "text": "42", "parent": 18, "children": [], "start_point": {"row": 6, "column": 22}, "end_point": {"row": 6, "column": 24}}, {"id": 41, "type": "number_literal", "text": "22", "parent": 18, "children": [], "start_point": {"row": 6, "column": 26}, "end_point": {"row": 6, "column": 28}}, {"id": 42, "type": "number_literal", "text": "9", "parent": 18, "children": [], "start_point": {"row": 6, "column": 31}, "end_point": {"row": 6, "column": 32}}, {"id": 43, "type": "number_literal", "text": "24", "parent": 18, "children": [], "start_point": {"row": 6, "column": 34}, "end_point": {"row": 6, "column": 36}}, {"id": 44, "type": "number_literal", "text": "35", "parent": 18, "children": [], "start_point": {"row": 6, "column": 38}, "end_point": {"row": 6, "column": 40}}, {"id": 45, "type": "number_literal", "text": "59", "parent": 18, "children": [], "start_point": {"row": 6, "column": 42}, "end_point": {"row": 6, "column": 44}}, {"id": 46, "type": "number_literal", "text": "56", "parent": 18, "children": [], "start_point": {"row": 6, "column": 46}, "end_point": {"row": 6, "column": 48}}, {"id": 47, "type": "number_literal", "text": "49", "parent": 18, "children": [], "start_point": {"row": 6, "column": 50}, "end_point": {"row": 6, "column": 52}}, {"id": 48, "type": "number_literal", "text": "18", "parent": 18, "children": [], "start_point": {"row": 6, "column": 54}, "end_point": {"row": 6, "column": 56}}, {"id": 49, "type": "number_literal", "text": "29", "parent": 18, "children": [], "start_point": {"row": 6, "column": 58}, "end_point": {"row": 6, "column": 60}}, {"id": 50, "type": "number_literal", "text": "11", "parent": 18, "children": [], "start_point": {"row": 6, "column": 62}, "end_point": {"row": 6, "column": 64}}, {"id": 51, "type": "number_literal", "text": "63", "parent": 18, "children": [], "start_point": {"row": 7, "column": 2}, "end_point": {"row": 7, "column": 4}}, {"id": 52, "type": "number_literal", "text": "52", "parent": 18, "children": [], "start_point": {"row": 7, "column": 6}, "end_point": {"row": 7, "column": 8}}, {"id": 53, "type": "number_literal", "text": "6", "parent": 18, "children": [], "start_point": {"row": 7, "column": 11}, "end_point": {"row": 7, "column": 12}}, {"id": 54, "type": "number_literal", "text": "26", "parent": 18, "children": [], "start_point": {"row": 7, "column": 14}, "end_point": {"row": 7, "column": 16}}, {"id": 55, "type": "number_literal", "text": "37", "parent": 18, "children": [], "start_point": {"row": 7, "column": 18}, "end_point": {"row": 7, "column": 20}}, {"id": 56, "type": "number_literal", "text": "40", "parent": 18, "children": [], "start_point": {"row": 7, "column": 22}, "end_point": {"row": 7, "column": 24}}, {"id": 57, "type": "number_literal", "text": "33", "parent": 18, "children": [], "start_point": {"row": 7, "column": 26}, "end_point": {"row": 7, "column": 28}}, {"id": 58, "type": "number_literal", "text": "47", "parent": 18, "children": [], "start_point": {"row": 7, "column": 30}, "end_point": {"row": 7, "column": 32}}, {"id": 59, "type": "number_literal", "text": "61", "parent": 18, "children": [], "start_point": {"row": 7, "column": 34}, "end_point": {"row": 7, "column": 36}}, {"id": 60, "type": "number_literal", "text": "45", "parent": 18, "children": [], "start_point": {"row": 7, "column": 38}, "end_point": {"row": 7, "column": 40}}, {"id": 61, "type": "number_literal", "text": "43", "parent": 18, "children": [], "start_point": {"row": 7, "column": 42}, "end_point": {"row": 7, "column": 44}}, {"id": 62, "type": "number_literal", "text": "21", "parent": 18, "children": [], "start_point": {"row": 7, "column": 46}, "end_point": {"row": 7, "column": 48}}, {"id": 63, "type": "number_literal", "text": "23", "parent": 18, "children": [], "start_point": {"row": 7, "column": 50}, "end_point": {"row": 7, "column": 52}}, {"id": 64, "type": "number_literal", "text": "58", "parent": 18, "children": [], "start_point": {"row": 7, "column": 54}, "end_point": {"row": 7, "column": 56}}, {"id": 65, "type": "number_literal", "text": "17", "parent": 18, "children": [], "start_point": {"row": 7, "column": 58}, "end_point": {"row": 7, "column": 60}}, {"id": 66, "type": "number_literal", "text": "10", "parent": 18, "children": [], "start_point": {"row": 7, "column": 62}, "end_point": {"row": 7, "column": 64}}, {"id": 67, "type": "number_literal", "text": "51", "parent": 18, "children": [], "start_point": {"row": 8, "column": 2}, "end_point": {"row": 8, "column": 4}}, {"id": 68, "type": "number_literal", "text": "25", "parent": 18, "children": [], "start_point": {"row": 8, "column": 6}, "end_point": {"row": 8, "column": 8}}, {"id": 69, "type": "number_literal", "text": "36", "parent": 18, "children": [], "start_point": {"row": 8, "column": 10}, "end_point": {"row": 8, "column": 12}}, {"id": 70, "type": "number_literal", "text": "32", "parent": 18, "children": [], "start_point": {"row": 8, "column": 14}, "end_point": {"row": 8, "column": 16}}, {"id": 71, "type": "number_literal", "text": "60", "parent": 18, "children": [], "start_point": {"row": 8, "column": 18}, "end_point": {"row": 8, "column": 20}}, {"id": 72, "type": "number_literal", "text": "20", "parent": 18, "children": [], "start_point": {"row": 8, "column": 22}, "end_point": {"row": 8, "column": 24}}, {"id": 73, "type": "number_literal", "text": "57", "parent": 18, "children": [], "start_point": {"row": 8, "column": 26}, "end_point": {"row": 8, "column": 28}}, {"id": 74, "type": "number_literal", "text": "16", "parent": 18, "children": [], "start_point": {"row": 8, "column": 30}, "end_point": {"row": 8, "column": 32}}, {"id": 75, "type": "number_literal", "text": "50", "parent": 18, "children": [], "start_point": {"row": 8, "column": 34}, "end_point": {"row": 8, "column": 36}}, {"id": 76, "type": "number_literal", "text": "31", "parent": 18, "children": [], "start_point": {"row": 8, "column": 38}, "end_point": {"row": 8, "column": 40}}, {"id": 77, "type": "number_literal", "text": "19", "parent": 18, "children": [], "start_point": {"row": 8, "column": 42}, "end_point": {"row": 8, "column": 44}}, {"id": 78, "type": "number_literal", "text": "15", "parent": 18, "children": [], "start_point": {"row": 8, "column": 46}, "end_point": {"row": 8, "column": 48}}, {"id": 79, "type": "number_literal", "text": "30", "parent": 18, "children": [], "start_point": {"row": 8, "column": 50}, "end_point": {"row": 8, "column": 52}}, {"id": 80, "type": "number_literal", "text": "14", "parent": 18, "children": [], "start_point": {"row": 8, "column": 54}, "end_point": {"row": 8, "column": 56}}, {"id": 81, "type": "number_literal", "text": "13", "parent": 18, "children": [], "start_point": {"row": 8, "column": 58}, "end_point": {"row": 8, "column": 60}}, {"id": 82, "type": "number_literal", "text": "12", "parent": 18, "children": [], "start_point": {"row": 8, "column": 62}, "end_point": {"row": 8, "column": 64}}, {"id": 83, "type": "declaration", "text": "static const uint64_t multiplicator = 0x022fdd63cc95386dUL;", "parent": 3, "children": [84, 85], "start_point": {"row": 10, "column": 2}, "end_point": {"row": 10, "column": 61}}, {"id": 84, "type": "primitive_type", "text": "uint64_t", "parent": 83, "children": [], "start_point": {"row": 10, "column": 15}, "end_point": {"row": 10, "column": 23}}, {"id": 85, "type": "init_declarator", "text": "multiplicator = 0x022fdd63cc95386dUL", "parent": 83, "children": [86, 87, 88], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 60}}, {"id": 86, "type": "identifier", "text": "multiplicator", "parent": 85, "children": [], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 37}}, {"id": 87, "type": "=", "text": "=", "parent": 85, "children": [], "start_point": {"row": 10, "column": 38}, "end_point": {"row": 10, "column": 39}}, {"id": 88, "type": "number_literal", "text": "0x022fdd63cc95386dUL", "parent": 85, "children": [], "start_point": {"row": 10, "column": 40}, "end_point": {"row": 10, "column": 60}}, {"id": 89, "type": "assignment_expression", "text": "v |= v >> 1", "parent": 3, "children": [90, 91, 92], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 11, "column": 13}}, {"id": 90, "type": "identifier", "text": "v", "parent": 89, "children": [], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 11, "column": 3}}, {"id": 91, "type": "|=", "text": "|=", "parent": 89, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 6}}, {"id": 92, "type": "binary_expression", "text": "v >> 1", "parent": 89, "children": [93, 94, 95], "start_point": {"row": 11, "column": 7}, "end_point": {"row": 11, "column": 13}}, {"id": 93, "type": "identifier", "text": "v", "parent": 92, "children": [], "start_point": {"row": 11, "column": 7}, "end_point": {"row": 11, "column": 8}}, {"id": 94, "type": ">>", "text": ">>", "parent": 92, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 11}}, {"id": 95, "type": "number_literal", "text": "1", "parent": 92, "children": [], "start_point": {"row": 11, "column": 12}, "end_point": {"row": 11, "column": 13}}, {"id": 96, "type": "assignment_expression", "text": "v |= v >> 2", "parent": 3, "children": [97, 98, 99], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 13}}, {"id": 97, "type": "identifier", "text": "v", "parent": 96, "children": [], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 3}}, {"id": 98, "type": "|=", "text": "|=", "parent": 96, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 6}}, {"id": 99, "type": "binary_expression", "text": "v >> 2", "parent": 96, "children": [100, 101, 102], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 13}}, {"id": 100, "type": "identifier", "text": "v", "parent": 99, "children": [], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 8}}, {"id": 101, "type": ">>", "text": ">>", "parent": 99, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 11}}, {"id": 102, "type": "number_literal", "text": "2", "parent": 99, "children": [], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 13}}, {"id": 103, "type": "assignment_expression", "text": "v |= v >> 4", "parent": 3, "children": [104, 105, 106], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 13}}, {"id": 104, "type": "identifier", "text": "v", "parent": 103, "children": [], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 3}}, {"id": 105, "type": "|=", "text": "|=", "parent": 103, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 6}}, {"id": 106, "type": "binary_expression", "text": "v >> 4", "parent": 103, "children": [107, 108, 109], "start_point": {"row": 13, "column": 7}, "end_point": {"row": 13, "column": 13}}, {"id": 107, "type": "identifier", "text": "v", "parent": 106, "children": [], "start_point": {"row": 13, "column": 7}, "end_point": {"row": 13, "column": 8}}, {"id": 108, "type": ">>", "text": ">>", "parent": 106, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 11}}, {"id": 109, "type": "number_literal", "text": "4", "parent": 106, "children": [], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 13}}, {"id": 110, "type": "assignment_expression", "text": "v |= v >> 8", "parent": 3, "children": [111, 112, 113], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 13}}, {"id": 111, "type": "identifier", "text": "v", "parent": 110, "children": [], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 3}}, {"id": 112, "type": "|=", "text": "|=", "parent": 110, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 6}}, {"id": 113, "type": "binary_expression", "text": "v >> 8", "parent": 110, "children": [114, 115, 116], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 13}}, {"id": 114, "type": "identifier", "text": "v", "parent": 113, "children": [], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 8}}, {"id": 115, "type": ">>", "text": ">>", "parent": 113, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 11}}, {"id": 116, "type": "number_literal", "text": "8", "parent": 113, "children": [], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 13}}, {"id": 117, "type": "assignment_expression", "text": "v |= v >> 16", "parent": 3, "children": [118, 119, 120], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 14}}, {"id": 118, "type": "identifier", "text": "v", "parent": 117, "children": [], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 3}}, {"id": 119, "type": "|=", "text": "|=", "parent": 117, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 6}}, {"id": 120, "type": "binary_expression", "text": "v >> 16", "parent": 117, "children": [121, 122, 123], "start_point": {"row": 15, "column": 7}, "end_point": {"row": 15, "column": 14}}, {"id": 121, "type": "identifier", "text": "v", "parent": 120, "children": [], "start_point": {"row": 15, "column": 7}, "end_point": {"row": 15, "column": 8}}, {"id": 122, "type": ">>", "text": ">>", "parent": 120, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 11}}, {"id": 123, "type": "number_literal", "text": "16", "parent": 120, "children": [], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 15, "column": 14}}, {"id": 124, "type": "assignment_expression", "text": "v |= v >> 32", "parent": 3, "children": [125, 126, 127], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 14}}, {"id": 125, "type": "identifier", "text": "v", "parent": 124, "children": [], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 3}}, {"id": 126, "type": "|=", "text": "|=", "parent": 124, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 6}}, {"id": 127, "type": "binary_expression", "text": "v >> 32", "parent": 124, "children": [128, 129, 130], "start_point": {"row": 16, "column": 7}, "end_point": {"row": 16, "column": 14}}, {"id": 128, "type": "identifier", "text": "v", "parent": 127, "children": [], "start_point": {"row": 16, "column": 7}, "end_point": {"row": 16, "column": 8}}, {"id": 129, "type": ">>", "text": ">>", "parent": 127, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 11}}, {"id": 130, "type": "number_literal", "text": "32", "parent": 127, "children": [], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 14}}, {"id": 131, "type": "update_expression", "text": "v++", "parent": 3, "children": [132, 133], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 5}}, {"id": 132, "type": "identifier", "text": "v", "parent": 131, "children": [], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 3}}, {"id": 133, "type": "++", "text": "++", "parent": 131, "children": [], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 5}}, {"id": 134, "type": "return_statement", "text": "return lookup[(uint64_t)(v * multiplicator) >> 58];", "parent": 3, "children": [135], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 53}}, {"id": 135, "type": "subscript_expression", "text": "lookup[(uint64_t)(v * multiplicator) >> 58]", "parent": 134, "children": [136, 137], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 52}}, {"id": 136, "type": "identifier", "text": "lookup", "parent": 135, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 15}}, {"id": 137, "type": "binary_expression", "text": "(uint64_t)(v * multiplicator) >> 58", "parent": 135, "children": [138, 146, 147], "start_point": {"row": 19, "column": 16}, "end_point": {"row": 19, "column": 51}}, {"id": 138, "type": "cast_expression", "text": "(uint64_t)(v * multiplicator)", "parent": 137, "children": [139, 141], "start_point": {"row": 19, "column": 16}, "end_point": {"row": 19, "column": 45}}, {"id": 139, "type": "type_descriptor", "text": "uint64_t", "parent": 138, "children": [140], "start_point": {"row": 19, "column": 17}, "end_point": {"row": 19, "column": 25}}, {"id": 140, "type": "primitive_type", "text": "uint64_t", "parent": 139, "children": [], "start_point": {"row": 19, "column": 17}, "end_point": {"row": 19, "column": 25}}, {"id": 141, "type": "parenthesized_expression", "text": "(v * multiplicator)", "parent": 138, "children": [142], "start_point": {"row": 19, "column": 26}, "end_point": {"row": 19, "column": 45}}, {"id": 142, "type": "binary_expression", "text": "v * multiplicator", "parent": 141, "children": [143, 144, 145], "start_point": {"row": 19, "column": 27}, "end_point": {"row": 19, "column": 44}}, {"id": 143, "type": "identifier", "text": "v", "parent": 142, "children": [], "start_point": {"row": 19, "column": 27}, "end_point": {"row": 19, "column": 28}}, {"id": 144, "type": "*", "text": "*", "parent": 142, "children": [], "start_point": {"row": 19, "column": 29}, "end_point": {"row": 19, "column": 30}}, {"id": 145, "type": "identifier", "text": "multiplicator", "parent": 142, "children": [], "start_point": {"row": 19, "column": 31}, "end_point": {"row": 19, "column": 44}}, {"id": 146, "type": ">>", "text": ">>", "parent": 137, "children": [], "start_point": {"row": 19, "column": 46}, "end_point": {"row": 19, "column": 48}}, {"id": 147, "type": "number_literal", "text": "58", "parent": 137, "children": [], "start_point": {"row": 19, "column": 49}, "end_point": {"row": 19, "column": 51}}, {"id": 148, "type": "function_definition", "text": "uint8_t reverse8(uint8_t inputData) {\n inputData = ((inputData * 0x0802LU & 0x22110LU) | (inputData * 0x8020LU & 0x88440LU)) * 0x10101LU >> 16; \n return inputData;\n}", "parent": null, "children": [149, 150], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 149, "type": "primitive_type", "text": "uint8_t", "parent": 148, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 7}}, {"id": 150, "type": "function_declarator", "text": "reverse8(uint8_t inputData)", "parent": 148, "children": [151, 152], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 35}}, {"id": 151, "type": "identifier", "text": "reverse8", "parent": 150, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 16}}, {"id": 152, "type": "parameter_list", "text": "(uint8_t inputData)", "parent": 150, "children": [153], "start_point": {"row": 22, "column": 16}, "end_point": {"row": 22, "column": 35}}, {"id": 153, "type": "parameter_declaration", "text": "uint8_t inputData", "parent": 152, "children": [154, 155], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 34}}, {"id": 154, "type": "primitive_type", "text": "uint8_t", "parent": 153, "children": [], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 24}}, {"id": 155, "type": "identifier", "text": "inputData", "parent": 153, "children": [], "start_point": {"row": 22, "column": 25}, "end_point": {"row": 22, "column": 34}}, {"id": 156, "type": "assignment_expression", "text": "inputData = ((inputData * 0x0802LU & 0x22110LU) | (inputData * 0x8020LU & 0x88440LU)) * 0x10101LU >> 16", "parent": 148, "children": [157, 158, 159], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 105}}, {"id": 157, "type": "identifier", "text": "inputData", "parent": 156, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 11}}, {"id": 158, "type": "=", "text": "=", "parent": 156, "children": [], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 13}}, {"id": 159, "type": "binary_expression", "text": "((inputData * 0x0802LU & 0x22110LU) | (inputData * 0x8020LU & 0x88440LU)) * 0x10101LU >> 16", "parent": 156, "children": [160, 179, 180], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 105}}, {"id": 160, "type": "binary_expression", "text": "((inputData * 0x0802LU & 0x22110LU) | (inputData * 0x8020LU & 0x88440LU)) * 0x10101LU", "parent": 159, "children": [161, 177, 178], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 99}}, {"id": 161, "type": "parenthesized_expression", "text": "((inputData * 0x0802LU & 0x22110LU) | (inputData * 0x8020LU & 0x88440LU))", "parent": 160, "children": [162], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 87}}, {"id": 162, "type": "binary_expression", "text": "(inputData * 0x0802LU & 0x22110LU) | (inputData * 0x8020LU & 0x88440LU)", "parent": 161, "children": [163, 170], "start_point": {"row": 23, "column": 15}, "end_point": {"row": 23, "column": 86}}, {"id": 163, "type": "parenthesized_expression", "text": "(inputData * 0x0802LU & 0x22110LU)", "parent": 162, "children": [164], "start_point": {"row": 23, "column": 15}, "end_point": {"row": 23, "column": 49}}, {"id": 164, "type": "binary_expression", "text": "inputData * 0x0802LU & 0x22110LU", "parent": 163, "children": [165, 169], "start_point": {"row": 23, "column": 16}, "end_point": {"row": 23, "column": 48}}, {"id": 165, "type": "binary_expression", "text": "inputData * 0x0802LU", "parent": 164, "children": [166, 167, 168], "start_point": {"row": 23, "column": 16}, "end_point": {"row": 23, "column": 36}}, {"id": 166, "type": "identifier", "text": "inputData", "parent": 165, "children": [], "start_point": {"row": 23, "column": 16}, "end_point": {"row": 23, "column": 25}}, {"id": 167, "type": "*", "text": "*", "parent": 165, "children": [], "start_point": {"row": 23, "column": 26}, "end_point": {"row": 23, "column": 27}}, {"id": 168, "type": "number_literal", "text": "0x0802LU", "parent": 165, "children": [], "start_point": {"row": 23, "column": 28}, "end_point": {"row": 23, "column": 36}}, {"id": 169, "type": "number_literal", "text": "0x22110LU", "parent": 164, "children": [], "start_point": {"row": 23, "column": 39}, "end_point": {"row": 23, "column": 48}}, {"id": 170, "type": "parenthesized_expression", "text": "(inputData * 0x8020LU & 0x88440LU)", "parent": 162, "children": [171], "start_point": {"row": 23, "column": 52}, "end_point": {"row": 23, "column": 86}}, {"id": 171, "type": "binary_expression", "text": "inputData * 0x8020LU & 0x88440LU", "parent": 170, "children": [172, 176], "start_point": {"row": 23, "column": 53}, "end_point": {"row": 23, "column": 85}}, {"id": 172, "type": "binary_expression", "text": "inputData * 0x8020LU", "parent": 171, "children": [173, 174, 175], "start_point": {"row": 23, "column": 53}, "end_point": {"row": 23, "column": 73}}, {"id": 173, "type": "identifier", "text": "inputData", "parent": 172, "children": [], "start_point": {"row": 23, "column": 53}, "end_point": {"row": 23, "column": 62}}, {"id": 174, "type": "*", "text": "*", "parent": 172, "children": [], "start_point": {"row": 23, "column": 63}, "end_point": {"row": 23, "column": 64}}, {"id": 175, "type": "number_literal", "text": "0x8020LU", "parent": 172, "children": [], "start_point": {"row": 23, "column": 65}, "end_point": {"row": 23, "column": 73}}, {"id": 176, "type": "number_literal", "text": "0x88440LU", "parent": 171, "children": [], "start_point": {"row": 23, "column": 76}, "end_point": {"row": 23, "column": 85}}, {"id": 177, "type": "*", "text": "*", "parent": 160, "children": [], "start_point": {"row": 23, "column": 88}, "end_point": {"row": 23, "column": 89}}, {"id": 178, "type": "number_literal", "text": "0x10101LU", "parent": 160, "children": [], "start_point": {"row": 23, "column": 90}, "end_point": {"row": 23, "column": 99}}, {"id": 179, "type": ">>", "text": ">>", "parent": 159, "children": [], "start_point": {"row": 23, "column": 100}, "end_point": {"row": 23, "column": 102}}, {"id": 180, "type": "number_literal", "text": "16", "parent": 159, "children": [], "start_point": {"row": 23, "column": 103}, "end_point": {"row": 23, "column": 105}}, {"id": 181, "type": "return_statement", "text": "return inputData;", "parent": 148, "children": [182], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 19}}, {"id": 182, "type": "identifier", "text": "inputData", "parent": 181, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 18}}, {"id": 183, "type": "function_definition", "text": "uint64_t reverse64(uint64_t inputData) {\n //reverse bytes\n //Efficient knuth 64 bit reverse\n static const uint64_t m0 = 0x5555555555555555LLU;\n static const uint64_t m1 = 0x0300c0303030c303LLU;\n static const uint64_t m2 = 0x00c0300c03f0003fLLU;\n static const uint64_t m3 = 0x00000ffc00003fffLLU;\n inputData = ((inputData >> 1) & m0) | (inputData & m0) << 1;\n inputData = inputData ^ (((inputData >> 4) ^ inputData) & m1) ^ ((((inputData >> 4) ^ inputData) & m1) << 4);\n inputData = inputData ^ (((inputData >> 8) ^ inputData) & m2) ^ ((((inputData >> 8) ^ inputData) & m2) << 8);\n inputData = inputData ^ (((inputData >> 20) ^ inputData) & m3) ^ ((((inputData >> 20) ^ inputData) & m3) << 20);\n inputData = (inputData >> 34) | (inputData << 30);\n return inputData;\n}", "parent": null, "children": [184, 185], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 40, "column": 1}}, {"id": 184, "type": "primitive_type", "text": "uint64_t", "parent": 183, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 8}}, {"id": 185, "type": "function_declarator", "text": "reverse64(uint64_t inputData)", "parent": 183, "children": [186, 187], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 38}}, {"id": 186, "type": "identifier", "text": "reverse64", "parent": 185, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 18}}, {"id": 187, "type": "parameter_list", "text": "(uint64_t inputData)", "parent": 185, "children": [188], "start_point": {"row": 27, "column": 18}, "end_point": {"row": 27, "column": 38}}, {"id": 188, "type": "parameter_declaration", "text": "uint64_t inputData", "parent": 187, "children": [189, 190], "start_point": {"row": 27, "column": 19}, "end_point": {"row": 27, "column": 37}}, {"id": 189, "type": "primitive_type", "text": "uint64_t", "parent": 188, "children": [], "start_point": {"row": 27, "column": 19}, "end_point": {"row": 27, "column": 27}}, {"id": 190, "type": "identifier", "text": "inputData", "parent": 188, "children": [], "start_point": {"row": 27, "column": 28}, "end_point": {"row": 27, "column": 37}}, {"id": 191, "type": "declaration", "text": "static const uint64_t m0 = 0x5555555555555555LLU;", "parent": 183, "children": [192, 193], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 51}}, {"id": 192, "type": "primitive_type", "text": "uint64_t", "parent": 191, "children": [], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 30, "column": 23}}, {"id": 193, "type": "init_declarator", "text": "m0 = 0x5555555555555555LLU", "parent": 191, "children": [194, 195, 196], "start_point": {"row": 30, "column": 24}, "end_point": {"row": 30, "column": 50}}, {"id": 194, "type": "identifier", "text": "m0", "parent": 193, "children": [], "start_point": {"row": 30, "column": 24}, "end_point": {"row": 30, "column": 26}}, {"id": 195, "type": "=", "text": "=", "parent": 193, "children": [], "start_point": {"row": 30, "column": 27}, "end_point": {"row": 30, "column": 28}}, {"id": 196, "type": "number_literal", "text": "0x5555555555555555LLU", "parent": 193, "children": [], "start_point": {"row": 30, "column": 29}, "end_point": {"row": 30, "column": 50}}, {"id": 197, "type": "declaration", "text": "static const uint64_t m1 = 0x0300c0303030c303LLU;", "parent": 183, "children": [198, 199], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 51}}, {"id": 198, "type": "primitive_type", "text": "uint64_t", "parent": 197, "children": [], "start_point": {"row": 31, "column": 15}, "end_point": {"row": 31, "column": 23}}, {"id": 199, "type": "init_declarator", "text": "m1 = 0x0300c0303030c303LLU", "parent": 197, "children": [200, 201, 202], "start_point": {"row": 31, "column": 24}, "end_point": {"row": 31, "column": 50}}, {"id": 200, "type": "identifier", "text": "m1", "parent": 199, "children": [], "start_point": {"row": 31, "column": 24}, "end_point": {"row": 31, "column": 26}}, {"id": 201, "type": "=", "text": "=", "parent": 199, "children": [], "start_point": {"row": 31, "column": 27}, "end_point": {"row": 31, "column": 28}}, {"id": 202, "type": "number_literal", "text": "0x0300c0303030c303LLU", "parent": 199, "children": [], "start_point": {"row": 31, "column": 29}, "end_point": {"row": 31, "column": 50}}, {"id": 203, "type": "declaration", "text": "static const uint64_t m2 = 0x00c0300c03f0003fLLU;", "parent": 183, "children": [204, 205], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 51}}, {"id": 204, "type": "primitive_type", "text": "uint64_t", "parent": 203, "children": [], "start_point": {"row": 32, "column": 15}, "end_point": {"row": 32, "column": 23}}, {"id": 205, "type": "init_declarator", "text": "m2 = 0x00c0300c03f0003fLLU", "parent": 203, "children": [206, 207, 208], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 50}}, {"id": 206, "type": "identifier", "text": "m2", "parent": 205, "children": [], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 26}}, {"id": 207, "type": "=", "text": "=", "parent": 205, "children": [], "start_point": {"row": 32, "column": 27}, "end_point": {"row": 32, "column": 28}}, {"id": 208, "type": "number_literal", "text": "0x00c0300c03f0003fLLU", "parent": 205, "children": [], "start_point": {"row": 32, "column": 29}, "end_point": {"row": 32, "column": 50}}, {"id": 209, "type": "declaration", "text": "static const uint64_t m3 = 0x00000ffc00003fffLLU;", "parent": 183, "children": [210, 211], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 51}}, {"id": 210, "type": "primitive_type", "text": "uint64_t", "parent": 209, "children": [], "start_point": {"row": 33, "column": 15}, "end_point": {"row": 33, "column": 23}}, {"id": 211, "type": "init_declarator", "text": "m3 = 0x00000ffc00003fffLLU", "parent": 209, "children": [212, 213, 214], "start_point": {"row": 33, "column": 24}, "end_point": {"row": 33, "column": 50}}, {"id": 212, "type": "identifier", "text": "m3", "parent": 211, "children": [], "start_point": {"row": 33, "column": 24}, "end_point": {"row": 33, "column": 26}}, {"id": 213, "type": "=", "text": "=", "parent": 211, "children": [], "start_point": {"row": 33, "column": 27}, "end_point": {"row": 33, "column": 28}}, {"id": 214, "type": "number_literal", "text": "0x00000ffc00003fffLLU", "parent": 211, "children": [], "start_point": {"row": 33, "column": 29}, "end_point": {"row": 33, "column": 50}}, {"id": 215, "type": "assignment_expression", "text": "inputData = ((inputData >> 1) & m0) | (inputData & m0) << 1", "parent": 183, "children": [216, 217, 218], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 61}}, {"id": 216, "type": "identifier", "text": "inputData", "parent": 215, "children": [], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 11}}, {"id": 217, "type": "=", "text": "=", "parent": 215, "children": [], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 13}}, {"id": 218, "type": "binary_expression", "text": "((inputData >> 1) & m0) | (inputData & m0) << 1", "parent": 215, "children": [219, 227], "start_point": {"row": 34, "column": 14}, "end_point": {"row": 34, "column": 61}}, {"id": 219, "type": "parenthesized_expression", "text": "((inputData >> 1) & m0)", "parent": 218, "children": [220], "start_point": {"row": 34, "column": 14}, "end_point": {"row": 34, "column": 37}}, {"id": 220, "type": "binary_expression", "text": "(inputData >> 1) & m0", "parent": 219, "children": [221, 226], "start_point": {"row": 34, "column": 15}, "end_point": {"row": 34, "column": 36}}, {"id": 221, "type": "parenthesized_expression", "text": "(inputData >> 1)", "parent": 220, "children": [222], "start_point": {"row": 34, "column": 15}, "end_point": {"row": 34, "column": 31}}, {"id": 222, "type": "binary_expression", "text": "inputData >> 1", "parent": 221, "children": [223, 224, 225], "start_point": {"row": 34, "column": 16}, "end_point": {"row": 34, "column": 30}}, {"id": 223, "type": "identifier", "text": "inputData", "parent": 222, "children": [], "start_point": {"row": 34, "column": 16}, "end_point": {"row": 34, "column": 25}}, {"id": 224, "type": ">>", "text": ">>", "parent": 222, "children": [], "start_point": {"row": 34, "column": 26}, "end_point": {"row": 34, "column": 28}}, {"id": 225, "type": "number_literal", "text": "1", "parent": 222, "children": [], "start_point": {"row": 34, "column": 29}, "end_point": {"row": 34, "column": 30}}, {"id": 226, "type": "identifier", "text": "m0", "parent": 220, "children": [], "start_point": {"row": 34, "column": 34}, "end_point": {"row": 34, "column": 36}}, {"id": 227, "type": "binary_expression", "text": "(inputData & m0) << 1", "parent": 218, "children": [228, 232, 233], "start_point": {"row": 34, "column": 40}, "end_point": {"row": 34, "column": 61}}, {"id": 228, "type": "parenthesized_expression", "text": "(inputData & m0)", "parent": 227, "children": [229], "start_point": {"row": 34, "column": 40}, "end_point": {"row": 34, "column": 56}}, {"id": 229, "type": "binary_expression", "text": "inputData & m0", "parent": 228, "children": [230, 231], "start_point": {"row": 34, "column": 41}, "end_point": {"row": 34, "column": 55}}, {"id": 230, "type": "identifier", "text": "inputData", "parent": 229, "children": [], "start_point": {"row": 34, "column": 41}, "end_point": {"row": 34, "column": 50}}, {"id": 231, "type": "identifier", "text": "m0", "parent": 229, "children": [], "start_point": {"row": 34, "column": 53}, "end_point": {"row": 34, "column": 55}}, {"id": 232, "type": "<<", "text": "<<", "parent": 227, "children": [], "start_point": {"row": 34, "column": 57}, "end_point": {"row": 34, "column": 59}}, {"id": 233, "type": "number_literal", "text": "1", "parent": 227, "children": [], "start_point": {"row": 34, "column": 60}, "end_point": {"row": 34, "column": 61}}, {"id": 234, "type": "assignment_expression", "text": "inputData = inputData ^ (((inputData >> 4) ^ inputData) & m1) ^ ((((inputData >> 4) ^ inputData) & m1) << 4)", "parent": 183, "children": [235, 236, 237], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 110}}, {"id": 235, "type": "identifier", "text": "inputData", "parent": 234, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 11}}, {"id": 236, "type": "=", "text": "=", "parent": 234, "children": [], "start_point": {"row": 35, "column": 12}, "end_point": {"row": 35, "column": 13}}, {"id": 237, "type": "binary_expression", "text": "inputData ^ (((inputData >> 4) ^ inputData) & m1) ^ ((((inputData >> 4) ^ inputData) & m1) << 4)", "parent": 234, "children": [238, 253, 254], "start_point": {"row": 35, "column": 14}, "end_point": {"row": 35, "column": 110}}, {"id": 238, "type": "binary_expression", "text": "inputData ^ (((inputData >> 4) ^ inputData) & m1)", "parent": 237, "children": [239, 240, 241], "start_point": {"row": 35, "column": 14}, "end_point": {"row": 35, "column": 63}}, {"id": 239, "type": "identifier", "text": "inputData", "parent": 238, "children": [], "start_point": {"row": 35, "column": 14}, "end_point": {"row": 35, "column": 23}}, {"id": 240, "type": "^", "text": "^", "parent": 238, "children": [], "start_point": {"row": 35, "column": 24}, "end_point": {"row": 35, "column": 25}}, {"id": 241, "type": "parenthesized_expression", "text": "(((inputData >> 4) ^ inputData) & m1)", "parent": 238, "children": [242], "start_point": {"row": 35, "column": 26}, "end_point": {"row": 35, "column": 63}}, {"id": 242, "type": "binary_expression", "text": "((inputData >> 4) ^ inputData) & m1", "parent": 241, "children": [243, 252], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 62}}, {"id": 243, "type": "parenthesized_expression", "text": "((inputData >> 4) ^ inputData)", "parent": 242, "children": [244], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 57}}, {"id": 244, "type": "binary_expression", "text": "(inputData >> 4) ^ inputData", "parent": 243, "children": [245, 250, 251], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 35, "column": 56}}, {"id": 245, "type": "parenthesized_expression", "text": "(inputData >> 4)", "parent": 244, "children": [246], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 35, "column": 44}}, {"id": 246, "type": "binary_expression", "text": "inputData >> 4", "parent": 245, "children": [247, 248, 249], "start_point": {"row": 35, "column": 29}, "end_point": {"row": 35, "column": 43}}, {"id": 247, "type": "identifier", "text": "inputData", "parent": 246, "children": [], "start_point": {"row": 35, "column": 29}, "end_point": {"row": 35, "column": 38}}, {"id": 248, "type": ">>", "text": ">>", "parent": 246, "children": [], "start_point": {"row": 35, "column": 39}, "end_point": {"row": 35, "column": 41}}, {"id": 249, "type": "number_literal", "text": "4", "parent": 246, "children": [], "start_point": {"row": 35, "column": 42}, "end_point": {"row": 35, "column": 43}}, {"id": 250, "type": "^", "text": "^", "parent": 244, "children": [], "start_point": {"row": 35, "column": 45}, "end_point": {"row": 35, "column": 46}}, {"id": 251, "type": "identifier", "text": "inputData", "parent": 244, "children": [], "start_point": {"row": 35, "column": 47}, "end_point": {"row": 35, "column": 56}}, {"id": 252, "type": "identifier", "text": "m1", "parent": 242, "children": [], "start_point": {"row": 35, "column": 60}, "end_point": {"row": 35, "column": 62}}, {"id": 253, "type": "^", "text": "^", "parent": 237, "children": [], "start_point": {"row": 35, "column": 64}, "end_point": {"row": 35, "column": 65}}, {"id": 254, "type": "parenthesized_expression", "text": "((((inputData >> 4) ^ inputData) & m1) << 4)", "parent": 237, "children": [255], "start_point": {"row": 35, "column": 66}, "end_point": {"row": 35, "column": 110}}, {"id": 255, "type": "binary_expression", "text": "(((inputData >> 4) ^ inputData) & m1) << 4", "parent": 254, "children": [256, 268, 269], "start_point": {"row": 35, "column": 67}, "end_point": {"row": 35, "column": 109}}, {"id": 256, "type": "parenthesized_expression", "text": "(((inputData >> 4) ^ inputData) & m1)", "parent": 255, "children": [257], "start_point": {"row": 35, "column": 67}, "end_point": {"row": 35, "column": 104}}, {"id": 257, "type": "binary_expression", "text": "((inputData >> 4) ^ inputData) & m1", "parent": 256, "children": [258, 267], "start_point": {"row": 35, "column": 68}, "end_point": {"row": 35, "column": 103}}, {"id": 258, "type": "parenthesized_expression", "text": "((inputData >> 4) ^ inputData)", "parent": 257, "children": [259], "start_point": {"row": 35, "column": 68}, "end_point": {"row": 35, "column": 98}}, {"id": 259, "type": "binary_expression", "text": "(inputData >> 4) ^ inputData", "parent": 258, "children": [260, 265, 266], "start_point": {"row": 35, "column": 69}, "end_point": {"row": 35, "column": 97}}, {"id": 260, "type": "parenthesized_expression", "text": "(inputData >> 4)", "parent": 259, "children": [261], "start_point": {"row": 35, "column": 69}, "end_point": {"row": 35, "column": 85}}, {"id": 261, "type": "binary_expression", "text": "inputData >> 4", "parent": 260, "children": [262, 263, 264], "start_point": {"row": 35, "column": 70}, "end_point": {"row": 35, "column": 84}}, {"id": 262, "type": "identifier", "text": "inputData", "parent": 261, "children": [], "start_point": {"row": 35, "column": 70}, "end_point": {"row": 35, "column": 79}}, {"id": 263, "type": ">>", "text": ">>", "parent": 261, "children": [], "start_point": {"row": 35, "column": 80}, "end_point": {"row": 35, "column": 82}}, {"id": 264, "type": "number_literal", "text": "4", "parent": 261, "children": [], "start_point": {"row": 35, "column": 83}, "end_point": {"row": 35, "column": 84}}, {"id": 265, "type": "^", "text": "^", "parent": 259, "children": [], "start_point": {"row": 35, "column": 86}, "end_point": {"row": 35, "column": 87}}, {"id": 266, "type": "identifier", "text": "inputData", "parent": 259, "children": [], "start_point": {"row": 35, "column": 88}, "end_point": {"row": 35, "column": 97}}, {"id": 267, "type": "identifier", "text": "m1", "parent": 257, "children": [], "start_point": {"row": 35, "column": 101}, "end_point": {"row": 35, "column": 103}}, {"id": 268, "type": "<<", "text": "<<", "parent": 255, "children": [], "start_point": {"row": 35, "column": 105}, "end_point": {"row": 35, "column": 107}}, {"id": 269, "type": "number_literal", "text": "4", "parent": 255, "children": [], "start_point": {"row": 35, "column": 108}, "end_point": {"row": 35, "column": 109}}, {"id": 270, "type": "assignment_expression", "text": "inputData = inputData ^ (((inputData >> 8) ^ inputData) & m2) ^ ((((inputData >> 8) ^ inputData) & m2) << 8)", "parent": 183, "children": [271, 272, 273], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 110}}, {"id": 271, "type": "identifier", "text": "inputData", "parent": 270, "children": [], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 11}}, {"id": 272, "type": "=", "text": "=", "parent": 270, "children": [], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 13}}, {"id": 273, "type": "binary_expression", "text": "inputData ^ (((inputData >> 8) ^ inputData) & m2) ^ ((((inputData >> 8) ^ inputData) & m2) << 8)", "parent": 270, "children": [274, 289, 290], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 110}}, {"id": 274, "type": "binary_expression", "text": "inputData ^ (((inputData >> 8) ^ inputData) & m2)", "parent": 273, "children": [275, 276, 277], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 63}}, {"id": 275, "type": "identifier", "text": "inputData", "parent": 274, "children": [], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 23}}, {"id": 276, "type": "^", "text": "^", "parent": 274, "children": [], "start_point": {"row": 36, "column": 24}, "end_point": {"row": 36, "column": 25}}, {"id": 277, "type": "parenthesized_expression", "text": "(((inputData >> 8) ^ inputData) & m2)", "parent": 274, "children": [278], "start_point": {"row": 36, "column": 26}, "end_point": {"row": 36, "column": 63}}, {"id": 278, "type": "binary_expression", "text": "((inputData >> 8) ^ inputData) & m2", "parent": 277, "children": [279, 288], "start_point": {"row": 36, "column": 27}, "end_point": {"row": 36, "column": 62}}, {"id": 279, "type": "parenthesized_expression", "text": "((inputData >> 8) ^ inputData)", "parent": 278, "children": [280], "start_point": {"row": 36, "column": 27}, "end_point": {"row": 36, "column": 57}}, {"id": 280, "type": "binary_expression", "text": "(inputData >> 8) ^ inputData", "parent": 279, "children": [281, 286, 287], "start_point": {"row": 36, "column": 28}, "end_point": {"row": 36, "column": 56}}, {"id": 281, "type": "parenthesized_expression", "text": "(inputData >> 8)", "parent": 280, "children": [282], "start_point": {"row": 36, "column": 28}, "end_point": {"row": 36, "column": 44}}, {"id": 282, "type": "binary_expression", "text": "inputData >> 8", "parent": 281, "children": [283, 284, 285], "start_point": {"row": 36, "column": 29}, "end_point": {"row": 36, "column": 43}}, {"id": 283, "type": "identifier", "text": "inputData", "parent": 282, "children": [], "start_point": {"row": 36, "column": 29}, "end_point": {"row": 36, "column": 38}}, {"id": 284, "type": ">>", "text": ">>", "parent": 282, "children": [], "start_point": {"row": 36, "column": 39}, "end_point": {"row": 36, "column": 41}}, {"id": 285, "type": "number_literal", "text": "8", "parent": 282, "children": [], "start_point": {"row": 36, "column": 42}, "end_point": {"row": 36, "column": 43}}, {"id": 286, "type": "^", "text": "^", "parent": 280, "children": [], "start_point": {"row": 36, "column": 45}, "end_point": {"row": 36, "column": 46}}, {"id": 287, "type": "identifier", "text": "inputData", "parent": 280, "children": [], "start_point": {"row": 36, "column": 47}, "end_point": {"row": 36, "column": 56}}, {"id": 288, "type": "identifier", "text": "m2", "parent": 278, "children": [], "start_point": {"row": 36, "column": 60}, "end_point": {"row": 36, "column": 62}}, {"id": 289, "type": "^", "text": "^", "parent": 273, "children": [], "start_point": {"row": 36, "column": 64}, "end_point": {"row": 36, "column": 65}}, {"id": 290, "type": "parenthesized_expression", "text": "((((inputData >> 8) ^ inputData) & m2) << 8)", "parent": 273, "children": [291], "start_point": {"row": 36, "column": 66}, "end_point": {"row": 36, "column": 110}}, {"id": 291, "type": "binary_expression", "text": "(((inputData >> 8) ^ inputData) & m2) << 8", "parent": 290, "children": [292, 304, 305], "start_point": {"row": 36, "column": 67}, "end_point": {"row": 36, "column": 109}}, {"id": 292, "type": "parenthesized_expression", "text": "(((inputData >> 8) ^ inputData) & m2)", "parent": 291, "children": [293], "start_point": {"row": 36, "column": 67}, "end_point": {"row": 36, "column": 104}}, {"id": 293, "type": "binary_expression", "text": "((inputData >> 8) ^ inputData) & m2", "parent": 292, "children": [294, 303], "start_point": {"row": 36, "column": 68}, "end_point": {"row": 36, "column": 103}}, {"id": 294, "type": "parenthesized_expression", "text": "((inputData >> 8) ^ inputData)", "parent": 293, "children": [295], "start_point": {"row": 36, "column": 68}, "end_point": {"row": 36, "column": 98}}, {"id": 295, "type": "binary_expression", "text": "(inputData >> 8) ^ inputData", "parent": 294, "children": [296, 301, 302], "start_point": {"row": 36, "column": 69}, "end_point": {"row": 36, "column": 97}}, {"id": 296, "type": "parenthesized_expression", "text": "(inputData >> 8)", "parent": 295, "children": [297], "start_point": {"row": 36, "column": 69}, "end_point": {"row": 36, "column": 85}}, {"id": 297, "type": "binary_expression", "text": "inputData >> 8", "parent": 296, "children": [298, 299, 300], "start_point": {"row": 36, "column": 70}, "end_point": {"row": 36, "column": 84}}, {"id": 298, "type": "identifier", "text": "inputData", "parent": 297, "children": [], "start_point": {"row": 36, "column": 70}, "end_point": {"row": 36, "column": 79}}, {"id": 299, "type": ">>", "text": ">>", "parent": 297, "children": [], "start_point": {"row": 36, "column": 80}, "end_point": {"row": 36, "column": 82}}, {"id": 300, "type": "number_literal", "text": "8", "parent": 297, "children": [], "start_point": {"row": 36, "column": 83}, "end_point": {"row": 36, "column": 84}}, {"id": 301, "type": "^", "text": "^", "parent": 295, "children": [], "start_point": {"row": 36, "column": 86}, "end_point": {"row": 36, "column": 87}}, {"id": 302, "type": "identifier", "text": "inputData", "parent": 295, "children": [], "start_point": {"row": 36, "column": 88}, "end_point": {"row": 36, "column": 97}}, {"id": 303, "type": "identifier", "text": "m2", "parent": 293, "children": [], "start_point": {"row": 36, "column": 101}, "end_point": {"row": 36, "column": 103}}, {"id": 304, "type": "<<", "text": "<<", "parent": 291, "children": [], "start_point": {"row": 36, "column": 105}, "end_point": {"row": 36, "column": 107}}, {"id": 305, "type": "number_literal", "text": "8", "parent": 291, "children": [], "start_point": {"row": 36, "column": 108}, "end_point": {"row": 36, "column": 109}}, {"id": 306, "type": "assignment_expression", "text": "inputData = inputData ^ (((inputData >> 20) ^ inputData) & m3) ^ ((((inputData >> 20) ^ inputData) & m3) << 20)", "parent": 183, "children": [307, 308, 309], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 113}}, {"id": 307, "type": "identifier", "text": "inputData", "parent": 306, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 11}}, {"id": 308, "type": "=", "text": "=", "parent": 306, "children": [], "start_point": {"row": 37, "column": 12}, "end_point": {"row": 37, "column": 13}}, {"id": 309, "type": "binary_expression", "text": "inputData ^ (((inputData >> 20) ^ inputData) & m3) ^ ((((inputData >> 20) ^ inputData) & m3) << 20)", "parent": 306, "children": [310, 325, 326], "start_point": {"row": 37, "column": 14}, "end_point": {"row": 37, "column": 113}}, {"id": 310, "type": "binary_expression", "text": "inputData ^ (((inputData >> 20) ^ inputData) & m3)", "parent": 309, "children": [311, 312, 313], "start_point": {"row": 37, "column": 14}, "end_point": {"row": 37, "column": 64}}, {"id": 311, "type": "identifier", "text": "inputData", "parent": 310, "children": [], "start_point": {"row": 37, "column": 14}, "end_point": {"row": 37, "column": 23}}, {"id": 312, "type": "^", "text": "^", "parent": 310, "children": [], "start_point": {"row": 37, "column": 24}, "end_point": {"row": 37, "column": 25}}, {"id": 313, "type": "parenthesized_expression", "text": "(((inputData >> 20) ^ inputData) & m3)", "parent": 310, "children": [314], "start_point": {"row": 37, "column": 26}, "end_point": {"row": 37, "column": 64}}, {"id": 314, "type": "binary_expression", "text": "((inputData >> 20) ^ inputData) & m3", "parent": 313, "children": [315, 324], "start_point": {"row": 37, "column": 27}, "end_point": {"row": 37, "column": 63}}, {"id": 315, "type": "parenthesized_expression", "text": "((inputData >> 20) ^ inputData)", "parent": 314, "children": [316], "start_point": {"row": 37, "column": 27}, "end_point": {"row": 37, "column": 58}}, {"id": 316, "type": "binary_expression", "text": "(inputData >> 20) ^ inputData", "parent": 315, "children": [317, 322, 323], "start_point": {"row": 37, "column": 28}, "end_point": {"row": 37, "column": 57}}, {"id": 317, "type": "parenthesized_expression", "text": "(inputData >> 20)", "parent": 316, "children": [318], "start_point": {"row": 37, "column": 28}, "end_point": {"row": 37, "column": 45}}, {"id": 318, "type": "binary_expression", "text": "inputData >> 20", "parent": 317, "children": [319, 320, 321], "start_point": {"row": 37, "column": 29}, "end_point": {"row": 37, "column": 44}}, {"id": 319, "type": "identifier", "text": "inputData", "parent": 318, "children": [], "start_point": {"row": 37, "column": 29}, "end_point": {"row": 37, "column": 38}}, {"id": 320, "type": ">>", "text": ">>", "parent": 318, "children": [], "start_point": {"row": 37, "column": 39}, "end_point": {"row": 37, "column": 41}}, {"id": 321, "type": "number_literal", "text": "20", "parent": 318, "children": [], "start_point": {"row": 37, "column": 42}, "end_point": {"row": 37, "column": 44}}, {"id": 322, "type": "^", "text": "^", "parent": 316, "children": [], "start_point": {"row": 37, "column": 46}, "end_point": {"row": 37, "column": 47}}, {"id": 323, "type": "identifier", "text": "inputData", "parent": 316, "children": [], "start_point": {"row": 37, "column": 48}, "end_point": {"row": 37, "column": 57}}, {"id": 324, "type": "identifier", "text": "m3", "parent": 314, "children": [], "start_point": {"row": 37, "column": 61}, "end_point": {"row": 37, "column": 63}}, {"id": 325, "type": "^", "text": "^", "parent": 309, "children": [], "start_point": {"row": 37, "column": 65}, "end_point": {"row": 37, "column": 66}}, {"id": 326, "type": "parenthesized_expression", "text": "((((inputData >> 20) ^ inputData) & m3) << 20)", "parent": 309, "children": [327], "start_point": {"row": 37, "column": 67}, "end_point": {"row": 37, "column": 113}}, {"id": 327, "type": "binary_expression", "text": "(((inputData >> 20) ^ inputData) & m3) << 20", "parent": 326, "children": [328, 340, 341], "start_point": {"row": 37, "column": 68}, "end_point": {"row": 37, "column": 112}}, {"id": 328, "type": "parenthesized_expression", "text": "(((inputData >> 20) ^ inputData) & m3)", "parent": 327, "children": [329], "start_point": {"row": 37, "column": 68}, "end_point": {"row": 37, "column": 106}}, {"id": 329, "type": "binary_expression", "text": "((inputData >> 20) ^ inputData) & m3", "parent": 328, "children": [330, 339], "start_point": {"row": 37, "column": 69}, "end_point": {"row": 37, "column": 105}}, {"id": 330, "type": "parenthesized_expression", "text": "((inputData >> 20) ^ inputData)", "parent": 329, "children": [331], "start_point": {"row": 37, "column": 69}, "end_point": {"row": 37, "column": 100}}, {"id": 331, "type": "binary_expression", "text": "(inputData >> 20) ^ inputData", "parent": 330, "children": [332, 337, 338], "start_point": {"row": 37, "column": 70}, "end_point": {"row": 37, "column": 99}}, {"id": 332, "type": "parenthesized_expression", "text": "(inputData >> 20)", "parent": 331, "children": [333], "start_point": {"row": 37, "column": 70}, "end_point": {"row": 37, "column": 87}}, {"id": 333, "type": "binary_expression", "text": "inputData >> 20", "parent": 332, "children": [334, 335, 336], "start_point": {"row": 37, "column": 71}, "end_point": {"row": 37, "column": 86}}, {"id": 334, "type": "identifier", "text": "inputData", "parent": 333, "children": [], "start_point": {"row": 37, "column": 71}, "end_point": {"row": 37, "column": 80}}, {"id": 335, "type": ">>", "text": ">>", "parent": 333, "children": [], "start_point": {"row": 37, "column": 81}, "end_point": {"row": 37, "column": 83}}, {"id": 336, "type": "number_literal", "text": "20", "parent": 333, "children": [], "start_point": {"row": 37, "column": 84}, "end_point": {"row": 37, "column": 86}}, {"id": 337, "type": "^", "text": "^", "parent": 331, "children": [], "start_point": {"row": 37, "column": 88}, "end_point": {"row": 37, "column": 89}}, {"id": 338, "type": "identifier", "text": "inputData", "parent": 331, "children": [], "start_point": {"row": 37, "column": 90}, "end_point": {"row": 37, "column": 99}}, {"id": 339, "type": "identifier", "text": "m3", "parent": 329, "children": [], "start_point": {"row": 37, "column": 103}, "end_point": {"row": 37, "column": 105}}, {"id": 340, "type": "<<", "text": "<<", "parent": 327, "children": [], "start_point": {"row": 37, "column": 107}, "end_point": {"row": 37, "column": 109}}, {"id": 341, "type": "number_literal", "text": "20", "parent": 327, "children": [], "start_point": {"row": 37, "column": 110}, "end_point": {"row": 37, "column": 112}}, {"id": 342, "type": "assignment_expression", "text": "inputData = (inputData >> 34) | (inputData << 30)", "parent": 183, "children": [343, 344, 345], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 51}}, {"id": 343, "type": "identifier", "text": "inputData", "parent": 342, "children": [], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 11}}, {"id": 344, "type": "=", "text": "=", "parent": 342, "children": [], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 13}}, {"id": 345, "type": "binary_expression", "text": "(inputData >> 34) | (inputData << 30)", "parent": 342, "children": [346, 351], "start_point": {"row": 38, "column": 14}, "end_point": {"row": 38, "column": 51}}, {"id": 346, "type": "parenthesized_expression", "text": "(inputData >> 34)", "parent": 345, "children": [347], "start_point": {"row": 38, "column": 14}, "end_point": {"row": 38, "column": 31}}, {"id": 347, "type": "binary_expression", "text": "inputData >> 34", "parent": 346, "children": [348, 349, 350], "start_point": {"row": 38, "column": 15}, "end_point": {"row": 38, "column": 30}}, {"id": 348, "type": "identifier", "text": "inputData", "parent": 347, "children": [], "start_point": {"row": 38, "column": 15}, "end_point": {"row": 38, "column": 24}}, {"id": 349, "type": ">>", "text": ">>", "parent": 347, "children": [], "start_point": {"row": 38, "column": 25}, "end_point": {"row": 38, "column": 27}}, {"id": 350, "type": "number_literal", "text": "34", "parent": 347, "children": [], "start_point": {"row": 38, "column": 28}, "end_point": {"row": 38, "column": 30}}, {"id": 351, "type": "parenthesized_expression", "text": "(inputData << 30)", "parent": 345, "children": [352], "start_point": {"row": 38, "column": 34}, "end_point": {"row": 38, "column": 51}}, {"id": 352, "type": "binary_expression", "text": "inputData << 30", "parent": 351, "children": [353, 354, 355], "start_point": {"row": 38, "column": 35}, "end_point": {"row": 38, "column": 50}}, {"id": 353, "type": "identifier", "text": "inputData", "parent": 352, "children": [], "start_point": {"row": 38, "column": 35}, "end_point": {"row": 38, "column": 44}}, {"id": 354, "type": "<<", "text": "<<", "parent": 352, "children": [], "start_point": {"row": 38, "column": 45}, "end_point": {"row": 38, "column": 47}}, {"id": 355, "type": "number_literal", "text": "30", "parent": 352, "children": [], "start_point": {"row": 38, "column": 48}, "end_point": {"row": 38, "column": 50}}, {"id": 356, "type": "return_statement", "text": "return inputData;", "parent": 183, "children": [357], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 19}}, {"id": 357, "type": "identifier", "text": "inputData", "parent": 356, "children": [], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 18}}, {"id": 358, "type": "function_definition", "text": "void CAN_encode(CAN_message_t *msg, double inputDataDouble, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias) { //byteOrder is 1 for MSB, 0 for LSB. Signed is 1 for signed, 0 for unsigned\n\n uint64_t inputData = 0x0000000000000000LU;\n //scale and bias\n inputDataDouble = (1/Scale) * (inputDataDouble - bias);\n uint64_t maxVal = 1;\n for(int i=0; i<bitLength; i++) {\n maxVal *= 2;\n }\n //Sign value if appropriate\n if(sign) {\n if(inputDataDouble < 0) {\n inputDataDouble += maxVal;\n }\n inputData = inputDataDouble;\n }\n else\n inputData = inputDataDouble;\n\n if(inputData > (maxVal-1)) {\n inputData = (maxVal-1);\n }\n else if(inputData < 0){\n inputData = 0;\n }\n //access input as byte array and evaluate length of array\n //take advantage of endianness\n uint8_t *bytePointer = (uint8_t *)&inputData;\n\n if(byteOrder) {\n //locate MSB\n uint8_t trueLen = bitSize(inputData);\n //if more bits are present than can be accomodated cut them off\n if(trueLen > bitLength) {\n inputData = inputData >> (trueLen - bitLength);\n }\n //Shift buf to 64th position\n inputData = inputData << (64 - bitLength);\n\n //Reverse int\n inputData = reverse64(inputData);\n //calculate altered start position and move\n uint8_t calcStartbit = (7 - startBit%8) + 8*(startBit/8);\n inputData = inputData << calcStartbit;\n \n //reverse each byte and move to appropriate place\n for(int i=0; i<8; i++) {\n msg->buf[i] |= reverse8(bytePointer[i]);\n }\n }else {\n //Shift buf to appropriate place\n inputData = inputData << startBit;\n //push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= bytePointer[i];\n }\n }\n}", "parent": null, "children": [359, 360], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 99, "column": 1}}, {"id": 359, "type": "primitive_type", "text": "void", "parent": 358, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 4}}, {"id": 360, "type": "function_declarator", "text": "CAN_encode(CAN_message_t *msg, double inputDataDouble, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias)", "parent": 358, "children": [361, 362], "start_point": {"row": 42, "column": 5}, "end_point": {"row": 42, "column": 150}}, {"id": 361, "type": "identifier", "text": "CAN_encode", "parent": 360, "children": [], "start_point": {"row": 42, "column": 5}, "end_point": {"row": 42, "column": 15}}, {"id": 362, "type": "parameter_list", "text": "(CAN_message_t *msg, double inputDataDouble, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias)", "parent": 360, "children": [363, 368, 371, 374, 377, 380, 383, 386], "start_point": {"row": 42, "column": 15}, "end_point": {"row": 42, "column": 150}}, {"id": 363, "type": "parameter_declaration", "text": "CAN_message_t *msg", "parent": 362, "children": [364, 365], "start_point": {"row": 42, "column": 16}, "end_point": {"row": 42, "column": 34}}, {"id": 364, "type": "type_identifier", "text": "CAN_message_t", "parent": 363, "children": [], "start_point": {"row": 42, "column": 16}, "end_point": {"row": 42, "column": 29}}, {"id": 365, "type": "pointer_declarator", "text": "*msg", "parent": 363, "children": [366, 367], "start_point": {"row": 42, "column": 30}, "end_point": {"row": 42, "column": 34}}, {"id": 366, "type": "*", "text": "*", "parent": 365, "children": [], "start_point": {"row": 42, "column": 30}, "end_point": {"row": 42, "column": 31}}, {"id": 367, "type": "identifier", "text": "msg", "parent": 365, "children": [], "start_point": {"row": 42, "column": 31}, "end_point": {"row": 42, "column": 34}}, {"id": 368, "type": "parameter_declaration", "text": "double inputDataDouble", "parent": 362, "children": [369, 370], "start_point": {"row": 42, "column": 36}, "end_point": {"row": 42, "column": 58}}, {"id": 369, "type": "primitive_type", "text": "double", "parent": 368, "children": [], "start_point": {"row": 42, "column": 36}, "end_point": {"row": 42, "column": 42}}, {"id": 370, "type": "identifier", "text": "inputDataDouble", "parent": 368, "children": [], "start_point": {"row": 42, "column": 43}, "end_point": {"row": 42, "column": 58}}, {"id": 371, "type": "parameter_declaration", "text": "uint8_t startBit", "parent": 362, "children": [372, 373], "start_point": {"row": 42, "column": 60}, "end_point": {"row": 42, "column": 76}}, {"id": 372, "type": "primitive_type", "text": "uint8_t", "parent": 371, "children": [], "start_point": {"row": 42, "column": 60}, "end_point": {"row": 42, "column": 67}}, {"id": 373, "type": "identifier", "text": "startBit", "parent": 371, "children": [], "start_point": {"row": 42, "column": 68}, "end_point": {"row": 42, "column": 76}}, {"id": 374, "type": "parameter_declaration", "text": "uint8_t bitLength", "parent": 362, "children": [375, 376], "start_point": {"row": 42, "column": 78}, "end_point": {"row": 42, "column": 95}}, {"id": 375, "type": "primitive_type", "text": "uint8_t", "parent": 374, "children": [], "start_point": {"row": 42, "column": 78}, "end_point": {"row": 42, "column": 85}}, {"id": 376, "type": "identifier", "text": "bitLength", "parent": 374, "children": [], "start_point": {"row": 42, "column": 86}, "end_point": {"row": 42, "column": 95}}, {"id": 377, "type": "parameter_declaration", "text": "bool byteOrder", "parent": 362, "children": [378, 379], "start_point": {"row": 42, "column": 97}, "end_point": {"row": 42, "column": 111}}, {"id": 378, "type": "primitive_type", "text": "bool", "parent": 377, "children": [], "start_point": {"row": 42, "column": 97}, "end_point": {"row": 42, "column": 101}}, {"id": 379, "type": "identifier", "text": "byteOrder", "parent": 377, "children": [], "start_point": {"row": 42, "column": 102}, "end_point": {"row": 42, "column": 111}}, {"id": 380, "type": "parameter_declaration", "text": "bool sign", "parent": 362, "children": [381, 382], "start_point": {"row": 42, "column": 113}, "end_point": {"row": 42, "column": 122}}, {"id": 381, "type": "primitive_type", "text": "bool", "parent": 380, "children": [], "start_point": {"row": 42, "column": 113}, "end_point": {"row": 42, "column": 117}}, {"id": 382, "type": "identifier", "text": "sign", "parent": 380, "children": [], "start_point": {"row": 42, "column": 118}, "end_point": {"row": 42, "column": 122}}, {"id": 383, "type": "parameter_declaration", "text": "double Scale", "parent": 362, "children": [384, 385], "start_point": {"row": 42, "column": 124}, "end_point": {"row": 42, "column": 136}}, {"id": 384, "type": "primitive_type", "text": "double", "parent": 383, "children": [], "start_point": {"row": 42, "column": 124}, "end_point": {"row": 42, "column": 130}}, {"id": 385, "type": "identifier", "text": "Scale", "parent": 383, "children": [], "start_point": {"row": 42, "column": 131}, "end_point": {"row": 42, "column": 136}}, {"id": 386, "type": "parameter_declaration", "text": "double bias", "parent": 362, "children": [387, 388], "start_point": {"row": 42, "column": 138}, "end_point": {"row": 42, "column": 149}}, {"id": 387, "type": "primitive_type", "text": "double", "parent": 386, "children": [], "start_point": {"row": 42, "column": 138}, "end_point": {"row": 42, "column": 144}}, {"id": 388, "type": "identifier", "text": "bias", "parent": 386, "children": [], "start_point": {"row": 42, "column": 145}, "end_point": {"row": 42, "column": 149}}, {"id": 389, "type": "declaration", "text": "uint64_t inputData = 0x0000000000000000LU;", "parent": 358, "children": [390, 391], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 44}}, {"id": 390, "type": "primitive_type", "text": "uint64_t", "parent": 389, "children": [], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 10}}, {"id": 391, "type": "init_declarator", "text": "inputData = 0x0000000000000000LU", "parent": 389, "children": [392, 393, 394], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 43}}, {"id": 392, "type": "identifier", "text": "inputData", "parent": 391, "children": [], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 20}}, {"id": 393, "type": "=", "text": "=", "parent": 391, "children": [], "start_point": {"row": 44, "column": 21}, "end_point": {"row": 44, "column": 22}}, {"id": 394, "type": "number_literal", "text": "0x0000000000000000LU", "parent": 391, "children": [], "start_point": {"row": 44, "column": 23}, "end_point": {"row": 44, "column": 43}}, {"id": 395, "type": "assignment_expression", "text": "inputDataDouble = (1/Scale) * (inputDataDouble - bias)", "parent": 358, "children": [396, 397, 398], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 56}}, {"id": 396, "type": "identifier", "text": "inputDataDouble", "parent": 395, "children": [], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 17}}, {"id": 397, "type": "=", "text": "=", "parent": 395, "children": [], "start_point": {"row": 46, "column": 18}, "end_point": {"row": 46, "column": 19}}, {"id": 398, "type": "binary_expression", "text": "(1/Scale) * (inputDataDouble - bias)", "parent": 395, "children": [399, 404, 405], "start_point": {"row": 46, "column": 20}, "end_point": {"row": 46, "column": 56}}, {"id": 399, "type": "parenthesized_expression", "text": "(1/Scale)", "parent": 398, "children": [400], "start_point": {"row": 46, "column": 20}, "end_point": {"row": 46, "column": 29}}, {"id": 400, "type": "binary_expression", "text": "1/Scale", "parent": 399, "children": [401, 402, 403], "start_point": {"row": 46, "column": 21}, "end_point": {"row": 46, "column": 28}}, {"id": 401, "type": "number_literal", "text": "1", "parent": 400, "children": [], "start_point": {"row": 46, "column": 21}, "end_point": {"row": 46, "column": 22}}, {"id": 402, "type": "/", "text": "/", "parent": 400, "children": [], "start_point": {"row": 46, "column": 22}, "end_point": {"row": 46, "column": 23}}, {"id": 403, "type": "identifier", "text": "Scale", "parent": 400, "children": [], "start_point": {"row": 46, "column": 23}, "end_point": {"row": 46, "column": 28}}, {"id": 404, "type": "*", "text": "*", "parent": 398, "children": [], "start_point": {"row": 46, "column": 30}, "end_point": {"row": 46, "column": 31}}, {"id": 405, "type": "parenthesized_expression", "text": "(inputDataDouble - bias)", "parent": 398, "children": [406], "start_point": {"row": 46, "column": 32}, "end_point": {"row": 46, "column": 56}}, {"id": 406, "type": "binary_expression", "text": "inputDataDouble - bias", "parent": 405, "children": [407, 408, 409], "start_point": {"row": 46, "column": 33}, "end_point": {"row": 46, "column": 55}}, {"id": 407, "type": "identifier", "text": "inputDataDouble", "parent": 406, "children": [], "start_point": {"row": 46, "column": 33}, "end_point": {"row": 46, "column": 48}}, {"id": 408, "type": "-", "text": "-", "parent": 406, "children": [], "start_point": {"row": 46, "column": 49}, "end_point": {"row": 46, "column": 50}}, {"id": 409, "type": "identifier", "text": "bias", "parent": 406, "children": [], "start_point": {"row": 46, "column": 51}, "end_point": {"row": 46, "column": 55}}, {"id": 410, "type": "declaration", "text": "uint64_t maxVal = 1;", "parent": 358, "children": [411, 412], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 22}}, {"id": 411, "type": "primitive_type", "text": "uint64_t", "parent": 410, "children": [], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 10}}, {"id": 412, "type": "init_declarator", "text": "maxVal = 1", "parent": 410, "children": [413, 414, 415], "start_point": {"row": 47, "column": 11}, "end_point": {"row": 47, "column": 21}}, {"id": 413, "type": "identifier", "text": "maxVal", "parent": 412, "children": [], "start_point": {"row": 47, "column": 11}, "end_point": {"row": 47, "column": 17}}, {"id": 414, "type": "=", "text": "=", "parent": 412, "children": [], "start_point": {"row": 47, "column": 18}, "end_point": {"row": 47, "column": 19}}, {"id": 415, "type": "number_literal", "text": "1", "parent": 412, "children": [], "start_point": {"row": 47, "column": 20}, "end_point": {"row": 47, "column": 21}}, {"id": 416, "type": "for_statement", "text": "for(int i=0; i<bitLength; i++) {\n maxVal *= 2;\n }", "parent": 358, "children": [417, 423, 427], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 50, "column": 3}}, {"id": 417, "type": "declaration", "text": "int i=0;", "parent": 416, "children": [418, 419], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 14}}, {"id": 418, "type": "primitive_type", "text": "int", "parent": 417, "children": [], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 9}}, {"id": 419, "type": "init_declarator", "text": "i=0", "parent": 417, "children": [420, 421, 422], "start_point": {"row": 48, "column": 10}, "end_point": {"row": 48, "column": 13}}, {"id": 420, "type": "identifier", "text": "i", "parent": 419, "children": [], "start_point": {"row": 48, "column": 10}, "end_point": {"row": 48, "column": 11}}, {"id": 421, "type": "=", "text": "=", "parent": 419, "children": [], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 12}}, {"id": 422, "type": "number_literal", "text": "0", "parent": 419, "children": [], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 48, "column": 13}}, {"id": 423, "type": "binary_expression", "text": "i<bitLength", "parent": 416, "children": [424, 425, 426], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 26}}, {"id": 424, "type": "identifier", "text": "i", "parent": 423, "children": [], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 16}}, {"id": 425, "type": "<", "text": "<", "parent": 423, "children": [], "start_point": {"row": 48, "column": 16}, "end_point": {"row": 48, "column": 17}}, {"id": 426, "type": "identifier", "text": "bitLength", "parent": 423, "children": [], "start_point": {"row": 48, "column": 17}, "end_point": {"row": 48, "column": 26}}, {"id": 427, "type": "update_expression", "text": "i++", "parent": 416, "children": [428, 429], "start_point": {"row": 48, "column": 28}, "end_point": {"row": 48, "column": 31}}, {"id": 428, "type": "identifier", "text": "i", "parent": 427, "children": [], "start_point": {"row": 48, "column": 28}, "end_point": {"row": 48, "column": 29}}, {"id": 429, "type": "++", "text": "++", "parent": 427, "children": [], "start_point": {"row": 48, "column": 29}, "end_point": {"row": 48, "column": 31}}, {"id": 430, "type": "assignment_expression", "text": "maxVal *= 2", "parent": 416, "children": [431, 432, 433], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 15}}, {"id": 431, "type": "identifier", "text": "maxVal", "parent": 430, "children": [], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 10}}, {"id": 432, "type": "*=", "text": "*=", "parent": 430, "children": [], "start_point": {"row": 49, "column": 11}, "end_point": {"row": 49, "column": 13}}, {"id": 433, "type": "number_literal", "text": "2", "parent": 430, "children": [], "start_point": {"row": 49, "column": 14}, "end_point": {"row": 49, "column": 15}}, {"id": 434, "type": "if_statement", "text": "if(sign) {\n if(inputDataDouble < 0) {\n inputDataDouble += maxVal;\n }\n inputData = inputDataDouble;\n }\n else\n inputData = inputDataDouble;", "parent": 358, "children": [435, 451], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 59, "column": 32}}, {"id": 435, "type": "parenthesized_expression", "text": "(sign)", "parent": 434, "children": [436], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 10}}, {"id": 436, "type": "identifier", "text": "sign", "parent": 435, "children": [], "start_point": {"row": 52, "column": 5}, "end_point": {"row": 52, "column": 9}}, {"id": 437, "type": "if_statement", "text": "if(inputDataDouble < 0) {\n inputDataDouble += maxVal;\n }", "parent": 434, "children": [438], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 55, "column": 5}}, {"id": 438, "type": "parenthesized_expression", "text": "(inputDataDouble < 0)", "parent": 437, "children": [439], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 27}}, {"id": 439, "type": "binary_expression", "text": "inputDataDouble < 0", "parent": 438, "children": [440, 441, 442], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 26}}, {"id": 440, "type": "identifier", "text": "inputDataDouble", "parent": 439, "children": [], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 22}}, {"id": 441, "type": "<", "text": "<", "parent": 439, "children": [], "start_point": {"row": 53, "column": 23}, "end_point": {"row": 53, "column": 24}}, {"id": 442, "type": "number_literal", "text": "0", "parent": 439, "children": [], "start_point": {"row": 53, "column": 25}, "end_point": {"row": 53, "column": 26}}, {"id": 443, "type": "assignment_expression", "text": "inputDataDouble += maxVal", "parent": 437, "children": [444, 445, 446], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 31}}, {"id": 444, "type": "identifier", "text": "inputDataDouble", "parent": 443, "children": [], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 21}}, {"id": 445, "type": "+=", "text": "+=", "parent": 443, "children": [], "start_point": {"row": 54, "column": 22}, "end_point": {"row": 54, "column": 24}}, {"id": 446, "type": "identifier", "text": "maxVal", "parent": 443, "children": [], "start_point": {"row": 54, "column": 25}, "end_point": {"row": 54, "column": 31}}, {"id": 447, "type": "assignment_expression", "text": "inputData = inputDataDouble", "parent": 434, "children": [448, 449, 450], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 31}}, {"id": 448, "type": "identifier", "text": "inputData", "parent": 447, "children": [], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 13}}, {"id": 449, "type": "=", "text": "=", "parent": 447, "children": [], "start_point": {"row": 56, "column": 14}, "end_point": {"row": 56, "column": 15}}, {"id": 450, "type": "identifier", "text": "inputDataDouble", "parent": 447, "children": [], "start_point": {"row": 56, "column": 16}, "end_point": {"row": 56, "column": 31}}, {"id": 451, "type": "else_clause", "text": "else\n inputData = inputDataDouble;", "parent": 434, "children": [], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 59, "column": 32}}, {"id": 452, "type": "assignment_expression", "text": "inputData = inputDataDouble", "parent": 451, "children": [453, 454, 455], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 31}}, {"id": 453, "type": "identifier", "text": "inputData", "parent": 452, "children": [], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 13}}, {"id": 454, "type": "=", "text": "=", "parent": 452, "children": [], "start_point": {"row": 59, "column": 14}, "end_point": {"row": 59, "column": 15}}, {"id": 455, "type": "identifier", "text": "inputDataDouble", "parent": 452, "children": [], "start_point": {"row": 59, "column": 16}, "end_point": {"row": 59, "column": 31}}, {"id": 456, "type": "if_statement", "text": "if(inputData > (maxVal-1)) {\n inputData = (maxVal-1);\n }\n else if(inputData < 0){\n inputData = 0;\n }", "parent": 358, "children": [457, 474], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 66, "column": 3}}, {"id": 457, "type": "parenthesized_expression", "text": "(inputData > (maxVal-1))", "parent": 456, "children": [458], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 28}}, {"id": 458, "type": "binary_expression", "text": "inputData > (maxVal-1)", "parent": 457, "children": [459, 460, 461], "start_point": {"row": 61, "column": 5}, "end_point": {"row": 61, "column": 27}}, {"id": 459, "type": "identifier", "text": "inputData", "parent": 458, "children": [], "start_point": {"row": 61, "column": 5}, "end_point": {"row": 61, "column": 14}}, {"id": 460, "type": ">", "text": ">", "parent": 458, "children": [], "start_point": {"row": 61, "column": 15}, "end_point": {"row": 61, "column": 16}}, {"id": 461, "type": "parenthesized_expression", "text": "(maxVal-1)", "parent": 458, "children": [462], "start_point": {"row": 61, "column": 17}, "end_point": {"row": 61, "column": 27}}, {"id": 462, "type": "binary_expression", "text": "maxVal-1", "parent": 461, "children": [463, 464, 465], "start_point": {"row": 61, "column": 18}, "end_point": {"row": 61, "column": 26}}, {"id": 463, "type": "identifier", "text": "maxVal", "parent": 462, "children": [], "start_point": {"row": 61, "column": 18}, "end_point": {"row": 61, "column": 24}}, {"id": 464, "type": "-", "text": "-", "parent": 462, "children": [], "start_point": {"row": 61, "column": 24}, "end_point": {"row": 61, "column": 25}}, {"id": 465, "type": "number_literal", "text": "1", "parent": 462, "children": [], "start_point": {"row": 61, "column": 25}, "end_point": {"row": 61, "column": 26}}, {"id": 466, "type": "assignment_expression", "text": "inputData = (maxVal-1)", "parent": 456, "children": [467, 468, 469], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 26}}, {"id": 467, "type": "identifier", "text": "inputData", "parent": 466, "children": [], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 13}}, {"id": 468, "type": "=", "text": "=", "parent": 466, "children": [], "start_point": {"row": 62, "column": 14}, "end_point": {"row": 62, "column": 15}}, {"id": 469, "type": "parenthesized_expression", "text": "(maxVal-1)", "parent": 466, "children": [470], "start_point": {"row": 62, "column": 16}, "end_point": {"row": 62, "column": 26}}, {"id": 470, "type": "binary_expression", "text": "maxVal-1", "parent": 469, "children": [471, 472, 473], "start_point": {"row": 62, "column": 17}, "end_point": {"row": 62, "column": 25}}, {"id": 471, "type": "identifier", "text": "maxVal", "parent": 470, "children": [], "start_point": {"row": 62, "column": 17}, "end_point": {"row": 62, "column": 23}}, {"id": 472, "type": "-", "text": "-", "parent": 470, "children": [], "start_point": {"row": 62, "column": 23}, "end_point": {"row": 62, "column": 24}}, {"id": 473, "type": "number_literal", "text": "1", "parent": 470, "children": [], "start_point": {"row": 62, "column": 24}, "end_point": {"row": 62, "column": 25}}, {"id": 474, "type": "else_clause", "text": "else if(inputData < 0){\n inputData = 0;\n }", "parent": 456, "children": [475], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 66, "column": 3}}, {"id": 475, "type": "if_statement", "text": "if(inputData < 0){\n inputData = 0;\n }", "parent": 474, "children": [476], "start_point": {"row": 64, "column": 7}, "end_point": {"row": 66, "column": 3}}, {"id": 476, "type": "parenthesized_expression", "text": "(inputData < 0)", "parent": 475, "children": [477], "start_point": {"row": 64, "column": 9}, "end_point": {"row": 64, "column": 24}}, {"id": 477, "type": "binary_expression", "text": "inputData < 0", "parent": 476, "children": [478, 479, 480], "start_point": {"row": 64, "column": 10}, "end_point": {"row": 64, "column": 23}}, {"id": 478, "type": "identifier", "text": "inputData", "parent": 477, "children": [], "start_point": {"row": 64, "column": 10}, "end_point": {"row": 64, "column": 19}}, {"id": 479, "type": "<", "text": "<", "parent": 477, "children": [], "start_point": {"row": 64, "column": 20}, "end_point": {"row": 64, "column": 21}}, {"id": 480, "type": "number_literal", "text": "0", "parent": 477, "children": [], "start_point": {"row": 64, "column": 22}, "end_point": {"row": 64, "column": 23}}, {"id": 481, "type": "assignment_expression", "text": "inputData = 0", "parent": 475, "children": [482, 483, 484], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 17}}, {"id": 482, "type": "identifier", "text": "inputData", "parent": 481, "children": [], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 13}}, {"id": 483, "type": "=", "text": "=", "parent": 481, "children": [], "start_point": {"row": 65, "column": 14}, "end_point": {"row": 65, "column": 15}}, {"id": 484, "type": "number_literal", "text": "0", "parent": 481, "children": [], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 17}}, {"id": 485, "type": "declaration", "text": "uint8_t *bytePointer = (uint8_t *)&inputData;", "parent": 358, "children": [486, 487], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 47}}, {"id": 486, "type": "primitive_type", "text": "uint8_t", "parent": 485, "children": [], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 9}}, {"id": 487, "type": "init_declarator", "text": "*bytePointer = (uint8_t *)&inputData", "parent": 485, "children": [488, 491, 492], "start_point": {"row": 69, "column": 10}, "end_point": {"row": 69, "column": 46}}, {"id": 488, "type": "pointer_declarator", "text": "*bytePointer", "parent": 487, "children": [489, 490], "start_point": {"row": 69, "column": 10}, "end_point": {"row": 69, "column": 22}}, {"id": 489, "type": "*", "text": "*", "parent": 488, "children": [], "start_point": {"row": 69, "column": 10}, "end_point": {"row": 69, "column": 11}}, {"id": 490, "type": "identifier", "text": "bytePointer", "parent": 488, "children": [], "start_point": {"row": 69, "column": 11}, "end_point": {"row": 69, "column": 22}}, {"id": 491, "type": "=", "text": "=", "parent": 487, "children": [], "start_point": {"row": 69, "column": 23}, "end_point": {"row": 69, "column": 24}}, {"id": 492, "type": "cast_expression", "text": "(uint8_t *)&inputData", "parent": 487, "children": [493, 497], "start_point": {"row": 69, "column": 25}, "end_point": {"row": 69, "column": 46}}, {"id": 493, "type": "type_descriptor", "text": "uint8_t *", "parent": 492, "children": [494, 495], "start_point": {"row": 69, "column": 26}, "end_point": {"row": 69, "column": 35}}, {"id": 494, "type": "primitive_type", "text": "uint8_t", "parent": 493, "children": [], "start_point": {"row": 69, "column": 26}, "end_point": {"row": 69, "column": 33}}, {"id": 495, "type": "abstract_pointer_declarator", "text": "*", "parent": 493, "children": [496], "start_point": {"row": 69, "column": 34}, "end_point": {"row": 69, "column": 35}}, {"id": 496, "type": "*", "text": "*", "parent": 495, "children": [], "start_point": {"row": 69, "column": 34}, "end_point": {"row": 69, "column": 35}}, {"id": 497, "type": "pointer_expression", "text": "&inputData", "parent": 492, "children": [498], "start_point": {"row": 69, "column": 36}, "end_point": {"row": 69, "column": 46}}, {"id": 498, "type": "identifier", "text": "inputData", "parent": 497, "children": [], "start_point": {"row": 69, "column": 37}, "end_point": {"row": 69, "column": 46}}, {"id": 499, "type": "if_statement", "text": "if(byteOrder) {\n //locate MSB\n uint8_t trueLen = bitSize(inputData);\n //if more bits are present than can be accomodated cut them off\n if(trueLen > bitLength) {\n inputData = inputData >> (trueLen - bitLength);\n }\n //Shift buf to 64th position\n inputData = inputData << (64 - bitLength);\n\n //Reverse int\n inputData = reverse64(inputData);\n //calculate altered start position and move\n uint8_t calcStartbit = (7 - startBit%8) + 8*(startBit/8);\n inputData = inputData << calcStartbit;\n \n //reverse each byte and move to appropriate place\n for(int i=0; i<8; i++) {\n msg->buf[i] |= reverse8(bytePointer[i]);\n }\n }else {\n //Shift buf to appropriate place\n inputData = inputData << startBit;\n //push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= bytePointer[i];\n }\n }", "parent": 358, "children": [500, 603], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 98, "column": 3}}, {"id": 500, "type": "parenthesized_expression", "text": "(byteOrder)", "parent": 499, "children": [501], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 15}}, {"id": 501, "type": "identifier", "text": "byteOrder", "parent": 500, "children": [], "start_point": {"row": 71, "column": 5}, "end_point": {"row": 71, "column": 14}}, {"id": 502, "type": "declaration", "text": "uint8_t trueLen = bitSize(inputData);", "parent": 499, "children": [503, 504], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 41}}, {"id": 503, "type": "primitive_type", "text": "uint8_t", "parent": 502, "children": [], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 11}}, {"id": 504, "type": "init_declarator", "text": "trueLen = bitSize(inputData)", "parent": 502, "children": [505, 506, 507], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 40}}, {"id": 505, "type": "identifier", "text": "trueLen", "parent": 504, "children": [], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 19}}, {"id": 506, "type": "=", "text": "=", "parent": 504, "children": [], "start_point": {"row": 73, "column": 20}, "end_point": {"row": 73, "column": 21}}, {"id": 507, "type": "call_expression", "text": "bitSize(inputData)", "parent": 504, "children": [508, 509], "start_point": {"row": 73, "column": 22}, "end_point": {"row": 73, "column": 40}}, {"id": 508, "type": "identifier", "text": "bitSize", "parent": 507, "children": [], "start_point": {"row": 73, "column": 22}, "end_point": {"row": 73, "column": 29}}, {"id": 509, "type": "argument_list", "text": "(inputData)", "parent": 507, "children": [510], "start_point": {"row": 73, "column": 29}, "end_point": {"row": 73, "column": 40}}, {"id": 510, "type": "identifier", "text": "inputData", "parent": 509, "children": [], "start_point": {"row": 73, "column": 30}, "end_point": {"row": 73, "column": 39}}, {"id": 511, "type": "if_statement", "text": "if(trueLen > bitLength) {\n inputData = inputData >> (trueLen - bitLength);\n }", "parent": 499, "children": [512], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 77, "column": 5}}, {"id": 512, "type": "parenthesized_expression", "text": "(trueLen > bitLength)", "parent": 511, "children": [513], "start_point": {"row": 75, "column": 6}, "end_point": {"row": 75, "column": 27}}, {"id": 513, "type": "binary_expression", "text": "trueLen > bitLength", "parent": 512, "children": [514, 515, 516], "start_point": {"row": 75, "column": 7}, "end_point": {"row": 75, "column": 26}}, {"id": 514, "type": "identifier", "text": "trueLen", "parent": 513, "children": [], "start_point": {"row": 75, "column": 7}, "end_point": {"row": 75, "column": 14}}, {"id": 515, "type": ">", "text": ">", "parent": 513, "children": [], "start_point": {"row": 75, "column": 15}, "end_point": {"row": 75, "column": 16}}, {"id": 516, "type": "identifier", "text": "bitLength", "parent": 513, "children": [], "start_point": {"row": 75, "column": 17}, "end_point": {"row": 75, "column": 26}}, {"id": 517, "type": "assignment_expression", "text": "inputData = inputData >> (trueLen - bitLength)", "parent": 511, "children": [518, 519, 520], "start_point": {"row": 76, "column": 6}, "end_point": {"row": 76, "column": 52}}, {"id": 518, "type": "identifier", "text": "inputData", "parent": 517, "children": [], "start_point": {"row": 76, "column": 6}, "end_point": {"row": 76, "column": 15}}, {"id": 519, "type": "=", "text": "=", "parent": 517, "children": [], "start_point": {"row": 76, "column": 16}, "end_point": {"row": 76, "column": 17}}, {"id": 520, "type": "binary_expression", "text": "inputData >> (trueLen - bitLength)", "parent": 517, "children": [521, 522, 523], "start_point": {"row": 76, "column": 18}, "end_point": {"row": 76, "column": 52}}, {"id": 521, "type": "identifier", "text": "inputData", "parent": 520, "children": [], "start_point": {"row": 76, "column": 18}, "end_point": {"row": 76, "column": 27}}, {"id": 522, "type": ">>", "text": ">>", "parent": 520, "children": [], "start_point": {"row": 76, "column": 28}, "end_point": {"row": 76, "column": 30}}, {"id": 523, "type": "parenthesized_expression", "text": "(trueLen - bitLength)", "parent": 520, "children": [524], "start_point": {"row": 76, "column": 31}, "end_point": {"row": 76, "column": 52}}, {"id": 524, "type": "binary_expression", "text": "trueLen - bitLength", "parent": 523, "children": [525, 526, 527], "start_point": {"row": 76, "column": 32}, "end_point": {"row": 76, "column": 51}}, {"id": 525, "type": "identifier", "text": "trueLen", "parent": 524, "children": [], "start_point": {"row": 76, "column": 32}, "end_point": {"row": 76, "column": 39}}, {"id": 526, "type": "-", "text": "-", "parent": 524, "children": [], "start_point": {"row": 76, "column": 40}, "end_point": {"row": 76, "column": 41}}, {"id": 527, "type": "identifier", "text": "bitLength", "parent": 524, "children": [], "start_point": {"row": 76, "column": 42}, "end_point": {"row": 76, "column": 51}}, {"id": 528, "type": "assignment_expression", "text": "inputData = inputData << (64 - bitLength)", "parent": 499, "children": [529, 530, 531], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 79, "column": 45}}, {"id": 529, "type": "identifier", "text": "inputData", "parent": 528, "children": [], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 79, "column": 13}}, {"id": 530, "type": "=", "text": "=", "parent": 528, "children": [], "start_point": {"row": 79, "column": 14}, "end_point": {"row": 79, "column": 15}}, {"id": 531, "type": "binary_expression", "text": "inputData << (64 - bitLength)", "parent": 528, "children": [532, 533, 534], "start_point": {"row": 79, "column": 16}, "end_point": {"row": 79, "column": 45}}, {"id": 532, "type": "identifier", "text": "inputData", "parent": 531, "children": [], "start_point": {"row": 79, "column": 16}, "end_point": {"row": 79, "column": 25}}, {"id": 533, "type": "<<", "text": "<<", "parent": 531, "children": [], "start_point": {"row": 79, "column": 26}, "end_point": {"row": 79, "column": 28}}, {"id": 534, "type": "parenthesized_expression", "text": "(64 - bitLength)", "parent": 531, "children": [535], "start_point": {"row": 79, "column": 29}, "end_point": {"row": 79, "column": 45}}, {"id": 535, "type": "binary_expression", "text": "64 - bitLength", "parent": 534, "children": [536, 537, 538], "start_point": {"row": 79, "column": 30}, "end_point": {"row": 79, "column": 44}}, {"id": 536, "type": "number_literal", "text": "64", "parent": 535, "children": [], "start_point": {"row": 79, "column": 30}, "end_point": {"row": 79, "column": 32}}, {"id": 537, "type": "-", "text": "-", "parent": 535, "children": [], "start_point": {"row": 79, "column": 33}, "end_point": {"row": 79, "column": 34}}, {"id": 538, "type": "identifier", "text": "bitLength", "parent": 535, "children": [], "start_point": {"row": 79, "column": 35}, "end_point": {"row": 79, "column": 44}}, {"id": 539, "type": "assignment_expression", "text": "inputData = reverse64(inputData)", "parent": 499, "children": [540, 541, 542], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 36}}, {"id": 540, "type": "identifier", "text": "inputData", "parent": 539, "children": [], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 13}}, {"id": 541, "type": "=", "text": "=", "parent": 539, "children": [], "start_point": {"row": 82, "column": 14}, "end_point": {"row": 82, "column": 15}}, {"id": 542, "type": "call_expression", "text": "reverse64(inputData)", "parent": 539, "children": [543, 544], "start_point": {"row": 82, "column": 16}, "end_point": {"row": 82, "column": 36}}, {"id": 543, "type": "identifier", "text": "reverse64", "parent": 542, "children": [], "start_point": {"row": 82, "column": 16}, "end_point": {"row": 82, "column": 25}}, {"id": 544, "type": "argument_list", "text": "(inputData)", "parent": 542, "children": [545], "start_point": {"row": 82, "column": 25}, "end_point": {"row": 82, "column": 36}}, {"id": 545, "type": "identifier", "text": "inputData", "parent": 544, "children": [], "start_point": {"row": 82, "column": 26}, "end_point": {"row": 82, "column": 35}}, {"id": 546, "type": "declaration", "text": "uint8_t calcStartbit = (7 - startBit%8) + 8*(startBit/8);", "parent": 499, "children": [547, 548], "start_point": {"row": 84, "column": 4}, "end_point": {"row": 84, "column": 61}}, {"id": 547, "type": "primitive_type", "text": "uint8_t", "parent": 546, "children": [], "start_point": {"row": 84, "column": 4}, "end_point": {"row": 84, "column": 11}}, {"id": 548, "type": "init_declarator", "text": "calcStartbit = (7 - startBit%8) + 8*(startBit/8)", "parent": 546, "children": [549, 550, 551], "start_point": {"row": 84, "column": 12}, "end_point": {"row": 84, "column": 60}}, {"id": 549, "type": "identifier", "text": "calcStartbit", "parent": 548, "children": [], "start_point": {"row": 84, "column": 12}, "end_point": {"row": 84, "column": 24}}, {"id": 550, "type": "=", "text": "=", "parent": 548, "children": [], "start_point": {"row": 84, "column": 25}, "end_point": {"row": 84, "column": 26}}, {"id": 551, "type": "binary_expression", "text": "(7 - startBit%8) + 8*(startBit/8)", "parent": 548, "children": [552, 560, 561], "start_point": {"row": 84, "column": 27}, "end_point": {"row": 84, "column": 60}}, {"id": 552, "type": "parenthesized_expression", "text": "(7 - startBit%8)", "parent": 551, "children": [553], "start_point": {"row": 84, "column": 27}, "end_point": {"row": 84, "column": 43}}, {"id": 553, "type": "binary_expression", "text": "7 - startBit%8", "parent": 552, "children": [554, 555, 556], "start_point": {"row": 84, "column": 28}, "end_point": {"row": 84, "column": 42}}, {"id": 554, "type": "number_literal", "text": "7", "parent": 553, "children": [], "start_point": {"row": 84, "column": 28}, "end_point": {"row": 84, "column": 29}}, {"id": 555, "type": "-", "text": "-", "parent": 553, "children": [], "start_point": {"row": 84, "column": 30}, "end_point": {"row": 84, "column": 31}}, {"id": 556, "type": "binary_expression", "text": "startBit%8", "parent": 553, "children": [557, 558, 559], "start_point": {"row": 84, "column": 32}, "end_point": {"row": 84, "column": 42}}, {"id": 557, "type": "identifier", "text": "startBit", "parent": 556, "children": [], "start_point": {"row": 84, "column": 32}, "end_point": {"row": 84, "column": 40}}, {"id": 558, "type": "%", "text": "%", "parent": 556, "children": [], "start_point": {"row": 84, "column": 40}, "end_point": {"row": 84, "column": 41}}, {"id": 559, "type": "number_literal", "text": "8", "parent": 556, "children": [], "start_point": {"row": 84, "column": 41}, "end_point": {"row": 84, "column": 42}}, {"id": 560, "type": "+", "text": "+", "parent": 551, "children": [], "start_point": {"row": 84, "column": 44}, "end_point": {"row": 84, "column": 45}}, {"id": 561, "type": "binary_expression", "text": "8*(startBit/8)", "parent": 551, "children": [562, 563, 564], "start_point": {"row": 84, "column": 46}, "end_point": {"row": 84, "column": 60}}, {"id": 562, "type": "number_literal", "text": "8", "parent": 561, "children": [], "start_point": {"row": 84, "column": 46}, "end_point": {"row": 84, "column": 47}}, {"id": 563, "type": "*", "text": "*", "parent": 561, "children": [], "start_point": {"row": 84, "column": 47}, "end_point": {"row": 84, "column": 48}}, {"id": 564, "type": "parenthesized_expression", "text": "(startBit/8)", "parent": 561, "children": [565], "start_point": {"row": 84, "column": 48}, "end_point": {"row": 84, "column": 60}}, {"id": 565, "type": "binary_expression", "text": "startBit/8", "parent": 564, "children": [566, 567, 568], "start_point": {"row": 84, "column": 49}, "end_point": {"row": 84, "column": 59}}, {"id": 566, "type": "identifier", "text": "startBit", "parent": 565, "children": [], "start_point": {"row": 84, "column": 49}, "end_point": {"row": 84, "column": 57}}, {"id": 567, "type": "/", "text": "/", "parent": 565, "children": [], "start_point": {"row": 84, "column": 57}, "end_point": {"row": 84, "column": 58}}, {"id": 568, "type": "number_literal", "text": "8", "parent": 565, "children": [], "start_point": {"row": 84, "column": 58}, "end_point": {"row": 84, "column": 59}}, {"id": 569, "type": "assignment_expression", "text": "inputData = inputData << calcStartbit", "parent": 499, "children": [570, 571, 572], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 41}}, {"id": 570, "type": "identifier", "text": "inputData", "parent": 569, "children": [], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 13}}, {"id": 571, "type": "=", "text": "=", "parent": 569, "children": [], "start_point": {"row": 85, "column": 14}, "end_point": {"row": 85, "column": 15}}, {"id": 572, "type": "binary_expression", "text": "inputData << calcStartbit", "parent": 569, "children": [573, 574, 575], "start_point": {"row": 85, "column": 16}, "end_point": {"row": 85, "column": 41}}, {"id": 573, "type": "identifier", "text": "inputData", "parent": 572, "children": [], "start_point": {"row": 85, "column": 16}, "end_point": {"row": 85, "column": 25}}, {"id": 574, "type": "<<", "text": "<<", "parent": 572, "children": [], "start_point": {"row": 85, "column": 26}, "end_point": {"row": 85, "column": 28}}, {"id": 575, "type": "identifier", "text": "calcStartbit", "parent": 572, "children": [], "start_point": {"row": 85, "column": 29}, "end_point": {"row": 85, "column": 41}}, {"id": 576, "type": "for_statement", "text": "for(int i=0; i<8; i++) {\n msg->buf[i] |= reverse8(bytePointer[i]);\n }", "parent": 499, "children": [577, 583, 587], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 90, "column": 5}}, {"id": 577, "type": "declaration", "text": "int i=0;", "parent": 576, "children": [578, 579], "start_point": {"row": 88, "column": 8}, "end_point": {"row": 88, "column": 16}}, {"id": 578, "type": "primitive_type", "text": "int", "parent": 577, "children": [], "start_point": {"row": 88, "column": 8}, "end_point": {"row": 88, "column": 11}}, {"id": 579, "type": "init_declarator", "text": "i=0", "parent": 577, "children": [580, 581, 582], "start_point": {"row": 88, "column": 12}, "end_point": {"row": 88, "column": 15}}, {"id": 580, "type": "identifier", "text": "i", "parent": 579, "children": [], "start_point": {"row": 88, "column": 12}, "end_point": {"row": 88, "column": 13}}, {"id": 581, "type": "=", "text": "=", "parent": 579, "children": [], "start_point": {"row": 88, "column": 13}, "end_point": {"row": 88, "column": 14}}, {"id": 582, "type": "number_literal", "text": "0", "parent": 579, "children": [], "start_point": {"row": 88, "column": 14}, "end_point": {"row": 88, "column": 15}}, {"id": 583, "type": "binary_expression", "text": "i<8", "parent": 576, "children": [584, 585, 586], "start_point": {"row": 88, "column": 17}, "end_point": {"row": 88, "column": 20}}, {"id": 584, "type": "identifier", "text": "i", "parent": 583, "children": [], "start_point": {"row": 88, "column": 17}, "end_point": {"row": 88, "column": 18}}, {"id": 585, "type": "<", "text": "<", "parent": 583, "children": [], "start_point": {"row": 88, "column": 18}, "end_point": {"row": 88, "column": 19}}, {"id": 586, "type": "number_literal", "text": "8", "parent": 583, "children": [], "start_point": {"row": 88, "column": 19}, "end_point": {"row": 88, "column": 20}}, {"id": 587, "type": "update_expression", "text": "i++", "parent": 576, "children": [588, 589], "start_point": {"row": 88, "column": 22}, "end_point": {"row": 88, "column": 25}}, {"id": 588, "type": "identifier", "text": "i", "parent": 587, "children": [], "start_point": {"row": 88, "column": 22}, "end_point": {"row": 88, "column": 23}}, {"id": 589, "type": "++", "text": "++", "parent": 587, "children": [], "start_point": {"row": 88, "column": 23}, "end_point": {"row": 88, "column": 25}}, {"id": 590, "type": "assignment_expression", "text": "msg->buf[i] |= reverse8(bytePointer[i])", "parent": 576, "children": [591, 596, 597], "start_point": {"row": 89, "column": 6}, "end_point": {"row": 89, "column": 45}}, {"id": 591, "type": "subscript_expression", "text": "msg->buf[i]", "parent": 590, "children": [592, 595], "start_point": {"row": 89, "column": 6}, "end_point": {"row": 89, "column": 17}}, {"id": 592, "type": "field_expression", "text": "msg->buf", "parent": 591, "children": [593, 594], "start_point": {"row": 89, "column": 6}, "end_point": {"row": 89, "column": 14}}, {"id": 593, "type": "identifier", "text": "msg", "parent": 592, "children": [], "start_point": {"row": 89, "column": 6}, "end_point": {"row": 89, "column": 9}}, {"id": 594, "type": "field_identifier", "text": "buf", "parent": 592, "children": [], "start_point": {"row": 89, "column": 11}, "end_point": {"row": 89, "column": 14}}, {"id": 595, "type": "identifier", "text": "i", "parent": 591, "children": [], "start_point": {"row": 89, "column": 15}, "end_point": {"row": 89, "column": 16}}, {"id": 596, "type": "|=", "text": "|=", "parent": 590, "children": [], "start_point": {"row": 89, "column": 18}, "end_point": {"row": 89, "column": 20}}, {"id": 597, "type": "call_expression", "text": "reverse8(bytePointer[i])", "parent": 590, "children": [598, 599], "start_point": {"row": 89, "column": 21}, "end_point": {"row": 89, "column": 45}}, {"id": 598, "type": "identifier", "text": "reverse8", "parent": 597, "children": [], "start_point": {"row": 89, "column": 21}, "end_point": {"row": 89, "column": 29}}, {"id": 599, "type": "argument_list", "text": "(bytePointer[i])", "parent": 597, "children": [600], "start_point": {"row": 89, "column": 29}, "end_point": {"row": 89, "column": 45}}, {"id": 600, "type": "subscript_expression", "text": "bytePointer[i]", "parent": 599, "children": [601, 602], "start_point": {"row": 89, "column": 30}, "end_point": {"row": 89, "column": 44}}, {"id": 601, "type": "identifier", "text": "bytePointer", "parent": 600, "children": [], "start_point": {"row": 89, "column": 30}, "end_point": {"row": 89, "column": 41}}, {"id": 602, "type": "identifier", "text": "i", "parent": 600, "children": [], "start_point": {"row": 89, "column": 42}, "end_point": {"row": 89, "column": 43}}, {"id": 603, "type": "else_clause", "text": "else {\n //Shift buf to appropriate place\n inputData = inputData << startBit;\n //push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= bytePointer[i];\n }\n }", "parent": 499, "children": [], "start_point": {"row": 91, "column": 3}, "end_point": {"row": 98, "column": 3}}, {"id": 604, "type": "assignment_expression", "text": "inputData = inputData << startBit", "parent": 603, "children": [605, 606, 607], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 93, "column": 37}}, {"id": 605, "type": "identifier", "text": "inputData", "parent": 604, "children": [], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 93, "column": 13}}, {"id": 606, "type": "=", "text": "=", "parent": 604, "children": [], "start_point": {"row": 93, "column": 14}, "end_point": {"row": 93, "column": 15}}, {"id": 607, "type": "binary_expression", "text": "inputData << startBit", "parent": 604, "children": [608, 609, 610], "start_point": {"row": 93, "column": 16}, "end_point": {"row": 93, "column": 37}}, {"id": 608, "type": "identifier", "text": "inputData", "parent": 607, "children": [], "start_point": {"row": 93, "column": 16}, "end_point": {"row": 93, "column": 25}}, {"id": 609, "type": "<<", "text": "<<", "parent": 607, "children": [], "start_point": {"row": 93, "column": 26}, "end_point": {"row": 93, "column": 28}}, {"id": 610, "type": "identifier", "text": "startBit", "parent": 607, "children": [], "start_point": {"row": 93, "column": 29}, "end_point": {"row": 93, "column": 37}}, {"id": 611, "type": "for_statement", "text": "for(int i=0; i<8; i++) {\n msg->buf[i] |= bytePointer[i];\n }", "parent": 603, "children": [612, 618, 622], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 97, "column": 5}}, {"id": 612, "type": "declaration", "text": "int i=0;", "parent": 611, "children": [613, 614], "start_point": {"row": 95, "column": 8}, "end_point": {"row": 95, "column": 16}}, {"id": 613, "type": "primitive_type", "text": "int", "parent": 612, "children": [], "start_point": {"row": 95, "column": 8}, "end_point": {"row": 95, "column": 11}}, {"id": 614, "type": "init_declarator", "text": "i=0", "parent": 612, "children": [615, 616, 617], "start_point": {"row": 95, "column": 12}, "end_point": {"row": 95, "column": 15}}, {"id": 615, "type": "identifier", "text": "i", "parent": 614, "children": [], "start_point": {"row": 95, "column": 12}, "end_point": {"row": 95, "column": 13}}, {"id": 616, "type": "=", "text": "=", "parent": 614, "children": [], "start_point": {"row": 95, "column": 13}, "end_point": {"row": 95, "column": 14}}, {"id": 617, "type": "number_literal", "text": "0", "parent": 614, "children": [], "start_point": {"row": 95, "column": 14}, "end_point": {"row": 95, "column": 15}}, {"id": 618, "type": "binary_expression", "text": "i<8", "parent": 611, "children": [619, 620, 621], "start_point": {"row": 95, "column": 17}, "end_point": {"row": 95, "column": 20}}, {"id": 619, "type": "identifier", "text": "i", "parent": 618, "children": [], "start_point": {"row": 95, "column": 17}, "end_point": {"row": 95, "column": 18}}, {"id": 620, "type": "<", "text": "<", "parent": 618, "children": [], "start_point": {"row": 95, "column": 18}, "end_point": {"row": 95, "column": 19}}, {"id": 621, "type": "number_literal", "text": "8", "parent": 618, "children": [], "start_point": {"row": 95, "column": 19}, "end_point": {"row": 95, "column": 20}}, {"id": 622, "type": "update_expression", "text": "i++", "parent": 611, "children": [623, 624], "start_point": {"row": 95, "column": 22}, "end_point": {"row": 95, "column": 25}}, {"id": 623, "type": "identifier", "text": "i", "parent": 622, "children": [], "start_point": {"row": 95, "column": 22}, "end_point": {"row": 95, "column": 23}}, {"id": 624, "type": "++", "text": "++", "parent": 622, "children": [], "start_point": {"row": 95, "column": 23}, "end_point": {"row": 95, "column": 25}}, {"id": 625, "type": "assignment_expression", "text": "msg->buf[i] |= bytePointer[i]", "parent": 611, "children": [626, 631, 632], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 35}}, {"id": 626, "type": "subscript_expression", "text": "msg->buf[i]", "parent": 625, "children": [627, 630], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 17}}, {"id": 627, "type": "field_expression", "text": "msg->buf", "parent": 626, "children": [628, 629], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 14}}, {"id": 628, "type": "identifier", "text": "msg", "parent": 627, "children": [], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 9}}, {"id": 629, "type": "field_identifier", "text": "buf", "parent": 627, "children": [], "start_point": {"row": 96, "column": 11}, "end_point": {"row": 96, "column": 14}}, {"id": 630, "type": "identifier", "text": "i", "parent": 626, "children": [], "start_point": {"row": 96, "column": 15}, "end_point": {"row": 96, "column": 16}}, {"id": 631, "type": "|=", "text": "|=", "parent": 625, "children": [], "start_point": {"row": 96, "column": 18}, "end_point": {"row": 96, "column": 20}}, {"id": 632, "type": "subscript_expression", "text": "bytePointer[i]", "parent": 625, "children": [633, 634], "start_point": {"row": 96, "column": 21}, "end_point": {"row": 96, "column": 35}}, {"id": 633, "type": "identifier", "text": "bytePointer", "parent": 632, "children": [], "start_point": {"row": 96, "column": 21}, "end_point": {"row": 96, "column": 32}}, {"id": 634, "type": "identifier", "text": "i", "parent": 632, "children": [], "start_point": {"row": 96, "column": 33}, "end_point": {"row": 96, "column": 34}}, {"id": 635, "type": "function_definition", "text": "void CAN_encode(CAN_message_t *msg, int inputDataInt, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias) { //byteOrder is 1 for MSB, 0 for LSB. Signed is 1 for signed, 0 for unsigned\n\n uint64_t inputData = 0x0000000000000000LU;\n //scale and bias\n inputDataInt = (1/Scale) * (inputDataInt - bias);\n //Sign value if appropriate\n uint64_t maxVal = 1;\n for(int i=0; i<bitLength; i++) {\n maxVal *= 2;\n }\n \n if(sign) {\n\n if(inputDataInt < 0) {\n inputDataInt += maxVal;\n }\n inputData = inputDataInt;\n }\n else\n inputData = inputDataInt;\n\n if(inputData > (maxVal-1)) {\n inputData = (maxVal-1);\n }\n else if(inputData < 0){\n inputData = 0;\n }\n //access input as byte array\n //take advantage of endianness\n uint8_t *bytePointer = (uint8_t *)&inputData;\n\n if(byteOrder) {\n //locate MSB\n uint8_t trueLen = bitSize(inputData);\n //if more bits are present than can be accomodated cut them off\n if(trueLen > bitLength) {\n inputData = inputData >> (trueLen - bitLength);\n }\n //Shift buf to 64th position\n inputData = inputData << (64 - bitLength);\n\n //Reverse int\n inputData = reverse64(inputData);\n uint8_t calcStartbit = (7 - startBit%8) + 8*(startBit/8);\n inputData = inputData << calcStartbit;\n //reverse each byte and push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= reverse8(bytePointer[i]);\n }\n }else {\n //Shift buf to appropriate place\n inputData = inputData << startBit;\n //push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= bytePointer[i];\n }\n }\n}", "parent": null, "children": [636, 637], "start_point": {"row": 101, "column": 0}, "end_point": {"row": 158, "column": 1}}, {"id": 636, "type": "primitive_type", "text": "void", "parent": 635, "children": [], "start_point": {"row": 101, "column": 0}, "end_point": {"row": 101, "column": 4}}, {"id": 637, "type": "function_declarator", "text": "CAN_encode(CAN_message_t *msg, int inputDataInt, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias)", "parent": 635, "children": [638, 639], "start_point": {"row": 101, "column": 5}, "end_point": {"row": 101, "column": 144}}, {"id": 638, "type": "identifier", "text": "CAN_encode", "parent": 637, "children": [], "start_point": {"row": 101, "column": 5}, "end_point": {"row": 101, "column": 15}}, {"id": 639, "type": "parameter_list", "text": "(CAN_message_t *msg, int inputDataInt, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias)", "parent": 637, "children": [640, 645, 648, 651, 654, 657, 660, 663], "start_point": {"row": 101, "column": 15}, "end_point": {"row": 101, "column": 144}}, {"id": 640, "type": "parameter_declaration", "text": "CAN_message_t *msg", "parent": 639, "children": [641, 642], "start_point": {"row": 101, "column": 16}, "end_point": {"row": 101, "column": 34}}, {"id": 641, "type": "type_identifier", "text": "CAN_message_t", "parent": 640, "children": [], "start_point": {"row": 101, "column": 16}, "end_point": {"row": 101, "column": 29}}, {"id": 642, "type": "pointer_declarator", "text": "*msg", "parent": 640, "children": [643, 644], "start_point": {"row": 101, "column": 30}, "end_point": {"row": 101, "column": 34}}, {"id": 643, "type": "*", "text": "*", "parent": 642, "children": [], "start_point": {"row": 101, "column": 30}, "end_point": {"row": 101, "column": 31}}, {"id": 644, "type": "identifier", "text": "msg", "parent": 642, "children": [], "start_point": {"row": 101, "column": 31}, "end_point": {"row": 101, "column": 34}}, {"id": 645, "type": "parameter_declaration", "text": "int inputDataInt", "parent": 639, "children": [646, 647], "start_point": {"row": 101, "column": 36}, "end_point": {"row": 101, "column": 52}}, {"id": 646, "type": "primitive_type", "text": "int", "parent": 645, "children": [], "start_point": {"row": 101, "column": 36}, "end_point": {"row": 101, "column": 39}}, {"id": 647, "type": "identifier", "text": "inputDataInt", "parent": 645, "children": [], "start_point": {"row": 101, "column": 40}, "end_point": {"row": 101, "column": 52}}, {"id": 648, "type": "parameter_declaration", "text": "uint8_t startBit", "parent": 639, "children": [649, 650], "start_point": {"row": 101, "column": 54}, "end_point": {"row": 101, "column": 70}}, {"id": 649, "type": "primitive_type", "text": "uint8_t", "parent": 648, "children": [], "start_point": {"row": 101, "column": 54}, "end_point": {"row": 101, "column": 61}}, {"id": 650, "type": "identifier", "text": "startBit", "parent": 648, "children": [], "start_point": {"row": 101, "column": 62}, "end_point": {"row": 101, "column": 70}}, {"id": 651, "type": "parameter_declaration", "text": "uint8_t bitLength", "parent": 639, "children": [652, 653], "start_point": {"row": 101, "column": 72}, "end_point": {"row": 101, "column": 89}}, {"id": 652, "type": "primitive_type", "text": "uint8_t", "parent": 651, "children": [], "start_point": {"row": 101, "column": 72}, "end_point": {"row": 101, "column": 79}}, {"id": 653, "type": "identifier", "text": "bitLength", "parent": 651, "children": [], "start_point": {"row": 101, "column": 80}, "end_point": {"row": 101, "column": 89}}, {"id": 654, "type": "parameter_declaration", "text": "bool byteOrder", "parent": 639, "children": [655, 656], "start_point": {"row": 101, "column": 91}, "end_point": {"row": 101, "column": 105}}, {"id": 655, "type": "primitive_type", "text": "bool", "parent": 654, "children": [], "start_point": {"row": 101, "column": 91}, "end_point": {"row": 101, "column": 95}}, {"id": 656, "type": "identifier", "text": "byteOrder", "parent": 654, "children": [], "start_point": {"row": 101, "column": 96}, "end_point": {"row": 101, "column": 105}}, {"id": 657, "type": "parameter_declaration", "text": "bool sign", "parent": 639, "children": [658, 659], "start_point": {"row": 101, "column": 107}, "end_point": {"row": 101, "column": 116}}, {"id": 658, "type": "primitive_type", "text": "bool", "parent": 657, "children": [], "start_point": {"row": 101, "column": 107}, "end_point": {"row": 101, "column": 111}}, {"id": 659, "type": "identifier", "text": "sign", "parent": 657, "children": [], "start_point": {"row": 101, "column": 112}, "end_point": {"row": 101, "column": 116}}, {"id": 660, "type": "parameter_declaration", "text": "double Scale", "parent": 639, "children": [661, 662], "start_point": {"row": 101, "column": 118}, "end_point": {"row": 101, "column": 130}}, {"id": 661, "type": "primitive_type", "text": "double", "parent": 660, "children": [], "start_point": {"row": 101, "column": 118}, "end_point": {"row": 101, "column": 124}}, {"id": 662, "type": "identifier", "text": "Scale", "parent": 660, "children": [], "start_point": {"row": 101, "column": 125}, "end_point": {"row": 101, "column": 130}}, {"id": 663, "type": "parameter_declaration", "text": "double bias", "parent": 639, "children": [664, 665], "start_point": {"row": 101, "column": 132}, "end_point": {"row": 101, "column": 143}}, {"id": 664, "type": "primitive_type", "text": "double", "parent": 663, "children": [], "start_point": {"row": 101, "column": 132}, "end_point": {"row": 101, "column": 138}}, {"id": 665, "type": "identifier", "text": "bias", "parent": 663, "children": [], "start_point": {"row": 101, "column": 139}, "end_point": {"row": 101, "column": 143}}, {"id": 666, "type": "declaration", "text": "uint64_t inputData = 0x0000000000000000LU;", "parent": 635, "children": [667, 668], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 44}}, {"id": 667, "type": "primitive_type", "text": "uint64_t", "parent": 666, "children": [], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 10}}, {"id": 668, "type": "init_declarator", "text": "inputData = 0x0000000000000000LU", "parent": 666, "children": [669, 670, 671], "start_point": {"row": 103, "column": 11}, "end_point": {"row": 103, "column": 43}}, {"id": 669, "type": "identifier", "text": "inputData", "parent": 668, "children": [], "start_point": {"row": 103, "column": 11}, "end_point": {"row": 103, "column": 20}}, {"id": 670, "type": "=", "text": "=", "parent": 668, "children": [], "start_point": {"row": 103, "column": 21}, "end_point": {"row": 103, "column": 22}}, {"id": 671, "type": "number_literal", "text": "0x0000000000000000LU", "parent": 668, "children": [], "start_point": {"row": 103, "column": 23}, "end_point": {"row": 103, "column": 43}}, {"id": 672, "type": "assignment_expression", "text": "inputDataInt = (1/Scale) * (inputDataInt - bias)", "parent": 635, "children": [673, 674, 675], "start_point": {"row": 105, "column": 2}, "end_point": {"row": 105, "column": 50}}, {"id": 673, "type": "identifier", "text": "inputDataInt", "parent": 672, "children": [], "start_point": {"row": 105, "column": 2}, "end_point": {"row": 105, "column": 14}}, {"id": 674, "type": "=", "text": "=", "parent": 672, "children": [], "start_point": {"row": 105, "column": 15}, "end_point": {"row": 105, "column": 16}}, {"id": 675, "type": "binary_expression", "text": "(1/Scale) * (inputDataInt - bias)", "parent": 672, "children": [676, 681, 682], "start_point": {"row": 105, "column": 17}, "end_point": {"row": 105, "column": 50}}, {"id": 676, "type": "parenthesized_expression", "text": "(1/Scale)", "parent": 675, "children": [677], "start_point": {"row": 105, "column": 17}, "end_point": {"row": 105, "column": 26}}, {"id": 677, "type": "binary_expression", "text": "1/Scale", "parent": 676, "children": [678, 679, 680], "start_point": {"row": 105, "column": 18}, "end_point": {"row": 105, "column": 25}}, {"id": 678, "type": "number_literal", "text": "1", "parent": 677, "children": [], "start_point": {"row": 105, "column": 18}, "end_point": {"row": 105, "column": 19}}, {"id": 679, "type": "/", "text": "/", "parent": 677, "children": [], "start_point": {"row": 105, "column": 19}, "end_point": {"row": 105, "column": 20}}, {"id": 680, "type": "identifier", "text": "Scale", "parent": 677, "children": [], "start_point": {"row": 105, "column": 20}, "end_point": {"row": 105, "column": 25}}, {"id": 681, "type": "*", "text": "*", "parent": 675, "children": [], "start_point": {"row": 105, "column": 27}, "end_point": {"row": 105, "column": 28}}, {"id": 682, "type": "parenthesized_expression", "text": "(inputDataInt - bias)", "parent": 675, "children": [683], "start_point": {"row": 105, "column": 29}, "end_point": {"row": 105, "column": 50}}, {"id": 683, "type": "binary_expression", "text": "inputDataInt - bias", "parent": 682, "children": [684, 685, 686], "start_point": {"row": 105, "column": 30}, "end_point": {"row": 105, "column": 49}}, {"id": 684, "type": "identifier", "text": "inputDataInt", "parent": 683, "children": [], "start_point": {"row": 105, "column": 30}, "end_point": {"row": 105, "column": 42}}, {"id": 685, "type": "-", "text": "-", "parent": 683, "children": [], "start_point": {"row": 105, "column": 43}, "end_point": {"row": 105, "column": 44}}, {"id": 686, "type": "identifier", "text": "bias", "parent": 683, "children": [], "start_point": {"row": 105, "column": 45}, "end_point": {"row": 105, "column": 49}}, {"id": 687, "type": "declaration", "text": "uint64_t maxVal = 1;", "parent": 635, "children": [688, 689], "start_point": {"row": 107, "column": 2}, "end_point": {"row": 107, "column": 22}}, {"id": 688, "type": "primitive_type", "text": "uint64_t", "parent": 687, "children": [], "start_point": {"row": 107, "column": 2}, "end_point": {"row": 107, "column": 10}}, {"id": 689, "type": "init_declarator", "text": "maxVal = 1", "parent": 687, "children": [690, 691, 692], "start_point": {"row": 107, "column": 11}, "end_point": {"row": 107, "column": 21}}, {"id": 690, "type": "identifier", "text": "maxVal", "parent": 689, "children": [], "start_point": {"row": 107, "column": 11}, "end_point": {"row": 107, "column": 17}}, {"id": 691, "type": "=", "text": "=", "parent": 689, "children": [], "start_point": {"row": 107, "column": 18}, "end_point": {"row": 107, "column": 19}}, {"id": 692, "type": "number_literal", "text": "1", "parent": 689, "children": [], "start_point": {"row": 107, "column": 20}, "end_point": {"row": 107, "column": 21}}, {"id": 693, "type": "for_statement", "text": "for(int i=0; i<bitLength; i++) {\n maxVal *= 2;\n }", "parent": 635, "children": [694, 700, 704], "start_point": {"row": 108, "column": 2}, "end_point": {"row": 110, "column": 3}}, {"id": 694, "type": "declaration", "text": "int i=0;", "parent": 693, "children": [695, 696], "start_point": {"row": 108, "column": 6}, "end_point": {"row": 108, "column": 14}}, {"id": 695, "type": "primitive_type", "text": "int", "parent": 694, "children": [], "start_point": {"row": 108, "column": 6}, "end_point": {"row": 108, "column": 9}}, {"id": 696, "type": "init_declarator", "text": "i=0", "parent": 694, "children": [697, 698, 699], "start_point": {"row": 108, "column": 10}, "end_point": {"row": 108, "column": 13}}, {"id": 697, "type": "identifier", "text": "i", "parent": 696, "children": [], "start_point": {"row": 108, "column": 10}, "end_point": {"row": 108, "column": 11}}, {"id": 698, "type": "=", "text": "=", "parent": 696, "children": [], "start_point": {"row": 108, "column": 11}, "end_point": {"row": 108, "column": 12}}, {"id": 699, "type": "number_literal", "text": "0", "parent": 696, "children": [], "start_point": {"row": 108, "column": 12}, "end_point": {"row": 108, "column": 13}}, {"id": 700, "type": "binary_expression", "text": "i<bitLength", "parent": 693, "children": [701, 702, 703], "start_point": {"row": 108, "column": 15}, "end_point": {"row": 108, "column": 26}}, {"id": 701, "type": "identifier", "text": "i", "parent": 700, "children": [], "start_point": {"row": 108, "column": 15}, "end_point": {"row": 108, "column": 16}}, {"id": 702, "type": "<", "text": "<", "parent": 700, "children": [], "start_point": {"row": 108, "column": 16}, "end_point": {"row": 108, "column": 17}}, {"id": 703, "type": "identifier", "text": "bitLength", "parent": 700, "children": [], "start_point": {"row": 108, "column": 17}, "end_point": {"row": 108, "column": 26}}, {"id": 704, "type": "update_expression", "text": "i++", "parent": 693, "children": [705, 706], "start_point": {"row": 108, "column": 28}, "end_point": {"row": 108, "column": 31}}, {"id": 705, "type": "identifier", "text": "i", "parent": 704, "children": [], "start_point": {"row": 108, "column": 28}, "end_point": {"row": 108, "column": 29}}, {"id": 706, "type": "++", "text": "++", "parent": 704, "children": [], "start_point": {"row": 108, "column": 29}, "end_point": {"row": 108, "column": 31}}, {"id": 707, "type": "assignment_expression", "text": "maxVal *= 2", "parent": 693, "children": [708, 709, 710], "start_point": {"row": 109, "column": 4}, "end_point": {"row": 109, "column": 15}}, {"id": 708, "type": "identifier", "text": "maxVal", "parent": 707, "children": [], "start_point": {"row": 109, "column": 4}, "end_point": {"row": 109, "column": 10}}, {"id": 709, "type": "*=", "text": "*=", "parent": 707, "children": [], "start_point": {"row": 109, "column": 11}, "end_point": {"row": 109, "column": 13}}, {"id": 710, "type": "number_literal", "text": "2", "parent": 707, "children": [], "start_point": {"row": 109, "column": 14}, "end_point": {"row": 109, "column": 15}}, {"id": 711, "type": "if_statement", "text": "if(sign) {\n\n if(inputDataInt < 0) {\n inputDataInt += maxVal;\n }\n inputData = inputDataInt;\n }\n else\n inputData = inputDataInt;", "parent": 635, "children": [712, 728], "start_point": {"row": 112, "column": 2}, "end_point": {"row": 120, "column": 29}}, {"id": 712, "type": "parenthesized_expression", "text": "(sign)", "parent": 711, "children": [713], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 10}}, {"id": 713, "type": "identifier", "text": "sign", "parent": 712, "children": [], "start_point": {"row": 112, "column": 5}, "end_point": {"row": 112, "column": 9}}, {"id": 714, "type": "if_statement", "text": "if(inputDataInt < 0) {\n inputDataInt += maxVal;\n }", "parent": 711, "children": [715], "start_point": {"row": 114, "column": 4}, "end_point": {"row": 116, "column": 5}}, {"id": 715, "type": "parenthesized_expression", "text": "(inputDataInt < 0)", "parent": 714, "children": [716], "start_point": {"row": 114, "column": 6}, "end_point": {"row": 114, "column": 24}}, {"id": 716, "type": "binary_expression", "text": "inputDataInt < 0", "parent": 715, "children": [717, 718, 719], "start_point": {"row": 114, "column": 7}, "end_point": {"row": 114, "column": 23}}, {"id": 717, "type": "identifier", "text": "inputDataInt", "parent": 716, "children": [], "start_point": {"row": 114, "column": 7}, "end_point": {"row": 114, "column": 19}}, {"id": 718, "type": "<", "text": "<", "parent": 716, "children": [], "start_point": {"row": 114, "column": 20}, "end_point": {"row": 114, "column": 21}}, {"id": 719, "type": "number_literal", "text": "0", "parent": 716, "children": [], "start_point": {"row": 114, "column": 22}, "end_point": {"row": 114, "column": 23}}, {"id": 720, "type": "assignment_expression", "text": "inputDataInt += maxVal", "parent": 714, "children": [721, 722, 723], "start_point": {"row": 115, "column": 6}, "end_point": {"row": 115, "column": 28}}, {"id": 721, "type": "identifier", "text": "inputDataInt", "parent": 720, "children": [], "start_point": {"row": 115, "column": 6}, "end_point": {"row": 115, "column": 18}}, {"id": 722, "type": "+=", "text": "+=", "parent": 720, "children": [], "start_point": {"row": 115, "column": 19}, "end_point": {"row": 115, "column": 21}}, {"id": 723, "type": "identifier", "text": "maxVal", "parent": 720, "children": [], "start_point": {"row": 115, "column": 22}, "end_point": {"row": 115, "column": 28}}, {"id": 724, "type": "assignment_expression", "text": "inputData = inputDataInt", "parent": 711, "children": [725, 726, 727], "start_point": {"row": 117, "column": 4}, "end_point": {"row": 117, "column": 28}}, {"id": 725, "type": "identifier", "text": "inputData", "parent": 724, "children": [], "start_point": {"row": 117, "column": 4}, "end_point": {"row": 117, "column": 13}}, {"id": 726, "type": "=", "text": "=", "parent": 724, "children": [], "start_point": {"row": 117, "column": 14}, "end_point": {"row": 117, "column": 15}}, {"id": 727, "type": "identifier", "text": "inputDataInt", "parent": 724, "children": [], "start_point": {"row": 117, "column": 16}, "end_point": {"row": 117, "column": 28}}, {"id": 728, "type": "else_clause", "text": "else\n inputData = inputDataInt;", "parent": 711, "children": [], "start_point": {"row": 119, "column": 2}, "end_point": {"row": 120, "column": 29}}, {"id": 729, "type": "assignment_expression", "text": "inputData = inputDataInt", "parent": 728, "children": [730, 731, 732], "start_point": {"row": 120, "column": 4}, "end_point": {"row": 120, "column": 28}}, {"id": 730, "type": "identifier", "text": "inputData", "parent": 729, "children": [], "start_point": {"row": 120, "column": 4}, "end_point": {"row": 120, "column": 13}}, {"id": 731, "type": "=", "text": "=", "parent": 729, "children": [], "start_point": {"row": 120, "column": 14}, "end_point": {"row": 120, "column": 15}}, {"id": 732, "type": "identifier", "text": "inputDataInt", "parent": 729, "children": [], "start_point": {"row": 120, "column": 16}, "end_point": {"row": 120, "column": 28}}, {"id": 733, "type": "if_statement", "text": "if(inputData > (maxVal-1)) {\n inputData = (maxVal-1);\n }\n else if(inputData < 0){\n inputData = 0;\n }", "parent": 635, "children": [734, 751], "start_point": {"row": 122, "column": 2}, "end_point": {"row": 127, "column": 3}}, {"id": 734, "type": "parenthesized_expression", "text": "(inputData > (maxVal-1))", "parent": 733, "children": [735], "start_point": {"row": 122, "column": 4}, "end_point": {"row": 122, "column": 28}}, {"id": 735, "type": "binary_expression", "text": "inputData > (maxVal-1)", "parent": 734, "children": [736, 737, 738], "start_point": {"row": 122, "column": 5}, "end_point": {"row": 122, "column": 27}}, {"id": 736, "type": "identifier", "text": "inputData", "parent": 735, "children": [], "start_point": {"row": 122, "column": 5}, "end_point": {"row": 122, "column": 14}}, {"id": 737, "type": ">", "text": ">", "parent": 735, "children": [], "start_point": {"row": 122, "column": 15}, "end_point": {"row": 122, "column": 16}}, {"id": 738, "type": "parenthesized_expression", "text": "(maxVal-1)", "parent": 735, "children": [739], "start_point": {"row": 122, "column": 17}, "end_point": {"row": 122, "column": 27}}, {"id": 739, "type": "binary_expression", "text": "maxVal-1", "parent": 738, "children": [740, 741, 742], "start_point": {"row": 122, "column": 18}, "end_point": {"row": 122, "column": 26}}, {"id": 740, "type": "identifier", "text": "maxVal", "parent": 739, "children": [], "start_point": {"row": 122, "column": 18}, "end_point": {"row": 122, "column": 24}}, {"id": 741, "type": "-", "text": "-", "parent": 739, "children": [], "start_point": {"row": 122, "column": 24}, "end_point": {"row": 122, "column": 25}}, {"id": 742, "type": "number_literal", "text": "1", "parent": 739, "children": [], "start_point": {"row": 122, "column": 25}, "end_point": {"row": 122, "column": 26}}, {"id": 743, "type": "assignment_expression", "text": "inputData = (maxVal-1)", "parent": 733, "children": [744, 745, 746], "start_point": {"row": 123, "column": 4}, "end_point": {"row": 123, "column": 26}}, {"id": 744, "type": "identifier", "text": "inputData", "parent": 743, "children": [], "start_point": {"row": 123, "column": 4}, "end_point": {"row": 123, "column": 13}}, {"id": 745, "type": "=", "text": "=", "parent": 743, "children": [], "start_point": {"row": 123, "column": 14}, "end_point": {"row": 123, "column": 15}}, {"id": 746, "type": "parenthesized_expression", "text": "(maxVal-1)", "parent": 743, "children": [747], "start_point": {"row": 123, "column": 16}, "end_point": {"row": 123, "column": 26}}, {"id": 747, "type": "binary_expression", "text": "maxVal-1", "parent": 746, "children": [748, 749, 750], "start_point": {"row": 123, "column": 17}, "end_point": {"row": 123, "column": 25}}, {"id": 748, "type": "identifier", "text": "maxVal", "parent": 747, "children": [], "start_point": {"row": 123, "column": 17}, "end_point": {"row": 123, "column": 23}}, {"id": 749, "type": "-", "text": "-", "parent": 747, "children": [], "start_point": {"row": 123, "column": 23}, "end_point": {"row": 123, "column": 24}}, {"id": 750, "type": "number_literal", "text": "1", "parent": 747, "children": [], "start_point": {"row": 123, "column": 24}, "end_point": {"row": 123, "column": 25}}, {"id": 751, "type": "else_clause", "text": "else if(inputData < 0){\n inputData = 0;\n }", "parent": 733, "children": [752], "start_point": {"row": 125, "column": 2}, "end_point": {"row": 127, "column": 3}}, {"id": 752, "type": "if_statement", "text": "if(inputData < 0){\n inputData = 0;\n }", "parent": 751, "children": [753], "start_point": {"row": 125, "column": 7}, "end_point": {"row": 127, "column": 3}}, {"id": 753, "type": "parenthesized_expression", "text": "(inputData < 0)", "parent": 752, "children": [754], "start_point": {"row": 125, "column": 9}, "end_point": {"row": 125, "column": 24}}, {"id": 754, "type": "binary_expression", "text": "inputData < 0", "parent": 753, "children": [755, 756, 757], "start_point": {"row": 125, "column": 10}, "end_point": {"row": 125, "column": 23}}, {"id": 755, "type": "identifier", "text": "inputData", "parent": 754, "children": [], "start_point": {"row": 125, "column": 10}, "end_point": {"row": 125, "column": 19}}, {"id": 756, "type": "<", "text": "<", "parent": 754, "children": [], "start_point": {"row": 125, "column": 20}, "end_point": {"row": 125, "column": 21}}, {"id": 757, "type": "number_literal", "text": "0", "parent": 754, "children": [], "start_point": {"row": 125, "column": 22}, "end_point": {"row": 125, "column": 23}}, {"id": 758, "type": "assignment_expression", "text": "inputData = 0", "parent": 752, "children": [759, 760, 761], "start_point": {"row": 126, "column": 4}, "end_point": {"row": 126, "column": 17}}, {"id": 759, "type": "identifier", "text": "inputData", "parent": 758, "children": [], "start_point": {"row": 126, "column": 4}, "end_point": {"row": 126, "column": 13}}, {"id": 760, "type": "=", "text": "=", "parent": 758, "children": [], "start_point": {"row": 126, "column": 14}, "end_point": {"row": 126, "column": 15}}, {"id": 761, "type": "number_literal", "text": "0", "parent": 758, "children": [], "start_point": {"row": 126, "column": 16}, "end_point": {"row": 126, "column": 17}}, {"id": 762, "type": "declaration", "text": "uint8_t *bytePointer = (uint8_t *)&inputData;", "parent": 635, "children": [763, 764], "start_point": {"row": 130, "column": 2}, "end_point": {"row": 130, "column": 47}}, {"id": 763, "type": "primitive_type", "text": "uint8_t", "parent": 762, "children": [], "start_point": {"row": 130, "column": 2}, "end_point": {"row": 130, "column": 9}}, {"id": 764, "type": "init_declarator", "text": "*bytePointer = (uint8_t *)&inputData", "parent": 762, "children": [765, 768, 769], "start_point": {"row": 130, "column": 10}, "end_point": {"row": 130, "column": 46}}, {"id": 765, "type": "pointer_declarator", "text": "*bytePointer", "parent": 764, "children": [766, 767], "start_point": {"row": 130, "column": 10}, "end_point": {"row": 130, "column": 22}}, {"id": 766, "type": "*", "text": "*", "parent": 765, "children": [], "start_point": {"row": 130, "column": 10}, "end_point": {"row": 130, "column": 11}}, {"id": 767, "type": "identifier", "text": "bytePointer", "parent": 765, "children": [], "start_point": {"row": 130, "column": 11}, "end_point": {"row": 130, "column": 22}}, {"id": 768, "type": "=", "text": "=", "parent": 764, "children": [], "start_point": {"row": 130, "column": 23}, "end_point": {"row": 130, "column": 24}}, {"id": 769, "type": "cast_expression", "text": "(uint8_t *)&inputData", "parent": 764, "children": [770, 774], "start_point": {"row": 130, "column": 25}, "end_point": {"row": 130, "column": 46}}, {"id": 770, "type": "type_descriptor", "text": "uint8_t *", "parent": 769, "children": [771, 772], "start_point": {"row": 130, "column": 26}, "end_point": {"row": 130, "column": 35}}, {"id": 771, "type": "primitive_type", "text": "uint8_t", "parent": 770, "children": [], "start_point": {"row": 130, "column": 26}, "end_point": {"row": 130, "column": 33}}, {"id": 772, "type": "abstract_pointer_declarator", "text": "*", "parent": 770, "children": [773], "start_point": {"row": 130, "column": 34}, "end_point": {"row": 130, "column": 35}}, {"id": 773, "type": "*", "text": "*", "parent": 772, "children": [], "start_point": {"row": 130, "column": 34}, "end_point": {"row": 130, "column": 35}}, {"id": 774, "type": "pointer_expression", "text": "&inputData", "parent": 769, "children": [775], "start_point": {"row": 130, "column": 36}, "end_point": {"row": 130, "column": 46}}, {"id": 775, "type": "identifier", "text": "inputData", "parent": 774, "children": [], "start_point": {"row": 130, "column": 37}, "end_point": {"row": 130, "column": 46}}, {"id": 776, "type": "if_statement", "text": "if(byteOrder) {\n //locate MSB\n uint8_t trueLen = bitSize(inputData);\n //if more bits are present than can be accomodated cut them off\n if(trueLen > bitLength) {\n inputData = inputData >> (trueLen - bitLength);\n }\n //Shift buf to 64th position\n inputData = inputData << (64 - bitLength);\n\n //Reverse int\n inputData = reverse64(inputData);\n uint8_t calcStartbit = (7 - startBit%8) + 8*(startBit/8);\n inputData = inputData << calcStartbit;\n //reverse each byte and push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= reverse8(bytePointer[i]);\n }\n }else {\n //Shift buf to appropriate place\n inputData = inputData << startBit;\n //push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= bytePointer[i];\n }\n }", "parent": 635, "children": [777, 880], "start_point": {"row": 132, "column": 2}, "end_point": {"row": 157, "column": 3}}, {"id": 777, "type": "parenthesized_expression", "text": "(byteOrder)", "parent": 776, "children": [778], "start_point": {"row": 132, "column": 4}, "end_point": {"row": 132, "column": 15}}, {"id": 778, "type": "identifier", "text": "byteOrder", "parent": 777, "children": [], "start_point": {"row": 132, "column": 5}, "end_point": {"row": 132, "column": 14}}, {"id": 779, "type": "declaration", "text": "uint8_t trueLen = bitSize(inputData);", "parent": 776, "children": [780, 781], "start_point": {"row": 134, "column": 4}, "end_point": {"row": 134, "column": 41}}, {"id": 780, "type": "primitive_type", "text": "uint8_t", "parent": 779, "children": [], "start_point": {"row": 134, "column": 4}, "end_point": {"row": 134, "column": 11}}, {"id": 781, "type": "init_declarator", "text": "trueLen = bitSize(inputData)", "parent": 779, "children": [782, 783, 784], "start_point": {"row": 134, "column": 12}, "end_point": {"row": 134, "column": 40}}, {"id": 782, "type": "identifier", "text": "trueLen", "parent": 781, "children": [], "start_point": {"row": 134, "column": 12}, "end_point": {"row": 134, "column": 19}}, {"id": 783, "type": "=", "text": "=", "parent": 781, "children": [], "start_point": {"row": 134, "column": 20}, "end_point": {"row": 134, "column": 21}}, {"id": 784, "type": "call_expression", "text": "bitSize(inputData)", "parent": 781, "children": [785, 786], "start_point": {"row": 134, "column": 22}, "end_point": {"row": 134, "column": 40}}, {"id": 785, "type": "identifier", "text": "bitSize", "parent": 784, "children": [], "start_point": {"row": 134, "column": 22}, "end_point": {"row": 134, "column": 29}}, {"id": 786, "type": "argument_list", "text": "(inputData)", "parent": 784, "children": [787], "start_point": {"row": 134, "column": 29}, "end_point": {"row": 134, "column": 40}}, {"id": 787, "type": "identifier", "text": "inputData", "parent": 786, "children": [], "start_point": {"row": 134, "column": 30}, "end_point": {"row": 134, "column": 39}}, {"id": 788, "type": "if_statement", "text": "if(trueLen > bitLength) {\n inputData = inputData >> (trueLen - bitLength);\n }", "parent": 776, "children": [789], "start_point": {"row": 136, "column": 4}, "end_point": {"row": 138, "column": 5}}, {"id": 789, "type": "parenthesized_expression", "text": "(trueLen > bitLength)", "parent": 788, "children": [790], "start_point": {"row": 136, "column": 6}, "end_point": {"row": 136, "column": 27}}, {"id": 790, "type": "binary_expression", "text": "trueLen > bitLength", "parent": 789, "children": [791, 792, 793], "start_point": {"row": 136, "column": 7}, "end_point": {"row": 136, "column": 26}}, {"id": 791, "type": "identifier", "text": "trueLen", "parent": 790, "children": [], "start_point": {"row": 136, "column": 7}, "end_point": {"row": 136, "column": 14}}, {"id": 792, "type": ">", "text": ">", "parent": 790, "children": [], "start_point": {"row": 136, "column": 15}, "end_point": {"row": 136, "column": 16}}, {"id": 793, "type": "identifier", "text": "bitLength", "parent": 790, "children": [], "start_point": {"row": 136, "column": 17}, "end_point": {"row": 136, "column": 26}}, {"id": 794, "type": "assignment_expression", "text": "inputData = inputData >> (trueLen - bitLength)", "parent": 788, "children": [795, 796, 797], "start_point": {"row": 137, "column": 6}, "end_point": {"row": 137, "column": 52}}, {"id": 795, "type": "identifier", "text": "inputData", "parent": 794, "children": [], "start_point": {"row": 137, "column": 6}, "end_point": {"row": 137, "column": 15}}, {"id": 796, "type": "=", "text": "=", "parent": 794, "children": [], "start_point": {"row": 137, "column": 16}, "end_point": {"row": 137, "column": 17}}, {"id": 797, "type": "binary_expression", "text": "inputData >> (trueLen - bitLength)", "parent": 794, "children": [798, 799, 800], "start_point": {"row": 137, "column": 18}, "end_point": {"row": 137, "column": 52}}, {"id": 798, "type": "identifier", "text": "inputData", "parent": 797, "children": [], "start_point": {"row": 137, "column": 18}, "end_point": {"row": 137, "column": 27}}, {"id": 799, "type": ">>", "text": ">>", "parent": 797, "children": [], "start_point": {"row": 137, "column": 28}, "end_point": {"row": 137, "column": 30}}, {"id": 800, "type": "parenthesized_expression", "text": "(trueLen - bitLength)", "parent": 797, "children": [801], "start_point": {"row": 137, "column": 31}, "end_point": {"row": 137, "column": 52}}, {"id": 801, "type": "binary_expression", "text": "trueLen - bitLength", "parent": 800, "children": [802, 803, 804], "start_point": {"row": 137, "column": 32}, "end_point": {"row": 137, "column": 51}}, {"id": 802, "type": "identifier", "text": "trueLen", "parent": 801, "children": [], "start_point": {"row": 137, "column": 32}, "end_point": {"row": 137, "column": 39}}, {"id": 803, "type": "-", "text": "-", "parent": 801, "children": [], "start_point": {"row": 137, "column": 40}, "end_point": {"row": 137, "column": 41}}, {"id": 804, "type": "identifier", "text": "bitLength", "parent": 801, "children": [], "start_point": {"row": 137, "column": 42}, "end_point": {"row": 137, "column": 51}}, {"id": 805, "type": "assignment_expression", "text": "inputData = inputData << (64 - bitLength)", "parent": 776, "children": [806, 807, 808], "start_point": {"row": 140, "column": 4}, "end_point": {"row": 140, "column": 45}}, {"id": 806, "type": "identifier", "text": "inputData", "parent": 805, "children": [], "start_point": {"row": 140, "column": 4}, "end_point": {"row": 140, "column": 13}}, {"id": 807, "type": "=", "text": "=", "parent": 805, "children": [], "start_point": {"row": 140, "column": 14}, "end_point": {"row": 140, "column": 15}}, {"id": 808, "type": "binary_expression", "text": "inputData << (64 - bitLength)", "parent": 805, "children": [809, 810, 811], "start_point": {"row": 140, "column": 16}, "end_point": {"row": 140, "column": 45}}, {"id": 809, "type": "identifier", "text": "inputData", "parent": 808, "children": [], "start_point": {"row": 140, "column": 16}, "end_point": {"row": 140, "column": 25}}, {"id": 810, "type": "<<", "text": "<<", "parent": 808, "children": [], "start_point": {"row": 140, "column": 26}, "end_point": {"row": 140, "column": 28}}, {"id": 811, "type": "parenthesized_expression", "text": "(64 - bitLength)", "parent": 808, "children": [812], "start_point": {"row": 140, "column": 29}, "end_point": {"row": 140, "column": 45}}, {"id": 812, "type": "binary_expression", "text": "64 - bitLength", "parent": 811, "children": [813, 814, 815], "start_point": {"row": 140, "column": 30}, "end_point": {"row": 140, "column": 44}}, {"id": 813, "type": "number_literal", "text": "64", "parent": 812, "children": [], "start_point": {"row": 140, "column": 30}, "end_point": {"row": 140, "column": 32}}, {"id": 814, "type": "-", "text": "-", "parent": 812, "children": [], "start_point": {"row": 140, "column": 33}, "end_point": {"row": 140, "column": 34}}, {"id": 815, "type": "identifier", "text": "bitLength", "parent": 812, "children": [], "start_point": {"row": 140, "column": 35}, "end_point": {"row": 140, "column": 44}}, {"id": 816, "type": "assignment_expression", "text": "inputData = reverse64(inputData)", "parent": 776, "children": [817, 818, 819], "start_point": {"row": 143, "column": 4}, "end_point": {"row": 143, "column": 36}}, {"id": 817, "type": "identifier", "text": "inputData", "parent": 816, "children": [], "start_point": {"row": 143, "column": 4}, "end_point": {"row": 143, "column": 13}}, {"id": 818, "type": "=", "text": "=", "parent": 816, "children": [], "start_point": {"row": 143, "column": 14}, "end_point": {"row": 143, "column": 15}}, {"id": 819, "type": "call_expression", "text": "reverse64(inputData)", "parent": 816, "children": [820, 821], "start_point": {"row": 143, "column": 16}, "end_point": {"row": 143, "column": 36}}, {"id": 820, "type": "identifier", "text": "reverse64", "parent": 819, "children": [], "start_point": {"row": 143, "column": 16}, "end_point": {"row": 143, "column": 25}}, {"id": 821, "type": "argument_list", "text": "(inputData)", "parent": 819, "children": [822], "start_point": {"row": 143, "column": 25}, "end_point": {"row": 143, "column": 36}}, {"id": 822, "type": "identifier", "text": "inputData", "parent": 821, "children": [], "start_point": {"row": 143, "column": 26}, "end_point": {"row": 143, "column": 35}}, {"id": 823, "type": "declaration", "text": "uint8_t calcStartbit = (7 - startBit%8) + 8*(startBit/8);", "parent": 776, "children": [824, 825], "start_point": {"row": 144, "column": 4}, "end_point": {"row": 144, "column": 61}}, {"id": 824, "type": "primitive_type", "text": "uint8_t", "parent": 823, "children": [], "start_point": {"row": 144, "column": 4}, "end_point": {"row": 144, "column": 11}}, {"id": 825, "type": "init_declarator", "text": "calcStartbit = (7 - startBit%8) + 8*(startBit/8)", "parent": 823, "children": [826, 827, 828], "start_point": {"row": 144, "column": 12}, "end_point": {"row": 144, "column": 60}}, {"id": 826, "type": "identifier", "text": "calcStartbit", "parent": 825, "children": [], "start_point": {"row": 144, "column": 12}, "end_point": {"row": 144, "column": 24}}, {"id": 827, "type": "=", "text": "=", "parent": 825, "children": [], "start_point": {"row": 144, "column": 25}, "end_point": {"row": 144, "column": 26}}, {"id": 828, "type": "binary_expression", "text": "(7 - startBit%8) + 8*(startBit/8)", "parent": 825, "children": [829, 837, 838], "start_point": {"row": 144, "column": 27}, "end_point": {"row": 144, "column": 60}}, {"id": 829, "type": "parenthesized_expression", "text": "(7 - startBit%8)", "parent": 828, "children": [830], "start_point": {"row": 144, "column": 27}, "end_point": {"row": 144, "column": 43}}, {"id": 830, "type": "binary_expression", "text": "7 - startBit%8", "parent": 829, "children": [831, 832, 833], "start_point": {"row": 144, "column": 28}, "end_point": {"row": 144, "column": 42}}, {"id": 831, "type": "number_literal", "text": "7", "parent": 830, "children": [], "start_point": {"row": 144, "column": 28}, "end_point": {"row": 144, "column": 29}}, {"id": 832, "type": "-", "text": "-", "parent": 830, "children": [], "start_point": {"row": 144, "column": 30}, "end_point": {"row": 144, "column": 31}}, {"id": 833, "type": "binary_expression", "text": "startBit%8", "parent": 830, "children": [834, 835, 836], "start_point": {"row": 144, "column": 32}, "end_point": {"row": 144, "column": 42}}, {"id": 834, "type": "identifier", "text": "startBit", "parent": 833, "children": [], "start_point": {"row": 144, "column": 32}, "end_point": {"row": 144, "column": 40}}, {"id": 835, "type": "%", "text": "%", "parent": 833, "children": [], "start_point": {"row": 144, "column": 40}, "end_point": {"row": 144, "column": 41}}, {"id": 836, "type": "number_literal", "text": "8", "parent": 833, "children": [], "start_point": {"row": 144, "column": 41}, "end_point": {"row": 144, "column": 42}}, {"id": 837, "type": "+", "text": "+", "parent": 828, "children": [], "start_point": {"row": 144, "column": 44}, "end_point": {"row": 144, "column": 45}}, {"id": 838, "type": "binary_expression", "text": "8*(startBit/8)", "parent": 828, "children": [839, 840, 841], "start_point": {"row": 144, "column": 46}, "end_point": {"row": 144, "column": 60}}, {"id": 839, "type": "number_literal", "text": "8", "parent": 838, "children": [], "start_point": {"row": 144, "column": 46}, "end_point": {"row": 144, "column": 47}}, {"id": 840, "type": "*", "text": "*", "parent": 838, "children": [], "start_point": {"row": 144, "column": 47}, "end_point": {"row": 144, "column": 48}}, {"id": 841, "type": "parenthesized_expression", "text": "(startBit/8)", "parent": 838, "children": [842], "start_point": {"row": 144, "column": 48}, "end_point": {"row": 144, "column": 60}}, {"id": 842, "type": "binary_expression", "text": "startBit/8", "parent": 841, "children": [843, 844, 845], "start_point": {"row": 144, "column": 49}, "end_point": {"row": 144, "column": 59}}, {"id": 843, "type": "identifier", "text": "startBit", "parent": 842, "children": [], "start_point": {"row": 144, "column": 49}, "end_point": {"row": 144, "column": 57}}, {"id": 844, "type": "/", "text": "/", "parent": 842, "children": [], "start_point": {"row": 144, "column": 57}, "end_point": {"row": 144, "column": 58}}, {"id": 845, "type": "number_literal", "text": "8", "parent": 842, "children": [], "start_point": {"row": 144, "column": 58}, "end_point": {"row": 144, "column": 59}}, {"id": 846, "type": "assignment_expression", "text": "inputData = inputData << calcStartbit", "parent": 776, "children": [847, 848, 849], "start_point": {"row": 145, "column": 4}, "end_point": {"row": 145, "column": 41}}, {"id": 847, "type": "identifier", "text": "inputData", "parent": 846, "children": [], "start_point": {"row": 145, "column": 4}, "end_point": {"row": 145, "column": 13}}, {"id": 848, "type": "=", "text": "=", "parent": 846, "children": [], "start_point": {"row": 145, "column": 14}, "end_point": {"row": 145, "column": 15}}, {"id": 849, "type": "binary_expression", "text": "inputData << calcStartbit", "parent": 846, "children": [850, 851, 852], "start_point": {"row": 145, "column": 16}, "end_point": {"row": 145, "column": 41}}, {"id": 850, "type": "identifier", "text": "inputData", "parent": 849, "children": [], "start_point": {"row": 145, "column": 16}, "end_point": {"row": 145, "column": 25}}, {"id": 851, "type": "<<", "text": "<<", "parent": 849, "children": [], "start_point": {"row": 145, "column": 26}, "end_point": {"row": 145, "column": 28}}, {"id": 852, "type": "identifier", "text": "calcStartbit", "parent": 849, "children": [], "start_point": {"row": 145, "column": 29}, "end_point": {"row": 145, "column": 41}}, {"id": 853, "type": "for_statement", "text": "for(int i=0; i<8; i++) {\n msg->buf[i] |= reverse8(bytePointer[i]);\n }", "parent": 776, "children": [854, 860, 864], "start_point": {"row": 147, "column": 4}, "end_point": {"row": 149, "column": 5}}, {"id": 854, "type": "declaration", "text": "int i=0;", "parent": 853, "children": [855, 856], "start_point": {"row": 147, "column": 8}, "end_point": {"row": 147, "column": 16}}, {"id": 855, "type": "primitive_type", "text": "int", "parent": 854, "children": [], "start_point": {"row": 147, "column": 8}, "end_point": {"row": 147, "column": 11}}, {"id": 856, "type": "init_declarator", "text": "i=0", "parent": 854, "children": [857, 858, 859], "start_point": {"row": 147, "column": 12}, "end_point": {"row": 147, "column": 15}}, {"id": 857, "type": "identifier", "text": "i", "parent": 856, "children": [], "start_point": {"row": 147, "column": 12}, "end_point": {"row": 147, "column": 13}}, {"id": 858, "type": "=", "text": "=", "parent": 856, "children": [], "start_point": {"row": 147, "column": 13}, "end_point": {"row": 147, "column": 14}}, {"id": 859, "type": "number_literal", "text": "0", "parent": 856, "children": [], "start_point": {"row": 147, "column": 14}, "end_point": {"row": 147, "column": 15}}, {"id": 860, "type": "binary_expression", "text": "i<8", "parent": 853, "children": [861, 862, 863], "start_point": {"row": 147, "column": 17}, "end_point": {"row": 147, "column": 20}}, {"id": 861, "type": "identifier", "text": "i", "parent": 860, "children": [], "start_point": {"row": 147, "column": 17}, "end_point": {"row": 147, "column": 18}}, {"id": 862, "type": "<", "text": "<", "parent": 860, "children": [], "start_point": {"row": 147, "column": 18}, "end_point": {"row": 147, "column": 19}}, {"id": 863, "type": "number_literal", "text": "8", "parent": 860, "children": [], "start_point": {"row": 147, "column": 19}, "end_point": {"row": 147, "column": 20}}, {"id": 864, "type": "update_expression", "text": "i++", "parent": 853, "children": [865, 866], "start_point": {"row": 147, "column": 22}, "end_point": {"row": 147, "column": 25}}, {"id": 865, "type": "identifier", "text": "i", "parent": 864, "children": [], "start_point": {"row": 147, "column": 22}, "end_point": {"row": 147, "column": 23}}, {"id": 866, "type": "++", "text": "++", "parent": 864, "children": [], "start_point": {"row": 147, "column": 23}, "end_point": {"row": 147, "column": 25}}, {"id": 867, "type": "assignment_expression", "text": "msg->buf[i] |= reverse8(bytePointer[i])", "parent": 853, "children": [868, 873, 874], "start_point": {"row": 148, "column": 6}, "end_point": {"row": 148, "column": 45}}, {"id": 868, "type": "subscript_expression", "text": "msg->buf[i]", "parent": 867, "children": [869, 872], "start_point": {"row": 148, "column": 6}, "end_point": {"row": 148, "column": 17}}, {"id": 869, "type": "field_expression", "text": "msg->buf", "parent": 868, "children": [870, 871], "start_point": {"row": 148, "column": 6}, "end_point": {"row": 148, "column": 14}}, {"id": 870, "type": "identifier", "text": "msg", "parent": 869, "children": [], "start_point": {"row": 148, "column": 6}, "end_point": {"row": 148, "column": 9}}, {"id": 871, "type": "field_identifier", "text": "buf", "parent": 869, "children": [], "start_point": {"row": 148, "column": 11}, "end_point": {"row": 148, "column": 14}}, {"id": 872, "type": "identifier", "text": "i", "parent": 868, "children": [], "start_point": {"row": 148, "column": 15}, "end_point": {"row": 148, "column": 16}}, {"id": 873, "type": "|=", "text": "|=", "parent": 867, "children": [], "start_point": {"row": 148, "column": 18}, "end_point": {"row": 148, "column": 20}}, {"id": 874, "type": "call_expression", "text": "reverse8(bytePointer[i])", "parent": 867, "children": [875, 876], "start_point": {"row": 148, "column": 21}, "end_point": {"row": 148, "column": 45}}, {"id": 875, "type": "identifier", "text": "reverse8", "parent": 874, "children": [], "start_point": {"row": 148, "column": 21}, "end_point": {"row": 148, "column": 29}}, {"id": 876, "type": "argument_list", "text": "(bytePointer[i])", "parent": 874, "children": [877], "start_point": {"row": 148, "column": 29}, "end_point": {"row": 148, "column": 45}}, {"id": 877, "type": "subscript_expression", "text": "bytePointer[i]", "parent": 876, "children": [878, 879], "start_point": {"row": 148, "column": 30}, "end_point": {"row": 148, "column": 44}}, {"id": 878, "type": "identifier", "text": "bytePointer", "parent": 877, "children": [], "start_point": {"row": 148, "column": 30}, "end_point": {"row": 148, "column": 41}}, {"id": 879, "type": "identifier", "text": "i", "parent": 877, "children": [], "start_point": {"row": 148, "column": 42}, "end_point": {"row": 148, "column": 43}}, {"id": 880, "type": "else_clause", "text": "else {\n //Shift buf to appropriate place\n inputData = inputData << startBit;\n //push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= bytePointer[i];\n }\n }", "parent": 776, "children": [], "start_point": {"row": 150, "column": 3}, "end_point": {"row": 157, "column": 3}}, {"id": 881, "type": "assignment_expression", "text": "inputData = inputData << startBit", "parent": 880, "children": [882, 883, 884], "start_point": {"row": 152, "column": 4}, "end_point": {"row": 152, "column": 37}}, {"id": 882, "type": "identifier", "text": "inputData", "parent": 881, "children": [], "start_point": {"row": 152, "column": 4}, "end_point": {"row": 152, "column": 13}}, {"id": 883, "type": "=", "text": "=", "parent": 881, "children": [], "start_point": {"row": 152, "column": 14}, "end_point": {"row": 152, "column": 15}}, {"id": 884, "type": "binary_expression", "text": "inputData << startBit", "parent": 881, "children": [885, 886, 887], "start_point": {"row": 152, "column": 16}, "end_point": {"row": 152, "column": 37}}, {"id": 885, "type": "identifier", "text": "inputData", "parent": 884, "children": [], "start_point": {"row": 152, "column": 16}, "end_point": {"row": 152, "column": 25}}, {"id": 886, "type": "<<", "text": "<<", "parent": 884, "children": [], "start_point": {"row": 152, "column": 26}, "end_point": {"row": 152, "column": 28}}, {"id": 887, "type": "identifier", "text": "startBit", "parent": 884, "children": [], "start_point": {"row": 152, "column": 29}, "end_point": {"row": 152, "column": 37}}, {"id": 888, "type": "for_statement", "text": "for(int i=0; i<8; i++) {\n msg->buf[i] |= bytePointer[i];\n }", "parent": 880, "children": [889, 895, 899], "start_point": {"row": 154, "column": 4}, "end_point": {"row": 156, "column": 5}}, {"id": 889, "type": "declaration", "text": "int i=0;", "parent": 888, "children": [890, 891], "start_point": {"row": 154, "column": 8}, "end_point": {"row": 154, "column": 16}}, {"id": 890, "type": "primitive_type", "text": "int", "parent": 889, "children": [], "start_point": {"row": 154, "column": 8}, "end_point": {"row": 154, "column": 11}}, {"id": 891, "type": "init_declarator", "text": "i=0", "parent": 889, "children": [892, 893, 894], "start_point": {"row": 154, "column": 12}, "end_point": {"row": 154, "column": 15}}, {"id": 892, "type": "identifier", "text": "i", "parent": 891, "children": [], "start_point": {"row": 154, "column": 12}, "end_point": {"row": 154, "column": 13}}, {"id": 893, "type": "=", "text": "=", "parent": 891, "children": [], "start_point": {"row": 154, "column": 13}, "end_point": {"row": 154, "column": 14}}, {"id": 894, "type": "number_literal", "text": "0", "parent": 891, "children": [], "start_point": {"row": 154, "column": 14}, "end_point": {"row": 154, "column": 15}}, {"id": 895, "type": "binary_expression", "text": "i<8", "parent": 888, "children": [896, 897, 898], "start_point": {"row": 154, "column": 17}, "end_point": {"row": 154, "column": 20}}, {"id": 896, "type": "identifier", "text": "i", "parent": 895, "children": [], "start_point": {"row": 154, "column": 17}, "end_point": {"row": 154, "column": 18}}, {"id": 897, "type": "<", "text": "<", "parent": 895, "children": [], "start_point": {"row": 154, "column": 18}, "end_point": {"row": 154, "column": 19}}, {"id": 898, "type": "number_literal", "text": "8", "parent": 895, "children": [], "start_point": {"row": 154, "column": 19}, "end_point": {"row": 154, "column": 20}}, {"id": 899, "type": "update_expression", "text": "i++", "parent": 888, "children": [900, 901], "start_point": {"row": 154, "column": 22}, "end_point": {"row": 154, "column": 25}}, {"id": 900, "type": "identifier", "text": "i", "parent": 899, "children": [], "start_point": {"row": 154, "column": 22}, "end_point": {"row": 154, "column": 23}}, {"id": 901, "type": "++", "text": "++", "parent": 899, "children": [], "start_point": {"row": 154, "column": 23}, "end_point": {"row": 154, "column": 25}}, {"id": 902, "type": "assignment_expression", "text": "msg->buf[i] |= bytePointer[i]", "parent": 888, "children": [903, 908, 909], "start_point": {"row": 155, "column": 6}, "end_point": {"row": 155, "column": 35}}, {"id": 903, "type": "subscript_expression", "text": "msg->buf[i]", "parent": 902, "children": [904, 907], "start_point": {"row": 155, "column": 6}, "end_point": {"row": 155, "column": 17}}, {"id": 904, "type": "field_expression", "text": "msg->buf", "parent": 903, "children": [905, 906], "start_point": {"row": 155, "column": 6}, "end_point": {"row": 155, "column": 14}}, {"id": 905, "type": "identifier", "text": "msg", "parent": 904, "children": [], "start_point": {"row": 155, "column": 6}, "end_point": {"row": 155, "column": 9}}, {"id": 906, "type": "field_identifier", "text": "buf", "parent": 904, "children": [], "start_point": {"row": 155, "column": 11}, "end_point": {"row": 155, "column": 14}}, {"id": 907, "type": "identifier", "text": "i", "parent": 903, "children": [], "start_point": {"row": 155, "column": 15}, "end_point": {"row": 155, "column": 16}}, {"id": 908, "type": "|=", "text": "|=", "parent": 902, "children": [], "start_point": {"row": 155, "column": 18}, "end_point": {"row": 155, "column": 20}}, {"id": 909, "type": "subscript_expression", "text": "bytePointer[i]", "parent": 902, "children": [910, 911], "start_point": {"row": 155, "column": 21}, "end_point": {"row": 155, "column": 35}}, {"id": 910, "type": "identifier", "text": "bytePointer", "parent": 909, "children": [], "start_point": {"row": 155, "column": 21}, "end_point": {"row": 155, "column": 32}}, {"id": 911, "type": "identifier", "text": "i", "parent": 909, "children": [], "start_point": {"row": 155, "column": 33}, "end_point": {"row": 155, "column": 34}}, {"id": 912, "type": "function_definition", "text": "double CAN_decode(CAN_message_t *msg, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias) { //byteOrder is 1 for MSB, 0 for LSB. Signed is 1 for signed, 0 for unsigned\n //Create uint64\nuint64_t dataOut;\n\n if(byteOrder) {\n uint8_t Bytes[8];\n \n //reverse all bytes\n for(int i=0; i<8; i++) {\n Bytes[i] = reverse8(msg->buf[i]);\n }\n //assemble to a uint64\n dataOut = *(uint64_t *)Bytes;\n //reverse to typical lsbfirst\n dataOut = reverse64(dataOut);\n //shift to isolate data\n uint8_t calcStartbit = (7 - (startBit%8)) + 8*(startBit/8);\n dataOut = dataOut << calcStartbit;\n //shift bits back\n dataOut = dataOut >> (64 - (bitLength));\n } else {\n //send message into uint64\n dataOut = *(uint64_t *)msg->buf;\n //Shift left then right to isolate the buf\n dataOut = dataOut << (64 - (startBit+bitLength));\n dataOut = dataOut >> (64 - bitLength);\n }\n double returnData = 0;\n //Adjust if signed and scale and bias\n if(sign) {\n uint64_t maxVal = 1;\n for(int i=0; i<bitLength; i++) {\n maxVal *= 2;\n }\n if(dataOut > (maxVal/2)) {\n returnData = (double) dataOut - maxVal;\n returnData = bias + (Scale * returnData);\n }\n else {\n returnData = bias + (Scale * dataOut);\n }\n }\n else {\n returnData = bias + (Scale * dataOut);\n }\n\n return(returnData);\n}", "parent": null, "children": [913, 914], "start_point": {"row": 161, "column": 0}, "end_point": {"row": 208, "column": 1}}, {"id": 913, "type": "primitive_type", "text": "double", "parent": 912, "children": [], "start_point": {"row": 161, "column": 0}, "end_point": {"row": 161, "column": 6}}, {"id": 914, "type": "function_declarator", "text": "CAN_decode(CAN_message_t *msg, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias)", "parent": 912, "children": [915, 916], "start_point": {"row": 161, "column": 7}, "end_point": {"row": 161, "column": 128}}, {"id": 915, "type": "identifier", "text": "CAN_decode", "parent": 914, "children": [], "start_point": {"row": 161, "column": 7}, "end_point": {"row": 161, "column": 17}}, {"id": 916, "type": "parameter_list", "text": "(CAN_message_t *msg, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias)", "parent": 914, "children": [917, 922, 925, 928, 931, 934, 937], "start_point": {"row": 161, "column": 17}, "end_point": {"row": 161, "column": 128}}, {"id": 917, "type": "parameter_declaration", "text": "CAN_message_t *msg", "parent": 916, "children": [918, 919], "start_point": {"row": 161, "column": 18}, "end_point": {"row": 161, "column": 36}}, {"id": 918, "type": "type_identifier", "text": "CAN_message_t", "parent": 917, "children": [], "start_point": {"row": 161, "column": 18}, "end_point": {"row": 161, "column": 31}}, {"id": 919, "type": "pointer_declarator", "text": "*msg", "parent": 917, "children": [920, 921], "start_point": {"row": 161, "column": 32}, "end_point": {"row": 161, "column": 36}}, {"id": 920, "type": "*", "text": "*", "parent": 919, "children": [], "start_point": {"row": 161, "column": 32}, "end_point": {"row": 161, "column": 33}}, {"id": 921, "type": "identifier", "text": "msg", "parent": 919, "children": [], "start_point": {"row": 161, "column": 33}, "end_point": {"row": 161, "column": 36}}, {"id": 922, "type": "parameter_declaration", "text": "uint8_t startBit", "parent": 916, "children": [923, 924], "start_point": {"row": 161, "column": 38}, "end_point": {"row": 161, "column": 54}}, {"id": 923, "type": "primitive_type", "text": "uint8_t", "parent": 922, "children": [], "start_point": {"row": 161, "column": 38}, "end_point": {"row": 161, "column": 45}}, {"id": 924, "type": "identifier", "text": "startBit", "parent": 922, "children": [], "start_point": {"row": 161, "column": 46}, "end_point": {"row": 161, "column": 54}}, {"id": 925, "type": "parameter_declaration", "text": "uint8_t bitLength", "parent": 916, "children": [926, 927], "start_point": {"row": 161, "column": 56}, "end_point": {"row": 161, "column": 73}}, {"id": 926, "type": "primitive_type", "text": "uint8_t", "parent": 925, "children": [], "start_point": {"row": 161, "column": 56}, "end_point": {"row": 161, "column": 63}}, {"id": 927, "type": "identifier", "text": "bitLength", "parent": 925, "children": [], "start_point": {"row": 161, "column": 64}, "end_point": {"row": 161, "column": 73}}, {"id": 928, "type": "parameter_declaration", "text": "bool byteOrder", "parent": 916, "children": [929, 930], "start_point": {"row": 161, "column": 75}, "end_point": {"row": 161, "column": 89}}, {"id": 929, "type": "primitive_type", "text": "bool", "parent": 928, "children": [], "start_point": {"row": 161, "column": 75}, "end_point": {"row": 161, "column": 79}}, {"id": 930, "type": "identifier", "text": "byteOrder", "parent": 928, "children": [], "start_point": {"row": 161, "column": 80}, "end_point": {"row": 161, "column": 89}}, {"id": 931, "type": "parameter_declaration", "text": "bool sign", "parent": 916, "children": [932, 933], "start_point": {"row": 161, "column": 91}, "end_point": {"row": 161, "column": 100}}, {"id": 932, "type": "primitive_type", "text": "bool", "parent": 931, "children": [], "start_point": {"row": 161, "column": 91}, "end_point": {"row": 161, "column": 95}}, {"id": 933, "type": "identifier", "text": "sign", "parent": 931, "children": [], "start_point": {"row": 161, "column": 96}, "end_point": {"row": 161, "column": 100}}, {"id": 934, "type": "parameter_declaration", "text": "double Scale", "parent": 916, "children": [935, 936], "start_point": {"row": 161, "column": 102}, "end_point": {"row": 161, "column": 114}}, {"id": 935, "type": "primitive_type", "text": "double", "parent": 934, "children": [], "start_point": {"row": 161, "column": 102}, "end_point": {"row": 161, "column": 108}}, {"id": 936, "type": "identifier", "text": "Scale", "parent": 934, "children": [], "start_point": {"row": 161, "column": 109}, "end_point": {"row": 161, "column": 114}}, {"id": 937, "type": "parameter_declaration", "text": "double bias", "parent": 916, "children": [938, 939], "start_point": {"row": 161, "column": 116}, "end_point": {"row": 161, "column": 127}}, {"id": 938, "type": "primitive_type", "text": "double", "parent": 937, "children": [], "start_point": {"row": 161, "column": 116}, "end_point": {"row": 161, "column": 122}}, {"id": 939, "type": "identifier", "text": "bias", "parent": 937, "children": [], "start_point": {"row": 161, "column": 123}, "end_point": {"row": 161, "column": 127}}, {"id": 940, "type": "declaration", "text": "uint64_t dataOut;", "parent": 912, "children": [941, 942], "start_point": {"row": 163, "column": 0}, "end_point": {"row": 163, "column": 17}}, {"id": 941, "type": "primitive_type", "text": "uint64_t", "parent": 940, "children": [], "start_point": {"row": 163, "column": 0}, "end_point": {"row": 163, "column": 8}}, {"id": 942, "type": "identifier", "text": "dataOut", "parent": 940, "children": [], "start_point": {"row": 163, "column": 9}, "end_point": {"row": 163, "column": 16}}, {"id": 943, "type": "if_statement", "text": "if(byteOrder) {\n uint8_t Bytes[8];\n \n //reverse all bytes\n for(int i=0; i<8; i++) {\n Bytes[i] = reverse8(msg->buf[i]);\n }\n //assemble to a uint64\n dataOut = *(uint64_t *)Bytes;\n //reverse to typical lsbfirst\n dataOut = reverse64(dataOut);\n //shift to isolate data\n uint8_t calcStartbit = (7 - (startBit%8)) + 8*(startBit/8);\n dataOut = dataOut << calcStartbit;\n //shift bits back\n dataOut = dataOut >> (64 - (bitLength));\n } else {\n //send message into uint64\n dataOut = *(uint64_t *)msg->buf;\n //Shift left then right to isolate the buf\n dataOut = dataOut << (64 - (startBit+bitLength));\n dataOut = dataOut >> (64 - bitLength);\n }", "parent": 912, "children": [944, 1039], "start_point": {"row": 165, "column": 2}, "end_point": {"row": 187, "column": 3}}, {"id": 944, "type": "parenthesized_expression", "text": "(byteOrder)", "parent": 943, "children": [945], "start_point": {"row": 165, "column": 4}, "end_point": {"row": 165, "column": 15}}, {"id": 945, "type": "identifier", "text": "byteOrder", "parent": 944, "children": [], "start_point": {"row": 165, "column": 5}, "end_point": {"row": 165, "column": 14}}, {"id": 946, "type": "declaration", "text": "uint8_t Bytes[8];", "parent": 943, "children": [947, 948], "start_point": {"row": 166, "column": 4}, "end_point": {"row": 166, "column": 21}}, {"id": 947, "type": "primitive_type", "text": "uint8_t", "parent": 946, "children": [], "start_point": {"row": 166, "column": 4}, "end_point": {"row": 166, "column": 11}}, {"id": 948, "type": "array_declarator", "text": "Bytes[8]", "parent": 946, "children": [949, 950], "start_point": {"row": 166, "column": 12}, "end_point": {"row": 166, "column": 20}}, {"id": 949, "type": "identifier", "text": "Bytes", "parent": 948, "children": [], "start_point": {"row": 166, "column": 12}, "end_point": {"row": 166, "column": 17}}, {"id": 950, "type": "number_literal", "text": "8", "parent": 948, "children": [], "start_point": {"row": 166, "column": 18}, "end_point": {"row": 166, "column": 19}}, {"id": 951, "type": "for_statement", "text": "for(int i=0; i<8; i++) {\n Bytes[i] = reverse8(msg->buf[i]);\n }", "parent": 943, "children": [952, 958, 962], "start_point": {"row": 169, "column": 4}, "end_point": {"row": 171, "column": 5}}, {"id": 952, "type": "declaration", "text": "int i=0;", "parent": 951, "children": [953, 954], "start_point": {"row": 169, "column": 8}, "end_point": {"row": 169, "column": 16}}, {"id": 953, "type": "primitive_type", "text": "int", "parent": 952, "children": [], "start_point": {"row": 169, "column": 8}, "end_point": {"row": 169, "column": 11}}, {"id": 954, "type": "init_declarator", "text": "i=0", "parent": 952, "children": [955, 956, 957], "start_point": {"row": 169, "column": 12}, "end_point": {"row": 169, "column": 15}}, {"id": 955, "type": "identifier", "text": "i", "parent": 954, "children": [], "start_point": {"row": 169, "column": 12}, "end_point": {"row": 169, "column": 13}}, {"id": 956, "type": "=", "text": "=", "parent": 954, "children": [], "start_point": {"row": 169, "column": 13}, "end_point": {"row": 169, "column": 14}}, {"id": 957, "type": "number_literal", "text": "0", "parent": 954, "children": [], "start_point": {"row": 169, "column": 14}, "end_point": {"row": 169, "column": 15}}, {"id": 958, "type": "binary_expression", "text": "i<8", "parent": 951, "children": [959, 960, 961], "start_point": {"row": 169, "column": 17}, "end_point": {"row": 169, "column": 20}}, {"id": 959, "type": "identifier", "text": "i", "parent": 958, "children": [], "start_point": {"row": 169, "column": 17}, "end_point": {"row": 169, "column": 18}}, {"id": 960, "type": "<", "text": "<", "parent": 958, "children": [], "start_point": {"row": 169, "column": 18}, "end_point": {"row": 169, "column": 19}}, {"id": 961, "type": "number_literal", "text": "8", "parent": 958, "children": [], "start_point": {"row": 169, "column": 19}, "end_point": {"row": 169, "column": 20}}, {"id": 962, "type": "update_expression", "text": "i++", "parent": 951, "children": [963, 964], "start_point": {"row": 169, "column": 22}, "end_point": {"row": 169, "column": 25}}, {"id": 963, "type": "identifier", "text": "i", "parent": 962, "children": [], "start_point": {"row": 169, "column": 22}, "end_point": {"row": 169, "column": 23}}, {"id": 964, "type": "++", "text": "++", "parent": 962, "children": [], "start_point": {"row": 169, "column": 23}, "end_point": {"row": 169, "column": 25}}, {"id": 965, "type": "assignment_expression", "text": "Bytes[i] = reverse8(msg->buf[i])", "parent": 951, "children": [966, 969, 970], "start_point": {"row": 170, "column": 6}, "end_point": {"row": 170, "column": 38}}, {"id": 966, "type": "subscript_expression", "text": "Bytes[i]", "parent": 965, "children": [967, 968], "start_point": {"row": 170, "column": 6}, "end_point": {"row": 170, "column": 14}}, {"id": 967, "type": "identifier", "text": "Bytes", "parent": 966, "children": [], "start_point": {"row": 170, "column": 6}, "end_point": {"row": 170, "column": 11}}, {"id": 968, "type": "identifier", "text": "i", "parent": 966, "children": [], "start_point": {"row": 170, "column": 12}, "end_point": {"row": 170, "column": 13}}, {"id": 969, "type": "=", "text": "=", "parent": 965, "children": [], "start_point": {"row": 170, "column": 15}, "end_point": {"row": 170, "column": 16}}, {"id": 970, "type": "call_expression", "text": "reverse8(msg->buf[i])", "parent": 965, "children": [971, 972], "start_point": {"row": 170, "column": 17}, "end_point": {"row": 170, "column": 38}}, {"id": 971, "type": "identifier", "text": "reverse8", "parent": 970, "children": [], "start_point": {"row": 170, "column": 17}, "end_point": {"row": 170, "column": 25}}, {"id": 972, "type": "argument_list", "text": "(msg->buf[i])", "parent": 970, "children": [973], "start_point": {"row": 170, "column": 25}, "end_point": {"row": 170, "column": 38}}, {"id": 973, "type": "subscript_expression", "text": "msg->buf[i]", "parent": 972, "children": [974, 977], "start_point": {"row": 170, "column": 26}, "end_point": {"row": 170, "column": 37}}, {"id": 974, "type": "field_expression", "text": "msg->buf", "parent": 973, "children": [975, 976], "start_point": {"row": 170, "column": 26}, "end_point": {"row": 170, "column": 34}}, {"id": 975, "type": "identifier", "text": "msg", "parent": 974, "children": [], "start_point": {"row": 170, "column": 26}, "end_point": {"row": 170, "column": 29}}, {"id": 976, "type": "field_identifier", "text": "buf", "parent": 974, "children": [], "start_point": {"row": 170, "column": 31}, "end_point": {"row": 170, "column": 34}}, {"id": 977, "type": "identifier", "text": "i", "parent": 973, "children": [], "start_point": {"row": 170, "column": 35}, "end_point": {"row": 170, "column": 36}}, {"id": 978, "type": "assignment_expression", "text": "dataOut = *(uint64_t *)Bytes", "parent": 943, "children": [979, 980, 981], "start_point": {"row": 173, "column": 4}, "end_point": {"row": 173, "column": 32}}, {"id": 979, "type": "identifier", "text": "dataOut", "parent": 978, "children": [], "start_point": {"row": 173, "column": 4}, "end_point": {"row": 173, "column": 11}}, {"id": 980, "type": "=", "text": "=", "parent": 978, "children": [], "start_point": {"row": 173, "column": 12}, "end_point": {"row": 173, "column": 13}}, {"id": 981, "type": "pointer_expression", "text": "*(uint64_t *)Bytes", "parent": 978, "children": [982, 983], "start_point": {"row": 173, "column": 14}, "end_point": {"row": 173, "column": 32}}, {"id": 982, "type": "*", "text": "*", "parent": 981, "children": [], "start_point": {"row": 173, "column": 14}, "end_point": {"row": 173, "column": 15}}, {"id": 983, "type": "cast_expression", "text": "(uint64_t *)Bytes", "parent": 981, "children": [984, 988], "start_point": {"row": 173, "column": 15}, "end_point": {"row": 173, "column": 32}}, {"id": 984, "type": "type_descriptor", "text": "uint64_t *", "parent": 983, "children": [985, 986], "start_point": {"row": 173, "column": 16}, "end_point": {"row": 173, "column": 26}}, {"id": 985, "type": "primitive_type", "text": "uint64_t", "parent": 984, "children": [], "start_point": {"row": 173, "column": 16}, "end_point": {"row": 173, "column": 24}}, {"id": 986, "type": "abstract_pointer_declarator", "text": "*", "parent": 984, "children": [987], "start_point": {"row": 173, "column": 25}, "end_point": {"row": 173, "column": 26}}, {"id": 987, "type": "*", "text": "*", "parent": 986, "children": [], "start_point": {"row": 173, "column": 25}, "end_point": {"row": 173, "column": 26}}, {"id": 988, "type": "identifier", "text": "Bytes", "parent": 983, "children": [], "start_point": {"row": 173, "column": 27}, "end_point": {"row": 173, "column": 32}}, {"id": 989, "type": "assignment_expression", "text": "dataOut = reverse64(dataOut)", "parent": 943, "children": [990, 991, 992], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 175, "column": 32}}, {"id": 990, "type": "identifier", "text": "dataOut", "parent": 989, "children": [], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 175, "column": 11}}, {"id": 991, "type": "=", "text": "=", "parent": 989, "children": [], "start_point": {"row": 175, "column": 12}, "end_point": {"row": 175, "column": 13}}, {"id": 992, "type": "call_expression", "text": "reverse64(dataOut)", "parent": 989, "children": [993, 994], "start_point": {"row": 175, "column": 14}, "end_point": {"row": 175, "column": 32}}, {"id": 993, "type": "identifier", "text": "reverse64", "parent": 992, "children": [], "start_point": {"row": 175, "column": 14}, "end_point": {"row": 175, "column": 23}}, {"id": 994, "type": "argument_list", "text": "(dataOut)", "parent": 992, "children": [995], "start_point": {"row": 175, "column": 23}, "end_point": {"row": 175, "column": 32}}, {"id": 995, "type": "identifier", "text": "dataOut", "parent": 994, "children": [], "start_point": {"row": 175, "column": 24}, "end_point": {"row": 175, "column": 31}}, {"id": 996, "type": "declaration", "text": "uint8_t calcStartbit = (7 - (startBit%8)) + 8*(startBit/8);", "parent": 943, "children": [997, 998], "start_point": {"row": 177, "column": 4}, "end_point": {"row": 177, "column": 63}}, {"id": 997, "type": "primitive_type", "text": "uint8_t", "parent": 996, "children": [], "start_point": {"row": 177, "column": 4}, "end_point": {"row": 177, "column": 11}}, {"id": 998, "type": "init_declarator", "text": "calcStartbit = (7 - (startBit%8)) + 8*(startBit/8)", "parent": 996, "children": [999, 1000, 1001], "start_point": {"row": 177, "column": 12}, "end_point": {"row": 177, "column": 62}}, {"id": 999, "type": "identifier", "text": "calcStartbit", "parent": 998, "children": [], "start_point": {"row": 177, "column": 12}, "end_point": {"row": 177, "column": 24}}, {"id": 1000, "type": "=", "text": "=", "parent": 998, "children": [], "start_point": {"row": 177, "column": 25}, "end_point": {"row": 177, "column": 26}}, {"id": 1001, "type": "binary_expression", "text": "(7 - (startBit%8)) + 8*(startBit/8)", "parent": 998, "children": [1002, 1011, 1012], "start_point": {"row": 177, "column": 27}, "end_point": {"row": 177, "column": 62}}, {"id": 1002, "type": "parenthesized_expression", "text": "(7 - (startBit%8))", "parent": 1001, "children": [1003], "start_point": {"row": 177, "column": 27}, "end_point": {"row": 177, "column": 45}}, {"id": 1003, "type": "binary_expression", "text": "7 - (startBit%8)", "parent": 1002, "children": [1004, 1005, 1006], "start_point": {"row": 177, "column": 28}, "end_point": {"row": 177, "column": 44}}, {"id": 1004, "type": "number_literal", "text": "7", "parent": 1003, "children": [], "start_point": {"row": 177, "column": 28}, "end_point": {"row": 177, "column": 29}}, {"id": 1005, "type": "-", "text": "-", "parent": 1003, "children": [], "start_point": {"row": 177, "column": 30}, "end_point": {"row": 177, "column": 31}}, {"id": 1006, "type": "parenthesized_expression", "text": "(startBit%8)", "parent": 1003, "children": [1007], "start_point": {"row": 177, "column": 32}, "end_point": {"row": 177, "column": 44}}, {"id": 1007, "type": "binary_expression", "text": "startBit%8", "parent": 1006, "children": [1008, 1009, 1010], "start_point": {"row": 177, "column": 33}, "end_point": {"row": 177, "column": 43}}, {"id": 1008, "type": "identifier", "text": "startBit", "parent": 1007, "children": [], "start_point": {"row": 177, "column": 33}, "end_point": {"row": 177, "column": 41}}, {"id": 1009, "type": "%", "text": "%", "parent": 1007, "children": [], "start_point": {"row": 177, "column": 41}, "end_point": {"row": 177, "column": 42}}, {"id": 1010, "type": "number_literal", "text": "8", "parent": 1007, "children": [], "start_point": {"row": 177, "column": 42}, "end_point": {"row": 177, "column": 43}}, {"id": 1011, "type": "+", "text": "+", "parent": 1001, "children": [], "start_point": {"row": 177, "column": 46}, "end_point": {"row": 177, "column": 47}}, {"id": 1012, "type": "binary_expression", "text": "8*(startBit/8)", "parent": 1001, "children": [1013, 1014, 1015], "start_point": {"row": 177, "column": 48}, "end_point": {"row": 177, "column": 62}}, {"id": 1013, "type": "number_literal", "text": "8", "parent": 1012, "children": [], "start_point": {"row": 177, "column": 48}, "end_point": {"row": 177, "column": 49}}, {"id": 1014, "type": "*", "text": "*", "parent": 1012, "children": [], "start_point": {"row": 177, "column": 49}, "end_point": {"row": 177, "column": 50}}, {"id": 1015, "type": "parenthesized_expression", "text": "(startBit/8)", "parent": 1012, "children": [1016], "start_point": {"row": 177, "column": 50}, "end_point": {"row": 177, "column": 62}}, {"id": 1016, "type": "binary_expression", "text": "startBit/8", "parent": 1015, "children": [1017, 1018, 1019], "start_point": {"row": 177, "column": 51}, "end_point": {"row": 177, "column": 61}}, {"id": 1017, "type": "identifier", "text": "startBit", "parent": 1016, "children": [], "start_point": {"row": 177, "column": 51}, "end_point": {"row": 177, "column": 59}}, {"id": 1018, "type": "/", "text": "/", "parent": 1016, "children": [], "start_point": {"row": 177, "column": 59}, "end_point": {"row": 177, "column": 60}}, {"id": 1019, "type": "number_literal", "text": "8", "parent": 1016, "children": [], "start_point": {"row": 177, "column": 60}, "end_point": {"row": 177, "column": 61}}, {"id": 1020, "type": "assignment_expression", "text": "dataOut = dataOut << calcStartbit", "parent": 943, "children": [1021, 1022, 1023], "start_point": {"row": 178, "column": 4}, "end_point": {"row": 178, "column": 37}}, {"id": 1021, "type": "identifier", "text": "dataOut", "parent": 1020, "children": [], "start_point": {"row": 178, "column": 4}, "end_point": {"row": 178, "column": 11}}, {"id": 1022, "type": "=", "text": "=", "parent": 1020, "children": [], "start_point": {"row": 178, "column": 12}, "end_point": {"row": 178, "column": 13}}, {"id": 1023, "type": "binary_expression", "text": "dataOut << calcStartbit", "parent": 1020, "children": [1024, 1025, 1026], "start_point": {"row": 178, "column": 14}, "end_point": {"row": 178, "column": 37}}, {"id": 1024, "type": "identifier", "text": "dataOut", "parent": 1023, "children": [], "start_point": {"row": 178, "column": 14}, "end_point": {"row": 178, "column": 21}}, {"id": 1025, "type": "<<", "text": "<<", "parent": 1023, "children": [], "start_point": {"row": 178, "column": 22}, "end_point": {"row": 178, "column": 24}}, {"id": 1026, "type": "identifier", "text": "calcStartbit", "parent": 1023, "children": [], "start_point": {"row": 178, "column": 25}, "end_point": {"row": 178, "column": 37}}, {"id": 1027, "type": "assignment_expression", "text": "dataOut = dataOut >> (64 - (bitLength))", "parent": 943, "children": [1028, 1029, 1030], "start_point": {"row": 180, "column": 4}, "end_point": {"row": 180, "column": 43}}, {"id": 1028, "type": "identifier", "text": "dataOut", "parent": 1027, "children": [], "start_point": {"row": 180, "column": 4}, "end_point": {"row": 180, "column": 11}}, {"id": 1029, "type": "=", "text": "=", "parent": 1027, "children": [], "start_point": {"row": 180, "column": 12}, "end_point": {"row": 180, "column": 13}}, {"id": 1030, "type": "binary_expression", "text": "dataOut >> (64 - (bitLength))", "parent": 1027, "children": [1031, 1032, 1033], "start_point": {"row": 180, "column": 14}, "end_point": {"row": 180, "column": 43}}, {"id": 1031, "type": "identifier", "text": "dataOut", "parent": 1030, "children": [], "start_point": {"row": 180, "column": 14}, "end_point": {"row": 180, "column": 21}}, {"id": 1032, "type": ">>", "text": ">>", "parent": 1030, "children": [], "start_point": {"row": 180, "column": 22}, "end_point": {"row": 180, "column": 24}}, {"id": 1033, "type": "parenthesized_expression", "text": "(64 - (bitLength))", "parent": 1030, "children": [1034], "start_point": {"row": 180, "column": 25}, "end_point": {"row": 180, "column": 43}}, {"id": 1034, "type": "binary_expression", "text": "64 - (bitLength)", "parent": 1033, "children": [1035, 1036, 1037], "start_point": {"row": 180, "column": 26}, "end_point": {"row": 180, "column": 42}}, {"id": 1035, "type": "number_literal", "text": "64", "parent": 1034, "children": [], "start_point": {"row": 180, "column": 26}, "end_point": {"row": 180, "column": 28}}, {"id": 1036, "type": "-", "text": "-", "parent": 1034, "children": [], "start_point": {"row": 180, "column": 29}, "end_point": {"row": 180, "column": 30}}, {"id": 1037, "type": "parenthesized_expression", "text": "(bitLength)", "parent": 1034, "children": [1038], "start_point": {"row": 180, "column": 31}, "end_point": {"row": 180, "column": 42}}, {"id": 1038, "type": "identifier", "text": "bitLength", "parent": 1037, "children": [], "start_point": {"row": 180, "column": 32}, "end_point": {"row": 180, "column": 41}}, {"id": 1039, "type": "else_clause", "text": "else {\n //send message into uint64\n dataOut = *(uint64_t *)msg->buf;\n //Shift left then right to isolate the buf\n dataOut = dataOut << (64 - (startBit+bitLength));\n dataOut = dataOut >> (64 - bitLength);\n }", "parent": 943, "children": [], "start_point": {"row": 181, "column": 4}, "end_point": {"row": 187, "column": 3}}, {"id": 1040, "type": "assignment_expression", "text": "dataOut = *(uint64_t *)msg->buf", "parent": 1039, "children": [1041, 1042, 1043], "start_point": {"row": 183, "column": 4}, "end_point": {"row": 183, "column": 35}}, {"id": 1041, "type": "identifier", "text": "dataOut", "parent": 1040, "children": [], "start_point": {"row": 183, "column": 4}, "end_point": {"row": 183, "column": 11}}, {"id": 1042, "type": "=", "text": "=", "parent": 1040, "children": [], "start_point": {"row": 183, "column": 12}, "end_point": {"row": 183, "column": 13}}, {"id": 1043, "type": "pointer_expression", "text": "*(uint64_t *)msg->buf", "parent": 1040, "children": [1044, 1045], "start_point": {"row": 183, "column": 14}, "end_point": {"row": 183, "column": 35}}, {"id": 1044, "type": "*", "text": "*", "parent": 1043, "children": [], "start_point": {"row": 183, "column": 14}, "end_point": {"row": 183, "column": 15}}, {"id": 1045, "type": "cast_expression", "text": "(uint64_t *)msg->buf", "parent": 1043, "children": [1046, 1050], "start_point": {"row": 183, "column": 15}, "end_point": {"row": 183, "column": 35}}, {"id": 1046, "type": "type_descriptor", "text": "uint64_t *", "parent": 1045, "children": [1047, 1048], "start_point": {"row": 183, "column": 16}, "end_point": {"row": 183, "column": 26}}, {"id": 1047, "type": "primitive_type", "text": "uint64_t", "parent": 1046, "children": [], "start_point": {"row": 183, "column": 16}, "end_point": {"row": 183, "column": 24}}, {"id": 1048, "type": "abstract_pointer_declarator", "text": "*", "parent": 1046, "children": [1049], "start_point": {"row": 183, "column": 25}, "end_point": {"row": 183, "column": 26}}, {"id": 1049, "type": "*", "text": "*", "parent": 1048, "children": [], "start_point": {"row": 183, "column": 25}, "end_point": {"row": 183, "column": 26}}, {"id": 1050, "type": "field_expression", "text": "msg->buf", "parent": 1045, "children": [1051, 1052], "start_point": {"row": 183, "column": 27}, "end_point": {"row": 183, "column": 35}}, {"id": 1051, "type": "identifier", "text": "msg", "parent": 1050, "children": [], "start_point": {"row": 183, "column": 27}, "end_point": {"row": 183, "column": 30}}, {"id": 1052, "type": "field_identifier", "text": "buf", "parent": 1050, "children": [], "start_point": {"row": 183, "column": 32}, "end_point": {"row": 183, "column": 35}}, {"id": 1053, "type": "assignment_expression", "text": "dataOut = dataOut << (64 - (startBit+bitLength))", "parent": 1039, "children": [1054, 1055, 1056], "start_point": {"row": 185, "column": 4}, "end_point": {"row": 185, "column": 52}}, {"id": 1054, "type": "identifier", "text": "dataOut", "parent": 1053, "children": [], "start_point": {"row": 185, "column": 4}, "end_point": {"row": 185, "column": 11}}, {"id": 1055, "type": "=", "text": "=", "parent": 1053, "children": [], "start_point": {"row": 185, "column": 12}, "end_point": {"row": 185, "column": 13}}, {"id": 1056, "type": "binary_expression", "text": "dataOut << (64 - (startBit+bitLength))", "parent": 1053, "children": [1057, 1058, 1059], "start_point": {"row": 185, "column": 14}, "end_point": {"row": 185, "column": 52}}, {"id": 1057, "type": "identifier", "text": "dataOut", "parent": 1056, "children": [], "start_point": {"row": 185, "column": 14}, "end_point": {"row": 185, "column": 21}}, {"id": 1058, "type": "<<", "text": "<<", "parent": 1056, "children": [], "start_point": {"row": 185, "column": 22}, "end_point": {"row": 185, "column": 24}}, {"id": 1059, "type": "parenthesized_expression", "text": "(64 - (startBit+bitLength))", "parent": 1056, "children": [1060], "start_point": {"row": 185, "column": 25}, "end_point": {"row": 185, "column": 52}}, {"id": 1060, "type": "binary_expression", "text": "64 - (startBit+bitLength)", "parent": 1059, "children": [1061, 1062, 1063], "start_point": {"row": 185, "column": 26}, "end_point": {"row": 185, "column": 51}}, {"id": 1061, "type": "number_literal", "text": "64", "parent": 1060, "children": [], "start_point": {"row": 185, "column": 26}, "end_point": {"row": 185, "column": 28}}, {"id": 1062, "type": "-", "text": "-", "parent": 1060, "children": [], "start_point": {"row": 185, "column": 29}, "end_point": {"row": 185, "column": 30}}, {"id": 1063, "type": "parenthesized_expression", "text": "(startBit+bitLength)", "parent": 1060, "children": [1064], "start_point": {"row": 185, "column": 31}, "end_point": {"row": 185, "column": 51}}, {"id": 1064, "type": "binary_expression", "text": "startBit+bitLength", "parent": 1063, "children": [1065, 1066, 1067], "start_point": {"row": 185, "column": 32}, "end_point": {"row": 185, "column": 50}}, {"id": 1065, "type": "identifier", "text": "startBit", "parent": 1064, "children": [], "start_point": {"row": 185, "column": 32}, "end_point": {"row": 185, "column": 40}}, {"id": 1066, "type": "+", "text": "+", "parent": 1064, "children": [], "start_point": {"row": 185, "column": 40}, "end_point": {"row": 185, "column": 41}}, {"id": 1067, "type": "identifier", "text": "bitLength", "parent": 1064, "children": [], "start_point": {"row": 185, "column": 41}, "end_point": {"row": 185, "column": 50}}, {"id": 1068, "type": "assignment_expression", "text": "dataOut = dataOut >> (64 - bitLength)", "parent": 1039, "children": [1069, 1070, 1071], "start_point": {"row": 186, "column": 4}, "end_point": {"row": 186, "column": 41}}, {"id": 1069, "type": "identifier", "text": "dataOut", "parent": 1068, "children": [], "start_point": {"row": 186, "column": 4}, "end_point": {"row": 186, "column": 11}}, {"id": 1070, "type": "=", "text": "=", "parent": 1068, "children": [], "start_point": {"row": 186, "column": 12}, "end_point": {"row": 186, "column": 13}}, {"id": 1071, "type": "binary_expression", "text": "dataOut >> (64 - bitLength)", "parent": 1068, "children": [1072, 1073, 1074], "start_point": {"row": 186, "column": 14}, "end_point": {"row": 186, "column": 41}}, {"id": 1072, "type": "identifier", "text": "dataOut", "parent": 1071, "children": [], "start_point": {"row": 186, "column": 14}, "end_point": {"row": 186, "column": 21}}, {"id": 1073, "type": ">>", "text": ">>", "parent": 1071, "children": [], "start_point": {"row": 186, "column": 22}, "end_point": {"row": 186, "column": 24}}, {"id": 1074, "type": "parenthesized_expression", "text": "(64 - bitLength)", "parent": 1071, "children": [1075], "start_point": {"row": 186, "column": 25}, "end_point": {"row": 186, "column": 41}}, {"id": 1075, "type": "binary_expression", "text": "64 - bitLength", "parent": 1074, "children": [1076, 1077, 1078], "start_point": {"row": 186, "column": 26}, "end_point": {"row": 186, "column": 40}}, {"id": 1076, "type": "number_literal", "text": "64", "parent": 1075, "children": [], "start_point": {"row": 186, "column": 26}, "end_point": {"row": 186, "column": 28}}, {"id": 1077, "type": "-", "text": "-", "parent": 1075, "children": [], "start_point": {"row": 186, "column": 29}, "end_point": {"row": 186, "column": 30}}, {"id": 1078, "type": "identifier", "text": "bitLength", "parent": 1075, "children": [], "start_point": {"row": 186, "column": 31}, "end_point": {"row": 186, "column": 40}}, {"id": 1079, "type": "declaration", "text": "double returnData = 0;", "parent": 912, "children": [1080, 1081], "start_point": {"row": 188, "column": 2}, "end_point": {"row": 188, "column": 24}}, {"id": 1080, "type": "primitive_type", "text": "double", "parent": 1079, "children": [], "start_point": {"row": 188, "column": 2}, "end_point": {"row": 188, "column": 8}}, {"id": 1081, "type": "init_declarator", "text": "returnData = 0", "parent": 1079, "children": [1082, 1083, 1084], "start_point": {"row": 188, "column": 9}, "end_point": {"row": 188, "column": 23}}, {"id": 1082, "type": "identifier", "text": "returnData", "parent": 1081, "children": [], "start_point": {"row": 188, "column": 9}, "end_point": {"row": 188, "column": 19}}, {"id": 1083, "type": "=", "text": "=", "parent": 1081, "children": [], "start_point": {"row": 188, "column": 20}, "end_point": {"row": 188, "column": 21}}, {"id": 1084, "type": "number_literal", "text": "0", "parent": 1081, "children": [], "start_point": {"row": 188, "column": 22}, "end_point": {"row": 188, "column": 23}}, {"id": 1085, "type": "if_statement", "text": "if(sign) {\n uint64_t maxVal = 1;\n for(int i=0; i<bitLength; i++) {\n maxVal *= 2;\n }\n if(dataOut > (maxVal/2)) {\n returnData = (double) dataOut - maxVal;\n returnData = bias + (Scale * returnData);\n }\n else {\n returnData = bias + (Scale * dataOut);\n }\n }\n else {\n returnData = bias + (Scale * dataOut);\n }", "parent": 912, "children": [1086, 1155], "start_point": {"row": 190, "column": 2}, "end_point": {"row": 205, "column": 3}}, {"id": 1086, "type": "parenthesized_expression", "text": "(sign)", "parent": 1085, "children": [1087], "start_point": {"row": 190, "column": 4}, "end_point": {"row": 190, "column": 10}}, {"id": 1087, "type": "identifier", "text": "sign", "parent": 1086, "children": [], "start_point": {"row": 190, "column": 5}, "end_point": {"row": 190, "column": 9}}, {"id": 1088, "type": "declaration", "text": "uint64_t maxVal = 1;", "parent": 1085, "children": [1089, 1090], "start_point": {"row": 191, "column": 4}, "end_point": {"row": 191, "column": 24}}, {"id": 1089, "type": "primitive_type", "text": "uint64_t", "parent": 1088, "children": [], "start_point": {"row": 191, "column": 4}, "end_point": {"row": 191, "column": 12}}, {"id": 1090, "type": "init_declarator", "text": "maxVal = 1", "parent": 1088, "children": [1091, 1092, 1093], "start_point": {"row": 191, "column": 13}, "end_point": {"row": 191, "column": 23}}, {"id": 1091, "type": "identifier", "text": "maxVal", "parent": 1090, "children": [], "start_point": {"row": 191, "column": 13}, "end_point": {"row": 191, "column": 19}}, {"id": 1092, "type": "=", "text": "=", "parent": 1090, "children": [], "start_point": {"row": 191, "column": 20}, "end_point": {"row": 191, "column": 21}}, {"id": 1093, "type": "number_literal", "text": "1", "parent": 1090, "children": [], "start_point": {"row": 191, "column": 22}, "end_point": {"row": 191, "column": 23}}, {"id": 1094, "type": "for_statement", "text": "for(int i=0; i<bitLength; i++) {\n maxVal *= 2;\n }", "parent": 1085, "children": [1095, 1101, 1105], "start_point": {"row": 192, "column": 4}, "end_point": {"row": 194, "column": 5}}, {"id": 1095, "type": "declaration", "text": "int i=0;", "parent": 1094, "children": [1096, 1097], "start_point": {"row": 192, "column": 8}, "end_point": {"row": 192, "column": 16}}, {"id": 1096, "type": "primitive_type", "text": "int", "parent": 1095, "children": [], "start_point": {"row": 192, "column": 8}, "end_point": {"row": 192, "column": 11}}, {"id": 1097, "type": "init_declarator", "text": "i=0", "parent": 1095, "children": [1098, 1099, 1100], "start_point": {"row": 192, "column": 12}, "end_point": {"row": 192, "column": 15}}, {"id": 1098, "type": "identifier", "text": "i", "parent": 1097, "children": [], "start_point": {"row": 192, "column": 12}, "end_point": {"row": 192, "column": 13}}, {"id": 1099, "type": "=", "text": "=", "parent": 1097, "children": [], "start_point": {"row": 192, "column": 13}, "end_point": {"row": 192, "column": 14}}, {"id": 1100, "type": "number_literal", "text": "0", "parent": 1097, "children": [], "start_point": {"row": 192, "column": 14}, "end_point": {"row": 192, "column": 15}}, {"id": 1101, "type": "binary_expression", "text": "i<bitLength", "parent": 1094, "children": [1102, 1103, 1104], "start_point": {"row": 192, "column": 17}, "end_point": {"row": 192, "column": 28}}, {"id": 1102, "type": "identifier", "text": "i", "parent": 1101, "children": [], "start_point": {"row": 192, "column": 17}, "end_point": {"row": 192, "column": 18}}, {"id": 1103, "type": "<", "text": "<", "parent": 1101, "children": [], "start_point": {"row": 192, "column": 18}, "end_point": {"row": 192, "column": 19}}, {"id": 1104, "type": "identifier", "text": "bitLength", "parent": 1101, "children": [], "start_point": {"row": 192, "column": 19}, "end_point": {"row": 192, "column": 28}}, {"id": 1105, "type": "update_expression", "text": "i++", "parent": 1094, "children": [1106, 1107], "start_point": {"row": 192, "column": 30}, "end_point": {"row": 192, "column": 33}}, {"id": 1106, "type": "identifier", "text": "i", "parent": 1105, "children": [], "start_point": {"row": 192, "column": 30}, "end_point": {"row": 192, "column": 31}}, {"id": 1107, "type": "++", "text": "++", "parent": 1105, "children": [], "start_point": {"row": 192, "column": 31}, "end_point": {"row": 192, "column": 33}}, {"id": 1108, "type": "assignment_expression", "text": "maxVal *= 2", "parent": 1094, "children": [1109, 1110, 1111], "start_point": {"row": 193, "column": 6}, "end_point": {"row": 193, "column": 17}}, {"id": 1109, "type": "identifier", "text": "maxVal", "parent": 1108, "children": [], "start_point": {"row": 193, "column": 6}, "end_point": {"row": 193, "column": 12}}, {"id": 1110, "type": "*=", "text": "*=", "parent": 1108, "children": [], "start_point": {"row": 193, "column": 13}, "end_point": {"row": 193, "column": 15}}, {"id": 1111, "type": "number_literal", "text": "2", "parent": 1108, "children": [], "start_point": {"row": 193, "column": 16}, "end_point": {"row": 193, "column": 17}}, {"id": 1112, "type": "if_statement", "text": "if(dataOut > (maxVal/2)) {\n returnData = (double) dataOut - maxVal;\n returnData = bias + (Scale * returnData);\n }\n else {\n returnData = bias + (Scale * dataOut);\n }", "parent": 1085, "children": [1113, 1143], "start_point": {"row": 195, "column": 4}, "end_point": {"row": 201, "column": 5}}, {"id": 1113, "type": "parenthesized_expression", "text": "(dataOut > (maxVal/2))", "parent": 1112, "children": [1114], "start_point": {"row": 195, "column": 6}, "end_point": {"row": 195, "column": 28}}, {"id": 1114, "type": "binary_expression", "text": "dataOut > (maxVal/2)", "parent": 1113, "children": [1115, 1116, 1117], "start_point": {"row": 195, "column": 7}, "end_point": {"row": 195, "column": 27}}, {"id": 1115, "type": "identifier", "text": "dataOut", "parent": 1114, "children": [], "start_point": {"row": 195, "column": 7}, "end_point": {"row": 195, "column": 14}}, {"id": 1116, "type": ">", "text": ">", "parent": 1114, "children": [], "start_point": {"row": 195, "column": 15}, "end_point": {"row": 195, "column": 16}}, {"id": 1117, "type": "parenthesized_expression", "text": "(maxVal/2)", "parent": 1114, "children": [1118], "start_point": {"row": 195, "column": 17}, "end_point": {"row": 195, "column": 27}}, {"id": 1118, "type": "binary_expression", "text": "maxVal/2", "parent": 1117, "children": [1119, 1120, 1121], "start_point": {"row": 195, "column": 18}, "end_point": {"row": 195, "column": 26}}, {"id": 1119, "type": "identifier", "text": "maxVal", "parent": 1118, "children": [], "start_point": {"row": 195, "column": 18}, "end_point": {"row": 195, "column": 24}}, {"id": 1120, "type": "/", "text": "/", "parent": 1118, "children": [], "start_point": {"row": 195, "column": 24}, "end_point": {"row": 195, "column": 25}}, {"id": 1121, "type": "number_literal", "text": "2", "parent": 1118, "children": [], "start_point": {"row": 195, "column": 25}, "end_point": {"row": 195, "column": 26}}, {"id": 1122, "type": "assignment_expression", "text": "returnData = (double) dataOut - maxVal", "parent": 1112, "children": [1123, 1124, 1125], "start_point": {"row": 196, "column": 6}, "end_point": {"row": 196, "column": 44}}, {"id": 1123, "type": "identifier", "text": "returnData", "parent": 1122, "children": [], "start_point": {"row": 196, "column": 6}, "end_point": {"row": 196, "column": 16}}, {"id": 1124, "type": "=", "text": "=", "parent": 1122, "children": [], "start_point": {"row": 196, "column": 17}, "end_point": {"row": 196, "column": 18}}, {"id": 1125, "type": "binary_expression", "text": "(double) dataOut - maxVal", "parent": 1122, "children": [1126, 1130, 1131], "start_point": {"row": 196, "column": 19}, "end_point": {"row": 196, "column": 44}}, {"id": 1126, "type": "cast_expression", "text": "(double) dataOut", "parent": 1125, "children": [1127, 1129], "start_point": {"row": 196, "column": 19}, "end_point": {"row": 196, "column": 35}}, {"id": 1127, "type": "type_descriptor", "text": "double", "parent": 1126, "children": [1128], "start_point": {"row": 196, "column": 20}, "end_point": {"row": 196, "column": 26}}, {"id": 1128, "type": "primitive_type", "text": "double", "parent": 1127, "children": [], "start_point": {"row": 196, "column": 20}, "end_point": {"row": 196, "column": 26}}, {"id": 1129, "type": "identifier", "text": "dataOut", "parent": 1126, "children": [], "start_point": {"row": 196, "column": 28}, "end_point": {"row": 196, "column": 35}}, {"id": 1130, "type": "-", "text": "-", "parent": 1125, "children": [], "start_point": {"row": 196, "column": 36}, "end_point": {"row": 196, "column": 37}}, {"id": 1131, "type": "identifier", "text": "maxVal", "parent": 1125, "children": [], "start_point": {"row": 196, "column": 38}, "end_point": {"row": 196, "column": 44}}, {"id": 1132, "type": "assignment_expression", "text": "returnData = bias + (Scale * returnData)", "parent": 1112, "children": [1133, 1134, 1135], "start_point": {"row": 197, "column": 6}, "end_point": {"row": 197, "column": 46}}, {"id": 1133, "type": "identifier", "text": "returnData", "parent": 1132, "children": [], "start_point": {"row": 197, "column": 6}, "end_point": {"row": 197, "column": 16}}, {"id": 1134, "type": "=", "text": "=", "parent": 1132, "children": [], "start_point": {"row": 197, "column": 17}, "end_point": {"row": 197, "column": 18}}, {"id": 1135, "type": "binary_expression", "text": "bias + (Scale * returnData)", "parent": 1132, "children": [1136, 1137, 1138], "start_point": {"row": 197, "column": 19}, "end_point": {"row": 197, "column": 46}}, {"id": 1136, "type": "identifier", "text": "bias", "parent": 1135, "children": [], "start_point": {"row": 197, "column": 19}, "end_point": {"row": 197, "column": 23}}, {"id": 1137, "type": "+", "text": "+", "parent": 1135, "children": [], "start_point": {"row": 197, "column": 24}, "end_point": {"row": 197, "column": 25}}, {"id": 1138, "type": "parenthesized_expression", "text": "(Scale * returnData)", "parent": 1135, "children": [1139], "start_point": {"row": 197, "column": 26}, "end_point": {"row": 197, "column": 46}}, {"id": 1139, "type": "binary_expression", "text": "Scale * returnData", "parent": 1138, "children": [1140, 1141, 1142], "start_point": {"row": 197, "column": 27}, "end_point": {"row": 197, "column": 45}}, {"id": 1140, "type": "identifier", "text": "Scale", "parent": 1139, "children": [], "start_point": {"row": 197, "column": 27}, "end_point": {"row": 197, "column": 32}}, {"id": 1141, "type": "*", "text": "*", "parent": 1139, "children": [], "start_point": {"row": 197, "column": 33}, "end_point": {"row": 197, "column": 34}}, {"id": 1142, "type": "identifier", "text": "returnData", "parent": 1139, "children": [], "start_point": {"row": 197, "column": 35}, "end_point": {"row": 197, "column": 45}}, {"id": 1143, "type": "else_clause", "text": "else {\n returnData = bias + (Scale * dataOut);\n }", "parent": 1112, "children": [], "start_point": {"row": 199, "column": 4}, "end_point": {"row": 201, "column": 5}}, {"id": 1144, "type": "assignment_expression", "text": "returnData = bias + (Scale * dataOut)", "parent": 1143, "children": [1145, 1146, 1147], "start_point": {"row": 200, "column": 6}, "end_point": {"row": 200, "column": 43}}, {"id": 1145, "type": "identifier", "text": "returnData", "parent": 1144, "children": [], "start_point": {"row": 200, "column": 6}, "end_point": {"row": 200, "column": 16}}, {"id": 1146, "type": "=", "text": "=", "parent": 1144, "children": [], "start_point": {"row": 200, "column": 17}, "end_point": {"row": 200, "column": 18}}, {"id": 1147, "type": "binary_expression", "text": "bias + (Scale * dataOut)", "parent": 1144, "children": [1148, 1149, 1150], "start_point": {"row": 200, "column": 19}, "end_point": {"row": 200, "column": 43}}, {"id": 1148, "type": "identifier", "text": "bias", "parent": 1147, "children": [], "start_point": {"row": 200, "column": 19}, "end_point": {"row": 200, "column": 23}}, {"id": 1149, "type": "+", "text": "+", "parent": 1147, "children": [], "start_point": {"row": 200, "column": 24}, "end_point": {"row": 200, "column": 25}}, {"id": 1150, "type": "parenthesized_expression", "text": "(Scale * dataOut)", "parent": 1147, "children": [1151], "start_point": {"row": 200, "column": 26}, "end_point": {"row": 200, "column": 43}}, {"id": 1151, "type": "binary_expression", "text": "Scale * dataOut", "parent": 1150, "children": [1152, 1153, 1154], "start_point": {"row": 200, "column": 27}, "end_point": {"row": 200, "column": 42}}, {"id": 1152, "type": "identifier", "text": "Scale", "parent": 1151, "children": [], "start_point": {"row": 200, "column": 27}, "end_point": {"row": 200, "column": 32}}, {"id": 1153, "type": "*", "text": "*", "parent": 1151, "children": [], "start_point": {"row": 200, "column": 33}, "end_point": {"row": 200, "column": 34}}, {"id": 1154, "type": "identifier", "text": "dataOut", "parent": 1151, "children": [], "start_point": {"row": 200, "column": 35}, "end_point": {"row": 200, "column": 42}}, {"id": 1155, "type": "else_clause", "text": "else {\n returnData = bias + (Scale * dataOut);\n }", "parent": 1085, "children": [], "start_point": {"row": 203, "column": 2}, "end_point": {"row": 205, "column": 3}}, {"id": 1156, "type": "assignment_expression", "text": "returnData = bias + (Scale * dataOut)", "parent": 1155, "children": [1157, 1158, 1159], "start_point": {"row": 204, "column": 4}, "end_point": {"row": 204, "column": 41}}, {"id": 1157, "type": "identifier", "text": "returnData", "parent": 1156, "children": [], "start_point": {"row": 204, "column": 4}, "end_point": {"row": 204, "column": 14}}, {"id": 1158, "type": "=", "text": "=", "parent": 1156, "children": [], "start_point": {"row": 204, "column": 15}, "end_point": {"row": 204, "column": 16}}, {"id": 1159, "type": "binary_expression", "text": "bias + (Scale * dataOut)", "parent": 1156, "children": [1160, 1161, 1162], "start_point": {"row": 204, "column": 17}, "end_point": {"row": 204, "column": 41}}, {"id": 1160, "type": "identifier", "text": "bias", "parent": 1159, "children": [], "start_point": {"row": 204, "column": 17}, "end_point": {"row": 204, "column": 21}}, {"id": 1161, "type": "+", "text": "+", "parent": 1159, "children": [], "start_point": {"row": 204, "column": 22}, "end_point": {"row": 204, "column": 23}}, {"id": 1162, "type": "parenthesized_expression", "text": "(Scale * dataOut)", "parent": 1159, "children": [1163], "start_point": {"row": 204, "column": 24}, "end_point": {"row": 204, "column": 41}}, {"id": 1163, "type": "binary_expression", "text": "Scale * dataOut", "parent": 1162, "children": [1164, 1165, 1166], "start_point": {"row": 204, "column": 25}, "end_point": {"row": 204, "column": 40}}, {"id": 1164, "type": "identifier", "text": "Scale", "parent": 1163, "children": [], "start_point": {"row": 204, "column": 25}, "end_point": {"row": 204, "column": 30}}, {"id": 1165, "type": "*", "text": "*", "parent": 1163, "children": [], "start_point": {"row": 204, "column": 31}, "end_point": {"row": 204, "column": 32}}, {"id": 1166, "type": "identifier", "text": "dataOut", "parent": 1163, "children": [], "start_point": {"row": 204, "column": 33}, "end_point": {"row": 204, "column": 40}}, {"id": 1167, "type": "return_statement", "text": "return(returnData);", "parent": 912, "children": [1168], "start_point": {"row": 207, "column": 2}, "end_point": {"row": 207, "column": 21}}, {"id": 1168, "type": "parenthesized_expression", "text": "(returnData)", "parent": 1167, "children": [1169], "start_point": {"row": 207, "column": 8}, "end_point": {"row": 207, "column": 20}}, {"id": 1169, "type": "identifier", "text": "returnData", "parent": 1168, "children": [], "start_point": {"row": 207, "column": 9}, "end_point": {"row": 207, "column": 19}}]}, "node_categories": {"declarations": {"functions": [3, 5, 148, 150, 183, 185, 358, 360, 635, 637, 912, 914], "variables": [8, 11, 83, 153, 188, 191, 197, 203, 209, 363, 368, 371, 374, 377, 380, 383, 386, 389, 410, 417, 485, 502, 546, 577, 612, 640, 645, 648, 651, 654, 657, 660, 663, 666, 687, 694, 762, 779, 823, 854, 889, 917, 922, 925, 928, 931, 934, 937, 940, 946, 952, 996, 1079, 1088, 1095], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [92, 99, 106, 113, 120, 127, 131, 135, 137, 138, 141, 142, 159, 160, 161, 162, 163, 164, 165, 170, 171, 172, 218, 219, 220, 221, 222, 227, 228, 229, 237, 238, 241, 242, 243, 244, 245, 246, 254, 255, 256, 257, 258, 259, 260, 261, 273, 274, 277, 278, 279, 280, 281, 282, 290, 291, 292, 293, 294, 295, 296, 297, 309, 310, 313, 314, 315, 316, 317, 318, 326, 327, 328, 329, 330, 331, 332, 333, 345, 346, 347, 351, 352, 398, 399, 400, 405, 406, 423, 427, 435, 438, 439, 457, 458, 461, 462, 469, 470, 476, 477, 492, 497, 500, 507, 512, 513, 520, 523, 524, 531, 534, 535, 542, 551, 552, 553, 556, 561, 564, 565, 572, 583, 587, 591, 592, 597, 600, 607, 618, 622, 626, 627, 632, 675, 676, 677, 682, 683, 700, 704, 712, 715, 716, 734, 735, 738, 739, 746, 747, 753, 754, 769, 774, 777, 784, 789, 790, 797, 800, 801, 808, 811, 812, 819, 828, 829, 830, 833, 838, 841, 842, 849, 860, 864, 868, 869, 874, 877, 884, 895, 899, 903, 904, 909, 944, 958, 962, 966, 970, 973, 974, 981, 983, 992, 1001, 1002, 1003, 1006, 1007, 1012, 1015, 1016, 1023, 1030, 1033, 1034, 1037, 1043, 1045, 1050, 1056, 1059, 1060, 1063, 1064, 1071, 1074, 1075, 1086, 1101, 1105, 1113, 1114, 1117, 1118, 1125, 1126, 1135, 1138, 1139, 1147, 1150, 1151, 1159, 1162, 1163, 1168], "assignments": [89, 96, 103, 110, 117, 124, 156, 215, 234, 270, 306, 342, 395, 430, 443, 447, 452, 466, 481, 517, 528, 539, 569, 590, 604, 625, 672, 707, 720, 724, 729, 743, 758, 794, 805, 816, 846, 867, 881, 902, 965, 978, 989, 1020, 1027, 1040, 1053, 1068, 1108, 1122, 1132, 1144, 1156], "loops": [416, 576, 611, 693, 853, 888, 951, 1094], "conditionals": [6, 10, 15, 86, 90, 93, 97, 100, 104, 107, 111, 114, 118, 121, 125, 128, 132, 136, 143, 145, 151, 155, 157, 166, 173, 182, 186, 190, 194, 200, 206, 212, 216, 223, 226, 230, 231, 235, 239, 247, 251, 252, 262, 266, 267, 271, 275, 283, 287, 288, 298, 302, 303, 307, 311, 319, 323, 324, 334, 338, 339, 343, 348, 353, 357, 361, 364, 367, 370, 373, 376, 379, 382, 385, 388, 392, 396, 403, 407, 409, 413, 420, 424, 426, 428, 431, 434, 436, 437, 440, 444, 446, 448, 450, 453, 455, 456, 459, 463, 467, 471, 475, 478, 482, 490, 498, 499, 501, 505, 508, 510, 511, 514, 516, 518, 521, 525, 527, 529, 532, 538, 540, 543, 545, 549, 557, 566, 570, 573, 575, 580, 584, 588, 593, 594, 595, 598, 601, 602, 605, 608, 610, 615, 619, 623, 628, 629, 630, 633, 634, 638, 641, 644, 647, 650, 653, 656, 659, 662, 665, 669, 673, 680, 684, 686, 690, 697, 701, 703, 705, 708, 711, 713, 714, 717, 721, 723, 725, 727, 730, 732, 733, 736, 740, 744, 748, 752, 755, 759, 767, 775, 776, 778, 782, 785, 787, 788, 791, 793, 795, 798, 802, 804, 806, 809, 815, 817, 820, 822, 826, 834, 843, 847, 850, 852, 857, 861, 865, 870, 871, 872, 875, 878, 879, 882, 885, 887, 892, 896, 900, 905, 906, 907, 910, 911, 915, 918, 921, 924, 927, 930, 933, 936, 939, 942, 943, 945, 949, 955, 959, 963, 967, 968, 971, 975, 976, 977, 979, 988, 990, 993, 995, 999, 1008, 1017, 1021, 1024, 1026, 1028, 1031, 1038, 1041, 1051, 1052, 1054, 1057, 1065, 1067, 1069, 1072, 1078, 1082, 1085, 1087, 1091, 1098, 1102, 1104, 1106, 1109, 1112, 1115, 1119, 1123, 1129, 1131, 1133, 1136, 1140, 1142, 1145, 1148, 1152, 1154, 1157, 1160, 1164, 1166, 1169], "returns": [134, 181, 356, 1167], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 16, 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, 88, 95, 102, 109, 116, 123, 130, 147, 168, 169, 175, 176, 178, 180, 196, 202, 208, 214, 225, 233, 249, 264, 269, 285, 300, 305, 321, 336, 341, 350, 355, 394, 401, 415, 422, 433, 442, 465, 473, 480, 484, 536, 554, 559, 562, 568, 582, 586, 617, 621, 671, 678, 692, 699, 710, 719, 742, 750, 757, 761, 813, 831, 836, 839, 845, 859, 863, 894, 898, 950, 957, 961, 1004, 1010, 1013, 1019, 1035, 1061, 1076, 1084, 1093, 1100, 1111, 1121], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "unknown", "text_snippet": "uint8_t bitSize(uint64_t v) {\n static const uint8_t lookup[64] = {\n 0, // change to 1 if you want "}, {"node_id": 5, "universal_type": "function", "name": "unknown", "text_snippet": "bitSize(uint64_t v)"}, {"node_id": 148, "universal_type": "function", "name": "unknown", "text_snippet": "uint8_t reverse8(uint8_t inputData) {\n inputData = ((inputData * 0x0802LU & 0x22110LU) | (inputData"}, {"node_id": 150, "universal_type": "function", "name": "unknown", "text_snippet": "reverse8(uint8_t inputData)"}, {"node_id": 183, "universal_type": "function", "name": "unknown", "text_snippet": "uint64_t reverse64(uint64_t inputData) {\n //reverse bytes\n //Efficient knuth 64 bit reverse\n stat"}, {"node_id": 185, "universal_type": "function", "name": "unknown", "text_snippet": "reverse64(uint64_t inputData)"}, {"node_id": 358, "universal_type": "function", "name": "CAN_encode", "text_snippet": "void CAN_encode(CAN_message_t *msg, double inputDataDouble, uint8_t startBit, uint8_t bitLength, boo"}, {"node_id": 360, "universal_type": "function", "name": "byteOrder,", "text_snippet": "CAN_encode(CAN_message_t *msg, double inputDataDouble, uint8_t startBit, uint8_t bitLength, bool byt"}, {"node_id": 635, "universal_type": "function", "name": "CAN_encode", "text_snippet": "void CAN_encode(CAN_message_t *msg, int inputDataInt, uint8_t startBit, uint8_t bitLength, bool byte"}, {"node_id": 637, "universal_type": "function", "name": "inputDataInt,", "text_snippet": "CAN_encode(CAN_message_t *msg, int inputDataInt, uint8_t startBit, uint8_t bitLength, bool byteOrder"}, {"node_id": 912, "universal_type": "function", "name": "byteOrder,", "text_snippet": "double CAN_decode(CAN_message_t *msg, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign"}, {"node_id": 914, "universal_type": "function", "name": "byteOrder,", "text_snippet": "CAN_decode(CAN_message_t *msg, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, doubl"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <FlexCAN.h>\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "#include <FlexCAN.h>\n\nuint8_t bitSize(uint64_t v) {\n static const uint8_t lookup[64] = {\n 0, // change to 1 if you want bitSize(0) = 1\n 1, 2, 53, 3, 7, 54, 27, 4, 38, 41, 8, 34, 55, 48, 28,\n 62, 5, 39, 46, 44, 42, 22, 9, 24, 35, 59, 56, 49, 18, 29, 11,\n 63, 52, 6, 26, 37, 40, 33, 47, 61, 45, 43, 21, 23, 58, 17, 10,\n 51, 25, 36, 32, 60, 20, 57, 16, 50, 31, 19, 15, 30, 14, 13, 12\n};\n static const uint64_t multiplicator = 0x022fdd63cc95386dUL;\n v |= v >> 1;\n v |= v >> 2;\n v |= v >> 4;\n v |= v >> 8;\n v |= v >> 16;\n v |= v >> 32;\n v++;\n\n return lookup[(uint64_t)(v * multiplicator) >> 58];\n}\n\nuint8_t reverse8(uint8_t inputData) {\n inputData = ((inputData * 0x0802LU & 0x22110LU) | (inputData * 0x8020LU & 0x88440LU)) * 0x10101LU >> 16; \n return inputData;\n}\n\nuint64_t reverse64(uint64_t inputData) {\n //reverse bytes\n //Efficient knuth 64 bit reverse\n static const uint64_t m0 = 0x5555555555555555LLU;\n static const uint64_t m1 = 0x0300c0303030c303LLU;\n static const uint64_t m2 = 0x00c0300c03f0003fLLU;\n static const uint64_t m3 = 0x00000ffc00003fffLLU;\n inputData = ((inputData >> 1) & m0) | (inputData & m0) << 1;\n inputData = inputData ^ (((inputData >> 4) ^ inputData) & m1) ^ ((((inputData >> 4) ^ inputData) & m1) << 4);\n inputData = inputData ^ (((inputData >> 8) ^ inputData) & m2) ^ ((((inputData >> 8) ^ inputData) & m2) << 8);\n inputData = inputData ^ (((inputData >> 20) ^ inputData) & m3) ^ ((((inputData >> 20) ^ inputData) & m3) << 20);\n inputData = (inputData >> 34) | (inputData << 30);\n return inputData;\n}\n\nvoid CAN_encode(CAN_message_t *msg, double inputDataDouble, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias) { //byteOrder is 1 for MSB, 0 for LSB. Signed is 1 for signed, 0 for unsigned\n\n uint64_t inputData = 0x0000000000000000LU;\n //scale and bias\n inputDataDouble = (1/Scale) * (inputDataDouble - bias);\n uint64_t maxVal = 1;\n for(int i=0; i<bitLength; i++) {\n maxVal *= 2;\n }\n //Sign value if appropriate\n if(sign) {\n if(inputDataDouble < 0) {\n inputDataDouble += maxVal;\n }\n inputData = inputDataDouble;\n }\n else\n inputData = inputDataDouble;\n\n if(inputData > (maxVal-1)) {\n inputData = (maxVal-1);\n }\n else if(inputData < 0){\n inputData = 0;\n }\n //access input as byte array and evaluate length of array\n //take advantage of endianness\n uint8_t *bytePointer = (uint8_t *)&inputData;\n\n if(byteOrder) {\n //locate MSB\n uint8_t trueLen = bitSize(inputData);\n //if more bits are present than can be accomodated cut them off\n if(trueLen > bitLength) {\n inputData = inputData >> (trueLen - bitLength);\n }\n //Shift buf to 64th position\n inputData = inputData << (64 - bitLength);\n\n //Reverse int\n inputData = reverse64(inputData);\n //calculate altered start position and move\n uint8_t calcStartbit = (7 - startBit%8) + 8*(startBit/8);\n inputData = inputData << calcStartbit;\n \n //reverse each byte and move to appropriate place\n for(int i=0; i<8; i++) {\n msg->buf[i] |= reverse8(bytePointer[i]);\n }\n }else {\n //Shift buf to appropriate place\n inputData = inputData << startBit;\n //push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= bytePointer[i];\n }\n }\n}\n\nvoid CAN_encode(CAN_message_t *msg, int inputDataInt, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias) { //byteOrder is 1 for MSB, 0 for LSB. Signed is 1 for signed, 0 for unsigned\n\n uint64_t inputData = 0x0000000000000000LU;\n //scale and bias\n inputDataInt = (1/Scale) * (inputDataInt - bias);\n //Sign value if appropriate\n uint64_t maxVal = 1;\n for(int i=0; i<bitLength; i++) {\n maxVal *= 2;\n }\n \n if(sign) {\n\n if(inputDataInt < 0) {\n inputDataInt += maxVal;\n }\n inputData = inputDataInt;\n }\n else\n inputData = inputDataInt;\n\n if(inputData > (maxVal-1)) {\n inputData = (maxVal-1);\n }\n else if(inputData < 0){\n inputData = 0;\n }\n //access input as byte array\n //take advantage of endianness\n uint8_t *bytePointer = (uint8_t *)&inputData;\n\n if(byteOrder) {\n //locate MSB\n uint8_t trueLen = bitSize(inputData);\n //if more bits are present than can be accomodated cut them off\n if(trueLen > bitLength) {\n inputData = inputData >> (trueLen - bitLength);\n }\n //Shift buf to 64th position\n inputData = inputData << (64 - bitLength);\n\n //Reverse int\n inputData = reverse64(inputData);\n uint8_t calcStartbit = (7 - startBit%8) + 8*(startBit/8);\n inputData = inputData << calcStartbit;\n //reverse each byte and push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= reverse8(bytePointer[i]);\n }\n }else {\n //Shift buf to appropriate place\n inputData = inputData << startBit;\n //push to message struct\n for(int i=0; i<8; i++) {\n msg->buf[i] |= bytePointer[i];\n }\n }\n}\n\n\ndouble CAN_decode(CAN_message_t *msg, uint8_t startBit, uint8_t bitLength, bool byteOrder, bool sign, double Scale, double bias) { //byteOrder is 1 for MSB, 0 for LSB. Signed is 1 for signed, 0 for unsigned\n //Create uint64\nuint64_t dataOut;\n\n if(byteOrder) {\n uint8_t Bytes[8];\n \n //reverse all bytes\n for(int i=0; i<8; i++) {\n Bytes[i] = reverse8(msg->buf[i]);\n }\n //assemble to a uint64\n dataOut = *(uint64_t *)Bytes;\n //reverse to typical lsbfirst\n dataOut = reverse64(dataOut);\n //shift to isolate data\n uint8_t calcStartbit = (7 - (startBit%8)) + 8*(startBit/8);\n dataOut = dataOut << calcStartbit;\n //shift bits back\n dataOut = dataOut >> (64 - (bitLength));\n } else {\n //send message into uint64\n dataOut = *(uint64_t *)msg->buf;\n //Shift left then right to isolate the buf\n dataOut = dataOut << (64 - (startBit+bitLength));\n dataOut = dataOut >> (64 - bitLength);\n }\n double returnData = 0;\n //Adjust if signed and scale and bias\n if(sign) {\n uint64_t maxVal = 1;\n for(int i=0; i<bitLength; i++) {\n maxVal *= 2;\n }\n if(dataOut > (maxVal/2)) {\n returnData = (double) dataOut - maxVal;\n returnData = bias + (Scale * returnData);\n }\n else {\n returnData = bias + (Scale * dataOut);\n }\n }\n else {\n returnData = bias + (Scale * dataOut);\n }\n\n return(returnData);\n}\n"}
| 81,237
|
c
|
//
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>.
//
#import <SpotlightServices/PRSFeedback.h>
@class NSString;
@interface PRSFeedbackContext : PRSFeedback
{
long long _start_ts;
NSString *_start_method;
NSString *_last_search;
}
+ (BOOL)supportsSecureCoding;
@property(retain, nonatomic) NSString *last_search; // @synthesize last_search=_last_search;
@property(retain, nonatomic) NSString *start_method; // @synthesize start_method=_start_method;
@property(nonatomic) long long start_ts; // @synthesize start_ts=_start_ts;
- (void).cxx_destruct;
- (id)plist;
- (void)encodeWithCoder:(id)arg1;
- (id)initWithCoder:(id)arg1;
- (id)initWithFeedback:(id)arg1;
- (id)typeString;
- (id)initWithInput:(id)arg1 timestamp:(long long)arg2;
@end
| 32.12
| 25
|
(translation_unit) "//\n// Generated by class-dump 3.5 (64 bit).\n//\n// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>.\n//\n\n#import <SpotlightServices/PRSFeedback.h>\n\n@class NSString;\n\n@interface PRSFeedbackContext : PRSFeedback\n{\n long long _start_ts;\n NSString *_start_method;\n NSString *_last_search;\n}\n\n+ (BOOL)supportsSecureCoding;\n@property(retain, nonatomic) NSString *last_search; // @synthesize last_search=_last_search;\n@property(retain, nonatomic) NSString *start_method; // @synthesize start_method=_start_method;\n@property(nonatomic) long long start_ts; // @synthesize start_ts=_start_ts;\n- (void).cxx_destruct;\n- (id)plist;\n- (void)encodeWithCoder:(id)arg1;\n- (id)initWithCoder:(id)arg1;\n- (id)initWithFeedback:(id)arg1;\n- (id)typeString;\n- (id)initWithInput:(id)arg1 timestamp:(long long)arg2;\n\n@end\n\n"
(comment) "//"
(comment) "// Generated by class-dump 3.5 (64 bit)."
(comment) "//"
(comment) "// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>."
(comment) "//"
(preproc_call) "#import <SpotlightServices/PRSFeedback.h>\n"
(preproc_directive) "#import"
(preproc_arg) "<SpotlightServices/PRSFeedback.h>"
(ERROR) "@"
(ERROR) "@"
(declaration) "class NSString;"
(type_identifier) "class"
(identifier) "NSString"
(;) ";"
(ERROR) "@"
(ERROR) "@"
(function_definition) "interface PRSFeedbackContext : PRSFeedback\n{\n long long _start_ts;\n NSString *_start_method;\n NSString *_last_search;\n}"
(type_identifier) "interface"
(identifier) "PRSFeedbackContext"
(ERROR) ": PRSFeedback"
(:) ":"
(identifier) "PRSFeedback"
(compound_statement) "{\n long long _start_ts;\n NSString *_start_method;\n NSString *_last_search;\n}"
({) "{"
(declaration) "long long _start_ts;"
(sized_type_specifier) "long long"
(long) "long"
(long) "long"
(identifier) "_start_ts"
(;) ";"
(declaration) "NSString *_start_method;"
(type_identifier) "NSString"
(pointer_declarator) "*_start_method"
(*) "*"
(identifier) "_start_method"
(;) ";"
(declaration) "NSString *_last_search;"
(type_identifier) "NSString"
(pointer_declarator) "*_last_search"
(*) "*"
(identifier) "_last_search"
(;) ";"
(}) "}"
(expression_statement) "+ (BOOL)supportsSecureCoding;"
(unary_expression) "+ (BOOL)supportsSecureCoding"
(+) "+"
(cast_expression) "(BOOL)supportsSecureCoding"
(() "("
(type_descriptor) "BOOL"
(type_identifier) "BOOL"
()) ")"
(identifier) "supportsSecureCoding"
(;) ";"
(ERROR) "@"
(ERROR) "@"
(expression_statement) "property(retain, nonatomic)"
(call_expression) "property(retain, nonatomic)"
(identifier) "property"
(argument_list) "(retain, nonatomic)"
(() "("
(identifier) "retain"
(,) ","
(identifier) "nonatomic"
()) ")"
(;) ""
(declaration) "NSString *last_search;"
(type_identifier) "NSString"
(pointer_declarator) "*last_search"
(*) "*"
(identifier) "last_search"
(;) ";"
(comment) "// @synthesize last_search=_last_search;"
(ERROR) "@"
(ERROR) "@"
(expression_statement) "property(retain, nonatomic)"
(call_expression) "property(retain, nonatomic)"
(identifier) "property"
(argument_list) "(retain, nonatomic)"
(() "("
(identifier) "retain"
(,) ","
(identifier) "nonatomic"
()) ")"
(;) ""
(declaration) "NSString *start_method;"
(type_identifier) "NSString"
(pointer_declarator) "*start_method"
(*) "*"
(identifier) "start_method"
(;) ";"
(comment) "// @synthesize start_method=_start_method;"
(ERROR) "@"
(ERROR) "@"
(declaration) "property(nonatomic) long"
(macro_type_specifier) "property(nonatomic)"
(identifier) "property"
(() "("
(type_descriptor) "nonatomic"
(type_identifier) "nonatomic"
()) ")"
(identifier) "long"
(;) ""
(declaration) "long start_ts;"
(sized_type_specifier) "long"
(long) "long"
(identifier) "start_ts"
(;) ";"
(comment) "// @synthesize start_ts=_start_ts;"
(expression_statement) "- (void).cxx_destruct;"
(unary_expression) "- (void).cxx_destruct"
(-) "-"
(cast_expression) "(void).cxx_destruct"
(() "("
(type_descriptor) "void"
(primitive_type) "void"
()) ")"
(ERROR) "."
(.) "."
(identifier) "cxx_destruct"
(;) ";"
(expression_statement) "- (id)plist;"
(unary_expression) "- (id)plist"
(-) "-"
(cast_expression) "(id)plist"
(() "("
(type_descriptor) "id"
(type_identifier) "id"
()) ")"
(identifier) "plist"
(;) ";"
(expression_statement) "- (void)encodeWithCoder:(id)arg1;"
(unary_expression) "- (void)encodeWithCoder"
(-) "-"
(cast_expression) "(void)encodeWithCoder"
(() "("
(type_descriptor) "void"
(primitive_type) "void"
()) ")"
(identifier) "encodeWithCoder"
(ERROR) ":(id)arg1"
(:) ":"
(() "("
(identifier) "id"
()) ")"
(identifier) "arg1"
(;) ";"
(expression_statement) "- (id)initWithCoder:(id)arg1;"
(unary_expression) "- (id)initWithCoder"
(-) "-"
(cast_expression) "(id)initWithCoder"
(() "("
(type_descriptor) "id"
(type_identifier) "id"
()) ")"
(identifier) "initWithCoder"
(ERROR) ":(id)arg1"
(:) ":"
(() "("
(identifier) "id"
()) ")"
(identifier) "arg1"
(;) ";"
(expression_statement) "- (id)initWithFeedback:(id)arg1;"
(unary_expression) "- (id)initWithFeedback"
(-) "-"
(cast_expression) "(id)initWithFeedback"
(() "("
(type_descriptor) "id"
(type_identifier) "id"
()) ")"
(identifier) "initWithFeedback"
(ERROR) ":(id)arg1"
(:) ":"
(() "("
(identifier) "id"
()) ")"
(identifier) "arg1"
(;) ";"
(expression_statement) "- (id)typeString;"
(unary_expression) "- (id)typeString"
(-) "-"
(cast_expression) "(id)typeString"
(() "("
(type_descriptor) "id"
(type_identifier) "id"
()) ")"
(identifier) "typeString"
(;) ";"
(ERROR) "- (id)initWithInput:(id)arg1 timestamp:("
(unary_expression) "- (id)initWithInput"
(-) "-"
(cast_expression) "(id)initWithInput"
(() "("
(type_descriptor) "id"
(type_identifier) "id"
()) ")"
(identifier) "initWithInput"
(:) ":"
(() "("
(identifier) "id"
()) ")"
(type_identifier) "arg1"
(identifier) "timestamp"
(:) ":"
(() "("
(declaration) "long long)arg2;"
(sized_type_specifier) "long long"
(long) "long"
(long) "long"
(ERROR) ")"
()) ")"
(identifier) "arg2"
(;) ";"
(ERROR) "@"
(ERROR) "@"
(expression_statement) "end"
(identifier) "end"
(;) ""
| 219
| 19
|
{"language": "c", "success": true, "metadata": {"lines": 25, "avg_line_length": 32.12, "nodes": 133, "errors": 0, "source_hash": "7f9f0688f762239bbca7b8538363c93dcb39a6d39afdfc5ffaab49d1c6f82e54", "categorized_nodes": 80}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#import <SpotlightServices/PRSFeedback.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#import", "parent": 0, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "<SpotlightServices/PRSFeedback.h>", "parent": 0, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 41}}, {"id": 3, "type": "ERROR", "text": "@", "parent": null, "children": [4], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 1}}, {"id": 4, "type": "ERROR", "text": "@", "parent": 3, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 1}}, {"id": 5, "type": "declaration", "text": "class NSString;", "parent": null, "children": [6], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 16}}, {"id": 6, "type": "identifier", "text": "NSString", "parent": 5, "children": [], "start_point": {"row": 8, "column": 7}, "end_point": {"row": 8, "column": 15}}, {"id": 7, "type": "ERROR", "text": "@", "parent": null, "children": [8], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 8, "type": "ERROR", "text": "@", "parent": 7, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 9, "type": "function_definition", "text": "interface PRSFeedbackContext : PRSFeedback\n{\n long long _start_ts;\n NSString *_start_method;\n NSString *_last_search;\n}", "parent": null, "children": [10, 11, 12], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 15, "column": 1}}, {"id": 10, "type": "type_identifier", "text": "interface", "parent": 9, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 10}}, {"id": 11, "type": "identifier", "text": "PRSFeedbackContext", "parent": 9, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 29}}, {"id": 12, "type": "ERROR", "text": ": PRSFeedback", "parent": 9, "children": [13], "start_point": {"row": 10, "column": 30}, "end_point": {"row": 10, "column": 43}}, {"id": 13, "type": "identifier", "text": "PRSFeedback", "parent": 12, "children": [], "start_point": {"row": 10, "column": 32}, "end_point": {"row": 10, "column": 43}}, {"id": 14, "type": "declaration", "text": "long long _start_ts;", "parent": 9, "children": [15, 18], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 24}}, {"id": 15, "type": "sized_type_specifier", "text": "long long", "parent": 14, "children": [16, 17], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 13}}, {"id": 16, "type": "long", "text": "long", "parent": 15, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 8}}, {"id": 17, "type": "long", "text": "long", "parent": 15, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 13}}, {"id": 18, "type": "identifier", "text": "_start_ts", "parent": 14, "children": [], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 23}}, {"id": 19, "type": "declaration", "text": "NSString *_start_method;", "parent": 9, "children": [20, 21], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 28}}, {"id": 20, "type": "type_identifier", "text": "NSString", "parent": 19, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 12}}, {"id": 21, "type": "pointer_declarator", "text": "*_start_method", "parent": 19, "children": [22, 23], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 27}}, {"id": 22, "type": "*", "text": "*", "parent": 21, "children": [], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 14}}, {"id": 23, "type": "identifier", "text": "_start_method", "parent": 21, "children": [], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 27}}, {"id": 24, "type": "declaration", "text": "NSString *_last_search;", "parent": 9, "children": [25, 26], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 27}}, {"id": 25, "type": "type_identifier", "text": "NSString", "parent": 24, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 12}}, {"id": 26, "type": "pointer_declarator", "text": "*_last_search", "parent": 24, "children": [27, 28], "start_point": {"row": 14, "column": 13}, "end_point": {"row": 14, "column": 26}}, {"id": 27, "type": "*", "text": "*", "parent": 26, "children": [], "start_point": {"row": 14, "column": 13}, "end_point": {"row": 14, "column": 14}}, {"id": 28, "type": "identifier", "text": "_last_search", "parent": 26, "children": [], "start_point": {"row": 14, "column": 14}, "end_point": {"row": 14, "column": 26}}, {"id": 29, "type": "unary_expression", "text": "+ (BOOL)supportsSecureCoding", "parent": null, "children": [30, 31], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 28}}, {"id": 30, "type": "+", "text": "+", "parent": 29, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 31, "type": "cast_expression", "text": "(BOOL)supportsSecureCoding", "parent": 29, "children": [32, 34], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 28}}, {"id": 32, "type": "type_descriptor", "text": "BOOL", "parent": 31, "children": [33], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 7}}, {"id": 33, "type": "type_identifier", "text": "BOOL", "parent": 32, "children": [], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 7}}, {"id": 34, "type": "identifier", "text": "supportsSecureCoding", "parent": 31, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 28}}, {"id": 35, "type": "ERROR", "text": "@", "parent": null, "children": [36], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 36, "type": "ERROR", "text": "@", "parent": 35, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 37, "type": "call_expression", "text": "property(retain, nonatomic)", "parent": null, "children": [38, 39], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 28}}, {"id": 38, "type": "identifier", "text": "property", "parent": 37, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 9}}, {"id": 39, "type": "argument_list", "text": "(retain, nonatomic)", "parent": 37, "children": [40, 41], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 28}}, {"id": 40, "type": "identifier", "text": "retain", "parent": 39, "children": [], "start_point": {"row": 18, "column": 10}, "end_point": {"row": 18, "column": 16}}, {"id": 41, "type": "identifier", "text": "nonatomic", "parent": 39, "children": [], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 27}}, {"id": 42, "type": "declaration", "text": "NSString *last_search;", "parent": null, "children": [43, 44], "start_point": {"row": 18, "column": 29}, "end_point": {"row": 18, "column": 51}}, {"id": 43, "type": "type_identifier", "text": "NSString", "parent": 42, "children": [], "start_point": {"row": 18, "column": 29}, "end_point": {"row": 18, "column": 37}}, {"id": 44, "type": "pointer_declarator", "text": "*last_search", "parent": 42, "children": [45, 46], "start_point": {"row": 18, "column": 38}, "end_point": {"row": 18, "column": 50}}, {"id": 45, "type": "*", "text": "*", "parent": 44, "children": [], "start_point": {"row": 18, "column": 38}, "end_point": {"row": 18, "column": 39}}, {"id": 46, "type": "identifier", "text": "last_search", "parent": 44, "children": [], "start_point": {"row": 18, "column": 39}, "end_point": {"row": 18, "column": 50}}, {"id": 47, "type": "ERROR", "text": "@", "parent": null, "children": [48], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 48, "type": "ERROR", "text": "@", "parent": 47, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 49, "type": "call_expression", "text": "property(retain, nonatomic)", "parent": null, "children": [50, 51], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 28}}, {"id": 50, "type": "identifier", "text": "property", "parent": 49, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 9}}, {"id": 51, "type": "argument_list", "text": "(retain, nonatomic)", "parent": 49, "children": [52, 53], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 28}}, {"id": 52, "type": "identifier", "text": "retain", "parent": 51, "children": [], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 16}}, {"id": 53, "type": "identifier", "text": "nonatomic", "parent": 51, "children": [], "start_point": {"row": 19, "column": 18}, "end_point": {"row": 19, "column": 27}}, {"id": 54, "type": "declaration", "text": "NSString *start_method;", "parent": null, "children": [55, 56], "start_point": {"row": 19, "column": 29}, "end_point": {"row": 19, "column": 52}}, {"id": 55, "type": "type_identifier", "text": "NSString", "parent": 54, "children": [], "start_point": {"row": 19, "column": 29}, "end_point": {"row": 19, "column": 37}}, {"id": 56, "type": "pointer_declarator", "text": "*start_method", "parent": 54, "children": [57, 58], "start_point": {"row": 19, "column": 38}, "end_point": {"row": 19, "column": 51}}, {"id": 57, "type": "*", "text": "*", "parent": 56, "children": [], "start_point": {"row": 19, "column": 38}, "end_point": {"row": 19, "column": 39}}, {"id": 58, "type": "identifier", "text": "start_method", "parent": 56, "children": [], "start_point": {"row": 19, "column": 39}, "end_point": {"row": 19, "column": 51}}, {"id": 59, "type": "ERROR", "text": "@", "parent": null, "children": [60], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 60, "type": "ERROR", "text": "@", "parent": 59, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 61, "type": "declaration", "text": "property(nonatomic) long", "parent": null, "children": [62, 66], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 25}}, {"id": 62, "type": "macro_type_specifier", "text": "property(nonatomic)", "parent": 61, "children": [63, 64], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 20}}, {"id": 63, "type": "identifier", "text": "property", "parent": 62, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 9}}, {"id": 64, "type": "type_descriptor", "text": "nonatomic", "parent": 62, "children": [65], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 19}}, {"id": 65, "type": "type_identifier", "text": "nonatomic", "parent": 64, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 19}}, {"id": 66, "type": "identifier", "text": "long", "parent": 61, "children": [], "start_point": {"row": 20, "column": 21}, "end_point": {"row": 20, "column": 25}}, {"id": 67, "type": "declaration", "text": "long start_ts;", "parent": null, "children": [68, 70], "start_point": {"row": 20, "column": 26}, "end_point": {"row": 20, "column": 40}}, {"id": 68, "type": "sized_type_specifier", "text": "long", "parent": 67, "children": [69], "start_point": {"row": 20, "column": 26}, "end_point": {"row": 20, "column": 30}}, {"id": 69, "type": "long", "text": "long", "parent": 68, "children": [], "start_point": {"row": 20, "column": 26}, "end_point": {"row": 20, "column": 30}}, {"id": 70, "type": "identifier", "text": "start_ts", "parent": 67, "children": [], "start_point": {"row": 20, "column": 31}, "end_point": {"row": 20, "column": 39}}, {"id": 71, "type": "unary_expression", "text": "- (void).cxx_destruct", "parent": null, "children": [72, 73], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 21}}, {"id": 72, "type": "-", "text": "-", "parent": 71, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 73, "type": "cast_expression", "text": "(void).cxx_destruct", "parent": 71, "children": [74, 76], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 21}}, {"id": 74, "type": "type_descriptor", "text": "void", "parent": 73, "children": [75], "start_point": {"row": 21, "column": 3}, "end_point": {"row": 21, "column": 7}}, {"id": 75, "type": "primitive_type", "text": "void", "parent": 74, "children": [], "start_point": {"row": 21, "column": 3}, "end_point": {"row": 21, "column": 7}}, {"id": 76, "type": "identifier", "text": "cxx_destruct", "parent": 73, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 21}}, {"id": 77, "type": "unary_expression", "text": "- (id)plist", "parent": null, "children": [78, 79], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 11}}, {"id": 78, "type": "-", "text": "-", "parent": 77, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 79, "type": "cast_expression", "text": "(id)plist", "parent": 77, "children": [80, 82], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 11}}, {"id": 80, "type": "type_descriptor", "text": "id", "parent": 79, "children": [81], "start_point": {"row": 22, "column": 3}, "end_point": {"row": 22, "column": 5}}, {"id": 81, "type": "type_identifier", "text": "id", "parent": 80, "children": [], "start_point": {"row": 22, "column": 3}, "end_point": {"row": 22, "column": 5}}, {"id": 82, "type": "identifier", "text": "plist", "parent": 79, "children": [], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 11}}, {"id": 83, "type": "unary_expression", "text": "- (void)encodeWithCoder", "parent": null, "children": [84, 85], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 23}}, {"id": 84, "type": "-", "text": "-", "parent": 83, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 85, "type": "cast_expression", "text": "(void)encodeWithCoder", "parent": 83, "children": [86, 88], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 23}}, {"id": 86, "type": "type_descriptor", "text": "void", "parent": 85, "children": [87], "start_point": {"row": 23, "column": 3}, "end_point": {"row": 23, "column": 7}}, {"id": 87, "type": "primitive_type", "text": "void", "parent": 86, "children": [], "start_point": {"row": 23, "column": 3}, "end_point": {"row": 23, "column": 7}}, {"id": 88, "type": "identifier", "text": "encodeWithCoder", "parent": 85, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 23}}, {"id": 89, "type": "ERROR", "text": ":(id)arg1", "parent": null, "children": [90, 91], "start_point": {"row": 23, "column": 23}, "end_point": {"row": 23, "column": 32}}, {"id": 90, "type": "identifier", "text": "id", "parent": 89, "children": [], "start_point": {"row": 23, "column": 25}, "end_point": {"row": 23, "column": 27}}, {"id": 91, "type": "identifier", "text": "arg1", "parent": 89, "children": [], "start_point": {"row": 23, "column": 28}, "end_point": {"row": 23, "column": 32}}, {"id": 92, "type": "unary_expression", "text": "- (id)initWithCoder", "parent": null, "children": [93, 94], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 19}}, {"id": 93, "type": "-", "text": "-", "parent": 92, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 94, "type": "cast_expression", "text": "(id)initWithCoder", "parent": 92, "children": [95, 97], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 19}}, {"id": 95, "type": "type_descriptor", "text": "id", "parent": 94, "children": [96], "start_point": {"row": 24, "column": 3}, "end_point": {"row": 24, "column": 5}}, {"id": 96, "type": "type_identifier", "text": "id", "parent": 95, "children": [], "start_point": {"row": 24, "column": 3}, "end_point": {"row": 24, "column": 5}}, {"id": 97, "type": "identifier", "text": "initWithCoder", "parent": 94, "children": [], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 19}}, {"id": 98, "type": "ERROR", "text": ":(id)arg1", "parent": null, "children": [99, 100], "start_point": {"row": 24, "column": 19}, "end_point": {"row": 24, "column": 28}}, {"id": 99, "type": "identifier", "text": "id", "parent": 98, "children": [], "start_point": {"row": 24, "column": 21}, "end_point": {"row": 24, "column": 23}}, {"id": 100, "type": "identifier", "text": "arg1", "parent": 98, "children": [], "start_point": {"row": 24, "column": 24}, "end_point": {"row": 24, "column": 28}}, {"id": 101, "type": "unary_expression", "text": "- (id)initWithFeedback", "parent": null, "children": [102, 103], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 22}}, {"id": 102, "type": "-", "text": "-", "parent": 101, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 103, "type": "cast_expression", "text": "(id)initWithFeedback", "parent": 101, "children": [104, 106], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 22}}, {"id": 104, "type": "type_descriptor", "text": "id", "parent": 103, "children": [105], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 5}}, {"id": 105, "type": "type_identifier", "text": "id", "parent": 104, "children": [], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 5}}, {"id": 106, "type": "identifier", "text": "initWithFeedback", "parent": 103, "children": [], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 22}}, {"id": 107, "type": "ERROR", "text": ":(id)arg1", "parent": null, "children": [108, 109], "start_point": {"row": 25, "column": 22}, "end_point": {"row": 25, "column": 31}}, {"id": 108, "type": "identifier", "text": "id", "parent": 107, "children": [], "start_point": {"row": 25, "column": 24}, "end_point": {"row": 25, "column": 26}}, {"id": 109, "type": "identifier", "text": "arg1", "parent": 107, "children": [], "start_point": {"row": 25, "column": 27}, "end_point": {"row": 25, "column": 31}}, {"id": 110, "type": "unary_expression", "text": "- (id)typeString", "parent": null, "children": [111, 112], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 16}}, {"id": 111, "type": "-", "text": "-", "parent": 110, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 1}}, {"id": 112, "type": "cast_expression", "text": "(id)typeString", "parent": 110, "children": [113, 115], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 16}}, {"id": 113, "type": "type_descriptor", "text": "id", "parent": 112, "children": [114], "start_point": {"row": 26, "column": 3}, "end_point": {"row": 26, "column": 5}}, {"id": 114, "type": "type_identifier", "text": "id", "parent": 113, "children": [], "start_point": {"row": 26, "column": 3}, "end_point": {"row": 26, "column": 5}}, {"id": 115, "type": "identifier", "text": "typeString", "parent": 112, "children": [], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 16}}, {"id": 116, "type": "ERROR", "text": "- (id)initWithInput:(id)arg1 timestamp:(", "parent": null, "children": [117, 123, 124, 125], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 40}}, {"id": 117, "type": "unary_expression", "text": "- (id)initWithInput", "parent": 116, "children": [118, 119], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 19}}, {"id": 118, "type": "-", "text": "-", "parent": 117, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 1}}, {"id": 119, "type": "cast_expression", "text": "(id)initWithInput", "parent": 117, "children": [120, 122], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 19}}, {"id": 120, "type": "type_descriptor", "text": "id", "parent": 119, "children": [121], "start_point": {"row": 27, "column": 3}, "end_point": {"row": 27, "column": 5}}, {"id": 121, "type": "type_identifier", "text": "id", "parent": 120, "children": [], "start_point": {"row": 27, "column": 3}, "end_point": {"row": 27, "column": 5}}, {"id": 122, "type": "identifier", "text": "initWithInput", "parent": 119, "children": [], "start_point": {"row": 27, "column": 6}, "end_point": {"row": 27, "column": 19}}, {"id": 123, "type": "identifier", "text": "id", "parent": 116, "children": [], "start_point": {"row": 27, "column": 21}, "end_point": {"row": 27, "column": 23}}, {"id": 124, "type": "type_identifier", "text": "arg1", "parent": 116, "children": [], "start_point": {"row": 27, "column": 24}, "end_point": {"row": 27, "column": 28}}, {"id": 125, "type": "identifier", "text": "timestamp", "parent": 116, "children": [], "start_point": {"row": 27, "column": 29}, "end_point": {"row": 27, "column": 38}}, {"id": 126, "type": "declaration", "text": "long long)arg2;", "parent": null, "children": [127, 130], "start_point": {"row": 27, "column": 40}, "end_point": {"row": 27, "column": 55}}, {"id": 127, "type": "sized_type_specifier", "text": "long long", "parent": 126, "children": [128, 129], "start_point": {"row": 27, "column": 40}, "end_point": {"row": 27, "column": 49}}, {"id": 128, "type": "long", "text": "long", "parent": 127, "children": [], "start_point": {"row": 27, "column": 40}, "end_point": {"row": 27, "column": 44}}, {"id": 129, "type": "long", "text": "long", "parent": 127, "children": [], "start_point": {"row": 27, "column": 45}, "end_point": {"row": 27, "column": 49}}, {"id": 130, "type": "identifier", "text": "arg2", "parent": 126, "children": [], "start_point": {"row": 27, "column": 50}, "end_point": {"row": 27, "column": 54}}, {"id": 131, "type": "ERROR", "text": "@", "parent": null, "children": [132], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 1}}, {"id": 132, "type": "ERROR", "text": "@", "parent": 131, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 1}}]}, "node_categories": {"declarations": {"functions": [9], "variables": [5, 14, 19, 24, 42, 54, 61, 67, 126], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [29, 31, 37, 49, 71, 73, 77, 79, 83, 85, 92, 94, 101, 103, 110, 112, 117, 119], "assignments": [], "loops": [], "conditionals": [6, 10, 11, 13, 15, 18, 20, 23, 25, 28, 33, 34, 38, 40, 41, 43, 46, 50, 52, 53, 55, 58, 62, 63, 65, 66, 68, 70, 76, 81, 82, 88, 90, 91, 96, 97, 99, 100, 105, 106, 108, 109, 114, 115, 121, 122, 123, 124, 125, 127, 130], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "PRSFeedbackContext", "text_snippet": "interface PRSFeedbackContext : PRSFeedback\n{\n long long _start_ts;\n NSString *_start_method;\n "}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// Generated by class-dump 3.5 (64 bit).\n//\n// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>.\n//\n\n#import <SpotlightServices/PRSFeedback.h>\n\n@class NSString;\n\n@interface PRSFeedbackContext : PRSFeedback\n{\n long long _start_ts;\n NSString *_start_method;\n NSString *_last_search;\n}\n\n+ (BOOL)supportsSecureCoding;\n@property(retain, nonatomic) NSString *last_search; // @synthesize last_search=_last_search;\n@property(retain, nonatomic) NSString *start_method; // @synthesize start_method=_start_method;\n@property(nonatomic) long long start_ts; // @synthesize start_ts=_start_ts;\n- (void).cxx_destruct;\n- (id)plist;\n- (void)encodeWithCoder:(id)arg1;\n- (id)initWithCoder:(id)arg1;\n- (id)initWithFeedback:(id)arg1;\n- (id)typeString;\n- (id)initWithInput:(id)arg1 timestamp:(long long)arg2;\n\n@end\n\n"}
| 81,238
|
c
|
/* Copyright (C) 2013 <NAME>, see COPYING.DJ for details */
/* Copyright (C) 2002 <NAME>, see COPYING.DJ for details */
/* Copyright (C) 1995 <NAME>, see COPYING.DJ for details */
#ifndef __dj_include_malloc_h_
#define __dj_include_malloc_h_
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __dj_ENFORCE_ANSI_FREESTANDING
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
|| !defined(__STRICT_ANSI__) || defined(__cplusplus)
#endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */
#ifndef __STRICT_ANSI__
#ifndef _POSIX_SOURCE
#include <stdlib.h>
void *memalign(size_t _align, size_t _amt);
#endif /* !_POSIX_SOURCE */
#endif /* !__STRICT_ANSI__ */
#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
#ifndef __dj_ENFORCE_FUNCTION_CALLS
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */
#ifdef __cplusplus
}
#endif
#endif /* !__dj_include_malloc_h_ */
| 33.36
| 25
|
(translation_unit) "/* Copyright (C) 2013 <NAME>, see COPYING.DJ for details */\n/* Copyright (C) 2002 <NAME>, see COPYING.DJ for details */\n/* Copyright (C) 1995 <NAME>, see COPYING.DJ for details */\n#ifndef __dj_include_malloc_h_\n#define __dj_include_malloc_h_\n\n#ifdef __cplusplus\nextern "C" {\n#endif\n\n#ifndef __dj_ENFORCE_ANSI_FREESTANDING\n\n#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \\n || !defined(__STRICT_ANSI__) || defined(__cplusplus)\n\n#endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */\n\n#ifndef __STRICT_ANSI__\n\n#ifndef _POSIX_SOURCE\n\n#include <stdlib.h>\nvoid *memalign(size_t _align, size_t _amt);\n\n#endif /* !_POSIX_SOURCE */\n#endif /* !__STRICT_ANSI__ */\n#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */\n\n#ifndef __dj_ENFORCE_FUNCTION_CALLS\n#endif /* !__dj_ENFORCE_FUNCTION_CALLS */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* !__dj_include_malloc_h_ */\n"
(comment) "/* Copyright (C) 2013 <NAME>, see COPYING.DJ for details */"
(comment) "/* Copyright (C) 2002 <NAME>, see COPYING.DJ for details */"
(comment) "/* Copyright (C) 1995 <NAME>, see COPYING.DJ for details */"
(preproc_ifdef) "#ifndef __dj_include_malloc_h_\n#define __dj_include_malloc_h_\n\n#ifdef __cplusplus\nextern "C" {\n#endif\n\n#ifndef __dj_ENFORCE_ANSI_FREESTANDING\n\n#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \\n || !defined(__STRICT_ANSI__) || defined(__cplusplus)\n\n#endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */\n\n#ifndef __STRICT_ANSI__\n\n#ifndef _POSIX_SOURCE\n\n#include <stdlib.h>\nvoid *memalign(size_t _align, size_t _amt);\n\n#endif /* !_POSIX_SOURCE */\n#endif /* !__STRICT_ANSI__ */\n#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */\n\n#ifndef __dj_ENFORCE_FUNCTION_CALLS\n#endif /* !__dj_ENFORCE_FUNCTION_CALLS */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif"
(#ifndef) "#ifndef"
(identifier) "__dj_include_malloc_h_"
(preproc_def) "#define __dj_include_malloc_h_\n"
(#define) "#define"
(identifier) "__dj_include_malloc_h_"
(preproc_ifdef) "#ifdef __cplusplus\nextern "C" {\n#endif\n\n#ifndef __dj_ENFORCE_ANSI_FREESTANDING\n\n#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \\n || !defined(__STRICT_ANSI__) || defined(__cplusplus)\n\n#endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */\n\n#ifndef __STRICT_ANSI__\n\n#ifndef _POSIX_SOURCE\n\n#include <stdlib.h>\nvoid *memalign(size_t _align, size_t _amt);\n\n#endif /* !_POSIX_SOURCE */\n#endif /* !__STRICT_ANSI__ */\n#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */\n\n#ifndef __dj_ENFORCE_FUNCTION_CALLS\n#endif /* !__dj_ENFORCE_FUNCTION_CALLS */\n\n#ifdef __cplusplus\n}\n#endif"
(#ifdef) "#ifdef"
(identifier) "__cplusplus"
(linkage_specification) "extern "C" {\n#endif\n\n#ifndef __dj_ENFORCE_ANSI_FREESTANDING\n\n#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \\n || !defined(__STRICT_ANSI__) || defined(__cplusplus)\n\n#endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */\n\n#ifndef __STRICT_ANSI__\n\n#ifndef _POSIX_SOURCE\n\n#include <stdlib.h>\nvoid *memalign(size_t _align, size_t _amt);\n\n#endif /* !_POSIX_SOURCE */\n#endif /* !__STRICT_ANSI__ */\n#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */\n\n#ifndef __dj_ENFORCE_FUNCTION_CALLS\n#endif /* !__dj_ENFORCE_FUNCTION_CALLS */\n\n#ifdef __cplusplus\n}"
(extern) "extern"
(string_literal) ""C""
(") """
(string_content) "C"
(") """
(declaration_list) "{\n#endif\n\n#ifndef __dj_ENFORCE_ANSI_FREESTANDING\n\n#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \\n || !defined(__STRICT_ANSI__) || defined(__cplusplus)\n\n#endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */\n\n#ifndef __STRICT_ANSI__\n\n#ifndef _POSIX_SOURCE\n\n#include <stdlib.h>\nvoid *memalign(size_t _align, size_t _amt);\n\n#endif /* !_POSIX_SOURCE */\n#endif /* !__STRICT_ANSI__ */\n#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */\n\n#ifndef __dj_ENFORCE_FUNCTION_CALLS\n#endif /* !__dj_ENFORCE_FUNCTION_CALLS */\n\n#ifdef __cplusplus\n}"
({) "{"
(preproc_call) "#endif\n"
(preproc_directive) "#endif"
(preproc_ifdef) "#ifndef __dj_ENFORCE_ANSI_FREESTANDING\n\n#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \\n || !defined(__STRICT_ANSI__) || defined(__cplusplus)\n\n#endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */\n\n#ifndef __STRICT_ANSI__\n\n#ifndef _POSIX_SOURCE\n\n#include <stdlib.h>\nvoid *memalign(size_t _align, size_t _amt);\n\n#endif /* !_POSIX_SOURCE */\n#endif /* !__STRICT_ANSI__ */\n#endif"
(#ifndef) "#ifndef"
(identifier) "__dj_ENFORCE_ANSI_FREESTANDING"
(preproc_if) "#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \\n || !defined(__STRICT_ANSI__) || defined(__cplusplus)\n\n#endif"
(#if) "#if"
(binary_expression) "(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \\n || !defined(__STRICT_ANSI__) || defined(__cplusplus)"
(binary_expression) "(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \\n || !defined(__STRICT_ANSI__)"
(parenthesized_expression) "(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)"
(() "("
(binary_expression) "defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L"
(preproc_defined) "defined(__STDC_VERSION__)"
(defined) "defined"
(() "("
(identifier) "__STDC_VERSION__"
()) ")"
(&&) "&&"
(binary_expression) "__STDC_VERSION__ >= 199901L"
(identifier) "__STDC_VERSION__"
(>=) ">="
(number_literal) "199901L"
()) ")"
(||) "||"
(unary_expression) "!defined(__STRICT_ANSI__)"
(!) "!"
(preproc_defined) "defined(__STRICT_ANSI__)"
(defined) "defined"
(() "("
(identifier) "__STRICT_ANSI__"
()) ")"
(||) "||"
(preproc_defined) "defined(__cplusplus)"
(defined) "defined"
(() "("
(identifier) "__cplusplus"
()) ")"
(
) "\n\n"
(#endif) "#endif"
(comment) "/* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */"
(preproc_ifdef) "#ifndef __STRICT_ANSI__\n\n#ifndef _POSIX_SOURCE\n\n#include <stdlib.h>\nvoid *memalign(size_t _align, size_t _amt);\n\n#endif /* !_POSIX_SOURCE */\n#endif"
(#ifndef) "#ifndef"
(identifier) "__STRICT_ANSI__"
(preproc_ifdef) "#ifndef _POSIX_SOURCE\n\n#include <stdlib.h>\nvoid *memalign(size_t _align, size_t _amt);\n\n#endif"
(#ifndef) "#ifndef"
(identifier) "_POSIX_SOURCE"
(preproc_include) "#include <stdlib.h>\n"
(#include) "#include"
(system_lib_string) "<stdlib.h>"
(declaration) "void *memalign(size_t _align, size_t _amt);"
(primitive_type) "void"
(pointer_declarator) "*memalign(size_t _align, size_t _amt)"
(*) "*"
(function_declarator) "memalign(size_t _align, size_t _amt)"
(identifier) "memalign"
(parameter_list) "(size_t _align, size_t _amt)"
(() "("
(parameter_declaration) "size_t _align"
(primitive_type) "size_t"
(identifier) "_align"
(,) ","
(parameter_declaration) "size_t _amt"
(primitive_type) "size_t"
(identifier) "_amt"
()) ")"
(;) ";"
(#endif) "#endif"
(comment) "/* !_POSIX_SOURCE */"
(#endif) "#endif"
(comment) "/* !__STRICT_ANSI__ */"
(#endif) "#endif"
(comment) "/* !__dj_ENFORCE_ANSI_FREESTANDING */"
(preproc_ifdef) "#ifndef __dj_ENFORCE_FUNCTION_CALLS\n#endif"
(#ifndef) "#ifndef"
(identifier) "__dj_ENFORCE_FUNCTION_CALLS"
(#endif) "#endif"
(comment) "/* !__dj_ENFORCE_FUNCTION_CALLS */"
(preproc_ifdef) "#ifdef __cplusplus"
(#ifdef) "#ifdef"
(identifier) "__cplusplus"
(#endif) ""
(}) "}"
(#endif) "#endif"
(#endif) "#endif"
(comment) "/* !__dj_include_malloc_h_ */"
| 106
| 0
|
{"language": "c", "success": true, "metadata": {"lines": 25, "avg_line_length": 33.36, "nodes": 78, "errors": 0, "source_hash": "fac494b8b9bfd139ca93e3472caa209e72718731510ddc9b5399ca87b5580990", "categorized_nodes": 56}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __dj_include_malloc_h_\n#define __dj_include_malloc_h_\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#ifndef __dj_ENFORCE_ANSI_FREESTANDING\n\n#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \\\n || !defined(__STRICT_ANSI__) || defined(__cplusplus)\n\n#endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */\n\n#ifndef __STRICT_ANSI__\n\n#ifndef _POSIX_SOURCE\n\n#include <stdlib.h>\nvoid *memalign(size_t _align, size_t _amt);\n\n#endif /* !_POSIX_SOURCE */\n#endif /* !__STRICT_ANSI__ */\n#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */\n\n#ifndef __dj_ENFORCE_FUNCTION_CALLS\n#endif /* !__dj_ENFORCE_FUNCTION_CALLS */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 77], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 35, "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": "__dj_include_malloc_h_", "parent": 0, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 30}}, {"id": 3, "type": "preproc_def", "text": "#define __dj_include_malloc_h_\n", "parent": 0, "children": [4, 5], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 5, "type": "identifier", "text": "__dj_include_malloc_h_", "parent": 3, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 30}}, {"id": 6, "type": "preproc_ifdef", "text": "#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#ifndef __dj_ENFORCE_ANSI_FREESTANDING\n\n#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \\\n || !defined(__STRICT_ANSI__) || defined(__cplusplus)\n\n#endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */\n\n#ifndef __STRICT_ANSI__\n\n#ifndef _POSIX_SOURCE\n\n#include <stdlib.h>\nvoid *memalign(size_t _align, size_t _amt);\n\n#endif /* !_POSIX_SOURCE */\n#endif /* !__STRICT_ANSI__ */\n#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */\n\n#ifndef __dj_ENFORCE_FUNCTION_CALLS\n#endif /* !__dj_ENFORCE_FUNCTION_CALLS */\n\n#ifdef __cplusplus\n}\n#endif", "parent": 0, "children": [7, 8, 9, 76], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 33, "column": 6}}, {"id": 7, "type": "#ifdef", "text": "#ifdef", "parent": 6, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 6}}, {"id": 8, "type": "identifier", "text": "__cplusplus", "parent": 6, "children": [], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 18}}, {"id": 9, "type": "linkage_specification", "text": "extern \"C\" {\n#endif\n\n#ifndef __dj_ENFORCE_ANSI_FREESTANDING\n\n#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \\\n || !defined(__STRICT_ANSI__) || defined(__cplusplus)\n\n#endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */\n\n#ifndef __STRICT_ANSI__\n\n#ifndef _POSIX_SOURCE\n\n#include <stdlib.h>\nvoid *memalign(size_t _align, size_t _amt);\n\n#endif /* !_POSIX_SOURCE */\n#endif /* !__STRICT_ANSI__ */\n#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */\n\n#ifndef __dj_ENFORCE_FUNCTION_CALLS\n#endif /* !__dj_ENFORCE_FUNCTION_CALLS */\n\n#ifdef __cplusplus\n}", "parent": 6, "children": [10, 11], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 32, "column": 1}}, {"id": 10, "type": "extern", "text": "extern", "parent": 9, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 6}}, {"id": 11, "type": "string_literal", "text": "\"C\"", "parent": 9, "children": [], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 10}}, {"id": 12, "type": "preproc_call", "text": "#endif\n", "parent": 9, "children": [13], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 13, "type": "preproc_directive", "text": "#endif", "parent": 12, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 6}}, {"id": 14, "type": "preproc_ifdef", "text": "#ifndef __dj_ENFORCE_ANSI_FREESTANDING\n\n#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \\\n || !defined(__STRICT_ANSI__) || defined(__cplusplus)\n\n#endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */\n\n#ifndef __STRICT_ANSI__\n\n#ifndef _POSIX_SOURCE\n\n#include <stdlib.h>\nvoid *memalign(size_t _align, size_t _amt);\n\n#endif /* !_POSIX_SOURCE */\n#endif /* !__STRICT_ANSI__ */\n#endif", "parent": 9, "children": [15, 16, 17, 43, 67], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 26, "column": 6}}, {"id": 15, "type": "#ifndef", "text": "#ifndef", "parent": 14, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 16, "type": "identifier", "text": "__dj_ENFORCE_ANSI_FREESTANDING", "parent": 14, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 38}}, {"id": 17, "type": "preproc_if", "text": "#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \\\n || !defined(__STRICT_ANSI__) || defined(__cplusplus)\n\n#endif", "parent": 14, "children": [18, 19, 41, 42], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 15, "column": 6}}, {"id": 18, "type": "#if", "text": "#if", "parent": 17, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 3}}, {"id": 19, "type": "binary_expression", "text": "(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \\\n || !defined(__STRICT_ANSI__) || defined(__cplusplus)", "parent": 17, "children": [20, 37, 38], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 13, "column": 54}}, {"id": 20, "type": "binary_expression", "text": "(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \\\n || !defined(__STRICT_ANSI__)", "parent": 19, "children": [21, 31, 32], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 13, "column": 30}}, {"id": 21, "type": "parenthesized_expression", "text": "(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)", "parent": 20, "children": [22], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 62}}, {"id": 22, "type": "binary_expression", "text": "defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L", "parent": 21, "children": [23, 26, 27], "start_point": {"row": 12, "column": 5}, "end_point": {"row": 12, "column": 61}}, {"id": 23, "type": "preproc_defined", "text": "defined(__STDC_VERSION__)", "parent": 22, "children": [24, 25], "start_point": {"row": 12, "column": 5}, "end_point": {"row": 12, "column": 30}}, {"id": 24, "type": "defined", "text": "defined", "parent": 23, "children": [], "start_point": {"row": 12, "column": 5}, "end_point": {"row": 12, "column": 12}}, {"id": 25, "type": "identifier", "text": "__STDC_VERSION__", "parent": 23, "children": [], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 29}}, {"id": 26, "type": "&&", "text": "&&", "parent": 22, "children": [], "start_point": {"row": 12, "column": 31}, "end_point": {"row": 12, "column": 33}}, {"id": 27, "type": "binary_expression", "text": "__STDC_VERSION__ >= 199901L", "parent": 22, "children": [28, 29, 30], "start_point": {"row": 12, "column": 34}, "end_point": {"row": 12, "column": 61}}, {"id": 28, "type": "identifier", "text": "__STDC_VERSION__", "parent": 27, "children": [], "start_point": {"row": 12, "column": 34}, "end_point": {"row": 12, "column": 50}}, {"id": 29, "type": ">=", "text": ">=", "parent": 27, "children": [], "start_point": {"row": 12, "column": 51}, "end_point": {"row": 12, "column": 53}}, {"id": 30, "type": "number_literal", "text": "199901L", "parent": 27, "children": [], "start_point": {"row": 12, "column": 54}, "end_point": {"row": 12, "column": 61}}, {"id": 31, "type": "||", "text": "||", "parent": 20, "children": [], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 4}}, {"id": 32, "type": "unary_expression", "text": "!defined(__STRICT_ANSI__)", "parent": 20, "children": [33, 34], "start_point": {"row": 13, "column": 5}, "end_point": {"row": 13, "column": 30}}, {"id": 33, "type": "!", "text": "!", "parent": 32, "children": [], "start_point": {"row": 13, "column": 5}, "end_point": {"row": 13, "column": 6}}, {"id": 34, "type": "preproc_defined", "text": "defined(__STRICT_ANSI__)", "parent": 32, "children": [35, 36], "start_point": {"row": 13, "column": 6}, "end_point": {"row": 13, "column": 30}}, {"id": 35, "type": "defined", "text": "defined", "parent": 34, "children": [], "start_point": {"row": 13, "column": 6}, "end_point": {"row": 13, "column": 13}}, {"id": 36, "type": "identifier", "text": "__STRICT_ANSI__", "parent": 34, "children": [], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 29}}, {"id": 37, "type": "||", "text": "||", "parent": 19, "children": [], "start_point": {"row": 13, "column": 31}, "end_point": {"row": 13, "column": 33}}, {"id": 38, "type": "preproc_defined", "text": "defined(__cplusplus)", "parent": 19, "children": [39, 40], "start_point": {"row": 13, "column": 34}, "end_point": {"row": 13, "column": 54}}, {"id": 39, "type": "defined", "text": "defined", "parent": 38, "children": [], "start_point": {"row": 13, "column": 34}, "end_point": {"row": 13, "column": 41}}, {"id": 40, "type": "identifier", "text": "__cplusplus", "parent": 38, "children": [], "start_point": {"row": 13, "column": 42}, "end_point": {"row": 13, "column": 53}}, {"id": 41, "type": "\n", "text": "\n\n", "parent": 17, "children": [], "start_point": {"row": 13, "column": 54}, "end_point": {"row": 15, "column": 0}}, {"id": 42, "type": "#endif", "text": "#endif", "parent": 17, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 6}}, {"id": 43, "type": "preproc_ifdef", "text": "#ifndef __STRICT_ANSI__\n\n#ifndef _POSIX_SOURCE\n\n#include <stdlib.h>\nvoid *memalign(size_t _align, size_t _amt);\n\n#endif /* !_POSIX_SOURCE */\n#endif", "parent": 14, "children": [44, 45, 46, 66], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 25, "column": 6}}, {"id": 44, "type": "#ifndef", "text": "#ifndef", "parent": 43, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 7}}, {"id": 45, "type": "identifier", "text": "__STRICT_ANSI__", "parent": 43, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 23}}, {"id": 46, "type": "preproc_ifdef", "text": "#ifndef _POSIX_SOURCE\n\n#include <stdlib.h>\nvoid *memalign(size_t _align, size_t _amt);\n\n#endif", "parent": 43, "children": [47, 48, 49, 52, 65], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 24, "column": 6}}, {"id": 47, "type": "#ifndef", "text": "#ifndef", "parent": 46, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 7}}, {"id": 48, "type": "identifier", "text": "_POSIX_SOURCE", "parent": 46, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 21}}, {"id": 49, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": 46, "children": [50, 51], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 50, "type": "#include", "text": "#include", "parent": 49, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 51, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 49, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 19}}, {"id": 52, "type": "declaration", "text": "void *memalign(size_t _align, size_t _amt);", "parent": 46, "children": [53, 54], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 43}}, {"id": 53, "type": "primitive_type", "text": "void", "parent": 52, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 4}}, {"id": 54, "type": "pointer_declarator", "text": "*memalign(size_t _align, size_t _amt)", "parent": 52, "children": [55, 56], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 42}}, {"id": 55, "type": "*", "text": "*", "parent": 54, "children": [], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 6}}, {"id": 56, "type": "function_declarator", "text": "memalign(size_t _align, size_t _amt)", "parent": 54, "children": [57, 58], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 42}}, {"id": 57, "type": "identifier", "text": "memalign", "parent": 56, "children": [], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 14}}, {"id": 58, "type": "parameter_list", "text": "(size_t _align, size_t _amt)", "parent": 56, "children": [59, 62], "start_point": {"row": 22, "column": 14}, "end_point": {"row": 22, "column": 42}}, {"id": 59, "type": "parameter_declaration", "text": "size_t _align", "parent": 58, "children": [60, 61], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 28}}, {"id": 60, "type": "primitive_type", "text": "size_t", "parent": 59, "children": [], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 21}}, {"id": 61, "type": "identifier", "text": "_align", "parent": 59, "children": [], "start_point": {"row": 22, "column": 22}, "end_point": {"row": 22, "column": 28}}, {"id": 62, "type": "parameter_declaration", "text": "size_t _amt", "parent": 58, "children": [63, 64], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 41}}, {"id": 63, "type": "primitive_type", "text": "size_t", "parent": 62, "children": [], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 36}}, {"id": 64, "type": "identifier", "text": "_amt", "parent": 62, "children": [], "start_point": {"row": 22, "column": 37}, "end_point": {"row": 22, "column": 41}}, {"id": 65, "type": "#endif", "text": "#endif", "parent": 46, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 6}}, {"id": 66, "type": "#endif", "text": "#endif", "parent": 43, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 6}}, {"id": 67, "type": "#endif", "text": "#endif", "parent": 14, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 6}}, {"id": 68, "type": "preproc_ifdef", "text": "#ifndef __dj_ENFORCE_FUNCTION_CALLS\n#endif", "parent": 9, "children": [69, 70, 71], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 6}}, {"id": 69, "type": "#ifndef", "text": "#ifndef", "parent": 68, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 7}}, {"id": 70, "type": "identifier", "text": "__dj_ENFORCE_FUNCTION_CALLS", "parent": 68, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 35}}, {"id": 71, "type": "#endif", "text": "#endif", "parent": 68, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 6}}, {"id": 72, "type": "preproc_ifdef", "text": "#ifdef __cplusplus", "parent": 9, "children": [73, 74, 75], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 18}}, {"id": 73, "type": "#ifdef", "text": "#ifdef", "parent": 72, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 6}}, {"id": 74, "type": "identifier", "text": "__cplusplus", "parent": 72, "children": [], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 18}}, {"id": 75, "type": "#endif", "text": "", "parent": 72, "children": [], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 18}}, {"id": 76, "type": "#endif", "text": "#endif", "parent": 6, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 6}}, {"id": 77, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 6}}]}, "node_categories": {"declarations": {"functions": [56], "variables": [52, 59, 62], "classes": [], "imports": [49, 50], "modules": [], "enums": []}, "statements": {"expressions": [19, 20, 21, 22, 27, 32], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 6, 7, 8, 9, 14, 15, 16, 17, 18, 25, 28, 36, 40, 42, 43, 44, 45, 46, 47, 48, 57, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77], "returns": [], "exceptions": []}, "expressions": {"calls": [12], "literals": [11, 30, 51], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 56, "universal_type": "function", "name": "unknown", "text_snippet": "memalign(size_t _align, size_t _amt)"}], "class_declarations": [], "import_statements": [{"node_id": 49, "text": "#include <stdlib.h>\n"}, {"node_id": 50, "text": "#include"}]}, "original_source_code": "/* Copyright (C) 2013 <NAME>, see COPYING.DJ for details */\n/* Copyright (C) 2002 <NAME>, see COPYING.DJ for details */\n/* Copyright (C) 1995 <NAME>, see COPYING.DJ for details */\n#ifndef __dj_include_malloc_h_\n#define __dj_include_malloc_h_\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#ifndef __dj_ENFORCE_ANSI_FREESTANDING\n\n#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \\\n || !defined(__STRICT_ANSI__) || defined(__cplusplus)\n\n#endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */\n\n#ifndef __STRICT_ANSI__\n\n#ifndef _POSIX_SOURCE\n\n#include <stdlib.h>\nvoid *memalign(size_t _align, size_t _amt);\n\n#endif /* !_POSIX_SOURCE */\n#endif /* !__STRICT_ANSI__ */\n#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */\n\n#ifndef __dj_ENFORCE_FUNCTION_CALLS\n#endif /* !__dj_ENFORCE_FUNCTION_CALLS */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* !__dj_include_malloc_h_ */\n"}
| 81,239
|
c
|
/*
* Copyright (c) 1990 <NAME>
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* <NAME> at Imperial College, London.
*
* %sccs.include.redist.c%
*
* @(#)sched.c 8.1 (Berkeley) 06/06/93
*
* $Id: sched.c,v 5.2.2.1 1992/02/09 15:09:02 jsp beta $
*
*/
/*
* Process scheduler
*/
#include "am.h"
#include <sys/signal.h>
#include WAIT
#include <setjmp.h>
extern jmp_buf select_intr;
extern int select_intr_valid;
typedef struct pjob pjob;
struct pjob {
qelem hdr; /* Linked list */
int pid; /* Process ID of job */
cb_fun cb_fun; /* Callback function */
voidp cb_closure; /* Closure for callback */
union wait w; /* Status filled in by sigchld */
voidp wchan; /* Wait channel */
};
extern qelem proc_list_head;
qelem proc_list_head = { &proc_list_head, &proc_list_head };
extern qelem proc_wait_list;
qelem proc_wait_list = { &proc_wait_list, &proc_wait_list };
int task_notify_todo;
void ins_que(elem, pred)
qelem *elem, *pred;
{
qelem *p = pred->q_forw;
elem->q_back = pred;
elem->q_forw = p;
pred->q_forw = elem;
p->q_back = elem;
}
void rem_que(elem)
qelem *elem;
{
qelem *p = elem->q_forw;
qelem *p2 = elem->q_back;
p2->q_forw = p;
p->q_back = p2;
}
static pjob *sched_job(cf, ca)
cb_fun cf;
voidp ca;
{
pjob *p = ALLOC(pjob);
p->cb_fun = cf;
p->cb_closure = ca;
/*
* Now place on wait queue
*/
ins_que(&p->hdr, &proc_wait_list);
return p;
}
void run_task(tf, ta, cf, ca)
task_fun tf;
voidp ta;
cb_fun cf;
voidp ca;
{
pjob *p = sched_job(cf, ca);
int mask;
p->wchan = (voidp) p;
mask = sigblock(sigmask(SIGCHLD));
if (p->pid = background()) {
sigsetmask(mask);
return;
}
exit((*tf)(ta));
/* firewall... */
abort();
}
/*
* Schedule a task to be run when woken up
*/
void sched_task(cf, ca, wchan)
cb_fun cf;
voidp ca;
voidp wchan;
{
/*
* Allocate a new task
*/
pjob *p = sched_job(cf, ca);
#ifdef DEBUG_SLEEP
dlog("SLEEP on %#x", wchan);
#endif
p->wchan = wchan;
p->pid = 0;
bzero((voidp) &p->w, sizeof(p->w));
}
static void wakeupjob(p)
pjob *p;
{
rem_que(&p->hdr);
ins_que(&p->hdr, &proc_list_head);
task_notify_todo++;
}
void wakeup(wchan)
voidp wchan;
{
pjob *p, *p2;
#ifdef DEBUG_SLEEP
int done = 0;
#endif
if (!foreground)
return;
#ifdef DEBUG_SLEEP
/*dlog("wakeup(%#x)", wchan);*/
#endif
/*
* Can't user ITER() here because
* wakeupjob() juggles the list.
*/
for (p = FIRST(pjob, &proc_wait_list);
p2 = NEXT(pjob, p), p != HEAD(pjob, &proc_wait_list);
p = p2) {
if (p->wchan == wchan) {
#ifdef DEBUG_SLEEP
done = 1;
#endif
wakeupjob(p);
}
}
#ifdef DEBUG_SLEEP
if (!done)
dlog("Nothing SLEEPing on %#x", wchan);
#endif
}
void wakeup_task(rc, term, cl)
int rc;
int term;
voidp cl;
{
wakeup(cl);
}
/*ARGSUSED*/
void sigchld(sig)
int sig;
{
union wait w;
int pid;
#ifdef SYS5_SIGNALS
if ((pid = wait(&w)) > 0) {
#else
while ((pid = wait3((int *) &w, WNOHANG, (struct rusage *) 0)) > 0) {
#endif /* SYS5_SIGNALS */
pjob *p, *p2;
if (WIFSIGNALED(w))
plog(XLOG_ERROR, "Process %d exited with signal %d",
pid, w.w_termsig);
#ifdef DEBUG
else
dlog("Process %d exited with status %d",
pid, w.w_retcode);
#endif /* DEBUG */
for (p = FIRST(pjob, &proc_wait_list);
p2 = NEXT(pjob, p), p != HEAD(pjob, &proc_wait_list);
p = p2) {
if (p->pid == pid) {
p->w = w;
wakeupjob(p);
break;
}
}
#ifdef DEBUG
if (p) ; else dlog("can't locate task block for pid %d", pid);
#endif /* DEBUG */
}
#ifdef SYS5_SIGNALS
signal(sig, sigchld);
#endif /* SYS5_SIGNALS */
if (select_intr_valid)
longjmp(select_intr, sig);
}
/*
* Run any pending tasks.
* This must be called with SIGCHLD disabled
*/
void do_task_notify(P_void)
{
/*
* Keep taking the first item off the list and processing it.
*
* Done this way because the the callback can, quite reasonably,
* queue a new task, so no local reference into the list can be
* held here.
*/
while (FIRST(pjob, &proc_list_head) != HEAD(pjob, &proc_list_head)) {
pjob *p = FIRST(pjob, &proc_list_head);
rem_que(&p->hdr);
/*
* This job has completed
*/
--task_notify_todo;
/*
* Do callback if it exists
*/
if (p->cb_fun)
(*p->cb_fun)(p->w.w_retcode,
p->w.w_termsig, p->cb_closure);
free((voidp) p);
}
}
#ifdef HAS_SVR3_SIGNALS
/*
* 4.2 signal library based on svr3 (4.1+ bsd) interface
* From <NAME> <<EMAIL>).
*/
static int current_mask = 0;
int sigblock(mask)
int mask;
{
int sig;
int m;
int oldmask;
oldmask = current_mask;
for ( sig = 1, m = 1; sig <= MAXSIG; sig++, m <<= 1 ) {
if (mask & m) {
sighold(sig);
current_mask |= m;
}
}
return oldmask;
}
int sigsetmask(mask)
int mask;
{
int sig;
int m;
int oldmask;
oldmask = current_mask;
for ( sig = 1, m = 1; sig <= MAXSIG; sig++, m <<= 1 ) {
if (mask & m) {
sighold(sig);
current_mask |= m;
}
else {
sigrelse(sig);
current_mask &= ~m;
}
}
return oldmask;
}
#endif /* HAS_SVR3_SIGNALS */
| 19.17
| 260
|
(translation_unit) "/*\n * Copyright (c) 1990 <NAME>\n * Copyright (c) 1990 Imperial College of Science, Technology & Medicine\n * Copyright (c) 1990, 1993\n * The Regents of the University of California. All rights reserved.\n *\n * This code is derived from software contributed to Berkeley by\n * <NAME> at Imperial College, London.\n *\n * %sccs.include.redist.c%\n *\n * @(#)sched.c 8.1 (Berkeley) 06/06/93\n *\n * $Id: sched.c,v 5.2.2.1 1992/02/09 15:09:02 jsp beta $\n *\n */\n\n/*\n * Process scheduler\n */\n\n#include "am.h"\n#include <sys/signal.h>\n#include WAIT\n#include <setjmp.h>\nextern jmp_buf select_intr;\nextern int select_intr_valid;\n\ntypedef struct pjob pjob;\nstruct pjob {\n qelem hdr; /* Linked list */\n int pid; /* Process ID of job */\n cb_fun cb_fun; /* Callback function */\n voidp cb_closure; /* Closure for callback */\n union wait w; /* Status filled in by sigchld */\n voidp wchan; /* Wait channel */\n};\n\nextern qelem proc_list_head;\nqelem proc_list_head = { &proc_list_head, &proc_list_head };\nextern qelem proc_wait_list;\nqelem proc_wait_list = { &proc_wait_list, &proc_wait_list };\n\nint task_notify_todo;\n\nvoid ins_que(elem, pred)\nqelem *elem, *pred;\n{\n qelem *p = pred->q_forw;\n elem->q_back = pred;\n elem->q_forw = p;\n pred->q_forw = elem;\n p->q_back = elem;\n}\n\nvoid rem_que(elem)\nqelem *elem;\n{\n qelem *p = elem->q_forw;\n qelem *p2 = elem->q_back;\n p2->q_forw = p;\n p->q_back = p2;\n}\n\nstatic pjob *sched_job(cf, ca)\ncb_fun cf;\nvoidp ca;\n{\n pjob *p = ALLOC(pjob);\n\n p->cb_fun = cf;\n p->cb_closure = ca;\n\n /*\n * Now place on wait queue\n */\n ins_que(&p->hdr, &proc_wait_list);\n\n return p;\n}\n\nvoid run_task(tf, ta, cf, ca)\ntask_fun tf;\nvoidp ta;\ncb_fun cf;\nvoidp ca;\n{\n pjob *p = sched_job(cf, ca);\n int mask;\n\n p->wchan = (voidp) p;\n\n mask = sigblock(sigmask(SIGCHLD));\n\n if (p->pid = background()) {\n sigsetmask(mask);\n return;\n }\n\n exit((*tf)(ta));\n /* firewall... */\n abort();\n}\n\n/*\n * Schedule a task to be run when woken up\n */\nvoid sched_task(cf, ca, wchan)\ncb_fun cf;\nvoidp ca;\nvoidp wchan;\n{\n /*\n * Allocate a new task\n */\n pjob *p = sched_job(cf, ca);\n#ifdef DEBUG_SLEEP\n dlog("SLEEP on %#x", wchan);\n#endif\n p->wchan = wchan;\n p->pid = 0;\n bzero((voidp) &p->w, sizeof(p->w));\n}\n\nstatic void wakeupjob(p)\npjob *p;\n{\n rem_que(&p->hdr);\n ins_que(&p->hdr, &proc_list_head);\n task_notify_todo++;\n}\n\nvoid wakeup(wchan)\nvoidp wchan;\n{\n pjob *p, *p2;\n#ifdef DEBUG_SLEEP\n int done = 0;\n#endif\n if (!foreground)\n return;\n\n#ifdef DEBUG_SLEEP\n /*dlog("wakeup(%#x)", wchan);*/\n#endif\n /*\n * Can't user ITER() here because\n * wakeupjob() juggles the list.\n */\n for (p = FIRST(pjob, &proc_wait_list);\n p2 = NEXT(pjob, p), p != HEAD(pjob, &proc_wait_list);\n p = p2) {\n if (p->wchan == wchan) {\n#ifdef DEBUG_SLEEP\n done = 1;\n#endif\n wakeupjob(p);\n }\n }\n\n#ifdef DEBUG_SLEEP\n if (!done)\n dlog("Nothing SLEEPing on %#x", wchan);\n#endif\n}\n\nvoid wakeup_task(rc, term, cl)\nint rc;\nint term;\nvoidp cl;\n{\n wakeup(cl);\n}\n\n/*ARGSUSED*/\n\nvoid sigchld(sig)\nint sig;\n{\n union wait w;\n int pid;\n\n#ifdef SYS5_SIGNALS\n if ((pid = wait(&w)) > 0) {\n#else\n while ((pid = wait3((int *) &w, WNOHANG, (struct rusage *) 0)) > 0) {\n#endif /* SYS5_SIGNALS */\n pjob *p, *p2;\n\n if (WIFSIGNALED(w))\n plog(XLOG_ERROR, "Process %d exited with signal %d",\n pid, w.w_termsig);\n#ifdef DEBUG\n else\n dlog("Process %d exited with status %d",\n pid, w.w_retcode);\n#endif /* DEBUG */\n\n for (p = FIRST(pjob, &proc_wait_list);\n p2 = NEXT(pjob, p), p != HEAD(pjob, &proc_wait_list);\n p = p2) {\n if (p->pid == pid) {\n p->w = w;\n wakeupjob(p);\n break;\n }\n }\n\n#ifdef DEBUG\n if (p) ; else dlog("can't locate task block for pid %d", pid);\n#endif /* DEBUG */\n }\n\n#ifdef SYS5_SIGNALS\n signal(sig, sigchld);\n#endif /* SYS5_SIGNALS */\n if (select_intr_valid)\n longjmp(select_intr, sig);\n}\n\n/*\n * Run any pending tasks.\n * This must be called with SIGCHLD disabled\n */\nvoid do_task_notify(P_void)\n{\n /*\n * Keep taking the first item off the list and processing it.\n *\n * Done this way because the the callback can, quite reasonably,\n * queue a new task, so no local reference into the list can be\n * held here.\n */\n while (FIRST(pjob, &proc_list_head) != HEAD(pjob, &proc_list_head)) {\n pjob *p = FIRST(pjob, &proc_list_head);\n rem_que(&p->hdr);\n /*\n * This job has completed\n */\n --task_notify_todo;\n\n /*\n * Do callback if it exists\n */\n if (p->cb_fun)\n (*p->cb_fun)(p->w.w_retcode,\n p->w.w_termsig, p->cb_closure);\n\n free((voidp) p);\n }\n}\n\n#ifdef HAS_SVR3_SIGNALS\n/*\n * 4.2 signal library based on svr3 (4.1+ bsd) interface\n * From <NAME> <<EMAIL>).\n */\n\nstatic int current_mask = 0;\n\nint sigblock(mask)\nint mask;\n{\n int sig;\n int m;\n int oldmask;\n\n oldmask = current_mask;\n for ( sig = 1, m = 1; sig <= MAXSIG; sig++, m <<= 1 ) {\n if (mask & m) {\n sighold(sig);\n current_mask |= m;\n }\n }\n return oldmask;\n}\n\nint sigsetmask(mask)\nint mask;\n{\n int sig;\n int m;\n int oldmask;\n\n oldmask = current_mask;\n for ( sig = 1, m = 1; sig <= MAXSIG; sig++, m <<= 1 ) {\n if (mask & m) {\n sighold(sig);\n current_mask |= m;\n }\n else {\n sigrelse(sig);\n current_mask &= ~m;\n }\n }\n return oldmask;\n}\n\n#endif /* HAS_SVR3_SIGNALS */\n"
(comment) "/*\n * Copyright (c) 1990 <NAME>\n * Copyright (c) 1990 Imperial College of Science, Technology & Medicine\n * Copyright (c) 1990, 1993\n * The Regents of the University of California. All rights reserved.\n *\n * This code is derived from software contributed to Berkeley by\n * <NAME> at Imperial College, London.\n *\n * %sccs.include.redist.c%\n *\n * @(#)sched.c 8.1 (Berkeley) 06/06/93\n *\n * $Id: sched.c,v 5.2.2.1 1992/02/09 15:09:02 jsp beta $\n *\n */"
(comment) "/*\n * Process scheduler\n */"
(preproc_include) "#include "am.h"\n"
(#include) "#include"
(string_literal) ""am.h""
(") """
(string_content) "am.h"
(") """
(preproc_include) "#include <sys/signal.h>\n"
(#include) "#include"
(system_lib_string) "<sys/signal.h>"
(preproc_include) "#include WAIT\n"
(#include) "#include"
(identifier) "WAIT"
(preproc_include) "#include <setjmp.h>\n"
(#include) "#include"
(system_lib_string) "<setjmp.h>"
(declaration) "extern jmp_buf select_intr;"
(storage_class_specifier) "extern"
(extern) "extern"
(type_identifier) "jmp_buf"
(identifier) "select_intr"
(;) ";"
(declaration) "extern int select_intr_valid;"
(storage_class_specifier) "extern"
(extern) "extern"
(primitive_type) "int"
(identifier) "select_intr_valid"
(;) ";"
(type_definition) "typedef struct pjob pjob;"
(typedef) "typedef"
(struct_specifier) "struct pjob"
(struct) "struct"
(type_identifier) "pjob"
(type_identifier) "pjob"
(;) ";"
(struct_specifier) "struct pjob {\n qelem hdr; /* Linked list */\n int pid; /* Process ID of job */\n cb_fun cb_fun; /* Callback function */\n voidp cb_closure; /* Closure for callback */\n union wait w; /* Status filled in by sigchld */\n voidp wchan; /* Wait channel */\n}"
(struct) "struct"
(type_identifier) "pjob"
(field_declaration_list) "{\n qelem hdr; /* Linked list */\n int pid; /* Process ID of job */\n cb_fun cb_fun; /* Callback function */\n voidp cb_closure; /* Closure for callback */\n union wait w; /* Status filled in by sigchld */\n voidp wchan; /* Wait channel */\n}"
({) "{"
(field_declaration) "qelem hdr;"
(type_identifier) "qelem"
(field_identifier) "hdr"
(;) ";"
(comment) "/* Linked list */"
(field_declaration) "int pid;"
(primitive_type) "int"
(field_identifier) "pid"
(;) ";"
(comment) "/* Process ID of job */"
(field_declaration) "cb_fun cb_fun;"
(type_identifier) "cb_fun"
(field_identifier) "cb_fun"
(;) ";"
(comment) "/* Callback function */"
(field_declaration) "voidp cb_closure;"
(type_identifier) "voidp"
(field_identifier) "cb_closure"
(;) ";"
(comment) "/* Closure for callback */"
(field_declaration) "union wait w;"
(union_specifier) "union wait"
(union) "union"
(type_identifier) "wait"
(field_identifier) "w"
(;) ";"
(comment) "/* Status filled in by sigchld */"
(field_declaration) "voidp wchan;"
(type_identifier) "voidp"
(field_identifier) "wchan"
(;) ";"
(comment) "/* Wait channel */"
(}) "}"
(;) ";"
(declaration) "extern qelem proc_list_head;"
(storage_class_specifier) "extern"
(extern) "extern"
(type_identifier) "qelem"
(identifier) "proc_list_head"
(;) ";"
(declaration) "qelem proc_list_head = { &proc_list_head, &proc_list_head };"
(type_identifier) "qelem"
(init_declarator) "proc_list_head = { &proc_list_head, &proc_list_head }"
(identifier) "proc_list_head"
(=) "="
(initializer_list) "{ &proc_list_head, &proc_list_head }"
({) "{"
(pointer_expression) "&proc_list_head"
(&) "&"
(identifier) "proc_list_head"
(,) ","
(pointer_expression) "&proc_list_head"
(&) "&"
(identifier) "proc_list_head"
(}) "}"
(;) ";"
(declaration) "extern qelem proc_wait_list;"
(storage_class_specifier) "extern"
(extern) "extern"
(type_identifier) "qelem"
(identifier) "proc_wait_list"
(;) ";"
(declaration) "qelem proc_wait_list = { &proc_wait_list, &proc_wait_list };"
(type_identifier) "qelem"
(init_declarator) "proc_wait_list = { &proc_wait_list, &proc_wait_list }"
(identifier) "proc_wait_list"
(=) "="
(initializer_list) "{ &proc_wait_list, &proc_wait_list }"
({) "{"
(pointer_expression) "&proc_wait_list"
(&) "&"
(identifier) "proc_wait_list"
(,) ","
(pointer_expression) "&proc_wait_list"
(&) "&"
(identifier) "proc_wait_list"
(}) "}"
(;) ";"
(declaration) "int task_notify_todo;"
(primitive_type) "int"
(identifier) "task_notify_todo"
(;) ";"
(function_definition) "void ins_que(elem, pred)\nqelem *elem, *pred;\n{\n qelem *p = pred->q_forw;\n elem->q_back = pred;\n elem->q_forw = p;\n pred->q_forw = elem;\n p->q_back = elem;\n}"
(primitive_type) "void"
(function_declarator) "ins_que(elem, pred)"
(identifier) "ins_que"
(parameter_list) "(elem, pred)"
(() "("
(identifier) "elem"
(,) ","
(identifier) "pred"
()) ")"
(declaration) "qelem *elem, *pred;"
(type_identifier) "qelem"
(pointer_declarator) "*elem"
(*) "*"
(identifier) "elem"
(,) ","
(pointer_declarator) "*pred"
(*) "*"
(identifier) "pred"
(;) ";"
(compound_statement) "{\n qelem *p = pred->q_forw;\n elem->q_back = pred;\n elem->q_forw = p;\n pred->q_forw = elem;\n p->q_back = elem;\n}"
({) "{"
(declaration) "qelem *p = pred->q_forw;"
(type_identifier) "qelem"
(init_declarator) "*p = pred->q_forw"
(pointer_declarator) "*p"
(*) "*"
(identifier) "p"
(=) "="
(field_expression) "pred->q_forw"
(identifier) "pred"
(->) "->"
(field_identifier) "q_forw"
(;) ";"
(expression_statement) "elem->q_back = pred;"
(assignment_expression) "elem->q_back = pred"
(field_expression) "elem->q_back"
(identifier) "elem"
(->) "->"
(field_identifier) "q_back"
(=) "="
(identifier) "pred"
(;) ";"
(expression_statement) "elem->q_forw = p;"
(assignment_expression) "elem->q_forw = p"
(field_expression) "elem->q_forw"
(identifier) "elem"
(->) "->"
(field_identifier) "q_forw"
(=) "="
(identifier) "p"
(;) ";"
(expression_statement) "pred->q_forw = elem;"
(assignment_expression) "pred->q_forw = elem"
(field_expression) "pred->q_forw"
(identifier) "pred"
(->) "->"
(field_identifier) "q_forw"
(=) "="
(identifier) "elem"
(;) ";"
(expression_statement) "p->q_back = elem;"
(assignment_expression) "p->q_back = elem"
(field_expression) "p->q_back"
(identifier) "p"
(->) "->"
(field_identifier) "q_back"
(=) "="
(identifier) "elem"
(;) ";"
(}) "}"
(function_definition) "void rem_que(elem)\nqelem *elem;\n{\n qelem *p = elem->q_forw;\n qelem *p2 = elem->q_back;\n p2->q_forw = p;\n p->q_back = p2;\n}"
(primitive_type) "void"
(function_declarator) "rem_que(elem)"
(identifier) "rem_que"
(parameter_list) "(elem)"
(() "("
(identifier) "elem"
()) ")"
(declaration) "qelem *elem;"
(type_identifier) "qelem"
(pointer_declarator) "*elem"
(*) "*"
(identifier) "elem"
(;) ";"
(compound_statement) "{\n qelem *p = elem->q_forw;\n qelem *p2 = elem->q_back;\n p2->q_forw = p;\n p->q_back = p2;\n}"
({) "{"
(declaration) "qelem *p = elem->q_forw;"
(type_identifier) "qelem"
(init_declarator) "*p = elem->q_forw"
(pointer_declarator) "*p"
(*) "*"
(identifier) "p"
(=) "="
(field_expression) "elem->q_forw"
(identifier) "elem"
(->) "->"
(field_identifier) "q_forw"
(;) ";"
(declaration) "qelem *p2 = elem->q_back;"
(type_identifier) "qelem"
(init_declarator) "*p2 = elem->q_back"
(pointer_declarator) "*p2"
(*) "*"
(identifier) "p2"
(=) "="
(field_expression) "elem->q_back"
(identifier) "elem"
(->) "->"
(field_identifier) "q_back"
(;) ";"
(expression_statement) "p2->q_forw = p;"
(assignment_expression) "p2->q_forw = p"
(field_expression) "p2->q_forw"
(identifier) "p2"
(->) "->"
(field_identifier) "q_forw"
(=) "="
(identifier) "p"
(;) ";"
(expression_statement) "p->q_back = p2;"
(assignment_expression) "p->q_back = p2"
(field_expression) "p->q_back"
(identifier) "p"
(->) "->"
(field_identifier) "q_back"
(=) "="
(identifier) "p2"
(;) ";"
(}) "}"
(declaration) "static pjob *sched_job(cf, ca)\ncb_fun cf;"
(storage_class_specifier) "static"
(static) "static"
(type_identifier) "pjob"
(pointer_declarator) "*sched_job(cf, ca)\ncb_fun cf"
(*) "*"
(function_declarator) "sched_job(cf, ca)\ncb_fun cf"
(identifier) "sched_job"
(parameter_list) "(cf, ca)"
(() "("
(parameter_declaration) "cf"
(type_identifier) "cf"
(,) ","
(parameter_declaration) "ca"
(type_identifier) "ca"
()) ")"
(identifier) "cb_fun"
(identifier) "cf"
(;) ";"
(declaration) "voidp ca;"
(type_identifier) "voidp"
(identifier) "ca"
(;) ";"
(compound_statement) "{\n pjob *p = ALLOC(pjob);\n\n p->cb_fun = cf;\n p->cb_closure = ca;\n\n /*\n * Now place on wait queue\n */\n ins_que(&p->hdr, &proc_wait_list);\n\n return p;\n}"
({) "{"
(declaration) "pjob *p = ALLOC(pjob);"
(type_identifier) "pjob"
(init_declarator) "*p = ALLOC(pjob)"
(pointer_declarator) "*p"
(*) "*"
(identifier) "p"
(=) "="
(call_expression) "ALLOC(pjob)"
(identifier) "ALLOC"
(argument_list) "(pjob)"
(() "("
(identifier) "pjob"
()) ")"
(;) ";"
(expression_statement) "p->cb_fun = cf;"
(assignment_expression) "p->cb_fun = cf"
(field_expression) "p->cb_fun"
(identifier) "p"
(->) "->"
(field_identifier) "cb_fun"
(=) "="
(identifier) "cf"
(;) ";"
(expression_statement) "p->cb_closure = ca;"
(assignment_expression) "p->cb_closure = ca"
(field_expression) "p->cb_closure"
(identifier) "p"
(->) "->"
(field_identifier) "cb_closure"
(=) "="
(identifier) "ca"
(;) ";"
(comment) "/*\n * Now place on wait queue\n */"
(expression_statement) "ins_que(&p->hdr, &proc_wait_list);"
(call_expression) "ins_que(&p->hdr, &proc_wait_list)"
(identifier) "ins_que"
(argument_list) "(&p->hdr, &proc_wait_list)"
(() "("
(pointer_expression) "&p->hdr"
(&) "&"
(field_expression) "p->hdr"
(identifier) "p"
(->) "->"
(field_identifier) "hdr"
(,) ","
(pointer_expression) "&proc_wait_list"
(&) "&"
(identifier) "proc_wait_list"
()) ")"
(;) ";"
(return_statement) "return p;"
(return) "return"
(identifier) "p"
(;) ";"
(}) "}"
(function_definition) "void run_task(tf, ta, cf, ca)\ntask_fun tf;\nvoidp ta;\ncb_fun cf;\nvoidp ca;\n{\n pjob *p = sched_job(cf, ca);\n int mask;\n\n p->wchan = (voidp) p;\n\n mask = sigblock(sigmask(SIGCHLD));\n\n if (p->pid = background()) {\n sigsetmask(mask);\n return;\n }\n\n exit((*tf)(ta));\n /* firewall... */\n abort();\n}"
(primitive_type) "void"
(function_declarator) "run_task(tf, ta, cf, ca)"
(identifier) "run_task"
(parameter_list) "(tf, ta, cf, ca)"
(() "("
(identifier) "tf"
(,) ","
(identifier) "ta"
(,) ","
(identifier) "cf"
(,) ","
(identifier) "ca"
()) ")"
(declaration) "task_fun tf;"
(type_identifier) "task_fun"
(identifier) "tf"
(;) ";"
(declaration) "voidp ta;"
(type_identifier) "voidp"
(identifier) "ta"
(;) ";"
(declaration) "cb_fun cf;"
(type_identifier) "cb_fun"
(identifier) "cf"
(;) ";"
(declaration) "voidp ca;"
(type_identifier) "voidp"
(identifier) "ca"
(;) ";"
(compound_statement) "{\n pjob *p = sched_job(cf, ca);\n int mask;\n\n p->wchan = (voidp) p;\n\n mask = sigblock(sigmask(SIGCHLD));\n\n if (p->pid = background()) {\n sigsetmask(mask);\n return;\n }\n\n exit((*tf)(ta));\n /* firewall... */\n abort();\n}"
({) "{"
(declaration) "pjob *p = sched_job(cf, ca);"
(type_identifier) "pjob"
(init_declarator) "*p = sched_job(cf, ca)"
(pointer_declarator) "*p"
(*) "*"
(identifier) "p"
(=) "="
(call_expression) "sched_job(cf, ca)"
(identifier) "sched_job"
(argument_list) "(cf, ca)"
(() "("
(identifier) "cf"
(,) ","
(identifier) "ca"
()) ")"
(;) ";"
(declaration) "int mask;"
(primitive_type) "int"
(identifier) "mask"
(;) ";"
(expression_statement) "p->wchan = (voidp) p;"
(assignment_expression) "p->wchan = (voidp) p"
(field_expression) "p->wchan"
(identifier) "p"
(->) "->"
(field_identifier) "wchan"
(=) "="
(cast_expression) "(voidp) p"
(() "("
(type_descriptor) "voidp"
(type_identifier) "voidp"
()) ")"
(identifier) "p"
(;) ";"
(expression_statement) "mask = sigblock(sigmask(SIGCHLD));"
(assignment_expression) "mask = sigblock(sigmask(SIGCHLD))"
(identifier) "mask"
(=) "="
(call_expression) "sigblock(sigmask(SIGCHLD))"
(identifier) "sigblock"
(argument_list) "(sigmask(SIGCHLD))"
(() "("
(call_expression) "sigmask(SIGCHLD)"
(identifier) "sigmask"
(argument_list) "(SIGCHLD)"
(() "("
(identifier) "SIGCHLD"
()) ")"
()) ")"
(;) ";"
(if_statement) "if (p->pid = background()) {\n sigsetmask(mask);\n return;\n }"
(if) "if"
(parenthesized_expression) "(p->pid = background())"
(() "("
(assignment_expression) "p->pid = background()"
(field_expression) "p->pid"
(identifier) "p"
(->) "->"
(field_identifier) "pid"
(=) "="
(call_expression) "background()"
(identifier) "background"
(argument_list) "()"
(() "("
()) ")"
()) ")"
(compound_statement) "{\n sigsetmask(mask);\n return;\n }"
({) "{"
(expression_statement) "sigsetmask(mask);"
(call_expression) "sigsetmask(mask)"
(identifier) "sigsetmask"
(argument_list) "(mask)"
(() "("
(identifier) "mask"
()) ")"
(;) ";"
(return_statement) "return;"
(return) "return"
(;) ";"
(}) "}"
(expression_statement) "exit((*tf)(ta));"
(call_expression) "exit((*tf)(ta))"
(identifier) "exit"
(argument_list) "((*tf)(ta))"
(() "("
(call_expression) "(*tf)(ta)"
(parenthesized_expression) "(*tf)"
(() "("
(pointer_expression) "*tf"
(*) "*"
(identifier) "tf"
()) ")"
(argument_list) "(ta)"
(() "("
(identifier) "ta"
()) ")"
()) ")"
(;) ";"
(comment) "/* firewall... */"
(expression_statement) "abort();"
(call_expression) "abort()"
(identifier) "abort"
(argument_list) "()"
(() "("
()) ")"
(;) ";"
(}) "}"
(comment) "/*\n * Schedule a task to be run when woken up\n */"
(function_definition) "void sched_task(cf, ca, wchan)\ncb_fun cf;\nvoidp ca;\nvoidp wchan;\n{\n /*\n * Allocate a new task\n */\n pjob *p = sched_job(cf, ca);\n#ifdef DEBUG_SLEEP\n dlog("SLEEP on %#x", wchan);\n#endif\n p->wchan = wchan;\n p->pid = 0;\n bzero((voidp) &p->w, sizeof(p->w));\n}"
(primitive_type) "void"
(function_declarator) "sched_task(cf, ca, wchan)"
(identifier) "sched_task"
(parameter_list) "(cf, ca, wchan)"
(() "("
(identifier) "cf"
(,) ","
(identifier) "ca"
(,) ","
(identifier) "wchan"
()) ")"
(declaration) "cb_fun cf;"
(type_identifier) "cb_fun"
(identifier) "cf"
(;) ";"
(declaration) "voidp ca;"
(type_identifier) "voidp"
(identifier) "ca"
(;) ";"
(declaration) "voidp wchan;"
(type_identifier) "voidp"
(identifier) "wchan"
(;) ";"
(compound_statement) "{\n /*\n * Allocate a new task\n */\n pjob *p = sched_job(cf, ca);\n#ifdef DEBUG_SLEEP\n dlog("SLEEP on %#x", wchan);\n#endif\n p->wchan = wchan;\n p->pid = 0;\n bzero((voidp) &p->w, sizeof(p->w));\n}"
({) "{"
(comment) "/*\n * Allocate a new task\n */"
(declaration) "pjob *p = sched_job(cf, ca);"
(type_identifier) "pjob"
(init_declarator) "*p = sched_job(cf, ca)"
(pointer_declarator) "*p"
(*) "*"
(identifier) "p"
(=) "="
(call_expression) "sched_job(cf, ca)"
(identifier) "sched_job"
(argument_list) "(cf, ca)"
(() "("
(identifier) "cf"
(,) ","
(identifier) "ca"
()) ")"
(;) ";"
(preproc_ifdef) "#ifdef DEBUG_SLEEP\n dlog("SLEEP on %#x", wchan);\n#endif"
(#ifdef) "#ifdef"
(identifier) "DEBUG_SLEEP"
(expression_statement) "dlog("SLEEP on %#x", wchan);"
(call_expression) "dlog("SLEEP on %#x", wchan)"
(identifier) "dlog"
(argument_list) "("SLEEP on %#x", wchan)"
(() "("
(string_literal) ""SLEEP on %#x""
(") """
(string_content) "SLEEP on %#x"
(") """
(,) ","
(identifier) "wchan"
()) ")"
(;) ";"
(#endif) "#endif"
(expression_statement) "p->wchan = wchan;"
(assignment_expression) "p->wchan = wchan"
(field_expression) "p->wchan"
(identifier) "p"
(->) "->"
(field_identifier) "wchan"
(=) "="
(identifier) "wchan"
(;) ";"
(expression_statement) "p->pid = 0;"
(assignment_expression) "p->pid = 0"
(field_expression) "p->pid"
(identifier) "p"
(->) "->"
(field_identifier) "pid"
(=) "="
(number_literal) "0"
(;) ";"
(expression_statement) "bzero((voidp) &p->w, sizeof(p->w));"
(call_expression) "bzero((voidp) &p->w, sizeof(p->w))"
(identifier) "bzero"
(argument_list) "((voidp) &p->w, sizeof(p->w))"
(() "("
(binary_expression) "(voidp) &p->w"
(parenthesized_expression) "(voidp)"
(() "("
(identifier) "voidp"
()) ")"
(&) "&"
(field_expression) "p->w"
(identifier) "p"
(->) "->"
(field_identifier) "w"
(,) ","
(sizeof_expression) "sizeof(p->w)"
(sizeof) "sizeof"
(parenthesized_expression) "(p->w)"
(() "("
(field_expression) "p->w"
(identifier) "p"
(->) "->"
(field_identifier) "w"
()) ")"
()) ")"
(;) ";"
(}) "}"
(function_definition) "static void wakeupjob(p)\npjob *p;\n{\n rem_que(&p->hdr);\n ins_que(&p->hdr, &proc_list_head);\n task_notify_todo++;\n}"
(storage_class_specifier) "static"
(static) "static"
(primitive_type) "void"
(function_declarator) "wakeupjob(p)"
(identifier) "wakeupjob"
(parameter_list) "(p)"
(() "("
(identifier) "p"
()) ")"
(declaration) "pjob *p;"
(type_identifier) "pjob"
(pointer_declarator) "*p"
(*) "*"
(identifier) "p"
(;) ";"
(compound_statement) "{\n rem_que(&p->hdr);\n ins_que(&p->hdr, &proc_list_head);\n task_notify_todo++;\n}"
({) "{"
(expression_statement) "rem_que(&p->hdr);"
(call_expression) "rem_que(&p->hdr)"
(identifier) "rem_que"
(argument_list) "(&p->hdr)"
(() "("
(pointer_expression) "&p->hdr"
(&) "&"
(field_expression) "p->hdr"
(identifier) "p"
(->) "->"
(field_identifier) "hdr"
()) ")"
(;) ";"
(expression_statement) "ins_que(&p->hdr, &proc_list_head);"
(call_expression) "ins_que(&p->hdr, &proc_list_head)"
(identifier) "ins_que"
(argument_list) "(&p->hdr, &proc_list_head)"
(() "("
(pointer_expression) "&p->hdr"
(&) "&"
(field_expression) "p->hdr"
(identifier) "p"
(->) "->"
(field_identifier) "hdr"
(,) ","
(pointer_expression) "&proc_list_head"
(&) "&"
(identifier) "proc_list_head"
()) ")"
(;) ";"
(expression_statement) "task_notify_todo++;"
(update_expression) "task_notify_todo++"
(identifier) "task_notify_todo"
(++) "++"
(;) ";"
(}) "}"
(function_definition) "void wakeup(wchan)\nvoidp wchan;\n{\n pjob *p, *p2;\n#ifdef DEBUG_SLEEP\n int done = 0;\n#endif\n if (!foreground)\n return;\n\n#ifdef DEBUG_SLEEP\n /*dlog("wakeup(%#x)", wchan);*/\n#endif\n /*\n * Can't user ITER() here because\n * wakeupjob() juggles the list.\n */\n for (p = FIRST(pjob, &proc_wait_list);\n p2 = NEXT(pjob, p), p != HEAD(pjob, &proc_wait_list);\n p = p2) {\n if (p->wchan == wchan) {\n#ifdef DEBUG_SLEEP\n done = 1;\n#endif\n wakeupjob(p);\n }\n }\n\n#ifdef DEBUG_SLEEP\n if (!done)\n dlog("Nothing SLEEPing on %#x", wchan);\n#endif\n}"
(primitive_type) "void"
(function_declarator) "wakeup(wchan)"
(identifier) "wakeup"
(parameter_list) "(wchan)"
(() "("
(identifier) "wchan"
()) ")"
(declaration) "voidp wchan;"
(type_identifier) "voidp"
(identifier) "wchan"
(;) ";"
(compound_statement) "{\n pjob *p, *p2;\n#ifdef DEBUG_SLEEP\n int done = 0;\n#endif\n if (!foreground)\n return;\n\n#ifdef DEBUG_SLEEP\n /*dlog("wakeup(%#x)", wchan);*/\n#endif\n /*\n * Can't user ITER() here because\n * wakeupjob() juggles the list.\n */\n for (p = FIRST(pjob, &proc_wait_list);\n p2 = NEXT(pjob, p), p != HEAD(pjob, &proc_wait_list);\n p = p2) {\n if (p->wchan == wchan) {\n#ifdef DEBUG_SLEEP\n done = 1;\n#endif\n wakeupjob(p);\n }\n }\n\n#ifdef DEBUG_SLEEP\n if (!done)\n dlog("Nothing SLEEPing on %#x", wchan);\n#endif\n}"
({) "{"
(declaration) "pjob *p, *p2;"
(type_identifier) "pjob"
(pointer_declarator) "*p"
(*) "*"
(identifier) "p"
(,) ","
(pointer_declarator) "*p2"
(*) "*"
(identifier) "p2"
(;) ";"
(preproc_ifdef) "#ifdef DEBUG_SLEEP\n int done = 0;\n#endif"
(#ifdef) "#ifdef"
(identifier) "DEBUG_SLEEP"
(declaration) "int done = 0;"
(primitive_type) "int"
(init_declarator) "done = 0"
(identifier) "done"
(=) "="
(number_literal) "0"
(;) ";"
(#endif) "#endif"
(if_statement) "if (!foreground)\n return;"
(if) "if"
(parenthesized_expression) "(!foreground)"
(() "("
(unary_expression) "!foreground"
(!) "!"
(identifier) "foreground"
()) ")"
(return_statement) "return;"
(return) "return"
(;) ";"
(preproc_ifdef) "#ifdef DEBUG_SLEEP\n /*dlog("wakeup(%#x)", wchan);*/\n#endif"
(#ifdef) "#ifdef"
(identifier) "DEBUG_SLEEP"
(comment) "/*dlog("wakeup(%#x)", wchan);*/"
(#endif) "#endif"
(comment) "/*\n * Can't user ITER() here because\n * wakeupjob() juggles the list.\n */"
(for_statement) "for (p = FIRST(pjob, &proc_wait_list);\n p2 = NEXT(pjob, p), p != HEAD(pjob, &proc_wait_list);\n p = p2) {\n if (p->wchan == wchan) {\n#ifdef DEBUG_SLEEP\n done = 1;\n#endif\n wakeupjob(p);\n }\n }"
(for) "for"
(() "("
(assignment_expression) "p = FIRST(pjob, &proc_wait_list)"
(identifier) "p"
(=) "="
(call_expression) "FIRST(pjob, &proc_wait_list)"
(identifier) "FIRST"
(argument_list) "(pjob, &proc_wait_list)"
(() "("
(identifier) "pjob"
(,) ","
(pointer_expression) "&proc_wait_list"
(&) "&"
(identifier) "proc_wait_list"
()) ")"
(;) ";"
(comma_expression) "p2 = NEXT(pjob, p), p != HEAD(pjob, &proc_wait_list)"
(assignment_expression) "p2 = NEXT(pjob, p)"
(identifier) "p2"
(=) "="
(call_expression) "NEXT(pjob, p)"
(identifier) "NEXT"
(argument_list) "(pjob, p)"
(() "("
(identifier) "pjob"
(,) ","
(identifier) "p"
()) ")"
(,) ","
(binary_expression) "p != HEAD(pjob, &proc_wait_list)"
(identifier) "p"
(!=) "!="
(call_expression) "HEAD(pjob, &proc_wait_list)"
(identifier) "HEAD"
(argument_list) "(pjob, &proc_wait_list)"
(() "("
(identifier) "pjob"
(,) ","
(pointer_expression) "&proc_wait_list"
(&) "&"
(identifier) "proc_wait_list"
()) ")"
(;) ";"
(assignment_expression) "p = p2"
(identifier) "p"
(=) "="
(identifier) "p2"
()) ")"
(compound_statement) "{\n if (p->wchan == wchan) {\n#ifdef DEBUG_SLEEP\n done = 1;\n#endif\n wakeupjob(p);\n }\n }"
({) "{"
(if_statement) "if (p->wchan == wchan) {\n#ifdef DEBUG_SLEEP\n done = 1;\n#endif\n wakeupjob(p);\n }"
(if) "if"
(parenthesized_expression) "(p->wchan == wchan)"
(() "("
(binary_expression) "p->wchan == wchan"
(field_expression) "p->wchan"
(identifier) "p"
(->) "->"
(field_identifier) "wchan"
(==) "=="
(identifier) "wchan"
()) ")"
(compound_statement) "{\n#ifdef DEBUG_SLEEP\n done = 1;\n#endif\n wakeupjob(p);\n }"
({) "{"
(preproc_ifdef) "#ifdef DEBUG_SLEEP\n done = 1;\n#endif"
(#ifdef) "#ifdef"
(identifier) "DEBUG_SLEEP"
(expression_statement) "done = 1;"
(assignment_expression) "done = 1"
(identifier) "done"
(=) "="
(number_literal) "1"
(;) ";"
(#endif) "#endif"
(expression_statement) "wakeupjob(p);"
(call_expression) "wakeupjob(p)"
(identifier) "wakeupjob"
(argument_list) "(p)"
(() "("
(identifier) "p"
()) ")"
(;) ";"
(}) "}"
(}) "}"
(preproc_ifdef) "#ifdef DEBUG_SLEEP\n if (!done)\n dlog("Nothing SLEEPing on %#x", wchan);\n#endif"
(#ifdef) "#ifdef"
(identifier) "DEBUG_SLEEP"
(if_statement) "if (!done)\n dlog("Nothing SLEEPing on %#x", wchan);"
(if) "if"
(parenthesized_expression) "(!done)"
(() "("
(unary_expression) "!done"
(!) "!"
(identifier) "done"
()) ")"
(expression_statement) "dlog("Nothing SLEEPing on %#x", wchan);"
(call_expression) "dlog("Nothing SLEEPing on %#x", wchan)"
(identifier) "dlog"
(argument_list) "("Nothing SLEEPing on %#x", wchan)"
(() "("
(string_literal) ""Nothing SLEEPing on %#x""
(") """
(string_content) "Nothing SLEEPing on %#x"
(") """
(,) ","
(identifier) "wchan"
()) ")"
(;) ";"
(#endif) "#endif"
(}) "}"
(function_definition) "void wakeup_task(rc, term, cl)\nint rc;\nint term;\nvoidp cl;\n{\n wakeup(cl);\n}"
(primitive_type) "void"
(function_declarator) "wakeup_task(rc, term, cl)"
(identifier) "wakeup_task"
(parameter_list) "(rc, term, cl)"
(() "("
(identifier) "rc"
(,) ","
(identifier) "term"
(,) ","
(identifier) "cl"
()) ")"
(declaration) "int rc;"
(primitive_type) "int"
(identifier) "rc"
(;) ";"
(declaration) "int term;"
(primitive_type) "int"
(identifier) "term"
(;) ";"
(declaration) "voidp cl;"
(type_identifier) "voidp"
(identifier) "cl"
(;) ";"
(compound_statement) "{\n wakeup(cl);\n}"
({) "{"
(expression_statement) "wakeup(cl);"
(call_expression) "wakeup(cl)"
(identifier) "wakeup"
(argument_list) "(cl)"
(() "("
(identifier) "cl"
()) ")"
(;) ";"
(}) "}"
(comment) "/*ARGSUSED*/"
(ERROR) "void sigchld(sig)\nint sig;\n{\n union wait w;\n int pid;\n\n#ifdef SYS5_SIGNALS\n if ((pid = wait(&w)) > 0) {\n#else\n while ((pid = wait3((int *) &w, WNOHANG, (struct rusage *) 0)) > 0) {\n#endif /* SYS5_SIGNALS */\n pjob *p, *p2;\n\n if (WIFSIGNALED(w))\n plog(XLOG_ERROR, "Process %d exited with signal %d",\n pid, w.w_termsig);\n#ifdef DEBUG\n else\n dlog("Process %d exited with status %d",\n pid, w.w_retcode);\n#endif /* DEBUG */\n\n for (p = FIRST(pjob, &proc_wait_list);\n p2 = NEXT(pjob, p), p != HEAD(pjob, &proc_wait_list);\n p = p2) {\n if (p->pid == pid) {\n p->w = w;\n wakeupjob(p);\n break;\n }\n }\n\n#ifdef DEBUG\n if (p) ; else dlog("can't locate task block for pid %d", pid);\n#endif /* DEBUG */\n }\n\n#ifdef SYS5_SIGNALS\n signal(sig, sigchld);\n#endif /* SYS5_SIGNALS */\n if (select_intr_valid)\n longjmp(select_intr, sig);\n}\n\n/*\n * Run any pending tasks.\n * This must be called with SIGCHLD disabled\n */\nvoid do_task_notify(P_void)\n{\n /*\n * Keep taking the first item off the list and processing it.\n *\n * Done this way because the the callback can, quite reasonably,\n * queue a new task, so no local reference into the list can be\n * held here.\n */\n while (FIRST(pjob, &proc_list_head) != HEAD(pjob, &proc_list_head)) {\n pjob *p = FIRST(pjob, &proc_list_head);\n rem_que(&p->hdr);\n /*\n * This job has completed\n */\n --task_notify_todo;\n\n /*\n * Do callback if it exists\n */\n if (p->cb_fun)\n (*p->cb_fun)(p->w.w_retcode,\n p->w.w_termsig, p->cb_closure);\n\n free((voidp) p);\n }\n}\n\n#ifdef HAS_SVR3_SIGNALS\n/*\n * 4.2 signal library based on svr3 (4.1+ bsd) interface\n * From <NAME> <<EMAIL>).\n */\n\nstatic int current_mask = 0;\n\nint sigblock(mask)\nint mask;\n{\n int sig;\n int m;\n int oldmask;\n\n oldmask = current_mask;\n for ( sig = 1, m = 1; sig <= MAXSIG; sig++, m <<= 1 ) {\n if (mask & m) {\n sighold(sig);\n current_mask |= m;\n }\n }\n return oldmask;\n}\n\nint sigsetmask(mask)\nint mask;\n{\n int sig;\n int m;\n int oldmask;\n\n oldmask = current_mask;\n for ( sig = 1, m = 1; sig <= MAXSIG; sig++, m <<= 1 ) {\n if (mask & m) {\n sighold(sig);\n current_mask |= m;\n }\n else {\n sigrelse(sig);\n current_mask &= ~m;\n }\n }\n return oldmask;\n}\n\n#endif"
(primitive_type) "void"
(function_declarator) "sigchld(sig)"
(identifier) "sigchld"
(parameter_list) "(sig)"
(() "("
(identifier) "sig"
()) ")"
(declaration) "int sig;"
(primitive_type) "int"
(identifier) "sig"
(;) ";"
({) "{"
(declaration) "union wait w;"
(union_specifier) "union wait"
(union) "union"
(type_identifier) "wait"
(identifier) "w"
(;) ";"
(declaration) "int pid;"
(primitive_type) "int"
(identifier) "pid"
(;) ";"
(#ifdef) "#ifdef"
(identifier) "SYS5_SIGNALS"
(if_statement) "if ((pid = wait(&w)) > 0) {\n#else\n while ((pid = wait3((int *) &w, WNOHANG, (struct rusage *) 0)) > 0) {\n#endif /* SYS5_SIGNALS */\n pjob *p, *p2;\n\n if (WIFSIGNALED(w))\n plog(XLOG_ERROR, "Process %d exited with signal %d",\n pid, w.w_termsig);\n#ifdef DEBUG\n else\n dlog("Process %d exited with status %d",\n pid, w.w_retcode);\n#endif /* DEBUG */\n\n for (p = FIRST(pjob, &proc_wait_list);\n p2 = NEXT(pjob, p), p != HEAD(pjob, &proc_wait_list);\n p = p2) {\n if (p->pid == pid) {\n p->w = w;\n wakeupjob(p);\n break;\n }\n }\n\n#ifdef DEBUG\n if (p) ; else dlog("can't locate task block for pid %d", pid);\n#endif /* DEBUG */\n }\n\n#ifdef SYS5_SIGNALS\n signal(sig, sigchld);\n#endif /* SYS5_SIGNALS */\n if (select_intr_valid)\n longjmp(select_intr, sig);\n}"
(if) "if"
(parenthesized_expression) "((pid = wait(&w)) > 0)"
(() "("
(binary_expression) "(pid = wait(&w)) > 0"
(parenthesized_expression) "(pid = wait(&w))"
(() "("
(assignment_expression) "pid = wait(&w)"
(identifier) "pid"
(=) "="
(call_expression) "wait(&w)"
(identifier) "wait"
(argument_list) "(&w)"
(() "("
(pointer_expression) "&w"
(&) "&"
(identifier) "w"
()) ")"
()) ")"
(>) ">"
(number_literal) "0"
()) ")"
(compound_statement) "{\n#else\n while ((pid = wait3((int *) &w, WNOHANG, (struct rusage *) 0)) > 0) {\n#endif /* SYS5_SIGNALS */\n pjob *p, *p2;\n\n if (WIFSIGNALED(w))\n plog(XLOG_ERROR, "Process %d exited with signal %d",\n pid, w.w_termsig);\n#ifdef DEBUG\n else\n dlog("Process %d exited with status %d",\n pid, w.w_retcode);\n#endif /* DEBUG */\n\n for (p = FIRST(pjob, &proc_wait_list);\n p2 = NEXT(pjob, p), p != HEAD(pjob, &proc_wait_list);\n p = p2) {\n if (p->pid == pid) {\n p->w = w;\n wakeupjob(p);\n break;\n }\n }\n\n#ifdef DEBUG\n if (p) ; else dlog("can't locate task block for pid %d", pid);\n#endif /* DEBUG */\n }\n\n#ifdef SYS5_SIGNALS\n signal(sig, sigchld);\n#endif /* SYS5_SIGNALS */\n if (select_intr_valid)\n longjmp(select_intr, sig);\n}"
({) "{"
(preproc_call) "#else\n"
(preproc_directive) "#else"
(while_statement) "while ((pid = wait3((int *) &w, WNOHANG, (struct rusage *) 0)) > 0) {\n#endif /* SYS5_SIGNALS */\n pjob *p, *p2;\n\n if (WIFSIGNALED(w))\n plog(XLOG_ERROR, "Process %d exited with signal %d",\n pid, w.w_termsig);\n#ifdef DEBUG\n else\n dlog("Process %d exited with status %d",\n pid, w.w_retcode);\n#endif /* DEBUG */\n\n for (p = FIRST(pjob, &proc_wait_list);\n p2 = NEXT(pjob, p), p != HEAD(pjob, &proc_wait_list);\n p = p2) {\n if (p->pid == pid) {\n p->w = w;\n wakeupjob(p);\n break;\n }\n }\n\n#ifdef DEBUG\n if (p) ; else dlog("can't locate task block for pid %d", pid);\n#endif /* DEBUG */\n }"
(while) "while"
(parenthesized_expression) "((pid = wait3((int *) &w, WNOHANG, (struct rusage *) 0)) > 0)"
(() "("
(binary_expression) "(pid = wait3((int *) &w, WNOHANG, (struct rusage *) 0)) > 0"
(parenthesized_expression) "(pid = wait3((int *) &w, WNOHANG, (struct rusage *) 0))"
(() "("
(assignment_expression) "pid = wait3((int *) &w, WNOHANG, (struct rusage *) 0)"
(identifier) "pid"
(=) "="
(call_expression) "wait3((int *) &w, WNOHANG, (struct rusage *) 0)"
(identifier) "wait3"
(argument_list) "((int *) &w, WNOHANG, (struct rusage *) 0)"
(() "("
(cast_expression) "(int *) &w"
(() "("
(type_descriptor) "int *"
(primitive_type) "int"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(pointer_expression) "&w"
(&) "&"
(identifier) "w"
(,) ","
(identifier) "WNOHANG"
(,) ","
(cast_expression) "(struct rusage *) 0"
(() "("
(type_descriptor) "struct rusage *"
(struct_specifier) "struct rusage"
(struct) "struct"
(type_identifier) "rusage"
(abstract_pointer_declarator) "*"
(*) "*"
()) ")"
(number_literal) "0"
()) ")"
()) ")"
(>) ">"
(number_literal) "0"
()) ")"
(compound_statement) "{\n#endif /* SYS5_SIGNALS */\n pjob *p, *p2;\n\n if (WIFSIGNALED(w))\n plog(XLOG_ERROR, "Process %d exited with signal %d",\n pid, w.w_termsig);\n#ifdef DEBUG\n else\n dlog("Process %d exited with status %d",\n pid, w.w_retcode);\n#endif /* DEBUG */\n\n for (p = FIRST(pjob, &proc_wait_list);\n p2 = NEXT(pjob, p), p != HEAD(pjob, &proc_wait_list);\n p = p2) {\n if (p->pid == pid) {\n p->w = w;\n wakeupjob(p);\n break;\n }\n }\n\n#ifdef DEBUG\n if (p) ; else dlog("can't locate task block for pid %d", pid);\n#endif /* DEBUG */\n }"
({) "{"
(preproc_call) "#endif /* SYS5_SIGNALS */\n"
(preproc_directive) "#endif"
(comment) "/* SYS5_SIGNALS */"
(declaration) "pjob *p, *p2;"
(type_identifier) "pjob"
(pointer_declarator) "*p"
(*) "*"
(identifier) "p"
(,) ","
(pointer_declarator) "*p2"
(*) "*"
(identifier) "p2"
(;) ";"
(if_statement) "if (WIFSIGNALED(w))\n plog(XLOG_ERROR, "Process %d exited with signal %d",\n pid, w.w_termsig);"
(if) "if"
(parenthesized_expression) "(WIFSIGNALED(w))"
(() "("
(call_expression) "WIFSIGNALED(w)"
(identifier) "WIFSIGNALED"
(argument_list) "(w)"
(() "("
(identifier) "w"
()) ")"
()) ")"
(expression_statement) "plog(XLOG_ERROR, "Process %d exited with signal %d",\n pid, w.w_termsig);"
(call_expression) "plog(XLOG_ERROR, "Process %d exited with signal %d",\n pid, w.w_termsig)"
(identifier) "plog"
(argument_list) "(XLOG_ERROR, "Process %d exited with signal %d",\n pid, w.w_termsig)"
(() "("
(identifier) "XLOG_ERROR"
(,) ","
(string_literal) ""Process %d exited with signal %d""
(") """
(string_content) "Process %d exited with signal %d"
(") """
(,) ","
(identifier) "pid"
(,) ","
(field_expression) "w.w_termsig"
(identifier) "w"
(.) "."
(field_identifier) "w_termsig"
()) ")"
(;) ";"
(preproc_ifdef) "#ifdef DEBUG\n else\n dlog("Process %d exited with status %d",\n pid, w.w_retcode);\n#endif"
(#ifdef) "#ifdef"
(identifier) "DEBUG"
(ERROR) "else\n dlog("
(type_identifier) "else"
(identifier) "dlog"
(() "("
(expression_statement) ""Process %d exited with status %d",\n pid, w.w_retcode);"
(comma_expression) ""Process %d exited with status %d",\n pid, w.w_retcode"
(string_literal) ""Process %d exited with status %d""
(") """
(string_content) "Process %d exited with status %d"
(") """
(,) ","
(comma_expression) "pid, w.w_retcode"
(identifier) "pid"
(,) ","
(field_expression) "w.w_retcode"
(identifier) "w"
(.) "."
(field_identifier) "w_retcode"
(ERROR) ")"
()) ")"
(;) ";"
(#endif) "#endif"
(comment) "/* DEBUG */"
(for_statement) "for (p = FIRST(pjob, &proc_wait_list);\n p2 = NEXT(pjob, p), p != HEAD(pjob, &proc_wait_list);\n p = p2) {\n if (p->pid == pid) {\n p->w = w;\n wakeupjob(p);\n break;\n }\n }"
(for) "for"
(() "("
(assignment_expression) "p = FIRST(pjob, &proc_wait_list)"
(identifier) "p"
(=) "="
(call_expression) "FIRST(pjob, &proc_wait_list)"
(identifier) "FIRST"
(argument_list) "(pjob, &proc_wait_list)"
(() "("
(identifier) "pjob"
(,) ","
(pointer_expression) "&proc_wait_list"
(&) "&"
(identifier) "proc_wait_list"
()) ")"
(;) ";"
(comma_expression) "p2 = NEXT(pjob, p), p != HEAD(pjob, &proc_wait_list)"
(assignment_expression) "p2 = NEXT(pjob, p)"
(identifier) "p2"
(=) "="
(call_expression) "NEXT(pjob, p)"
(identifier) "NEXT"
(argument_list) "(pjob, p)"
(() "("
(identifier) "pjob"
(,) ","
(identifier) "p"
()) ")"
(,) ","
(binary_expression) "p != HEAD(pjob, &proc_wait_list)"
(identifier) "p"
(!=) "!="
(call_expression) "HEAD(pjob, &proc_wait_list)"
(identifier) "HEAD"
(argument_list) "(pjob, &proc_wait_list)"
(() "("
(identifier) "pjob"
(,) ","
(pointer_expression) "&proc_wait_list"
(&) "&"
(identifier) "proc_wait_list"
()) ")"
(;) ";"
(assignment_expression) "p = p2"
(identifier) "p"
(=) "="
(identifier) "p2"
()) ")"
(compound_statement) "{\n if (p->pid == pid) {\n p->w = w;\n wakeupjob(p);\n break;\n }\n }"
({) "{"
(if_statement) "if (p->pid == pid) {\n p->w = w;\n wakeupjob(p);\n break;\n }"
(if) "if"
(parenthesized_expression) "(p->pid == pid)"
(() "("
(binary_expression) "p->pid == pid"
(field_expression) "p->pid"
(identifier) "p"
(->) "->"
(field_identifier) "pid"
(==) "=="
(identifier) "pid"
()) ")"
(compound_statement) "{\n p->w = w;\n wakeupjob(p);\n break;\n }"
({) "{"
(expression_statement) "p->w = w;"
(assignment_expression) "p->w = w"
(field_expression) "p->w"
(identifier) "p"
(->) "->"
(field_identifier) "w"
(=) "="
(identifier) "w"
(;) ";"
(expression_statement) "wakeupjob(p);"
(call_expression) "wakeupjob(p)"
(identifier) "wakeupjob"
(argument_list) "(p)"
(() "("
(identifier) "p"
()) ")"
(;) ";"
(break_statement) "break;"
(break) "break"
(;) ";"
(}) "}"
(}) "}"
(preproc_ifdef) "#ifdef DEBUG\n if (p) ; else dlog("can't locate task block for pid %d", pid);\n#endif"
(#ifdef) "#ifdef"
(identifier) "DEBUG"
(if_statement) "if (p) ; else dlog("can't locate task block for pid %d", pid);"
(if) "if"
(parenthesized_expression) "(p)"
(() "("
(identifier) "p"
()) ")"
(expression_statement) ";"
(;) ";"
(else_clause) "else dlog("can't locate task block for pid %d", pid);"
(else) "else"
(expression_statement) "dlog("can't locate task block for pid %d", pid);"
(call_expression) "dlog("can't locate task block for pid %d", pid)"
(identifier) "dlog"
(argument_list) "("can't locate task block for pid %d", pid)"
(() "("
(string_literal) ""can't locate task block for pid %d""
(") """
(string_content) "can't locate task block for pid %d"
(") """
(,) ","
(identifier) "pid"
()) ")"
(;) ";"
(#endif) "#endif"
(comment) "/* DEBUG */"
(}) "}"
(preproc_ifdef) "#ifdef SYS5_SIGNALS\n signal(sig, sigchld);\n#endif"
(#ifdef) "#ifdef"
(identifier) "SYS5_SIGNALS"
(expression_statement) "signal(sig, sigchld);"
(call_expression) "signal(sig, sigchld)"
(identifier) "signal"
(argument_list) "(sig, sigchld)"
(() "("
(identifier) "sig"
(,) ","
(identifier) "sigchld"
()) ")"
(;) ";"
(#endif) "#endif"
(comment) "/* SYS5_SIGNALS */"
(if_statement) "if (select_intr_valid)\n longjmp(select_intr, sig);"
(if) "if"
(parenthesized_expression) "(select_intr_valid)"
(() "("
(identifier) "select_intr_valid"
()) ")"
(expression_statement) "longjmp(select_intr, sig);"
(call_expression) "longjmp(select_intr, sig)"
(identifier) "longjmp"
(argument_list) "(select_intr, sig)"
(() "("
(identifier) "select_intr"
(,) ","
(identifier) "sig"
()) ")"
(;) ";"
(}) "}"
(comment) "/*\n * Run any pending tasks.\n * This must be called with SIGCHLD disabled\n */"
(function_definition) "void do_task_notify(P_void)\n{\n /*\n * Keep taking the first item off the list and processing it.\n *\n * Done this way because the the callback can, quite reasonably,\n * queue a new task, so no local reference into the list can be\n * held here.\n */\n while (FIRST(pjob, &proc_list_head) != HEAD(pjob, &proc_list_head)) {\n pjob *p = FIRST(pjob, &proc_list_head);\n rem_que(&p->hdr);\n /*\n * This job has completed\n */\n --task_notify_todo;\n\n /*\n * Do callback if it exists\n */\n if (p->cb_fun)\n (*p->cb_fun)(p->w.w_retcode,\n p->w.w_termsig, p->cb_closure);\n\n free((voidp) p);\n }\n}"
(primitive_type) "void"
(function_declarator) "do_task_notify(P_void)"
(identifier) "do_task_notify"
(parameter_list) "(P_void)"
(() "("
(parameter_declaration) "P_void"
(type_identifier) "P_void"
()) ")"
(compound_statement) "{\n /*\n * Keep taking the first item off the list and processing it.\n *\n * Done this way because the the callback can, quite reasonably,\n * queue a new task, so no local reference into the list can be\n * held here.\n */\n while (FIRST(pjob, &proc_list_head) != HEAD(pjob, &proc_list_head)) {\n pjob *p = FIRST(pjob, &proc_list_head);\n rem_que(&p->hdr);\n /*\n * This job has completed\n */\n --task_notify_todo;\n\n /*\n * Do callback if it exists\n */\n if (p->cb_fun)\n (*p->cb_fun)(p->w.w_retcode,\n p->w.w_termsig, p->cb_closure);\n\n free((voidp) p);\n }\n}"
({) "{"
(comment) "/*\n * Keep taking the first item off the list and processing it.\n *\n * Done this way because the the callback can, quite reasonably,\n * queue a new task, so no local reference into the list can be\n * held here.\n */"
(while_statement) "while (FIRST(pjob, &proc_list_head) != HEAD(pjob, &proc_list_head)) {\n pjob *p = FIRST(pjob, &proc_list_head);\n rem_que(&p->hdr);\n /*\n * This job has completed\n */\n --task_notify_todo;\n\n /*\n * Do callback if it exists\n */\n if (p->cb_fun)\n (*p->cb_fun)(p->w.w_retcode,\n p->w.w_termsig, p->cb_closure);\n\n free((voidp) p);\n }"
(while) "while"
(parenthesized_expression) "(FIRST(pjob, &proc_list_head) != HEAD(pjob, &proc_list_head))"
(() "("
(binary_expression) "FIRST(pjob, &proc_list_head) != HEAD(pjob, &proc_list_head)"
(call_expression) "FIRST(pjob, &proc_list_head)"
(identifier) "FIRST"
(argument_list) "(pjob, &proc_list_head)"
(() "("
(identifier) "pjob"
(,) ","
(pointer_expression) "&proc_list_head"
(&) "&"
(identifier) "proc_list_head"
()) ")"
(!=) "!="
(call_expression) "HEAD(pjob, &proc_list_head)"
(identifier) "HEAD"
(argument_list) "(pjob, &proc_list_head)"
(() "("
(identifier) "pjob"
(,) ","
(pointer_expression) "&proc_list_head"
(&) "&"
(identifier) "proc_list_head"
()) ")"
()) ")"
(compound_statement) "{\n pjob *p = FIRST(pjob, &proc_list_head);\n rem_que(&p->hdr);\n /*\n * This job has completed\n */\n --task_notify_todo;\n\n /*\n * Do callback if it exists\n */\n if (p->cb_fun)\n (*p->cb_fun)(p->w.w_retcode,\n p->w.w_termsig, p->cb_closure);\n\n free((voidp) p);\n }"
({) "{"
(declaration) "pjob *p = FIRST(pjob, &proc_list_head);"
(type_identifier) "pjob"
(init_declarator) "*p = FIRST(pjob, &proc_list_head)"
(pointer_declarator) "*p"
(*) "*"
(identifier) "p"
(=) "="
(call_expression) "FIRST(pjob, &proc_list_head)"
(identifier) "FIRST"
(argument_list) "(pjob, &proc_list_head)"
(() "("
(identifier) "pjob"
(,) ","
(pointer_expression) "&proc_list_head"
(&) "&"
(identifier) "proc_list_head"
()) ")"
(;) ";"
(expression_statement) "rem_que(&p->hdr);"
(call_expression) "rem_que(&p->hdr)"
(identifier) "rem_que"
(argument_list) "(&p->hdr)"
(() "("
(pointer_expression) "&p->hdr"
(&) "&"
(field_expression) "p->hdr"
(identifier) "p"
(->) "->"
(field_identifier) "hdr"
()) ")"
(;) ";"
(comment) "/*\n * This job has completed\n */"
(expression_statement) "--task_notify_todo;"
(update_expression) "--task_notify_todo"
(--) "--"
(identifier) "task_notify_todo"
(;) ";"
(comment) "/*\n * Do callback if it exists\n */"
(if_statement) "if (p->cb_fun)\n (*p->cb_fun)(p->w.w_retcode,\n p->w.w_termsig, p->cb_closure);"
(if) "if"
(parenthesized_expression) "(p->cb_fun)"
(() "("
(field_expression) "p->cb_fun"
(identifier) "p"
(->) "->"
(field_identifier) "cb_fun"
()) ")"
(expression_statement) "(*p->cb_fun)(p->w.w_retcode,\n p->w.w_termsig, p->cb_closure);"
(call_expression) "(*p->cb_fun)(p->w.w_retcode,\n p->w.w_termsig, p->cb_closure)"
(parenthesized_expression) "(*p->cb_fun)"
(() "("
(pointer_expression) "*p->cb_fun"
(*) "*"
(field_expression) "p->cb_fun"
(identifier) "p"
(->) "->"
(field_identifier) "cb_fun"
()) ")"
(argument_list) "(p->w.w_retcode,\n p->w.w_termsig, p->cb_closure)"
(() "("
(field_expression) "p->w.w_retcode"
(field_expression) "p->w"
(identifier) "p"
(->) "->"
(field_identifier) "w"
(.) "."
(field_identifier) "w_retcode"
(,) ","
(field_expression) "p->w.w_termsig"
(field_expression) "p->w"
(identifier) "p"
(->) "->"
(field_identifier) "w"
(.) "."
(field_identifier) "w_termsig"
(,) ","
(field_expression) "p->cb_closure"
(identifier) "p"
(->) "->"
(field_identifier) "cb_closure"
()) ")"
(;) ";"
(expression_statement) "free((voidp) p);"
(call_expression) "free((voidp) p)"
(identifier) "free"
(argument_list) "((voidp) p)"
(() "("
(cast_expression) "(voidp) p"
(() "("
(type_descriptor) "voidp"
(type_identifier) "voidp"
()) ")"
(identifier) "p"
()) ")"
(;) ";"
(}) "}"
(}) "}"
(preproc_ifdef) "#ifdef HAS_SVR3_SIGNALS\n/*\n * 4.2 signal library based on svr3 (4.1+ bsd) interface\n * From <NAME> <<EMAIL>).\n */\n\nstatic int current_mask = 0;\n\nint sigblock(mask)\nint mask;\n{\n int sig;\n int m;\n int oldmask;\n\n oldmask = current_mask;\n for ( sig = 1, m = 1; sig <= MAXSIG; sig++, m <<= 1 ) {\n if (mask & m) {\n sighold(sig);\n current_mask |= m;\n }\n }\n return oldmask;\n}\n\nint sigsetmask(mask)\nint mask;\n{\n int sig;\n int m;\n int oldmask;\n\n oldmask = current_mask;\n for ( sig = 1, m = 1; sig <= MAXSIG; sig++, m <<= 1 ) {\n if (mask & m) {\n sighold(sig);\n current_mask |= m;\n }\n else {\n sigrelse(sig);\n current_mask &= ~m;\n }\n }\n return oldmask;\n}\n\n#endif"
(#ifdef) "#ifdef"
(identifier) "HAS_SVR3_SIGNALS"
(comment) "/*\n * 4.2 signal library based on svr3 (4.1+ bsd) interface\n * From <NAME> <<EMAIL>).\n */"
(declaration) "static int current_mask = 0;"
(storage_class_specifier) "static"
(static) "static"
(primitive_type) "int"
(init_declarator) "current_mask = 0"
(identifier) "current_mask"
(=) "="
(number_literal) "0"
(;) ";"
(function_definition) "int sigblock(mask)\nint mask;\n{\n int sig;\n int m;\n int oldmask;\n\n oldmask = current_mask;\n for ( sig = 1, m = 1; sig <= MAXSIG; sig++, m <<= 1 ) {\n if (mask & m) {\n sighold(sig);\n current_mask |= m;\n }\n }\n return oldmask;\n}"
(primitive_type) "int"
(function_declarator) "sigblock(mask)"
(identifier) "sigblock"
(parameter_list) "(mask)"
(() "("
(identifier) "mask"
()) ")"
(declaration) "int mask;"
(primitive_type) "int"
(identifier) "mask"
(;) ";"
(compound_statement) "{\n int sig;\n int m;\n int oldmask;\n\n oldmask = current_mask;\n for ( sig = 1, m = 1; sig <= MAXSIG; sig++, m <<= 1 ) {\n if (mask & m) {\n sighold(sig);\n current_mask |= m;\n }\n }\n return oldmask;\n}"
({) "{"
(declaration) "int sig;"
(primitive_type) "int"
(identifier) "sig"
(;) ";"
(declaration) "int m;"
(primitive_type) "int"
(identifier) "m"
(;) ";"
(declaration) "int oldmask;"
(primitive_type) "int"
(identifier) "oldmask"
(;) ";"
(expression_statement) "oldmask = current_mask;"
(assignment_expression) "oldmask = current_mask"
(identifier) "oldmask"
(=) "="
(identifier) "current_mask"
(;) ";"
(for_statement) "for ( sig = 1, m = 1; sig <= MAXSIG; sig++, m <<= 1 ) {\n if (mask & m) {\n sighold(sig);\n current_mask |= m;\n }\n }"
(for) "for"
(() "("
(comma_expression) "sig = 1, m = 1"
(assignment_expression) "sig = 1"
(identifier) "sig"
(=) "="
(number_literal) "1"
(,) ","
(assignment_expression) "m = 1"
(identifier) "m"
(=) "="
(number_literal) "1"
(;) ";"
(binary_expression) "sig <= MAXSIG"
(identifier) "sig"
(<=) "<="
(identifier) "MAXSIG"
(;) ";"
(comma_expression) "sig++, m <<= 1"
(update_expression) "sig++"
(identifier) "sig"
(++) "++"
(,) ","
(assignment_expression) "m <<= 1"
(identifier) "m"
(<<=) "<<="
(number_literal) "1"
()) ")"
(compound_statement) "{\n if (mask & m) {\n sighold(sig);\n current_mask |= m;\n }\n }"
({) "{"
(if_statement) "if (mask & m) {\n sighold(sig);\n current_mask |= m;\n }"
(if) "if"
(parenthesized_expression) "(mask & m)"
(() "("
(binary_expression) "mask & m"
(identifier) "mask"
(&) "&"
(identifier) "m"
()) ")"
(compound_statement) "{\n sighold(sig);\n current_mask |= m;\n }"
({) "{"
(expression_statement) "sighold(sig);"
(call_expression) "sighold(sig)"
(identifier) "sighold"
(argument_list) "(sig)"
(() "("
(identifier) "sig"
()) ")"
(;) ";"
(expression_statement) "current_mask |= m;"
(assignment_expression) "current_mask |= m"
(identifier) "current_mask"
(|=) "|="
(identifier) "m"
(;) ";"
(}) "}"
(}) "}"
(return_statement) "return oldmask;"
(return) "return"
(identifier) "oldmask"
(;) ";"
(}) "}"
(function_definition) "int sigsetmask(mask)\nint mask;\n{\n int sig;\n int m;\n int oldmask;\n\n oldmask = current_mask;\n for ( sig = 1, m = 1; sig <= MAXSIG; sig++, m <<= 1 ) {\n if (mask & m) {\n sighold(sig);\n current_mask |= m;\n }\n else {\n sigrelse(sig);\n current_mask &= ~m;\n }\n }\n return oldmask;\n}"
(primitive_type) "int"
(function_declarator) "sigsetmask(mask)"
(identifier) "sigsetmask"
(parameter_list) "(mask)"
(() "("
(identifier) "mask"
()) ")"
(declaration) "int mask;"
(primitive_type) "int"
(identifier) "mask"
(;) ";"
(compound_statement) "{\n int sig;\n int m;\n int oldmask;\n\n oldmask = current_mask;\n for ( sig = 1, m = 1; sig <= MAXSIG; sig++, m <<= 1 ) {\n if (mask & m) {\n sighold(sig);\n current_mask |= m;\n }\n else {\n sigrelse(sig);\n current_mask &= ~m;\n }\n }\n return oldmask;\n}"
({) "{"
(declaration) "int sig;"
(primitive_type) "int"
(identifier) "sig"
(;) ";"
(declaration) "int m;"
(primitive_type) "int"
(identifier) "m"
(;) ";"
(declaration) "int oldmask;"
(primitive_type) "int"
(identifier) "oldmask"
(;) ";"
(expression_statement) "oldmask = current_mask;"
(assignment_expression) "oldmask = current_mask"
(identifier) "oldmask"
(=) "="
(identifier) "current_mask"
(;) ";"
(for_statement) "for ( sig = 1, m = 1; sig <= MAXSIG; sig++, m <<= 1 ) {\n if (mask & m) {\n sighold(sig);\n current_mask |= m;\n }\n else {\n sigrelse(sig);\n current_mask &= ~m;\n }\n }"
(for) "for"
(() "("
(comma_expression) "sig = 1, m = 1"
(assignment_expression) "sig = 1"
(identifier) "sig"
(=) "="
(number_literal) "1"
(,) ","
(assignment_expression) "m = 1"
(identifier) "m"
(=) "="
(number_literal) "1"
(;) ";"
(binary_expression) "sig <= MAXSIG"
(identifier) "sig"
(<=) "<="
(identifier) "MAXSIG"
(;) ";"
(comma_expression) "sig++, m <<= 1"
(update_expression) "sig++"
(identifier) "sig"
(++) "++"
(,) ","
(assignment_expression) "m <<= 1"
(identifier) "m"
(<<=) "<<="
(number_literal) "1"
()) ")"
(compound_statement) "{\n if (mask & m) {\n sighold(sig);\n current_mask |= m;\n }\n else {\n sigrelse(sig);\n current_mask &= ~m;\n }\n }"
({) "{"
(if_statement) "if (mask & m) {\n sighold(sig);\n current_mask |= m;\n }\n else {\n sigrelse(sig);\n current_mask &= ~m;\n }"
(if) "if"
(parenthesized_expression) "(mask & m)"
(() "("
(binary_expression) "mask & m"
(identifier) "mask"
(&) "&"
(identifier) "m"
()) ")"
(compound_statement) "{\n sighold(sig);\n current_mask |= m;\n }"
({) "{"
(expression_statement) "sighold(sig);"
(call_expression) "sighold(sig)"
(identifier) "sighold"
(argument_list) "(sig)"
(() "("
(identifier) "sig"
()) ")"
(;) ";"
(expression_statement) "current_mask |= m;"
(assignment_expression) "current_mask |= m"
(identifier) "current_mask"
(|=) "|="
(identifier) "m"
(;) ";"
(}) "}"
(else_clause) "else {\n sigrelse(sig);\n current_mask &= ~m;\n }"
(else) "else"
(compound_statement) "{\n sigrelse(sig);\n current_mask &= ~m;\n }"
({) "{"
(expression_statement) "sigrelse(sig);"
(call_expression) "sigrelse(sig)"
(identifier) "sigrelse"
(argument_list) "(sig)"
(() "("
(identifier) "sig"
()) ")"
(;) ";"
(expression_statement) "current_mask &= ~m;"
(assignment_expression) "current_mask &= ~m"
(identifier) "current_mask"
(&=) "&="
(unary_expression) "~m"
(~) "~"
(identifier) "m"
(;) ";"
(}) "}"
(}) "}"
(return_statement) "return oldmask;"
(return) "return"
(identifier) "oldmask"
(;) ";"
(}) "}"
(#endif) "#endif"
(comment) "/* HAS_SVR3_SIGNALS */"
| 1,511
| 3
|
{"language": "c", "success": true, "metadata": {"lines": 260, "avg_line_length": 19.17, "nodes": 928, "errors": 0, "source_hash": "eb97268c7aba41b11dcbceb7bd4057104d26b5cddc7f849949ab102f62de3101", "categorized_nodes": 716}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"am.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 2, "type": "string_literal", "text": "\"am.h\"", "parent": 0, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 15}}, {"id": 3, "type": "preproc_include", "text": "#include <sys/signal.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<sys/signal.h>", "parent": 3, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 23}}, {"id": 6, "type": "preproc_include", "text": "#include WAIT\n", "parent": null, "children": [7, 8], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 8}}, {"id": 8, "type": "identifier", "text": "WAIT", "parent": 6, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 13}}, {"id": 9, "type": "preproc_include", "text": "#include <setjmp.h>\n", "parent": null, "children": [10, 11], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<setjmp.h>", "parent": 9, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 19}}, {"id": 12, "type": "declaration", "text": "extern jmp_buf select_intr;", "parent": null, "children": [13, 15, 16], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 27}}, {"id": 13, "type": "storage_class_specifier", "text": "extern", "parent": 12, "children": [14], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 6}}, {"id": 14, "type": "extern", "text": "extern", "parent": 13, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 6}}, {"id": 15, "type": "type_identifier", "text": "jmp_buf", "parent": 12, "children": [], "start_point": {"row": 25, "column": 7}, "end_point": {"row": 25, "column": 14}}, {"id": 16, "type": "identifier", "text": "select_intr", "parent": 12, "children": [], "start_point": {"row": 25, "column": 15}, "end_point": {"row": 25, "column": 26}}, {"id": 17, "type": "declaration", "text": "extern int select_intr_valid;", "parent": null, "children": [18, 20, 21], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 29}}, {"id": 18, "type": "storage_class_specifier", "text": "extern", "parent": 17, "children": [19], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 6}}, {"id": 19, "type": "extern", "text": "extern", "parent": 18, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 6}}, {"id": 20, "type": "primitive_type", "text": "int", "parent": 17, "children": [], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 10}}, {"id": 21, "type": "identifier", "text": "select_intr_valid", "parent": 17, "children": [], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 28}}, {"id": 22, "type": "type_definition", "text": "typedef struct pjob pjob;", "parent": null, "children": [23, 24, 27], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 25}}, {"id": 23, "type": "typedef", "text": "typedef", "parent": 22, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 7}}, {"id": 24, "type": "struct_specifier", "text": "struct pjob", "parent": 22, "children": [25, 26], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 19}}, {"id": 25, "type": "struct", "text": "struct", "parent": 24, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 14}}, {"id": 26, "type": "type_identifier", "text": "pjob", "parent": 24, "children": [], "start_point": {"row": 28, "column": 15}, "end_point": {"row": 28, "column": 19}}, {"id": 27, "type": "type_identifier", "text": "pjob", "parent": 22, "children": [], "start_point": {"row": 28, "column": 20}, "end_point": {"row": 28, "column": 24}}, {"id": 28, "type": "struct_specifier", "text": "struct pjob {\n\tqelem hdr;\t\t\t/* Linked list */\n\tint pid;\t\t\t/* Process ID of job */\n\tcb_fun cb_fun;\t\t\t/* Callback function */\n\tvoidp cb_closure;\t\t/* Closure for callback */\n\tunion wait w;\t\t\t/* Status filled in by sigchld */\n\tvoidp wchan;\t\t\t/* Wait channel */\n}", "parent": null, "children": [29, 30], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 36, "column": 1}}, {"id": 29, "type": "struct", "text": "struct", "parent": 28, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 6}}, {"id": 30, "type": "type_identifier", "text": "pjob", "parent": 28, "children": [], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 11}}, {"id": 31, "type": "field_declaration", "text": "qelem hdr;", "parent": 28, "children": [32, 33], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 11}}, {"id": 32, "type": "type_identifier", "text": "qelem", "parent": 31, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 6}}, {"id": 33, "type": "field_identifier", "text": "hdr", "parent": 31, "children": [], "start_point": {"row": 30, "column": 7}, "end_point": {"row": 30, "column": 10}}, {"id": 34, "type": "field_declaration", "text": "int pid;", "parent": 28, "children": [35, 36], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 9}}, {"id": 35, "type": "primitive_type", "text": "int", "parent": 34, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 4}}, {"id": 36, "type": "field_identifier", "text": "pid", "parent": 34, "children": [], "start_point": {"row": 31, "column": 5}, "end_point": {"row": 31, "column": 8}}, {"id": 37, "type": "field_declaration", "text": "cb_fun cb_fun;", "parent": 28, "children": [38, 39], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 15}}, {"id": 38, "type": "type_identifier", "text": "cb_fun", "parent": 37, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 7}}, {"id": 39, "type": "field_identifier", "text": "cb_fun", "parent": 37, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 14}}, {"id": 40, "type": "field_declaration", "text": "voidp cb_closure;", "parent": 28, "children": [41, 42], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 18}}, {"id": 41, "type": "type_identifier", "text": "voidp", "parent": 40, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 6}}, {"id": 42, "type": "field_identifier", "text": "cb_closure", "parent": 40, "children": [], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 17}}, {"id": 43, "type": "field_declaration", "text": "union wait w;", "parent": 28, "children": [44, 47], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 14}}, {"id": 44, "type": "union_specifier", "text": "union wait", "parent": 43, "children": [45, 46], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 11}}, {"id": 45, "type": "union", "text": "union", "parent": 44, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 6}}, {"id": 46, "type": "type_identifier", "text": "wait", "parent": 44, "children": [], "start_point": {"row": 34, "column": 7}, "end_point": {"row": 34, "column": 11}}, {"id": 47, "type": "field_identifier", "text": "w", "parent": 43, "children": [], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 13}}, {"id": 48, "type": "field_declaration", "text": "voidp wchan;", "parent": 28, "children": [49, 50], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 13}}, {"id": 49, "type": "type_identifier", "text": "voidp", "parent": 48, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 6}}, {"id": 50, "type": "field_identifier", "text": "wchan", "parent": 48, "children": [], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 12}}, {"id": 51, "type": "declaration", "text": "extern qelem proc_list_head;", "parent": null, "children": [52, 54, 55], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 28}}, {"id": 52, "type": "storage_class_specifier", "text": "extern", "parent": 51, "children": [53], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 6}}, {"id": 53, "type": "extern", "text": "extern", "parent": 52, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 6}}, {"id": 54, "type": "type_identifier", "text": "qelem", "parent": 51, "children": [], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 12}}, {"id": 55, "type": "identifier", "text": "proc_list_head", "parent": 51, "children": [], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 27}}, {"id": 56, "type": "declaration", "text": "qelem proc_list_head = { &proc_list_head, &proc_list_head };", "parent": null, "children": [57, 58], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 60}}, {"id": 57, "type": "type_identifier", "text": "qelem", "parent": 56, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 5}}, {"id": 58, "type": "init_declarator", "text": "proc_list_head = { &proc_list_head, &proc_list_head }", "parent": 56, "children": [59, 60, 61], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 39, "column": 59}}, {"id": 59, "type": "identifier", "text": "proc_list_head", "parent": 58, "children": [], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 39, "column": 20}}, {"id": 60, "type": "=", "text": "=", "parent": 58, "children": [], "start_point": {"row": 39, "column": 21}, "end_point": {"row": 39, "column": 22}}, {"id": 61, "type": "initializer_list", "text": "{ &proc_list_head, &proc_list_head }", "parent": 58, "children": [62, 64], "start_point": {"row": 39, "column": 23}, "end_point": {"row": 39, "column": 59}}, {"id": 62, "type": "pointer_expression", "text": "&proc_list_head", "parent": 61, "children": [63], "start_point": {"row": 39, "column": 25}, "end_point": {"row": 39, "column": 40}}, {"id": 63, "type": "identifier", "text": "proc_list_head", "parent": 62, "children": [], "start_point": {"row": 39, "column": 26}, "end_point": {"row": 39, "column": 40}}, {"id": 64, "type": "pointer_expression", "text": "&proc_list_head", "parent": 61, "children": [65], "start_point": {"row": 39, "column": 42}, "end_point": {"row": 39, "column": 57}}, {"id": 65, "type": "identifier", "text": "proc_list_head", "parent": 64, "children": [], "start_point": {"row": 39, "column": 43}, "end_point": {"row": 39, "column": 57}}, {"id": 66, "type": "declaration", "text": "extern qelem proc_wait_list;", "parent": null, "children": [67, 69, 70], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 28}}, {"id": 67, "type": "storage_class_specifier", "text": "extern", "parent": 66, "children": [68], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 6}}, {"id": 68, "type": "extern", "text": "extern", "parent": 67, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 6}}, {"id": 69, "type": "type_identifier", "text": "qelem", "parent": 66, "children": [], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 12}}, {"id": 70, "type": "identifier", "text": "proc_wait_list", "parent": 66, "children": [], "start_point": {"row": 40, "column": 13}, "end_point": {"row": 40, "column": 27}}, {"id": 71, "type": "declaration", "text": "qelem proc_wait_list = { &proc_wait_list, &proc_wait_list };", "parent": null, "children": [72, 73], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 60}}, {"id": 72, "type": "type_identifier", "text": "qelem", "parent": 71, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 5}}, {"id": 73, "type": "init_declarator", "text": "proc_wait_list = { &proc_wait_list, &proc_wait_list }", "parent": 71, "children": [74, 75, 76], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 59}}, {"id": 74, "type": "identifier", "text": "proc_wait_list", "parent": 73, "children": [], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 20}}, {"id": 75, "type": "=", "text": "=", "parent": 73, "children": [], "start_point": {"row": 41, "column": 21}, "end_point": {"row": 41, "column": 22}}, {"id": 76, "type": "initializer_list", "text": "{ &proc_wait_list, &proc_wait_list }", "parent": 73, "children": [77, 79], "start_point": {"row": 41, "column": 23}, "end_point": {"row": 41, "column": 59}}, {"id": 77, "type": "pointer_expression", "text": "&proc_wait_list", "parent": 76, "children": [78], "start_point": {"row": 41, "column": 25}, "end_point": {"row": 41, "column": 40}}, {"id": 78, "type": "identifier", "text": "proc_wait_list", "parent": 77, "children": [], "start_point": {"row": 41, "column": 26}, "end_point": {"row": 41, "column": 40}}, {"id": 79, "type": "pointer_expression", "text": "&proc_wait_list", "parent": 76, "children": [80], "start_point": {"row": 41, "column": 42}, "end_point": {"row": 41, "column": 57}}, {"id": 80, "type": "identifier", "text": "proc_wait_list", "parent": 79, "children": [], "start_point": {"row": 41, "column": 43}, "end_point": {"row": 41, "column": 57}}, {"id": 81, "type": "declaration", "text": "int task_notify_todo;", "parent": null, "children": [82, 83], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 21}}, {"id": 82, "type": "primitive_type", "text": "int", "parent": 81, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 3}}, {"id": 83, "type": "identifier", "text": "task_notify_todo", "parent": 81, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 20}}, {"id": 84, "type": "function_definition", "text": "void ins_que(elem, pred)\nqelem *elem, *pred;\n{\n\tqelem *p = pred->q_forw;\n\telem->q_back = pred;\n\telem->q_forw = p;\n\tpred->q_forw = elem;\n\tp->q_back = elem;\n}", "parent": null, "children": [85, 86, 91], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 53, "column": 1}}, {"id": 85, "type": "primitive_type", "text": "void", "parent": 84, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 4}}, {"id": 86, "type": "function_declarator", "text": "ins_que(elem, pred)", "parent": 84, "children": [87, 88], "start_point": {"row": 45, "column": 5}, "end_point": {"row": 45, "column": 24}}, {"id": 87, "type": "identifier", "text": "ins_que", "parent": 86, "children": [], "start_point": {"row": 45, "column": 5}, "end_point": {"row": 45, "column": 12}}, {"id": 88, "type": "parameter_list", "text": "(elem, pred)", "parent": 86, "children": [89, 90], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 24}}, {"id": 89, "type": "identifier", "text": "elem", "parent": 88, "children": [], "start_point": {"row": 45, "column": 13}, "end_point": {"row": 45, "column": 17}}, {"id": 90, "type": "identifier", "text": "pred", "parent": 88, "children": [], "start_point": {"row": 45, "column": 19}, "end_point": {"row": 45, "column": 23}}, {"id": 91, "type": "declaration", "text": "qelem *elem, *pred;", "parent": 84, "children": [92, 93, 96], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 19}}, {"id": 92, "type": "type_identifier", "text": "qelem", "parent": 91, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 5}}, {"id": 93, "type": "pointer_declarator", "text": "*elem", "parent": 91, "children": [94, 95], "start_point": {"row": 46, "column": 6}, "end_point": {"row": 46, "column": 11}}, {"id": 94, "type": "*", "text": "*", "parent": 93, "children": [], "start_point": {"row": 46, "column": 6}, "end_point": {"row": 46, "column": 7}}, {"id": 95, "type": "identifier", "text": "elem", "parent": 93, "children": [], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 11}}, {"id": 96, "type": "pointer_declarator", "text": "*pred", "parent": 91, "children": [97, 98], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 18}}, {"id": 97, "type": "*", "text": "*", "parent": 96, "children": [], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 14}}, {"id": 98, "type": "identifier", "text": "pred", "parent": 96, "children": [], "start_point": {"row": 46, "column": 14}, "end_point": {"row": 46, "column": 18}}, {"id": 99, "type": "declaration", "text": "qelem *p = pred->q_forw;", "parent": 84, "children": [100, 101], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 25}}, {"id": 100, "type": "type_identifier", "text": "qelem", "parent": 99, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 6}}, {"id": 101, "type": "init_declarator", "text": "*p = pred->q_forw", "parent": 99, "children": [102, 105, 106], "start_point": {"row": 48, "column": 7}, "end_point": {"row": 48, "column": 24}}, {"id": 102, "type": "pointer_declarator", "text": "*p", "parent": 101, "children": [103, 104], "start_point": {"row": 48, "column": 7}, "end_point": {"row": 48, "column": 9}}, {"id": 103, "type": "*", "text": "*", "parent": 102, "children": [], "start_point": {"row": 48, "column": 7}, "end_point": {"row": 48, "column": 8}}, {"id": 104, "type": "identifier", "text": "p", "parent": 102, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 9}}, {"id": 105, "type": "=", "text": "=", "parent": 101, "children": [], "start_point": {"row": 48, "column": 10}, "end_point": {"row": 48, "column": 11}}, {"id": 106, "type": "field_expression", "text": "pred->q_forw", "parent": 101, "children": [107, 108], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 48, "column": 24}}, {"id": 107, "type": "identifier", "text": "pred", "parent": 106, "children": [], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 48, "column": 16}}, {"id": 108, "type": "field_identifier", "text": "q_forw", "parent": 106, "children": [], "start_point": {"row": 48, "column": 18}, "end_point": {"row": 48, "column": 24}}, {"id": 109, "type": "assignment_expression", "text": "elem->q_back = pred", "parent": 84, "children": [110, 113, 114], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 20}}, {"id": 110, "type": "field_expression", "text": "elem->q_back", "parent": 109, "children": [111, 112], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 13}}, {"id": 111, "type": "identifier", "text": "elem", "parent": 110, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 5}}, {"id": 112, "type": "field_identifier", "text": "q_back", "parent": 110, "children": [], "start_point": {"row": 49, "column": 7}, "end_point": {"row": 49, "column": 13}}, {"id": 113, "type": "=", "text": "=", "parent": 109, "children": [], "start_point": {"row": 49, "column": 14}, "end_point": {"row": 49, "column": 15}}, {"id": 114, "type": "identifier", "text": "pred", "parent": 109, "children": [], "start_point": {"row": 49, "column": 16}, "end_point": {"row": 49, "column": 20}}, {"id": 115, "type": "assignment_expression", "text": "elem->q_forw = p", "parent": 84, "children": [116, 119, 120], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 17}}, {"id": 116, "type": "field_expression", "text": "elem->q_forw", "parent": 115, "children": [117, 118], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 13}}, {"id": 117, "type": "identifier", "text": "elem", "parent": 116, "children": [], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 5}}, {"id": 118, "type": "field_identifier", "text": "q_forw", "parent": 116, "children": [], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 13}}, {"id": 119, "type": "=", "text": "=", "parent": 115, "children": [], "start_point": {"row": 50, "column": 14}, "end_point": {"row": 50, "column": 15}}, {"id": 120, "type": "identifier", "text": "p", "parent": 115, "children": [], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 17}}, {"id": 121, "type": "assignment_expression", "text": "pred->q_forw = elem", "parent": 84, "children": [122, 125, 126], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 20}}, {"id": 122, "type": "field_expression", "text": "pred->q_forw", "parent": 121, "children": [123, 124], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 13}}, {"id": 123, "type": "identifier", "text": "pred", "parent": 122, "children": [], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 5}}, {"id": 124, "type": "field_identifier", "text": "q_forw", "parent": 122, "children": [], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 13}}, {"id": 125, "type": "=", "text": "=", "parent": 121, "children": [], "start_point": {"row": 51, "column": 14}, "end_point": {"row": 51, "column": 15}}, {"id": 126, "type": "identifier", "text": "elem", "parent": 121, "children": [], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 20}}, {"id": 127, "type": "assignment_expression", "text": "p->q_back = elem", "parent": 84, "children": [128, 131, 132], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 17}}, {"id": 128, "type": "field_expression", "text": "p->q_back", "parent": 127, "children": [129, 130], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 10}}, {"id": 129, "type": "identifier", "text": "p", "parent": 128, "children": [], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 2}}, {"id": 130, "type": "field_identifier", "text": "q_back", "parent": 128, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 10}}, {"id": 131, "type": "=", "text": "=", "parent": 127, "children": [], "start_point": {"row": 52, "column": 11}, "end_point": {"row": 52, "column": 12}}, {"id": 132, "type": "identifier", "text": "elem", "parent": 127, "children": [], "start_point": {"row": 52, "column": 13}, "end_point": {"row": 52, "column": 17}}, {"id": 133, "type": "function_definition", "text": "void rem_que(elem)\nqelem *elem;\n{\n\tqelem *p = elem->q_forw;\n\tqelem *p2 = elem->q_back;\n\tp2->q_forw = p;\n\tp->q_back = p2;\n}", "parent": null, "children": [134, 135, 139], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 62, "column": 1}}, {"id": 134, "type": "primitive_type", "text": "void", "parent": 133, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 4}}, {"id": 135, "type": "function_declarator", "text": "rem_que(elem)", "parent": 133, "children": [136, 137], "start_point": {"row": 55, "column": 5}, "end_point": {"row": 55, "column": 18}}, {"id": 136, "type": "identifier", "text": "rem_que", "parent": 135, "children": [], "start_point": {"row": 55, "column": 5}, "end_point": {"row": 55, "column": 12}}, {"id": 137, "type": "parameter_list", "text": "(elem)", "parent": 135, "children": [138], "start_point": {"row": 55, "column": 12}, "end_point": {"row": 55, "column": 18}}, {"id": 138, "type": "identifier", "text": "elem", "parent": 137, "children": [], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 55, "column": 17}}, {"id": 139, "type": "declaration", "text": "qelem *elem;", "parent": 133, "children": [140, 141], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 12}}, {"id": 140, "type": "type_identifier", "text": "qelem", "parent": 139, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 5}}, {"id": 141, "type": "pointer_declarator", "text": "*elem", "parent": 139, "children": [142, 143], "start_point": {"row": 56, "column": 6}, "end_point": {"row": 56, "column": 11}}, {"id": 142, "type": "*", "text": "*", "parent": 141, "children": [], "start_point": {"row": 56, "column": 6}, "end_point": {"row": 56, "column": 7}}, {"id": 143, "type": "identifier", "text": "elem", "parent": 141, "children": [], "start_point": {"row": 56, "column": 7}, "end_point": {"row": 56, "column": 11}}, {"id": 144, "type": "declaration", "text": "qelem *p = elem->q_forw;", "parent": 133, "children": [145, 146], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 25}}, {"id": 145, "type": "type_identifier", "text": "qelem", "parent": 144, "children": [], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 6}}, {"id": 146, "type": "init_declarator", "text": "*p = elem->q_forw", "parent": 144, "children": [147, 150, 151], "start_point": {"row": 58, "column": 7}, "end_point": {"row": 58, "column": 24}}, {"id": 147, "type": "pointer_declarator", "text": "*p", "parent": 146, "children": [148, 149], "start_point": {"row": 58, "column": 7}, "end_point": {"row": 58, "column": 9}}, {"id": 148, "type": "*", "text": "*", "parent": 147, "children": [], "start_point": {"row": 58, "column": 7}, "end_point": {"row": 58, "column": 8}}, {"id": 149, "type": "identifier", "text": "p", "parent": 147, "children": [], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 9}}, {"id": 150, "type": "=", "text": "=", "parent": 146, "children": [], "start_point": {"row": 58, "column": 10}, "end_point": {"row": 58, "column": 11}}, {"id": 151, "type": "field_expression", "text": "elem->q_forw", "parent": 146, "children": [152, 153], "start_point": {"row": 58, "column": 12}, "end_point": {"row": 58, "column": 24}}, {"id": 152, "type": "identifier", "text": "elem", "parent": 151, "children": [], "start_point": {"row": 58, "column": 12}, "end_point": {"row": 58, "column": 16}}, {"id": 153, "type": "field_identifier", "text": "q_forw", "parent": 151, "children": [], "start_point": {"row": 58, "column": 18}, "end_point": {"row": 58, "column": 24}}, {"id": 154, "type": "declaration", "text": "qelem *p2 = elem->q_back;", "parent": 133, "children": [155, 156], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 26}}, {"id": 155, "type": "type_identifier", "text": "qelem", "parent": 154, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 6}}, {"id": 156, "type": "init_declarator", "text": "*p2 = elem->q_back", "parent": 154, "children": [157, 160, 161], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 25}}, {"id": 157, "type": "pointer_declarator", "text": "*p2", "parent": 156, "children": [158, 159], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 10}}, {"id": 158, "type": "*", "text": "*", "parent": 157, "children": [], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 8}}, {"id": 159, "type": "identifier", "text": "p2", "parent": 157, "children": [], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 10}}, {"id": 160, "type": "=", "text": "=", "parent": 156, "children": [], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 12}}, {"id": 161, "type": "field_expression", "text": "elem->q_back", "parent": 156, "children": [162, 163], "start_point": {"row": 59, "column": 13}, "end_point": {"row": 59, "column": 25}}, {"id": 162, "type": "identifier", "text": "elem", "parent": 161, "children": [], "start_point": {"row": 59, "column": 13}, "end_point": {"row": 59, "column": 17}}, {"id": 163, "type": "field_identifier", "text": "q_back", "parent": 161, "children": [], "start_point": {"row": 59, "column": 19}, "end_point": {"row": 59, "column": 25}}, {"id": 164, "type": "assignment_expression", "text": "p2->q_forw = p", "parent": 133, "children": [165, 168, 169], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 15}}, {"id": 165, "type": "field_expression", "text": "p2->q_forw", "parent": 164, "children": [166, 167], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 11}}, {"id": 166, "type": "identifier", "text": "p2", "parent": 165, "children": [], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 3}}, {"id": 167, "type": "field_identifier", "text": "q_forw", "parent": 165, "children": [], "start_point": {"row": 60, "column": 5}, "end_point": {"row": 60, "column": 11}}, {"id": 168, "type": "=", "text": "=", "parent": 164, "children": [], "start_point": {"row": 60, "column": 12}, "end_point": {"row": 60, "column": 13}}, {"id": 169, "type": "identifier", "text": "p", "parent": 164, "children": [], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 60, "column": 15}}, {"id": 170, "type": "assignment_expression", "text": "p->q_back = p2", "parent": 133, "children": [171, 174, 175], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 15}}, {"id": 171, "type": "field_expression", "text": "p->q_back", "parent": 170, "children": [172, 173], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 10}}, {"id": 172, "type": "identifier", "text": "p", "parent": 171, "children": [], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 2}}, {"id": 173, "type": "field_identifier", "text": "q_back", "parent": 171, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 10}}, {"id": 174, "type": "=", "text": "=", "parent": 170, "children": [], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 12}}, {"id": 175, "type": "identifier", "text": "p2", "parent": 170, "children": [], "start_point": {"row": 61, "column": 13}, "end_point": {"row": 61, "column": 15}}, {"id": 176, "type": "declaration", "text": "static pjob *sched_job(cf, ca)\ncb_fun cf;", "parent": null, "children": [177, 178], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 65, "column": 10}}, {"id": 177, "type": "type_identifier", "text": "pjob", "parent": 176, "children": [], "start_point": {"row": 64, "column": 7}, "end_point": {"row": 64, "column": 11}}, {"id": 178, "type": "pointer_declarator", "text": "*sched_job(cf, ca)\ncb_fun cf", "parent": 176, "children": [179, 180], "start_point": {"row": 64, "column": 12}, "end_point": {"row": 65, "column": 9}}, {"id": 179, "type": "*", "text": "*", "parent": 178, "children": [], "start_point": {"row": 64, "column": 12}, "end_point": {"row": 64, "column": 13}}, {"id": 180, "type": "function_declarator", "text": "sched_job(cf, ca)\ncb_fun cf", "parent": 178, "children": [181, 182, 187, 188], "start_point": {"row": 64, "column": 13}, "end_point": {"row": 65, "column": 9}}, {"id": 181, "type": "identifier", "text": "sched_job", "parent": 180, "children": [], "start_point": {"row": 64, "column": 13}, "end_point": {"row": 64, "column": 22}}, {"id": 182, "type": "parameter_list", "text": "(cf, ca)", "parent": 180, "children": [183, 185], "start_point": {"row": 64, "column": 22}, "end_point": {"row": 64, "column": 30}}, {"id": 183, "type": "parameter_declaration", "text": "cf", "parent": 182, "children": [184], "start_point": {"row": 64, "column": 23}, "end_point": {"row": 64, "column": 25}}, {"id": 184, "type": "type_identifier", "text": "cf", "parent": 183, "children": [], "start_point": {"row": 64, "column": 23}, "end_point": {"row": 64, "column": 25}}, {"id": 185, "type": "parameter_declaration", "text": "ca", "parent": 182, "children": [186], "start_point": {"row": 64, "column": 27}, "end_point": {"row": 64, "column": 29}}, {"id": 186, "type": "type_identifier", "text": "ca", "parent": 185, "children": [], "start_point": {"row": 64, "column": 27}, "end_point": {"row": 64, "column": 29}}, {"id": 187, "type": "identifier", "text": "cb_fun", "parent": 180, "children": [], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 6}}, {"id": 188, "type": "identifier", "text": "cf", "parent": 180, "children": [], "start_point": {"row": 65, "column": 7}, "end_point": {"row": 65, "column": 9}}, {"id": 189, "type": "declaration", "text": "voidp ca;", "parent": null, "children": [190, 191], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 9}}, {"id": 190, "type": "type_identifier", "text": "voidp", "parent": 189, "children": [], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 5}}, {"id": 191, "type": "identifier", "text": "ca", "parent": 189, "children": [], "start_point": {"row": 66, "column": 6}, "end_point": {"row": 66, "column": 8}}, {"id": 192, "type": "declaration", "text": "pjob *p = ALLOC(pjob);", "parent": null, "children": [193, 194], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 23}}, {"id": 193, "type": "type_identifier", "text": "pjob", "parent": 192, "children": [], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 5}}, {"id": 194, "type": "init_declarator", "text": "*p = ALLOC(pjob)", "parent": 192, "children": [195, 198, 199], "start_point": {"row": 68, "column": 6}, "end_point": {"row": 68, "column": 22}}, {"id": 195, "type": "pointer_declarator", "text": "*p", "parent": 194, "children": [196, 197], "start_point": {"row": 68, "column": 6}, "end_point": {"row": 68, "column": 8}}, {"id": 196, "type": "*", "text": "*", "parent": 195, "children": [], "start_point": {"row": 68, "column": 6}, "end_point": {"row": 68, "column": 7}}, {"id": 197, "type": "identifier", "text": "p", "parent": 195, "children": [], "start_point": {"row": 68, "column": 7}, "end_point": {"row": 68, "column": 8}}, {"id": 198, "type": "=", "text": "=", "parent": 194, "children": [], "start_point": {"row": 68, "column": 9}, "end_point": {"row": 68, "column": 10}}, {"id": 199, "type": "call_expression", "text": "ALLOC(pjob)", "parent": 194, "children": [200, 201], "start_point": {"row": 68, "column": 11}, "end_point": {"row": 68, "column": 22}}, {"id": 200, "type": "identifier", "text": "ALLOC", "parent": 199, "children": [], "start_point": {"row": 68, "column": 11}, "end_point": {"row": 68, "column": 16}}, {"id": 201, "type": "argument_list", "text": "(pjob)", "parent": 199, "children": [202], "start_point": {"row": 68, "column": 16}, "end_point": {"row": 68, "column": 22}}, {"id": 202, "type": "identifier", "text": "pjob", "parent": 201, "children": [], "start_point": {"row": 68, "column": 17}, "end_point": {"row": 68, "column": 21}}, {"id": 203, "type": "assignment_expression", "text": "p->cb_fun = cf", "parent": null, "children": [204, 207, 208], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 15}}, {"id": 204, "type": "field_expression", "text": "p->cb_fun", "parent": 203, "children": [205, 206], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 10}}, {"id": 205, "type": "identifier", "text": "p", "parent": 204, "children": [], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 2}}, {"id": 206, "type": "field_identifier", "text": "cb_fun", "parent": 204, "children": [], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 10}}, {"id": 207, "type": "=", "text": "=", "parent": 203, "children": [], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 12}}, {"id": 208, "type": "identifier", "text": "cf", "parent": 203, "children": [], "start_point": {"row": 70, "column": 13}, "end_point": {"row": 70, "column": 15}}, {"id": 209, "type": "assignment_expression", "text": "p->cb_closure = ca", "parent": null, "children": [210, 213, 214], "start_point": {"row": 71, "column": 1}, "end_point": {"row": 71, "column": 19}}, {"id": 210, "type": "field_expression", "text": "p->cb_closure", "parent": 209, "children": [211, 212], "start_point": {"row": 71, "column": 1}, "end_point": {"row": 71, "column": 14}}, {"id": 211, "type": "identifier", "text": "p", "parent": 210, "children": [], "start_point": {"row": 71, "column": 1}, "end_point": {"row": 71, "column": 2}}, {"id": 212, "type": "field_identifier", "text": "cb_closure", "parent": 210, "children": [], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 14}}, {"id": 213, "type": "=", "text": "=", "parent": 209, "children": [], "start_point": {"row": 71, "column": 15}, "end_point": {"row": 71, "column": 16}}, {"id": 214, "type": "identifier", "text": "ca", "parent": 209, "children": [], "start_point": {"row": 71, "column": 17}, "end_point": {"row": 71, "column": 19}}, {"id": 215, "type": "call_expression", "text": "ins_que(&p->hdr, &proc_wait_list)", "parent": null, "children": [216, 217], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 76, "column": 34}}, {"id": 216, "type": "identifier", "text": "ins_que", "parent": 215, "children": [], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 76, "column": 8}}, {"id": 217, "type": "argument_list", "text": "(&p->hdr, &proc_wait_list)", "parent": 215, "children": [218, 222], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 34}}, {"id": 218, "type": "pointer_expression", "text": "&p->hdr", "parent": 217, "children": [219], "start_point": {"row": 76, "column": 9}, "end_point": {"row": 76, "column": 16}}, {"id": 219, "type": "field_expression", "text": "p->hdr", "parent": 218, "children": [220, 221], "start_point": {"row": 76, "column": 10}, "end_point": {"row": 76, "column": 16}}, {"id": 220, "type": "identifier", "text": "p", "parent": 219, "children": [], "start_point": {"row": 76, "column": 10}, "end_point": {"row": 76, "column": 11}}, {"id": 221, "type": "field_identifier", "text": "hdr", "parent": 219, "children": [], "start_point": {"row": 76, "column": 13}, "end_point": {"row": 76, "column": 16}}, {"id": 222, "type": "pointer_expression", "text": "&proc_wait_list", "parent": 217, "children": [223], "start_point": {"row": 76, "column": 18}, "end_point": {"row": 76, "column": 33}}, {"id": 223, "type": "identifier", "text": "proc_wait_list", "parent": 222, "children": [], "start_point": {"row": 76, "column": 19}, "end_point": {"row": 76, "column": 33}}, {"id": 224, "type": "return_statement", "text": "return p;", "parent": null, "children": [225], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 10}}, {"id": 225, "type": "identifier", "text": "p", "parent": 224, "children": [], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 9}}, {"id": 226, "type": "function_definition", "text": "void run_task(tf, ta, cf, ca)\ntask_fun tf;\nvoidp ta;\ncb_fun cf;\nvoidp ca;\n{\n\tpjob *p = sched_job(cf, ca);\n\tint mask;\n\n\tp->wchan = (voidp) p;\n\n\tmask = sigblock(sigmask(SIGCHLD));\n\n\tif (p->pid = background()) {\n\t\tsigsetmask(mask);\n\t\treturn;\n\t}\n\n\texit((*tf)(ta));\n\t/* firewall... */\n\tabort();\n}", "parent": null, "children": [227, 228, 235, 238, 241, 244], "start_point": {"row": 81, "column": 0}, "end_point": {"row": 102, "column": 1}}, {"id": 227, "type": "primitive_type", "text": "void", "parent": 226, "children": [], "start_point": {"row": 81, "column": 0}, "end_point": {"row": 81, "column": 4}}, {"id": 228, "type": "function_declarator", "text": "run_task(tf, ta, cf, ca)", "parent": 226, "children": [229, 230], "start_point": {"row": 81, "column": 5}, "end_point": {"row": 81, "column": 29}}, {"id": 229, "type": "identifier", "text": "run_task", "parent": 228, "children": [], "start_point": {"row": 81, "column": 5}, "end_point": {"row": 81, "column": 13}}, {"id": 230, "type": "parameter_list", "text": "(tf, ta, cf, ca)", "parent": 228, "children": [231, 232, 233, 234], "start_point": {"row": 81, "column": 13}, "end_point": {"row": 81, "column": 29}}, {"id": 231, "type": "identifier", "text": "tf", "parent": 230, "children": [], "start_point": {"row": 81, "column": 14}, "end_point": {"row": 81, "column": 16}}, {"id": 232, "type": "identifier", "text": "ta", "parent": 230, "children": [], "start_point": {"row": 81, "column": 18}, "end_point": {"row": 81, "column": 20}}, {"id": 233, "type": "identifier", "text": "cf", "parent": 230, "children": [], "start_point": {"row": 81, "column": 22}, "end_point": {"row": 81, "column": 24}}, {"id": 234, "type": "identifier", "text": "ca", "parent": 230, "children": [], "start_point": {"row": 81, "column": 26}, "end_point": {"row": 81, "column": 28}}, {"id": 235, "type": "declaration", "text": "task_fun tf;", "parent": 226, "children": [236, 237], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 82, "column": 12}}, {"id": 236, "type": "type_identifier", "text": "task_fun", "parent": 235, "children": [], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 82, "column": 8}}, {"id": 237, "type": "identifier", "text": "tf", "parent": 235, "children": [], "start_point": {"row": 82, "column": 9}, "end_point": {"row": 82, "column": 11}}, {"id": 238, "type": "declaration", "text": "voidp ta;", "parent": 226, "children": [239, 240], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 83, "column": 9}}, {"id": 239, "type": "type_identifier", "text": "voidp", "parent": 238, "children": [], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 83, "column": 5}}, {"id": 240, "type": "identifier", "text": "ta", "parent": 238, "children": [], "start_point": {"row": 83, "column": 6}, "end_point": {"row": 83, "column": 8}}, {"id": 241, "type": "declaration", "text": "cb_fun cf;", "parent": 226, "children": [242, 243], "start_point": {"row": 84, "column": 0}, "end_point": {"row": 84, "column": 10}}, {"id": 242, "type": "type_identifier", "text": "cb_fun", "parent": 241, "children": [], "start_point": {"row": 84, "column": 0}, "end_point": {"row": 84, "column": 6}}, {"id": 243, "type": "identifier", "text": "cf", "parent": 241, "children": [], "start_point": {"row": 84, "column": 7}, "end_point": {"row": 84, "column": 9}}, {"id": 244, "type": "declaration", "text": "voidp ca;", "parent": 226, "children": [245, 246], "start_point": {"row": 85, "column": 0}, "end_point": {"row": 85, "column": 9}}, {"id": 245, "type": "type_identifier", "text": "voidp", "parent": 244, "children": [], "start_point": {"row": 85, "column": 0}, "end_point": {"row": 85, "column": 5}}, {"id": 246, "type": "identifier", "text": "ca", "parent": 244, "children": [], "start_point": {"row": 85, "column": 6}, "end_point": {"row": 85, "column": 8}}, {"id": 247, "type": "declaration", "text": "pjob *p = sched_job(cf, ca);", "parent": 226, "children": [248, 249], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 29}}, {"id": 248, "type": "type_identifier", "text": "pjob", "parent": 247, "children": [], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 5}}, {"id": 249, "type": "init_declarator", "text": "*p = sched_job(cf, ca)", "parent": 247, "children": [250, 253, 254], "start_point": {"row": 87, "column": 6}, "end_point": {"row": 87, "column": 28}}, {"id": 250, "type": "pointer_declarator", "text": "*p", "parent": 249, "children": [251, 252], "start_point": {"row": 87, "column": 6}, "end_point": {"row": 87, "column": 8}}, {"id": 251, "type": "*", "text": "*", "parent": 250, "children": [], "start_point": {"row": 87, "column": 6}, "end_point": {"row": 87, "column": 7}}, {"id": 252, "type": "identifier", "text": "p", "parent": 250, "children": [], "start_point": {"row": 87, "column": 7}, "end_point": {"row": 87, "column": 8}}, {"id": 253, "type": "=", "text": "=", "parent": 249, "children": [], "start_point": {"row": 87, "column": 9}, "end_point": {"row": 87, "column": 10}}, {"id": 254, "type": "call_expression", "text": "sched_job(cf, ca)", "parent": 249, "children": [255, 256], "start_point": {"row": 87, "column": 11}, "end_point": {"row": 87, "column": 28}}, {"id": 255, "type": "identifier", "text": "sched_job", "parent": 254, "children": [], "start_point": {"row": 87, "column": 11}, "end_point": {"row": 87, "column": 20}}, {"id": 256, "type": "argument_list", "text": "(cf, ca)", "parent": 254, "children": [257, 258], "start_point": {"row": 87, "column": 20}, "end_point": {"row": 87, "column": 28}}, {"id": 257, "type": "identifier", "text": "cf", "parent": 256, "children": [], "start_point": {"row": 87, "column": 21}, "end_point": {"row": 87, "column": 23}}, {"id": 258, "type": "identifier", "text": "ca", "parent": 256, "children": [], "start_point": {"row": 87, "column": 25}, "end_point": {"row": 87, "column": 27}}, {"id": 259, "type": "declaration", "text": "int mask;", "parent": 226, "children": [260, 261], "start_point": {"row": 88, "column": 1}, "end_point": {"row": 88, "column": 10}}, {"id": 260, "type": "primitive_type", "text": "int", "parent": 259, "children": [], "start_point": {"row": 88, "column": 1}, "end_point": {"row": 88, "column": 4}}, {"id": 261, "type": "identifier", "text": "mask", "parent": 259, "children": [], "start_point": {"row": 88, "column": 5}, "end_point": {"row": 88, "column": 9}}, {"id": 262, "type": "assignment_expression", "text": "p->wchan = (voidp) p", "parent": 226, "children": [263, 266, 267], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 21}}, {"id": 263, "type": "field_expression", "text": "p->wchan", "parent": 262, "children": [264, 265], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 9}}, {"id": 264, "type": "identifier", "text": "p", "parent": 263, "children": [], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 2}}, {"id": 265, "type": "field_identifier", "text": "wchan", "parent": 263, "children": [], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 90, "column": 9}}, {"id": 266, "type": "=", "text": "=", "parent": 262, "children": [], "start_point": {"row": 90, "column": 10}, "end_point": {"row": 90, "column": 11}}, {"id": 267, "type": "cast_expression", "text": "(voidp) p", "parent": 262, "children": [268, 270], "start_point": {"row": 90, "column": 12}, "end_point": {"row": 90, "column": 21}}, {"id": 268, "type": "type_descriptor", "text": "voidp", "parent": 267, "children": [269], "start_point": {"row": 90, "column": 13}, "end_point": {"row": 90, "column": 18}}, {"id": 269, "type": "type_identifier", "text": "voidp", "parent": 268, "children": [], "start_point": {"row": 90, "column": 13}, "end_point": {"row": 90, "column": 18}}, {"id": 270, "type": "identifier", "text": "p", "parent": 267, "children": [], "start_point": {"row": 90, "column": 20}, "end_point": {"row": 90, "column": 21}}, {"id": 271, "type": "assignment_expression", "text": "mask = sigblock(sigmask(SIGCHLD))", "parent": 226, "children": [272, 273, 274], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 34}}, {"id": 272, "type": "identifier", "text": "mask", "parent": 271, "children": [], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 5}}, {"id": 273, "type": "=", "text": "=", "parent": 271, "children": [], "start_point": {"row": 92, "column": 6}, "end_point": {"row": 92, "column": 7}}, {"id": 274, "type": "call_expression", "text": "sigblock(sigmask(SIGCHLD))", "parent": 271, "children": [275, 276], "start_point": {"row": 92, "column": 8}, "end_point": {"row": 92, "column": 34}}, {"id": 275, "type": "identifier", "text": "sigblock", "parent": 274, "children": [], "start_point": {"row": 92, "column": 8}, "end_point": {"row": 92, "column": 16}}, {"id": 276, "type": "argument_list", "text": "(sigmask(SIGCHLD))", "parent": 274, "children": [277], "start_point": {"row": 92, "column": 16}, "end_point": {"row": 92, "column": 34}}, {"id": 277, "type": "call_expression", "text": "sigmask(SIGCHLD)", "parent": 276, "children": [278, 279], "start_point": {"row": 92, "column": 17}, "end_point": {"row": 92, "column": 33}}, {"id": 278, "type": "identifier", "text": "sigmask", "parent": 277, "children": [], "start_point": {"row": 92, "column": 17}, "end_point": {"row": 92, "column": 24}}, {"id": 279, "type": "argument_list", "text": "(SIGCHLD)", "parent": 277, "children": [280], "start_point": {"row": 92, "column": 24}, "end_point": {"row": 92, "column": 33}}, {"id": 280, "type": "identifier", "text": "SIGCHLD", "parent": 279, "children": [], "start_point": {"row": 92, "column": 25}, "end_point": {"row": 92, "column": 32}}, {"id": 281, "type": "if_statement", "text": "if (p->pid = background()) {\n\t\tsigsetmask(mask);\n\t\treturn;\n\t}", "parent": 226, "children": [282], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 97, "column": 2}}, {"id": 282, "type": "parenthesized_expression", "text": "(p->pid = background())", "parent": 281, "children": [283], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 27}}, {"id": 283, "type": "assignment_expression", "text": "p->pid = background()", "parent": 282, "children": [284, 287, 288], "start_point": {"row": 94, "column": 5}, "end_point": {"row": 94, "column": 26}}, {"id": 284, "type": "field_expression", "text": "p->pid", "parent": 283, "children": [285, 286], "start_point": {"row": 94, "column": 5}, "end_point": {"row": 94, "column": 11}}, {"id": 285, "type": "identifier", "text": "p", "parent": 284, "children": [], "start_point": {"row": 94, "column": 5}, "end_point": {"row": 94, "column": 6}}, {"id": 286, "type": "field_identifier", "text": "pid", "parent": 284, "children": [], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 94, "column": 11}}, {"id": 287, "type": "=", "text": "=", "parent": 283, "children": [], "start_point": {"row": 94, "column": 12}, "end_point": {"row": 94, "column": 13}}, {"id": 288, "type": "call_expression", "text": "background()", "parent": 283, "children": [289, 290], "start_point": {"row": 94, "column": 14}, "end_point": {"row": 94, "column": 26}}, {"id": 289, "type": "identifier", "text": "background", "parent": 288, "children": [], "start_point": {"row": 94, "column": 14}, "end_point": {"row": 94, "column": 24}}, {"id": 290, "type": "argument_list", "text": "()", "parent": 288, "children": [], "start_point": {"row": 94, "column": 24}, "end_point": {"row": 94, "column": 26}}, {"id": 291, "type": "call_expression", "text": "sigsetmask(mask)", "parent": 281, "children": [292, 293], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 95, "column": 18}}, {"id": 292, "type": "identifier", "text": "sigsetmask", "parent": 291, "children": [], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 95, "column": 12}}, {"id": 293, "type": "argument_list", "text": "(mask)", "parent": 291, "children": [294], "start_point": {"row": 95, "column": 12}, "end_point": {"row": 95, "column": 18}}, {"id": 294, "type": "identifier", "text": "mask", "parent": 293, "children": [], "start_point": {"row": 95, "column": 13}, "end_point": {"row": 95, "column": 17}}, {"id": 295, "type": "return_statement", "text": "return;", "parent": 281, "children": [], "start_point": {"row": 96, "column": 2}, "end_point": {"row": 96, "column": 9}}, {"id": 296, "type": "call_expression", "text": "exit((*tf)(ta))", "parent": 226, "children": [297, 298], "start_point": {"row": 99, "column": 1}, "end_point": {"row": 99, "column": 16}}, {"id": 297, "type": "identifier", "text": "exit", "parent": 296, "children": [], "start_point": {"row": 99, "column": 1}, "end_point": {"row": 99, "column": 5}}, {"id": 298, "type": "argument_list", "text": "((*tf)(ta))", "parent": 296, "children": [299], "start_point": {"row": 99, "column": 5}, "end_point": {"row": 99, "column": 16}}, {"id": 299, "type": "call_expression", "text": "(*tf)(ta)", "parent": 298, "children": [300, 304], "start_point": {"row": 99, "column": 6}, "end_point": {"row": 99, "column": 15}}, {"id": 300, "type": "parenthesized_expression", "text": "(*tf)", "parent": 299, "children": [301], "start_point": {"row": 99, "column": 6}, "end_point": {"row": 99, "column": 11}}, {"id": 301, "type": "pointer_expression", "text": "*tf", "parent": 300, "children": [302, 303], "start_point": {"row": 99, "column": 7}, "end_point": {"row": 99, "column": 10}}, {"id": 302, "type": "*", "text": "*", "parent": 301, "children": [], "start_point": {"row": 99, "column": 7}, "end_point": {"row": 99, "column": 8}}, {"id": 303, "type": "identifier", "text": "tf", "parent": 301, "children": [], "start_point": {"row": 99, "column": 8}, "end_point": {"row": 99, "column": 10}}, {"id": 304, "type": "argument_list", "text": "(ta)", "parent": 299, "children": [305], "start_point": {"row": 99, "column": 11}, "end_point": {"row": 99, "column": 15}}, {"id": 305, "type": "identifier", "text": "ta", "parent": 304, "children": [], "start_point": {"row": 99, "column": 12}, "end_point": {"row": 99, "column": 14}}, {"id": 306, "type": "call_expression", "text": "abort()", "parent": 226, "children": [307, 308], "start_point": {"row": 101, "column": 1}, "end_point": {"row": 101, "column": 8}}, {"id": 307, "type": "identifier", "text": "abort", "parent": 306, "children": [], "start_point": {"row": 101, "column": 1}, "end_point": {"row": 101, "column": 6}}, {"id": 308, "type": "argument_list", "text": "()", "parent": 306, "children": [], "start_point": {"row": 101, "column": 6}, "end_point": {"row": 101, "column": 8}}, {"id": 309, "type": "function_definition", "text": "void sched_task(cf, ca, wchan)\ncb_fun cf;\nvoidp ca;\nvoidp wchan;\n{\n\t/*\n\t * Allocate a new task\n\t */\n\tpjob *p = sched_job(cf, ca);\n#ifdef DEBUG_SLEEP\n\tdlog(\"SLEEP on %#x\", wchan);\n#endif\n\tp->wchan = wchan;\n\tp->pid = 0;\n\tbzero((voidp) &p->w, sizeof(p->w));\n}", "parent": null, "children": [310, 311, 317, 320, 323], "start_point": {"row": 107, "column": 0}, "end_point": {"row": 122, "column": 1}}, {"id": 310, "type": "primitive_type", "text": "void", "parent": 309, "children": [], "start_point": {"row": 107, "column": 0}, "end_point": {"row": 107, "column": 4}}, {"id": 311, "type": "function_declarator", "text": "sched_task(cf, ca, wchan)", "parent": 309, "children": [312, 313], "start_point": {"row": 107, "column": 5}, "end_point": {"row": 107, "column": 30}}, {"id": 312, "type": "identifier", "text": "sched_task", "parent": 311, "children": [], "start_point": {"row": 107, "column": 5}, "end_point": {"row": 107, "column": 15}}, {"id": 313, "type": "parameter_list", "text": "(cf, ca, wchan)", "parent": 311, "children": [314, 315, 316], "start_point": {"row": 107, "column": 15}, "end_point": {"row": 107, "column": 30}}, {"id": 314, "type": "identifier", "text": "cf", "parent": 313, "children": [], "start_point": {"row": 107, "column": 16}, "end_point": {"row": 107, "column": 18}}, {"id": 315, "type": "identifier", "text": "ca", "parent": 313, "children": [], "start_point": {"row": 107, "column": 20}, "end_point": {"row": 107, "column": 22}}, {"id": 316, "type": "identifier", "text": "wchan", "parent": 313, "children": [], "start_point": {"row": 107, "column": 24}, "end_point": {"row": 107, "column": 29}}, {"id": 317, "type": "declaration", "text": "cb_fun cf;", "parent": 309, "children": [318, 319], "start_point": {"row": 108, "column": 0}, "end_point": {"row": 108, "column": 10}}, {"id": 318, "type": "type_identifier", "text": "cb_fun", "parent": 317, "children": [], "start_point": {"row": 108, "column": 0}, "end_point": {"row": 108, "column": 6}}, {"id": 319, "type": "identifier", "text": "cf", "parent": 317, "children": [], "start_point": {"row": 108, "column": 7}, "end_point": {"row": 108, "column": 9}}, {"id": 320, "type": "declaration", "text": "voidp ca;", "parent": 309, "children": [321, 322], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 109, "column": 9}}, {"id": 321, "type": "type_identifier", "text": "voidp", "parent": 320, "children": [], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 109, "column": 5}}, {"id": 322, "type": "identifier", "text": "ca", "parent": 320, "children": [], "start_point": {"row": 109, "column": 6}, "end_point": {"row": 109, "column": 8}}, {"id": 323, "type": "declaration", "text": "voidp wchan;", "parent": 309, "children": [324, 325], "start_point": {"row": 110, "column": 0}, "end_point": {"row": 110, "column": 12}}, {"id": 324, "type": "type_identifier", "text": "voidp", "parent": 323, "children": [], "start_point": {"row": 110, "column": 0}, "end_point": {"row": 110, "column": 5}}, {"id": 325, "type": "identifier", "text": "wchan", "parent": 323, "children": [], "start_point": {"row": 110, "column": 6}, "end_point": {"row": 110, "column": 11}}, {"id": 326, "type": "declaration", "text": "pjob *p = sched_job(cf, ca);", "parent": 309, "children": [327, 328], "start_point": {"row": 115, "column": 1}, "end_point": {"row": 115, "column": 29}}, {"id": 327, "type": "type_identifier", "text": "pjob", "parent": 326, "children": [], "start_point": {"row": 115, "column": 1}, "end_point": {"row": 115, "column": 5}}, {"id": 328, "type": "init_declarator", "text": "*p = sched_job(cf, ca)", "parent": 326, "children": [329, 332, 333], "start_point": {"row": 115, "column": 6}, "end_point": {"row": 115, "column": 28}}, {"id": 329, "type": "pointer_declarator", "text": "*p", "parent": 328, "children": [330, 331], "start_point": {"row": 115, "column": 6}, "end_point": {"row": 115, "column": 8}}, {"id": 330, "type": "*", "text": "*", "parent": 329, "children": [], "start_point": {"row": 115, "column": 6}, "end_point": {"row": 115, "column": 7}}, {"id": 331, "type": "identifier", "text": "p", "parent": 329, "children": [], "start_point": {"row": 115, "column": 7}, "end_point": {"row": 115, "column": 8}}, {"id": 332, "type": "=", "text": "=", "parent": 328, "children": [], "start_point": {"row": 115, "column": 9}, "end_point": {"row": 115, "column": 10}}, {"id": 333, "type": "call_expression", "text": "sched_job(cf, ca)", "parent": 328, "children": [334, 335], "start_point": {"row": 115, "column": 11}, "end_point": {"row": 115, "column": 28}}, {"id": 334, "type": "identifier", "text": "sched_job", "parent": 333, "children": [], "start_point": {"row": 115, "column": 11}, "end_point": {"row": 115, "column": 20}}, {"id": 335, "type": "argument_list", "text": "(cf, ca)", "parent": 333, "children": [336, 337], "start_point": {"row": 115, "column": 20}, "end_point": {"row": 115, "column": 28}}, {"id": 336, "type": "identifier", "text": "cf", "parent": 335, "children": [], "start_point": {"row": 115, "column": 21}, "end_point": {"row": 115, "column": 23}}, {"id": 337, "type": "identifier", "text": "ca", "parent": 335, "children": [], "start_point": {"row": 115, "column": 25}, "end_point": {"row": 115, "column": 27}}, {"id": 338, "type": "preproc_ifdef", "text": "#ifdef DEBUG_SLEEP\n\tdlog(\"SLEEP on %#x\", wchan);\n#endif", "parent": 309, "children": [339, 340, 346], "start_point": {"row": 116, "column": 0}, "end_point": {"row": 118, "column": 6}}, {"id": 339, "type": "#ifdef", "text": "#ifdef", "parent": 338, "children": [], "start_point": {"row": 116, "column": 0}, "end_point": {"row": 116, "column": 6}}, {"id": 340, "type": "identifier", "text": "DEBUG_SLEEP", "parent": 338, "children": [], "start_point": {"row": 116, "column": 7}, "end_point": {"row": 116, "column": 18}}, {"id": 341, "type": "call_expression", "text": "dlog(\"SLEEP on %#x\", wchan)", "parent": 338, "children": [342, 343], "start_point": {"row": 117, "column": 1}, "end_point": {"row": 117, "column": 28}}, {"id": 342, "type": "identifier", "text": "dlog", "parent": 341, "children": [], "start_point": {"row": 117, "column": 1}, "end_point": {"row": 117, "column": 5}}, {"id": 343, "type": "argument_list", "text": "(\"SLEEP on %#x\", wchan)", "parent": 341, "children": [344, 345], "start_point": {"row": 117, "column": 5}, "end_point": {"row": 117, "column": 28}}, {"id": 344, "type": "string_literal", "text": "\"SLEEP on %#x\"", "parent": 343, "children": [], "start_point": {"row": 117, "column": 6}, "end_point": {"row": 117, "column": 20}}, {"id": 345, "type": "identifier", "text": "wchan", "parent": 343, "children": [], "start_point": {"row": 117, "column": 22}, "end_point": {"row": 117, "column": 27}}, {"id": 346, "type": "#endif", "text": "#endif", "parent": 338, "children": [], "start_point": {"row": 118, "column": 0}, "end_point": {"row": 118, "column": 6}}, {"id": 347, "type": "assignment_expression", "text": "p->wchan = wchan", "parent": 309, "children": [348, 351, 352], "start_point": {"row": 119, "column": 1}, "end_point": {"row": 119, "column": 17}}, {"id": 348, "type": "field_expression", "text": "p->wchan", "parent": 347, "children": [349, 350], "start_point": {"row": 119, "column": 1}, "end_point": {"row": 119, "column": 9}}, {"id": 349, "type": "identifier", "text": "p", "parent": 348, "children": [], "start_point": {"row": 119, "column": 1}, "end_point": {"row": 119, "column": 2}}, {"id": 350, "type": "field_identifier", "text": "wchan", "parent": 348, "children": [], "start_point": {"row": 119, "column": 4}, "end_point": {"row": 119, "column": 9}}, {"id": 351, "type": "=", "text": "=", "parent": 347, "children": [], "start_point": {"row": 119, "column": 10}, "end_point": {"row": 119, "column": 11}}, {"id": 352, "type": "identifier", "text": "wchan", "parent": 347, "children": [], "start_point": {"row": 119, "column": 12}, "end_point": {"row": 119, "column": 17}}, {"id": 353, "type": "assignment_expression", "text": "p->pid = 0", "parent": 309, "children": [354, 357, 358], "start_point": {"row": 120, "column": 1}, "end_point": {"row": 120, "column": 11}}, {"id": 354, "type": "field_expression", "text": "p->pid", "parent": 353, "children": [355, 356], "start_point": {"row": 120, "column": 1}, "end_point": {"row": 120, "column": 7}}, {"id": 355, "type": "identifier", "text": "p", "parent": 354, "children": [], "start_point": {"row": 120, "column": 1}, "end_point": {"row": 120, "column": 2}}, {"id": 356, "type": "field_identifier", "text": "pid", "parent": 354, "children": [], "start_point": {"row": 120, "column": 4}, "end_point": {"row": 120, "column": 7}}, {"id": 357, "type": "=", "text": "=", "parent": 353, "children": [], "start_point": {"row": 120, "column": 8}, "end_point": {"row": 120, "column": 9}}, {"id": 358, "type": "number_literal", "text": "0", "parent": 353, "children": [], "start_point": {"row": 120, "column": 10}, "end_point": {"row": 120, "column": 11}}, {"id": 359, "type": "call_expression", "text": "bzero((voidp) &p->w, sizeof(p->w))", "parent": 309, "children": [360, 361], "start_point": {"row": 121, "column": 1}, "end_point": {"row": 121, "column": 35}}, {"id": 360, "type": "identifier", "text": "bzero", "parent": 359, "children": [], "start_point": {"row": 121, "column": 1}, "end_point": {"row": 121, "column": 6}}, {"id": 361, "type": "argument_list", "text": "((voidp) &p->w, sizeof(p->w))", "parent": 359, "children": [362, 368], "start_point": {"row": 121, "column": 6}, "end_point": {"row": 121, "column": 35}}, {"id": 362, "type": "binary_expression", "text": "(voidp) &p->w", "parent": 361, "children": [363, 365], "start_point": {"row": 121, "column": 7}, "end_point": {"row": 121, "column": 20}}, {"id": 363, "type": "parenthesized_expression", "text": "(voidp)", "parent": 362, "children": [364], "start_point": {"row": 121, "column": 7}, "end_point": {"row": 121, "column": 14}}, {"id": 364, "type": "identifier", "text": "voidp", "parent": 363, "children": [], "start_point": {"row": 121, "column": 8}, "end_point": {"row": 121, "column": 13}}, {"id": 365, "type": "field_expression", "text": "p->w", "parent": 362, "children": [366, 367], "start_point": {"row": 121, "column": 16}, "end_point": {"row": 121, "column": 20}}, {"id": 366, "type": "identifier", "text": "p", "parent": 365, "children": [], "start_point": {"row": 121, "column": 16}, "end_point": {"row": 121, "column": 17}}, {"id": 367, "type": "field_identifier", "text": "w", "parent": 365, "children": [], "start_point": {"row": 121, "column": 19}, "end_point": {"row": 121, "column": 20}}, {"id": 368, "type": "sizeof_expression", "text": "sizeof(p->w)", "parent": 361, "children": [369], "start_point": {"row": 121, "column": 22}, "end_point": {"row": 121, "column": 34}}, {"id": 369, "type": "parenthesized_expression", "text": "(p->w)", "parent": 368, "children": [370], "start_point": {"row": 121, "column": 28}, "end_point": {"row": 121, "column": 34}}, {"id": 370, "type": "field_expression", "text": "p->w", "parent": 369, "children": [371, 372], "start_point": {"row": 121, "column": 29}, "end_point": {"row": 121, "column": 33}}, {"id": 371, "type": "identifier", "text": "p", "parent": 370, "children": [], "start_point": {"row": 121, "column": 29}, "end_point": {"row": 121, "column": 30}}, {"id": 372, "type": "field_identifier", "text": "w", "parent": 370, "children": [], "start_point": {"row": 121, "column": 32}, "end_point": {"row": 121, "column": 33}}, {"id": 373, "type": "function_definition", "text": "static void wakeupjob(p)\npjob *p;\n{\n\trem_que(&p->hdr);\n\tins_que(&p->hdr, &proc_list_head);\n\ttask_notify_todo++;\n}", "parent": null, "children": [374, 375, 379], "start_point": {"row": 124, "column": 0}, "end_point": {"row": 130, "column": 1}}, {"id": 374, "type": "primitive_type", "text": "void", "parent": 373, "children": [], "start_point": {"row": 124, "column": 7}, "end_point": {"row": 124, "column": 11}}, {"id": 375, "type": "function_declarator", "text": "wakeupjob(p)", "parent": 373, "children": [376, 377], "start_point": {"row": 124, "column": 12}, "end_point": {"row": 124, "column": 24}}, {"id": 376, "type": "identifier", "text": "wakeupjob", "parent": 375, "children": [], "start_point": {"row": 124, "column": 12}, "end_point": {"row": 124, "column": 21}}, {"id": 377, "type": "parameter_list", "text": "(p)", "parent": 375, "children": [378], "start_point": {"row": 124, "column": 21}, "end_point": {"row": 124, "column": 24}}, {"id": 378, "type": "identifier", "text": "p", "parent": 377, "children": [], "start_point": {"row": 124, "column": 22}, "end_point": {"row": 124, "column": 23}}, {"id": 379, "type": "declaration", "text": "pjob *p;", "parent": 373, "children": [380, 381], "start_point": {"row": 125, "column": 0}, "end_point": {"row": 125, "column": 8}}, {"id": 380, "type": "type_identifier", "text": "pjob", "parent": 379, "children": [], "start_point": {"row": 125, "column": 0}, "end_point": {"row": 125, "column": 4}}, {"id": 381, "type": "pointer_declarator", "text": "*p", "parent": 379, "children": [382, 383], "start_point": {"row": 125, "column": 5}, "end_point": {"row": 125, "column": 7}}, {"id": 382, "type": "*", "text": "*", "parent": 381, "children": [], "start_point": {"row": 125, "column": 5}, "end_point": {"row": 125, "column": 6}}, {"id": 383, "type": "identifier", "text": "p", "parent": 381, "children": [], "start_point": {"row": 125, "column": 6}, "end_point": {"row": 125, "column": 7}}, {"id": 384, "type": "call_expression", "text": "rem_que(&p->hdr)", "parent": 373, "children": [385, 386], "start_point": {"row": 127, "column": 1}, "end_point": {"row": 127, "column": 17}}, {"id": 385, "type": "identifier", "text": "rem_que", "parent": 384, "children": [], "start_point": {"row": 127, "column": 1}, "end_point": {"row": 127, "column": 8}}, {"id": 386, "type": "argument_list", "text": "(&p->hdr)", "parent": 384, "children": [387], "start_point": {"row": 127, "column": 8}, "end_point": {"row": 127, "column": 17}}, {"id": 387, "type": "pointer_expression", "text": "&p->hdr", "parent": 386, "children": [388], "start_point": {"row": 127, "column": 9}, "end_point": {"row": 127, "column": 16}}, {"id": 388, "type": "field_expression", "text": "p->hdr", "parent": 387, "children": [389, 390], "start_point": {"row": 127, "column": 10}, "end_point": {"row": 127, "column": 16}}, {"id": 389, "type": "identifier", "text": "p", "parent": 388, "children": [], "start_point": {"row": 127, "column": 10}, "end_point": {"row": 127, "column": 11}}, {"id": 390, "type": "field_identifier", "text": "hdr", "parent": 388, "children": [], "start_point": {"row": 127, "column": 13}, "end_point": {"row": 127, "column": 16}}, {"id": 391, "type": "call_expression", "text": "ins_que(&p->hdr, &proc_list_head)", "parent": 373, "children": [392, 393], "start_point": {"row": 128, "column": 1}, "end_point": {"row": 128, "column": 34}}, {"id": 392, "type": "identifier", "text": "ins_que", "parent": 391, "children": [], "start_point": {"row": 128, "column": 1}, "end_point": {"row": 128, "column": 8}}, {"id": 393, "type": "argument_list", "text": "(&p->hdr, &proc_list_head)", "parent": 391, "children": [394, 398], "start_point": {"row": 128, "column": 8}, "end_point": {"row": 128, "column": 34}}, {"id": 394, "type": "pointer_expression", "text": "&p->hdr", "parent": 393, "children": [395], "start_point": {"row": 128, "column": 9}, "end_point": {"row": 128, "column": 16}}, {"id": 395, "type": "field_expression", "text": "p->hdr", "parent": 394, "children": [396, 397], "start_point": {"row": 128, "column": 10}, "end_point": {"row": 128, "column": 16}}, {"id": 396, "type": "identifier", "text": "p", "parent": 395, "children": [], "start_point": {"row": 128, "column": 10}, "end_point": {"row": 128, "column": 11}}, {"id": 397, "type": "field_identifier", "text": "hdr", "parent": 395, "children": [], "start_point": {"row": 128, "column": 13}, "end_point": {"row": 128, "column": 16}}, {"id": 398, "type": "pointer_expression", "text": "&proc_list_head", "parent": 393, "children": [399], "start_point": {"row": 128, "column": 18}, "end_point": {"row": 128, "column": 33}}, {"id": 399, "type": "identifier", "text": "proc_list_head", "parent": 398, "children": [], "start_point": {"row": 128, "column": 19}, "end_point": {"row": 128, "column": 33}}, {"id": 400, "type": "update_expression", "text": "task_notify_todo++", "parent": 373, "children": [401, 402], "start_point": {"row": 129, "column": 1}, "end_point": {"row": 129, "column": 19}}, {"id": 401, "type": "identifier", "text": "task_notify_todo", "parent": 400, "children": [], "start_point": {"row": 129, "column": 1}, "end_point": {"row": 129, "column": 17}}, {"id": 402, "type": "++", "text": "++", "parent": 400, "children": [], "start_point": {"row": 129, "column": 17}, "end_point": {"row": 129, "column": 19}}, {"id": 403, "type": "function_definition", "text": "void wakeup(wchan)\nvoidp wchan;\n{\n\tpjob *p, *p2;\n#ifdef DEBUG_SLEEP\n\tint done = 0;\n#endif\n\tif (!foreground)\n\t\treturn;\n\n#ifdef DEBUG_SLEEP\n\t/*dlog(\"wakeup(%#x)\", wchan);*/\n#endif\n\t/*\n\t * Can't user ITER() here because\n\t * wakeupjob() juggles the list.\n\t */\n\tfor (p = FIRST(pjob, &proc_wait_list);\n\t\t\tp2 = NEXT(pjob, p), p != HEAD(pjob, &proc_wait_list);\n\t\t\tp = p2) {\n\t\tif (p->wchan == wchan) {\n#ifdef DEBUG_SLEEP\n\t\t\tdone = 1;\n#endif\n\t\t\twakeupjob(p);\n\t\t}\n\t}\n\n#ifdef DEBUG_SLEEP\n\tif (!done)\n\t\tdlog(\"Nothing SLEEPing on %#x\", wchan);\n#endif\n}", "parent": null, "children": [404, 405, 409], "start_point": {"row": 132, "column": 0}, "end_point": {"row": 164, "column": 1}}, {"id": 404, "type": "primitive_type", "text": "void", "parent": 403, "children": [], "start_point": {"row": 132, "column": 0}, "end_point": {"row": 132, "column": 4}}, {"id": 405, "type": "function_declarator", "text": "wakeup(wchan)", "parent": 403, "children": [406, 407], "start_point": {"row": 132, "column": 5}, "end_point": {"row": 132, "column": 18}}, {"id": 406, "type": "identifier", "text": "wakeup", "parent": 405, "children": [], "start_point": {"row": 132, "column": 5}, "end_point": {"row": 132, "column": 11}}, {"id": 407, "type": "parameter_list", "text": "(wchan)", "parent": 405, "children": [408], "start_point": {"row": 132, "column": 11}, "end_point": {"row": 132, "column": 18}}, {"id": 408, "type": "identifier", "text": "wchan", "parent": 407, "children": [], "start_point": {"row": 132, "column": 12}, "end_point": {"row": 132, "column": 17}}, {"id": 409, "type": "declaration", "text": "voidp wchan;", "parent": 403, "children": [410, 411], "start_point": {"row": 133, "column": 0}, "end_point": {"row": 133, "column": 12}}, {"id": 410, "type": "type_identifier", "text": "voidp", "parent": 409, "children": [], "start_point": {"row": 133, "column": 0}, "end_point": {"row": 133, "column": 5}}, {"id": 411, "type": "identifier", "text": "wchan", "parent": 409, "children": [], "start_point": {"row": 133, "column": 6}, "end_point": {"row": 133, "column": 11}}, {"id": 412, "type": "declaration", "text": "pjob *p, *p2;", "parent": 403, "children": [413, 414, 417], "start_point": {"row": 135, "column": 1}, "end_point": {"row": 135, "column": 14}}, {"id": 413, "type": "type_identifier", "text": "pjob", "parent": 412, "children": [], "start_point": {"row": 135, "column": 1}, "end_point": {"row": 135, "column": 5}}, {"id": 414, "type": "pointer_declarator", "text": "*p", "parent": 412, "children": [415, 416], "start_point": {"row": 135, "column": 6}, "end_point": {"row": 135, "column": 8}}, {"id": 415, "type": "*", "text": "*", "parent": 414, "children": [], "start_point": {"row": 135, "column": 6}, "end_point": {"row": 135, "column": 7}}, {"id": 416, "type": "identifier", "text": "p", "parent": 414, "children": [], "start_point": {"row": 135, "column": 7}, "end_point": {"row": 135, "column": 8}}, {"id": 417, "type": "pointer_declarator", "text": "*p2", "parent": 412, "children": [418, 419], "start_point": {"row": 135, "column": 10}, "end_point": {"row": 135, "column": 13}}, {"id": 418, "type": "*", "text": "*", "parent": 417, "children": [], "start_point": {"row": 135, "column": 10}, "end_point": {"row": 135, "column": 11}}, {"id": 419, "type": "identifier", "text": "p2", "parent": 417, "children": [], "start_point": {"row": 135, "column": 11}, "end_point": {"row": 135, "column": 13}}, {"id": 420, "type": "preproc_ifdef", "text": "#ifdef DEBUG_SLEEP\n\tint done = 0;\n#endif", "parent": 403, "children": [421, 422, 423, 429], "start_point": {"row": 136, "column": 0}, "end_point": {"row": 138, "column": 6}}, {"id": 421, "type": "#ifdef", "text": "#ifdef", "parent": 420, "children": [], "start_point": {"row": 136, "column": 0}, "end_point": {"row": 136, "column": 6}}, {"id": 422, "type": "identifier", "text": "DEBUG_SLEEP", "parent": 420, "children": [], "start_point": {"row": 136, "column": 7}, "end_point": {"row": 136, "column": 18}}, {"id": 423, "type": "declaration", "text": "int done = 0;", "parent": 420, "children": [424, 425], "start_point": {"row": 137, "column": 1}, "end_point": {"row": 137, "column": 14}}, {"id": 424, "type": "primitive_type", "text": "int", "parent": 423, "children": [], "start_point": {"row": 137, "column": 1}, "end_point": {"row": 137, "column": 4}}, {"id": 425, "type": "init_declarator", "text": "done = 0", "parent": 423, "children": [426, 427, 428], "start_point": {"row": 137, "column": 5}, "end_point": {"row": 137, "column": 13}}, {"id": 426, "type": "identifier", "text": "done", "parent": 425, "children": [], "start_point": {"row": 137, "column": 5}, "end_point": {"row": 137, "column": 9}}, {"id": 427, "type": "=", "text": "=", "parent": 425, "children": [], "start_point": {"row": 137, "column": 10}, "end_point": {"row": 137, "column": 11}}, {"id": 428, "type": "number_literal", "text": "0", "parent": 425, "children": [], "start_point": {"row": 137, "column": 12}, "end_point": {"row": 137, "column": 13}}, {"id": 429, "type": "#endif", "text": "#endif", "parent": 420, "children": [], "start_point": {"row": 138, "column": 0}, "end_point": {"row": 138, "column": 6}}, {"id": 430, "type": "if_statement", "text": "if (!foreground)\n\t\treturn;", "parent": 403, "children": [431, 435], "start_point": {"row": 139, "column": 1}, "end_point": {"row": 140, "column": 9}}, {"id": 431, "type": "parenthesized_expression", "text": "(!foreground)", "parent": 430, "children": [432], "start_point": {"row": 139, "column": 4}, "end_point": {"row": 139, "column": 17}}, {"id": 432, "type": "unary_expression", "text": "!foreground", "parent": 431, "children": [433, 434], "start_point": {"row": 139, "column": 5}, "end_point": {"row": 139, "column": 16}}, {"id": 433, "type": "!", "text": "!", "parent": 432, "children": [], "start_point": {"row": 139, "column": 5}, "end_point": {"row": 139, "column": 6}}, {"id": 434, "type": "identifier", "text": "foreground", "parent": 432, "children": [], "start_point": {"row": 139, "column": 6}, "end_point": {"row": 139, "column": 16}}, {"id": 435, "type": "return_statement", "text": "return;", "parent": 430, "children": [], "start_point": {"row": 140, "column": 2}, "end_point": {"row": 140, "column": 9}}, {"id": 436, "type": "preproc_ifdef", "text": "#ifdef DEBUG_SLEEP\n\t/*dlog(\"wakeup(%#x)\", wchan);*/\n#endif", "parent": 403, "children": [437, 438, 439], "start_point": {"row": 142, "column": 0}, "end_point": {"row": 144, "column": 6}}, {"id": 437, "type": "#ifdef", "text": "#ifdef", "parent": 436, "children": [], "start_point": {"row": 142, "column": 0}, "end_point": {"row": 142, "column": 6}}, {"id": 438, "type": "identifier", "text": "DEBUG_SLEEP", "parent": 436, "children": [], "start_point": {"row": 142, "column": 7}, "end_point": {"row": 142, "column": 18}}, {"id": 439, "type": "#endif", "text": "#endif", "parent": 436, "children": [], "start_point": {"row": 144, "column": 0}, "end_point": {"row": 144, "column": 6}}, {"id": 440, "type": "for_statement", "text": "for (p = FIRST(pjob, &proc_wait_list);\n\t\t\tp2 = NEXT(pjob, p), p != HEAD(pjob, &proc_wait_list);\n\t\t\tp = p2) {\n\t\tif (p->wchan == wchan) {\n#ifdef DEBUG_SLEEP\n\t\t\tdone = 1;\n#endif\n\t\t\twakeupjob(p);\n\t\t}\n\t}", "parent": 403, "children": [441, 450, 468], "start_point": {"row": 149, "column": 1}, "end_point": {"row": 158, "column": 2}}, {"id": 441, "type": "assignment_expression", "text": "p = FIRST(pjob, &proc_wait_list)", "parent": 440, "children": [442, 443, 444], "start_point": {"row": 149, "column": 6}, "end_point": {"row": 149, "column": 38}}, {"id": 442, "type": "identifier", "text": "p", "parent": 441, "children": [], "start_point": {"row": 149, "column": 6}, "end_point": {"row": 149, "column": 7}}, {"id": 443, "type": "=", "text": "=", "parent": 441, "children": [], "start_point": {"row": 149, "column": 8}, "end_point": {"row": 149, "column": 9}}, {"id": 444, "type": "call_expression", "text": "FIRST(pjob, &proc_wait_list)", "parent": 441, "children": [445, 446], "start_point": {"row": 149, "column": 10}, "end_point": {"row": 149, "column": 38}}, {"id": 445, "type": "identifier", "text": "FIRST", "parent": 444, "children": [], "start_point": {"row": 149, "column": 10}, "end_point": {"row": 149, "column": 15}}, {"id": 446, "type": "argument_list", "text": "(pjob, &proc_wait_list)", "parent": 444, "children": [447, 448], "start_point": {"row": 149, "column": 15}, "end_point": {"row": 149, "column": 38}}, {"id": 447, "type": "identifier", "text": "pjob", "parent": 446, "children": [], "start_point": {"row": 149, "column": 16}, "end_point": {"row": 149, "column": 20}}, {"id": 448, "type": "pointer_expression", "text": "&proc_wait_list", "parent": 446, "children": [449], "start_point": {"row": 149, "column": 22}, "end_point": {"row": 149, "column": 37}}, {"id": 449, "type": "identifier", "text": "proc_wait_list", "parent": 448, "children": [], "start_point": {"row": 149, "column": 23}, "end_point": {"row": 149, "column": 37}}, {"id": 450, "type": "comma_expression", "text": "p2 = NEXT(pjob, p), p != HEAD(pjob, &proc_wait_list)", "parent": 440, "children": [451, 459], "start_point": {"row": 150, "column": 3}, "end_point": {"row": 150, "column": 55}}, {"id": 451, "type": "assignment_expression", "text": "p2 = NEXT(pjob, p)", "parent": 450, "children": [452, 453, 454], "start_point": {"row": 150, "column": 3}, "end_point": {"row": 150, "column": 21}}, {"id": 452, "type": "identifier", "text": "p2", "parent": 451, "children": [], "start_point": {"row": 150, "column": 3}, "end_point": {"row": 150, "column": 5}}, {"id": 453, "type": "=", "text": "=", "parent": 451, "children": [], "start_point": {"row": 150, "column": 6}, "end_point": {"row": 150, "column": 7}}, {"id": 454, "type": "call_expression", "text": "NEXT(pjob, p)", "parent": 451, "children": [455, 456], "start_point": {"row": 150, "column": 8}, "end_point": {"row": 150, "column": 21}}, {"id": 455, "type": "identifier", "text": "NEXT", "parent": 454, "children": [], "start_point": {"row": 150, "column": 8}, "end_point": {"row": 150, "column": 12}}, {"id": 456, "type": "argument_list", "text": "(pjob, p)", "parent": 454, "children": [457, 458], "start_point": {"row": 150, "column": 12}, "end_point": {"row": 150, "column": 21}}, {"id": 457, "type": "identifier", "text": "pjob", "parent": 456, "children": [], "start_point": {"row": 150, "column": 13}, "end_point": {"row": 150, "column": 17}}, {"id": 458, "type": "identifier", "text": "p", "parent": 456, "children": [], "start_point": {"row": 150, "column": 19}, "end_point": {"row": 150, "column": 20}}, {"id": 459, "type": "binary_expression", "text": "p != HEAD(pjob, &proc_wait_list)", "parent": 450, "children": [460, 461, 462], "start_point": {"row": 150, "column": 23}, "end_point": {"row": 150, "column": 55}}, {"id": 460, "type": "identifier", "text": "p", "parent": 459, "children": [], "start_point": {"row": 150, "column": 23}, "end_point": {"row": 150, "column": 24}}, {"id": 461, "type": "!=", "text": "!=", "parent": 459, "children": [], "start_point": {"row": 150, "column": 25}, "end_point": {"row": 150, "column": 27}}, {"id": 462, "type": "call_expression", "text": "HEAD(pjob, &proc_wait_list)", "parent": 459, "children": [463, 464], "start_point": {"row": 150, "column": 28}, "end_point": {"row": 150, "column": 55}}, {"id": 463, "type": "identifier", "text": "HEAD", "parent": 462, "children": [], "start_point": {"row": 150, "column": 28}, "end_point": {"row": 150, "column": 32}}, {"id": 464, "type": "argument_list", "text": "(pjob, &proc_wait_list)", "parent": 462, "children": [465, 466], "start_point": {"row": 150, "column": 32}, "end_point": {"row": 150, "column": 55}}, {"id": 465, "type": "identifier", "text": "pjob", "parent": 464, "children": [], "start_point": {"row": 150, "column": 33}, "end_point": {"row": 150, "column": 37}}, {"id": 466, "type": "pointer_expression", "text": "&proc_wait_list", "parent": 464, "children": [467], "start_point": {"row": 150, "column": 39}, "end_point": {"row": 150, "column": 54}}, {"id": 467, "type": "identifier", "text": "proc_wait_list", "parent": 466, "children": [], "start_point": {"row": 150, "column": 40}, "end_point": {"row": 150, "column": 54}}, {"id": 468, "type": "assignment_expression", "text": "p = p2", "parent": 440, "children": [469, 470, 471], "start_point": {"row": 151, "column": 3}, "end_point": {"row": 151, "column": 9}}, {"id": 469, "type": "identifier", "text": "p", "parent": 468, "children": [], "start_point": {"row": 151, "column": 3}, "end_point": {"row": 151, "column": 4}}, {"id": 470, "type": "=", "text": "=", "parent": 468, "children": [], "start_point": {"row": 151, "column": 5}, "end_point": {"row": 151, "column": 6}}, {"id": 471, "type": "identifier", "text": "p2", "parent": 468, "children": [], "start_point": {"row": 151, "column": 7}, "end_point": {"row": 151, "column": 9}}, {"id": 472, "type": "if_statement", "text": "if (p->wchan == wchan) {\n#ifdef DEBUG_SLEEP\n\t\t\tdone = 1;\n#endif\n\t\t\twakeupjob(p);\n\t\t}", "parent": 440, "children": [473], "start_point": {"row": 152, "column": 2}, "end_point": {"row": 157, "column": 3}}, {"id": 473, "type": "parenthesized_expression", "text": "(p->wchan == wchan)", "parent": 472, "children": [474], "start_point": {"row": 152, "column": 5}, "end_point": {"row": 152, "column": 24}}, {"id": 474, "type": "binary_expression", "text": "p->wchan == wchan", "parent": 473, "children": [475, 478, 479], "start_point": {"row": 152, "column": 6}, "end_point": {"row": 152, "column": 23}}, {"id": 475, "type": "field_expression", "text": "p->wchan", "parent": 474, "children": [476, 477], "start_point": {"row": 152, "column": 6}, "end_point": {"row": 152, "column": 14}}, {"id": 476, "type": "identifier", "text": "p", "parent": 475, "children": [], "start_point": {"row": 152, "column": 6}, "end_point": {"row": 152, "column": 7}}, {"id": 477, "type": "field_identifier", "text": "wchan", "parent": 475, "children": [], "start_point": {"row": 152, "column": 9}, "end_point": {"row": 152, "column": 14}}, {"id": 478, "type": "==", "text": "==", "parent": 474, "children": [], "start_point": {"row": 152, "column": 15}, "end_point": {"row": 152, "column": 17}}, {"id": 479, "type": "identifier", "text": "wchan", "parent": 474, "children": [], "start_point": {"row": 152, "column": 18}, "end_point": {"row": 152, "column": 23}}, {"id": 480, "type": "preproc_ifdef", "text": "#ifdef DEBUG_SLEEP\n\t\t\tdone = 1;\n#endif", "parent": 472, "children": [481, 482, 487], "start_point": {"row": 153, "column": 0}, "end_point": {"row": 155, "column": 6}}, {"id": 481, "type": "#ifdef", "text": "#ifdef", "parent": 480, "children": [], "start_point": {"row": 153, "column": 0}, "end_point": {"row": 153, "column": 6}}, {"id": 482, "type": "identifier", "text": "DEBUG_SLEEP", "parent": 480, "children": [], "start_point": {"row": 153, "column": 7}, "end_point": {"row": 153, "column": 18}}, {"id": 483, "type": "assignment_expression", "text": "done = 1", "parent": 480, "children": [484, 485, 486], "start_point": {"row": 154, "column": 3}, "end_point": {"row": 154, "column": 11}}, {"id": 484, "type": "identifier", "text": "done", "parent": 483, "children": [], "start_point": {"row": 154, "column": 3}, "end_point": {"row": 154, "column": 7}}, {"id": 485, "type": "=", "text": "=", "parent": 483, "children": [], "start_point": {"row": 154, "column": 8}, "end_point": {"row": 154, "column": 9}}, {"id": 486, "type": "number_literal", "text": "1", "parent": 483, "children": [], "start_point": {"row": 154, "column": 10}, "end_point": {"row": 154, "column": 11}}, {"id": 487, "type": "#endif", "text": "#endif", "parent": 480, "children": [], "start_point": {"row": 155, "column": 0}, "end_point": {"row": 155, "column": 6}}, {"id": 488, "type": "call_expression", "text": "wakeupjob(p)", "parent": 472, "children": [489, 490], "start_point": {"row": 156, "column": 3}, "end_point": {"row": 156, "column": 15}}, {"id": 489, "type": "identifier", "text": "wakeupjob", "parent": 488, "children": [], "start_point": {"row": 156, "column": 3}, "end_point": {"row": 156, "column": 12}}, {"id": 490, "type": "argument_list", "text": "(p)", "parent": 488, "children": [491], "start_point": {"row": 156, "column": 12}, "end_point": {"row": 156, "column": 15}}, {"id": 491, "type": "identifier", "text": "p", "parent": 490, "children": [], "start_point": {"row": 156, "column": 13}, "end_point": {"row": 156, "column": 14}}, {"id": 492, "type": "preproc_ifdef", "text": "#ifdef DEBUG_SLEEP\n\tif (!done)\n\t\tdlog(\"Nothing SLEEPing on %#x\", wchan);\n#endif", "parent": 403, "children": [493, 494, 495, 505], "start_point": {"row": 160, "column": 0}, "end_point": {"row": 163, "column": 6}}, {"id": 493, "type": "#ifdef", "text": "#ifdef", "parent": 492, "children": [], "start_point": {"row": 160, "column": 0}, "end_point": {"row": 160, "column": 6}}, {"id": 494, "type": "identifier", "text": "DEBUG_SLEEP", "parent": 492, "children": [], "start_point": {"row": 160, "column": 7}, "end_point": {"row": 160, "column": 18}}, {"id": 495, "type": "if_statement", "text": "if (!done)\n\t\tdlog(\"Nothing SLEEPing on %#x\", wchan);", "parent": 492, "children": [496], "start_point": {"row": 161, "column": 1}, "end_point": {"row": 162, "column": 41}}, {"id": 496, "type": "parenthesized_expression", "text": "(!done)", "parent": 495, "children": [497], "start_point": {"row": 161, "column": 4}, "end_point": {"row": 161, "column": 11}}, {"id": 497, "type": "unary_expression", "text": "!done", "parent": 496, "children": [498, 499], "start_point": {"row": 161, "column": 5}, "end_point": {"row": 161, "column": 10}}, {"id": 498, "type": "!", "text": "!", "parent": 497, "children": [], "start_point": {"row": 161, "column": 5}, "end_point": {"row": 161, "column": 6}}, {"id": 499, "type": "identifier", "text": "done", "parent": 497, "children": [], "start_point": {"row": 161, "column": 6}, "end_point": {"row": 161, "column": 10}}, {"id": 500, "type": "call_expression", "text": "dlog(\"Nothing SLEEPing on %#x\", wchan)", "parent": 495, "children": [501, 502], "start_point": {"row": 162, "column": 2}, "end_point": {"row": 162, "column": 40}}, {"id": 501, "type": "identifier", "text": "dlog", "parent": 500, "children": [], "start_point": {"row": 162, "column": 2}, "end_point": {"row": 162, "column": 6}}, {"id": 502, "type": "argument_list", "text": "(\"Nothing SLEEPing on %#x\", wchan)", "parent": 500, "children": [503, 504], "start_point": {"row": 162, "column": 6}, "end_point": {"row": 162, "column": 40}}, {"id": 503, "type": "string_literal", "text": "\"Nothing SLEEPing on %#x\"", "parent": 502, "children": [], "start_point": {"row": 162, "column": 7}, "end_point": {"row": 162, "column": 32}}, {"id": 504, "type": "identifier", "text": "wchan", "parent": 502, "children": [], "start_point": {"row": 162, "column": 34}, "end_point": {"row": 162, "column": 39}}, {"id": 505, "type": "#endif", "text": "#endif", "parent": 492, "children": [], "start_point": {"row": 163, "column": 0}, "end_point": {"row": 163, "column": 6}}, {"id": 506, "type": "function_definition", "text": "void wakeup_task(rc, term, cl)\nint rc;\nint term;\nvoidp cl;\n{\n\twakeup(cl);\n}", "parent": null, "children": [507, 508, 514, 517, 520], "start_point": {"row": 166, "column": 0}, "end_point": {"row": 172, "column": 1}}, {"id": 507, "type": "primitive_type", "text": "void", "parent": 506, "children": [], "start_point": {"row": 166, "column": 0}, "end_point": {"row": 166, "column": 4}}, {"id": 508, "type": "function_declarator", "text": "wakeup_task(rc, term, cl)", "parent": 506, "children": [509, 510], "start_point": {"row": 166, "column": 5}, "end_point": {"row": 166, "column": 30}}, {"id": 509, "type": "identifier", "text": "wakeup_task", "parent": 508, "children": [], "start_point": {"row": 166, "column": 5}, "end_point": {"row": 166, "column": 16}}, {"id": 510, "type": "parameter_list", "text": "(rc, term, cl)", "parent": 508, "children": [511, 512, 513], "start_point": {"row": 166, "column": 16}, "end_point": {"row": 166, "column": 30}}, {"id": 511, "type": "identifier", "text": "rc", "parent": 510, "children": [], "start_point": {"row": 166, "column": 17}, "end_point": {"row": 166, "column": 19}}, {"id": 512, "type": "identifier", "text": "term", "parent": 510, "children": [], "start_point": {"row": 166, "column": 21}, "end_point": {"row": 166, "column": 25}}, {"id": 513, "type": "identifier", "text": "cl", "parent": 510, "children": [], "start_point": {"row": 166, "column": 27}, "end_point": {"row": 166, "column": 29}}, {"id": 514, "type": "declaration", "text": "int rc;", "parent": 506, "children": [515, 516], "start_point": {"row": 167, "column": 0}, "end_point": {"row": 167, "column": 7}}, {"id": 515, "type": "primitive_type", "text": "int", "parent": 514, "children": [], "start_point": {"row": 167, "column": 0}, "end_point": {"row": 167, "column": 3}}, {"id": 516, "type": "identifier", "text": "rc", "parent": 514, "children": [], "start_point": {"row": 167, "column": 4}, "end_point": {"row": 167, "column": 6}}, {"id": 517, "type": "declaration", "text": "int term;", "parent": 506, "children": [518, 519], "start_point": {"row": 168, "column": 0}, "end_point": {"row": 168, "column": 9}}, {"id": 518, "type": "primitive_type", "text": "int", "parent": 517, "children": [], "start_point": {"row": 168, "column": 0}, "end_point": {"row": 168, "column": 3}}, {"id": 519, "type": "identifier", "text": "term", "parent": 517, "children": [], "start_point": {"row": 168, "column": 4}, "end_point": {"row": 168, "column": 8}}, {"id": 520, "type": "declaration", "text": "voidp cl;", "parent": 506, "children": [521, 522], "start_point": {"row": 169, "column": 0}, "end_point": {"row": 169, "column": 9}}, {"id": 521, "type": "type_identifier", "text": "voidp", "parent": 520, "children": [], "start_point": {"row": 169, "column": 0}, "end_point": {"row": 169, "column": 5}}, {"id": 522, "type": "identifier", "text": "cl", "parent": 520, "children": [], "start_point": {"row": 169, "column": 6}, "end_point": {"row": 169, "column": 8}}, {"id": 523, "type": "call_expression", "text": "wakeup(cl)", "parent": 506, "children": [524, 525], "start_point": {"row": 171, "column": 1}, "end_point": {"row": 171, "column": 11}}, {"id": 524, "type": "identifier", "text": "wakeup", "parent": 523, "children": [], "start_point": {"row": 171, "column": 1}, "end_point": {"row": 171, "column": 7}}, {"id": 525, "type": "argument_list", "text": "(cl)", "parent": 523, "children": [526], "start_point": {"row": 171, "column": 7}, "end_point": {"row": 171, "column": 11}}, {"id": 526, "type": "identifier", "text": "cl", "parent": 525, "children": [], "start_point": {"row": 171, "column": 8}, "end_point": {"row": 171, "column": 10}}, {"id": 527, "type": "ERROR", "text": "void sigchld(sig)\nint sig;\n{\n\tunion wait w;\n\tint pid;\n\n#ifdef SYS5_SIGNALS\n\tif ((pid = wait(&w)) > 0) {\n#else\n\twhile ((pid = wait3((int *) &w, WNOHANG, (struct rusage *) 0)) > 0) {\n#endif /* SYS5_SIGNALS */\n\t\tpjob *p, *p2;\n\n\t\tif (WIFSIGNALED(w))\n\t\t\tplog(XLOG_ERROR, \"Process %d exited with signal %d\",\n\t\t\t\tpid, w.w_termsig);\n#ifdef DEBUG\n\t\telse\n\t\t\tdlog(\"Process %d exited with status %d\",\n\t\t\t\tpid, w.w_retcode);\n#endif /* DEBUG */\n\n\t\tfor (p = FIRST(pjob, &proc_wait_list);\n\t\t\t\tp2 = NEXT(pjob, p), p != HEAD(pjob, &proc_wait_list);\n\t\t\t\tp = p2) {\n\t\t\tif (p->pid == pid) {\n\t\t\t\tp->w = w;\n\t\t\t\twakeupjob(p);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n#ifdef DEBUG\n\t\tif (p) ; else dlog(\"can't locate task block for pid %d\", pid);\n#endif /* DEBUG */\n\t}\n\n#ifdef SYS5_SIGNALS\n\tsignal(sig, sigchld);\n#endif /* SYS5_SIGNALS */\n\tif (select_intr_valid)\n\t\tlongjmp(select_intr, sig);\n}\n\n/*\n * Run any pending tasks.\n * This must be called with SIGCHLD disabled\n */\nvoid do_task_notify(P_void)\n{\n\t/*\n\t * Keep taking the first item off the list and processing it.\n\t *\n\t * Done this way because the the callback can, quite reasonably,\n\t * queue a new task, so no local reference into the list can be\n\t * held here.\n\t */\n\twhile (FIRST(pjob, &proc_list_head) != HEAD(pjob, &proc_list_head)) {\n\t\tpjob *p = FIRST(pjob, &proc_list_head);\n\t\trem_que(&p->hdr);\n\t\t/*\n\t\t * This job has completed\n\t\t */\n\t\t--task_notify_todo;\n\n\t\t/*\n\t\t * Do callback if it exists\n\t\t */\n\t\tif (p->cb_fun)\n\t\t\t(*p->cb_fun)(p->w.w_retcode,\n\t\t\t\tp->w.w_termsig, p->cb_closure);\n\n\t\tfree((voidp) p);\n\t}\n}\n\n#ifdef HAS_SVR3_SIGNALS\n/*\n * 4.2 signal library based on svr3 (4.1+ bsd) interface\n * From <NAME> <<EMAIL>).\n */\n\nstatic int current_mask = 0;\n\nint sigblock(mask)\nint mask;\n{\n int sig;\n int m;\n int oldmask;\n\n oldmask = current_mask;\n for ( sig = 1, m = 1; sig <= MAXSIG; sig++, m <<= 1 ) {\n if (mask & m) {\n\t sighold(sig);\n current_mask |= m;\n }\n }\n return oldmask;\n}\n\nint sigsetmask(mask)\nint mask;\n{\n int sig;\n int m;\n int oldmask;\n\n oldmask = current_mask;\n for ( sig = 1, m = 1; sig <= MAXSIG; sig++, m <<= 1 ) {\n if (mask & m) {\n sighold(sig);\n current_mask |= m;\n }\n else {\n sigrelse(sig);\n current_mask &= ~m;\n }\n }\n return oldmask;\n}\n\n#endif", "parent": null, "children": [528, 529, 533, 536, 541, 544, 545, 546, 710, 789], "start_point": {"row": 176, "column": 0}, "end_point": {"row": 298, "column": 6}}, {"id": 528, "type": "primitive_type", "text": "void", "parent": 527, "children": [], "start_point": {"row": 176, "column": 0}, "end_point": {"row": 176, "column": 4}}, {"id": 529, "type": "function_declarator", "text": "sigchld(sig)", "parent": 527, "children": [530, 531], "start_point": {"row": 176, "column": 5}, "end_point": {"row": 176, "column": 17}}, {"id": 530, "type": "identifier", "text": "sigchld", "parent": 529, "children": [], "start_point": {"row": 176, "column": 5}, "end_point": {"row": 176, "column": 12}}, {"id": 531, "type": "parameter_list", "text": "(sig)", "parent": 529, "children": [532], "start_point": {"row": 176, "column": 12}, "end_point": {"row": 176, "column": 17}}, {"id": 532, "type": "identifier", "text": "sig", "parent": 531, "children": [], "start_point": {"row": 176, "column": 13}, "end_point": {"row": 176, "column": 16}}, {"id": 533, "type": "declaration", "text": "int sig;", "parent": 527, "children": [534, 535], "start_point": {"row": 177, "column": 0}, "end_point": {"row": 177, "column": 8}}, {"id": 534, "type": "primitive_type", "text": "int", "parent": 533, "children": [], "start_point": {"row": 177, "column": 0}, "end_point": {"row": 177, "column": 3}}, {"id": 535, "type": "identifier", "text": "sig", "parent": 533, "children": [], "start_point": {"row": 177, "column": 4}, "end_point": {"row": 177, "column": 7}}, {"id": 536, "type": "declaration", "text": "union wait w;", "parent": 527, "children": [537, 540], "start_point": {"row": 179, "column": 1}, "end_point": {"row": 179, "column": 14}}, {"id": 537, "type": "union_specifier", "text": "union wait", "parent": 536, "children": [538, 539], "start_point": {"row": 179, "column": 1}, "end_point": {"row": 179, "column": 11}}, {"id": 538, "type": "union", "text": "union", "parent": 537, "children": [], "start_point": {"row": 179, "column": 1}, "end_point": {"row": 179, "column": 6}}, {"id": 539, "type": "type_identifier", "text": "wait", "parent": 537, "children": [], "start_point": {"row": 179, "column": 7}, "end_point": {"row": 179, "column": 11}}, {"id": 540, "type": "identifier", "text": "w", "parent": 536, "children": [], "start_point": {"row": 179, "column": 12}, "end_point": {"row": 179, "column": 13}}, {"id": 541, "type": "declaration", "text": "int pid;", "parent": 527, "children": [542, 543], "start_point": {"row": 180, "column": 1}, "end_point": {"row": 180, "column": 9}}, {"id": 542, "type": "primitive_type", "text": "int", "parent": 541, "children": [], "start_point": {"row": 180, "column": 1}, "end_point": {"row": 180, "column": 4}}, {"id": 543, "type": "identifier", "text": "pid", "parent": 541, "children": [], "start_point": {"row": 180, "column": 5}, "end_point": {"row": 180, "column": 8}}, {"id": 544, "type": "#ifdef", "text": "#ifdef", "parent": 527, "children": [], "start_point": {"row": 182, "column": 0}, "end_point": {"row": 182, "column": 6}}, {"id": 545, "type": "identifier", "text": "SYS5_SIGNALS", "parent": 527, "children": [], "start_point": {"row": 182, "column": 7}, "end_point": {"row": 182, "column": 19}}, {"id": 546, "type": "if_statement", "text": "if ((pid = wait(&w)) > 0) {\n#else\n\twhile ((pid = wait3((int *) &w, WNOHANG, (struct rusage *) 0)) > 0) {\n#endif /* SYS5_SIGNALS */\n\t\tpjob *p, *p2;\n\n\t\tif (WIFSIGNALED(w))\n\t\t\tplog(XLOG_ERROR, \"Process %d exited with signal %d\",\n\t\t\t\tpid, w.w_termsig);\n#ifdef DEBUG\n\t\telse\n\t\t\tdlog(\"Process %d exited with status %d\",\n\t\t\t\tpid, w.w_retcode);\n#endif /* DEBUG */\n\n\t\tfor (p = FIRST(pjob, &proc_wait_list);\n\t\t\t\tp2 = NEXT(pjob, p), p != HEAD(pjob, &proc_wait_list);\n\t\t\t\tp = p2) {\n\t\t\tif (p->pid == pid) {\n\t\t\t\tp->w = w;\n\t\t\t\twakeupjob(p);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n#ifdef DEBUG\n\t\tif (p) ; else dlog(\"can't locate task block for pid %d\", pid);\n#endif /* DEBUG */\n\t}\n\n#ifdef SYS5_SIGNALS\n\tsignal(sig, sigchld);\n#endif /* SYS5_SIGNALS */\n\tif (select_intr_valid)\n\t\tlongjmp(select_intr, sig);\n}", "parent": 527, "children": [547], "start_point": {"row": 183, "column": 1}, "end_point": {"row": 218, "column": 1}}, {"id": 547, "type": "parenthesized_expression", "text": "((pid = wait(&w)) > 0)", "parent": 546, "children": [548], "start_point": {"row": 183, "column": 4}, "end_point": {"row": 183, "column": 26}}, {"id": 548, "type": "binary_expression", "text": "(pid = wait(&w)) > 0", "parent": 547, "children": [549, 558, 559], "start_point": {"row": 183, "column": 5}, "end_point": {"row": 183, "column": 25}}, {"id": 549, "type": "parenthesized_expression", "text": "(pid = wait(&w))", "parent": 548, "children": [550], "start_point": {"row": 183, "column": 5}, "end_point": {"row": 183, "column": 21}}, {"id": 550, "type": "assignment_expression", "text": "pid = wait(&w)", "parent": 549, "children": [551, 552, 553], "start_point": {"row": 183, "column": 6}, "end_point": {"row": 183, "column": 20}}, {"id": 551, "type": "identifier", "text": "pid", "parent": 550, "children": [], "start_point": {"row": 183, "column": 6}, "end_point": {"row": 183, "column": 9}}, {"id": 552, "type": "=", "text": "=", "parent": 550, "children": [], "start_point": {"row": 183, "column": 10}, "end_point": {"row": 183, "column": 11}}, {"id": 553, "type": "call_expression", "text": "wait(&w)", "parent": 550, "children": [554, 555], "start_point": {"row": 183, "column": 12}, "end_point": {"row": 183, "column": 20}}, {"id": 554, "type": "identifier", "text": "wait", "parent": 553, "children": [], "start_point": {"row": 183, "column": 12}, "end_point": {"row": 183, "column": 16}}, {"id": 555, "type": "argument_list", "text": "(&w)", "parent": 553, "children": [556], "start_point": {"row": 183, "column": 16}, "end_point": {"row": 183, "column": 20}}, {"id": 556, "type": "pointer_expression", "text": "&w", "parent": 555, "children": [557], "start_point": {"row": 183, "column": 17}, "end_point": {"row": 183, "column": 19}}, {"id": 557, "type": "identifier", "text": "w", "parent": 556, "children": [], "start_point": {"row": 183, "column": 18}, "end_point": {"row": 183, "column": 19}}, {"id": 558, "type": ">", "text": ">", "parent": 548, "children": [], "start_point": {"row": 183, "column": 22}, "end_point": {"row": 183, "column": 23}}, {"id": 559, "type": "number_literal", "text": "0", "parent": 548, "children": [], "start_point": {"row": 183, "column": 24}, "end_point": {"row": 183, "column": 25}}, {"id": 560, "type": "preproc_call", "text": "#else\n", "parent": 546, "children": [561], "start_point": {"row": 184, "column": 0}, "end_point": {"row": 185, "column": 0}}, {"id": 561, "type": "preproc_directive", "text": "#else", "parent": 560, "children": [], "start_point": {"row": 184, "column": 0}, "end_point": {"row": 184, "column": 5}}, {"id": 562, "type": "while_statement", "text": "while ((pid = wait3((int *) &w, WNOHANG, (struct rusage *) 0)) > 0) {\n#endif /* SYS5_SIGNALS */\n\t\tpjob *p, *p2;\n\n\t\tif (WIFSIGNALED(w))\n\t\t\tplog(XLOG_ERROR, \"Process %d exited with signal %d\",\n\t\t\t\tpid, w.w_termsig);\n#ifdef DEBUG\n\t\telse\n\t\t\tdlog(\"Process %d exited with status %d\",\n\t\t\t\tpid, w.w_retcode);\n#endif /* DEBUG */\n\n\t\tfor (p = FIRST(pjob, &proc_wait_list);\n\t\t\t\tp2 = NEXT(pjob, p), p != HEAD(pjob, &proc_wait_list);\n\t\t\t\tp = p2) {\n\t\t\tif (p->pid == pid) {\n\t\t\t\tp->w = w;\n\t\t\t\twakeupjob(p);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n#ifdef DEBUG\n\t\tif (p) ; else dlog(\"can't locate task block for pid %d\", pid);\n#endif /* DEBUG */\n\t}", "parent": 546, "children": [563], "start_point": {"row": 185, "column": 1}, "end_point": {"row": 211, "column": 2}}, {"id": 563, "type": "parenthesized_expression", "text": "((pid = wait3((int *) &w, WNOHANG, (struct rusage *) 0)) > 0)", "parent": 562, "children": [564], "start_point": {"row": 185, "column": 7}, "end_point": {"row": 185, "column": 68}}, {"id": 564, "type": "binary_expression", "text": "(pid = wait3((int *) &w, WNOHANG, (struct rusage *) 0)) > 0", "parent": 563, "children": [565, 588, 589], "start_point": {"row": 185, "column": 8}, "end_point": {"row": 185, "column": 67}}, {"id": 565, "type": "parenthesized_expression", "text": "(pid = wait3((int *) &w, WNOHANG, (struct rusage *) 0))", "parent": 564, "children": [566], "start_point": {"row": 185, "column": 8}, "end_point": {"row": 185, "column": 63}}, {"id": 566, "type": "assignment_expression", "text": "pid = wait3((int *) &w, WNOHANG, (struct rusage *) 0)", "parent": 565, "children": [567, 568, 569], "start_point": {"row": 185, "column": 9}, "end_point": {"row": 185, "column": 62}}, {"id": 567, "type": "identifier", "text": "pid", "parent": 566, "children": [], "start_point": {"row": 185, "column": 9}, "end_point": {"row": 185, "column": 12}}, {"id": 568, "type": "=", "text": "=", "parent": 566, "children": [], "start_point": {"row": 185, "column": 13}, "end_point": {"row": 185, "column": 14}}, {"id": 569, "type": "call_expression", "text": "wait3((int *) &w, WNOHANG, (struct rusage *) 0)", "parent": 566, "children": [570, 571], "start_point": {"row": 185, "column": 15}, "end_point": {"row": 185, "column": 62}}, {"id": 570, "type": "identifier", "text": "wait3", "parent": 569, "children": [], "start_point": {"row": 185, "column": 15}, "end_point": {"row": 185, "column": 20}}, {"id": 571, "type": "argument_list", "text": "((int *) &w, WNOHANG, (struct rusage *) 0)", "parent": 569, "children": [572, 579, 580], "start_point": {"row": 185, "column": 20}, "end_point": {"row": 185, "column": 62}}, {"id": 572, "type": "cast_expression", "text": "(int *) &w", "parent": 571, "children": [573, 577], "start_point": {"row": 185, "column": 21}, "end_point": {"row": 185, "column": 31}}, {"id": 573, "type": "type_descriptor", "text": "int *", "parent": 572, "children": [574, 575], "start_point": {"row": 185, "column": 22}, "end_point": {"row": 185, "column": 27}}, {"id": 574, "type": "primitive_type", "text": "int", "parent": 573, "children": [], "start_point": {"row": 185, "column": 22}, "end_point": {"row": 185, "column": 25}}, {"id": 575, "type": "abstract_pointer_declarator", "text": "*", "parent": 573, "children": [576], "start_point": {"row": 185, "column": 26}, "end_point": {"row": 185, "column": 27}}, {"id": 576, "type": "*", "text": "*", "parent": 575, "children": [], "start_point": {"row": 185, "column": 26}, "end_point": {"row": 185, "column": 27}}, {"id": 577, "type": "pointer_expression", "text": "&w", "parent": 572, "children": [578], "start_point": {"row": 185, "column": 29}, "end_point": {"row": 185, "column": 31}}, {"id": 578, "type": "identifier", "text": "w", "parent": 577, "children": [], "start_point": {"row": 185, "column": 30}, "end_point": {"row": 185, "column": 31}}, {"id": 579, "type": "identifier", "text": "WNOHANG", "parent": 571, "children": [], "start_point": {"row": 185, "column": 33}, "end_point": {"row": 185, "column": 40}}, {"id": 580, "type": "cast_expression", "text": "(struct rusage *) 0", "parent": 571, "children": [581, 587], "start_point": {"row": 185, "column": 42}, "end_point": {"row": 185, "column": 61}}, {"id": 581, "type": "type_descriptor", "text": "struct rusage *", "parent": 580, "children": [582, 585], "start_point": {"row": 185, "column": 43}, "end_point": {"row": 185, "column": 58}}, {"id": 582, "type": "struct_specifier", "text": "struct rusage", "parent": 581, "children": [583, 584], "start_point": {"row": 185, "column": 43}, "end_point": {"row": 185, "column": 56}}, {"id": 583, "type": "struct", "text": "struct", "parent": 582, "children": [], "start_point": {"row": 185, "column": 43}, "end_point": {"row": 185, "column": 49}}, {"id": 584, "type": "type_identifier", "text": "rusage", "parent": 582, "children": [], "start_point": {"row": 185, "column": 50}, "end_point": {"row": 185, "column": 56}}, {"id": 585, "type": "abstract_pointer_declarator", "text": "*", "parent": 581, "children": [586], "start_point": {"row": 185, "column": 57}, "end_point": {"row": 185, "column": 58}}, {"id": 586, "type": "*", "text": "*", "parent": 585, "children": [], "start_point": {"row": 185, "column": 57}, "end_point": {"row": 185, "column": 58}}, {"id": 587, "type": "number_literal", "text": "0", "parent": 580, "children": [], "start_point": {"row": 185, "column": 60}, "end_point": {"row": 185, "column": 61}}, {"id": 588, "type": ">", "text": ">", "parent": 564, "children": [], "start_point": {"row": 185, "column": 64}, "end_point": {"row": 185, "column": 65}}, {"id": 589, "type": "number_literal", "text": "0", "parent": 564, "children": [], "start_point": {"row": 185, "column": 66}, "end_point": {"row": 185, "column": 67}}, {"id": 590, "type": "preproc_call", "text": "#endif /* SYS5_SIGNALS */\n", "parent": 562, "children": [591], "start_point": {"row": 186, "column": 0}, "end_point": {"row": 187, "column": 0}}, {"id": 591, "type": "preproc_directive", "text": "#endif", "parent": 590, "children": [], "start_point": {"row": 186, "column": 0}, "end_point": {"row": 186, "column": 6}}, {"id": 592, "type": "declaration", "text": "pjob *p, *p2;", "parent": 562, "children": [593, 594, 597], "start_point": {"row": 187, "column": 2}, "end_point": {"row": 187, "column": 15}}, {"id": 593, "type": "type_identifier", "text": "pjob", "parent": 592, "children": [], "start_point": {"row": 187, "column": 2}, "end_point": {"row": 187, "column": 6}}, {"id": 594, "type": "pointer_declarator", "text": "*p", "parent": 592, "children": [595, 596], "start_point": {"row": 187, "column": 7}, "end_point": {"row": 187, "column": 9}}, {"id": 595, "type": "*", "text": "*", "parent": 594, "children": [], "start_point": {"row": 187, "column": 7}, "end_point": {"row": 187, "column": 8}}, {"id": 596, "type": "identifier", "text": "p", "parent": 594, "children": [], "start_point": {"row": 187, "column": 8}, "end_point": {"row": 187, "column": 9}}, {"id": 597, "type": "pointer_declarator", "text": "*p2", "parent": 592, "children": [598, 599], "start_point": {"row": 187, "column": 11}, "end_point": {"row": 187, "column": 14}}, {"id": 598, "type": "*", "text": "*", "parent": 597, "children": [], "start_point": {"row": 187, "column": 11}, "end_point": {"row": 187, "column": 12}}, {"id": 599, "type": "identifier", "text": "p2", "parent": 597, "children": [], "start_point": {"row": 187, "column": 12}, "end_point": {"row": 187, "column": 14}}, {"id": 600, "type": "if_statement", "text": "if (WIFSIGNALED(w))\n\t\t\tplog(XLOG_ERROR, \"Process %d exited with signal %d\",\n\t\t\t\tpid, w.w_termsig);", "parent": 562, "children": [601], "start_point": {"row": 189, "column": 2}, "end_point": {"row": 191, "column": 22}}, {"id": 601, "type": "parenthesized_expression", "text": "(WIFSIGNALED(w))", "parent": 600, "children": [602], "start_point": {"row": 189, "column": 5}, "end_point": {"row": 189, "column": 21}}, {"id": 602, "type": "call_expression", "text": "WIFSIGNALED(w)", "parent": 601, "children": [603, 604], "start_point": {"row": 189, "column": 6}, "end_point": {"row": 189, "column": 20}}, {"id": 603, "type": "identifier", "text": "WIFSIGNALED", "parent": 602, "children": [], "start_point": {"row": 189, "column": 6}, "end_point": {"row": 189, "column": 17}}, {"id": 604, "type": "argument_list", "text": "(w)", "parent": 602, "children": [605], "start_point": {"row": 189, "column": 17}, "end_point": {"row": 189, "column": 20}}, {"id": 605, "type": "identifier", "text": "w", "parent": 604, "children": [], "start_point": {"row": 189, "column": 18}, "end_point": {"row": 189, "column": 19}}, {"id": 606, "type": "call_expression", "text": "plog(XLOG_ERROR, \"Process %d exited with signal %d\",\n\t\t\t\tpid, w.w_termsig)", "parent": 600, "children": [607, 608], "start_point": {"row": 190, "column": 3}, "end_point": {"row": 191, "column": 21}}, {"id": 607, "type": "identifier", "text": "plog", "parent": 606, "children": [], "start_point": {"row": 190, "column": 3}, "end_point": {"row": 190, "column": 7}}, {"id": 608, "type": "argument_list", "text": "(XLOG_ERROR, \"Process %d exited with signal %d\",\n\t\t\t\tpid, w.w_termsig)", "parent": 606, "children": [609, 610, 611, 612], "start_point": {"row": 190, "column": 7}, "end_point": {"row": 191, "column": 21}}, {"id": 609, "type": "identifier", "text": "XLOG_ERROR", "parent": 608, "children": [], "start_point": {"row": 190, "column": 8}, "end_point": {"row": 190, "column": 18}}, {"id": 610, "type": "string_literal", "text": "\"Process %d exited with signal %d\"", "parent": 608, "children": [], "start_point": {"row": 190, "column": 20}, "end_point": {"row": 190, "column": 54}}, {"id": 611, "type": "identifier", "text": "pid", "parent": 608, "children": [], "start_point": {"row": 191, "column": 4}, "end_point": {"row": 191, "column": 7}}, {"id": 612, "type": "field_expression", "text": "w.w_termsig", "parent": 608, "children": [613, 614], "start_point": {"row": 191, "column": 9}, "end_point": {"row": 191, "column": 20}}, {"id": 613, "type": "identifier", "text": "w", "parent": 612, "children": [], "start_point": {"row": 191, "column": 9}, "end_point": {"row": 191, "column": 10}}, {"id": 614, "type": "field_identifier", "text": "w_termsig", "parent": 612, "children": [], "start_point": {"row": 191, "column": 11}, "end_point": {"row": 191, "column": 20}}, {"id": 615, "type": "preproc_ifdef", "text": "#ifdef DEBUG\n\t\telse\n\t\t\tdlog(\"Process %d exited with status %d\",\n\t\t\t\tpid, w.w_retcode);\n#endif", "parent": 562, "children": [616, 617, 618, 627], "start_point": {"row": 192, "column": 0}, "end_point": {"row": 196, "column": 6}}, {"id": 616, "type": "#ifdef", "text": "#ifdef", "parent": 615, "children": [], "start_point": {"row": 192, "column": 0}, "end_point": {"row": 192, "column": 6}}, {"id": 617, "type": "identifier", "text": "DEBUG", "parent": 615, "children": [], "start_point": {"row": 192, "column": 7}, "end_point": {"row": 192, "column": 12}}, {"id": 618, "type": "ERROR", "text": "else\n\t\t\tdlog(", "parent": 615, "children": [619], "start_point": {"row": 193, "column": 2}, "end_point": {"row": 194, "column": 8}}, {"id": 619, "type": "identifier", "text": "dlog", "parent": 618, "children": [], "start_point": {"row": 194, "column": 3}, "end_point": {"row": 194, "column": 7}}, {"id": 620, "type": "comma_expression", "text": "\"Process %d exited with status %d\",\n\t\t\t\tpid, w.w_retcode", "parent": 615, "children": [621, 622], "start_point": {"row": 194, "column": 8}, "end_point": {"row": 195, "column": 20}}, {"id": 621, "type": "string_literal", "text": "\"Process %d exited with status %d\"", "parent": 620, "children": [], "start_point": {"row": 194, "column": 8}, "end_point": {"row": 194, "column": 42}}, {"id": 622, "type": "comma_expression", "text": "pid, w.w_retcode", "parent": 620, "children": [623, 624], "start_point": {"row": 195, "column": 4}, "end_point": {"row": 195, "column": 20}}, {"id": 623, "type": "identifier", "text": "pid", "parent": 622, "children": [], "start_point": {"row": 195, "column": 4}, "end_point": {"row": 195, "column": 7}}, {"id": 624, "type": "field_expression", "text": "w.w_retcode", "parent": 622, "children": [625, 626], "start_point": {"row": 195, "column": 9}, "end_point": {"row": 195, "column": 20}}, {"id": 625, "type": "identifier", "text": "w", "parent": 624, "children": [], "start_point": {"row": 195, "column": 9}, "end_point": {"row": 195, "column": 10}}, {"id": 626, "type": "field_identifier", "text": "w_retcode", "parent": 624, "children": [], "start_point": {"row": 195, "column": 11}, "end_point": {"row": 195, "column": 20}}, {"id": 627, "type": "#endif", "text": "#endif", "parent": 615, "children": [], "start_point": {"row": 196, "column": 0}, "end_point": {"row": 196, "column": 6}}, {"id": 628, "type": "for_statement", "text": "for (p = FIRST(pjob, &proc_wait_list);\n\t\t\t\tp2 = NEXT(pjob, p), p != HEAD(pjob, &proc_wait_list);\n\t\t\t\tp = p2) {\n\t\t\tif (p->pid == pid) {\n\t\t\t\tp->w = w;\n\t\t\t\twakeupjob(p);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "parent": 562, "children": [629, 638, 656], "start_point": {"row": 198, "column": 2}, "end_point": {"row": 206, "column": 3}}, {"id": 629, "type": "assignment_expression", "text": "p = FIRST(pjob, &proc_wait_list)", "parent": 628, "children": [630, 631, 632], "start_point": {"row": 198, "column": 7}, "end_point": {"row": 198, "column": 39}}, {"id": 630, "type": "identifier", "text": "p", "parent": 629, "children": [], "start_point": {"row": 198, "column": 7}, "end_point": {"row": 198, "column": 8}}, {"id": 631, "type": "=", "text": "=", "parent": 629, "children": [], "start_point": {"row": 198, "column": 9}, "end_point": {"row": 198, "column": 10}}, {"id": 632, "type": "call_expression", "text": "FIRST(pjob, &proc_wait_list)", "parent": 629, "children": [633, 634], "start_point": {"row": 198, "column": 11}, "end_point": {"row": 198, "column": 39}}, {"id": 633, "type": "identifier", "text": "FIRST", "parent": 632, "children": [], "start_point": {"row": 198, "column": 11}, "end_point": {"row": 198, "column": 16}}, {"id": 634, "type": "argument_list", "text": "(pjob, &proc_wait_list)", "parent": 632, "children": [635, 636], "start_point": {"row": 198, "column": 16}, "end_point": {"row": 198, "column": 39}}, {"id": 635, "type": "identifier", "text": "pjob", "parent": 634, "children": [], "start_point": {"row": 198, "column": 17}, "end_point": {"row": 198, "column": 21}}, {"id": 636, "type": "pointer_expression", "text": "&proc_wait_list", "parent": 634, "children": [637], "start_point": {"row": 198, "column": 23}, "end_point": {"row": 198, "column": 38}}, {"id": 637, "type": "identifier", "text": "proc_wait_list", "parent": 636, "children": [], "start_point": {"row": 198, "column": 24}, "end_point": {"row": 198, "column": 38}}, {"id": 638, "type": "comma_expression", "text": "p2 = NEXT(pjob, p), p != HEAD(pjob, &proc_wait_list)", "parent": 628, "children": [639, 647], "start_point": {"row": 199, "column": 4}, "end_point": {"row": 199, "column": 56}}, {"id": 639, "type": "assignment_expression", "text": "p2 = NEXT(pjob, p)", "parent": 638, "children": [640, 641, 642], "start_point": {"row": 199, "column": 4}, "end_point": {"row": 199, "column": 22}}, {"id": 640, "type": "identifier", "text": "p2", "parent": 639, "children": [], "start_point": {"row": 199, "column": 4}, "end_point": {"row": 199, "column": 6}}, {"id": 641, "type": "=", "text": "=", "parent": 639, "children": [], "start_point": {"row": 199, "column": 7}, "end_point": {"row": 199, "column": 8}}, {"id": 642, "type": "call_expression", "text": "NEXT(pjob, p)", "parent": 639, "children": [643, 644], "start_point": {"row": 199, "column": 9}, "end_point": {"row": 199, "column": 22}}, {"id": 643, "type": "identifier", "text": "NEXT", "parent": 642, "children": [], "start_point": {"row": 199, "column": 9}, "end_point": {"row": 199, "column": 13}}, {"id": 644, "type": "argument_list", "text": "(pjob, p)", "parent": 642, "children": [645, 646], "start_point": {"row": 199, "column": 13}, "end_point": {"row": 199, "column": 22}}, {"id": 645, "type": "identifier", "text": "pjob", "parent": 644, "children": [], "start_point": {"row": 199, "column": 14}, "end_point": {"row": 199, "column": 18}}, {"id": 646, "type": "identifier", "text": "p", "parent": 644, "children": [], "start_point": {"row": 199, "column": 20}, "end_point": {"row": 199, "column": 21}}, {"id": 647, "type": "binary_expression", "text": "p != HEAD(pjob, &proc_wait_list)", "parent": 638, "children": [648, 649, 650], "start_point": {"row": 199, "column": 24}, "end_point": {"row": 199, "column": 56}}, {"id": 648, "type": "identifier", "text": "p", "parent": 647, "children": [], "start_point": {"row": 199, "column": 24}, "end_point": {"row": 199, "column": 25}}, {"id": 649, "type": "!=", "text": "!=", "parent": 647, "children": [], "start_point": {"row": 199, "column": 26}, "end_point": {"row": 199, "column": 28}}, {"id": 650, "type": "call_expression", "text": "HEAD(pjob, &proc_wait_list)", "parent": 647, "children": [651, 652], "start_point": {"row": 199, "column": 29}, "end_point": {"row": 199, "column": 56}}, {"id": 651, "type": "identifier", "text": "HEAD", "parent": 650, "children": [], "start_point": {"row": 199, "column": 29}, "end_point": {"row": 199, "column": 33}}, {"id": 652, "type": "argument_list", "text": "(pjob, &proc_wait_list)", "parent": 650, "children": [653, 654], "start_point": {"row": 199, "column": 33}, "end_point": {"row": 199, "column": 56}}, {"id": 653, "type": "identifier", "text": "pjob", "parent": 652, "children": [], "start_point": {"row": 199, "column": 34}, "end_point": {"row": 199, "column": 38}}, {"id": 654, "type": "pointer_expression", "text": "&proc_wait_list", "parent": 652, "children": [655], "start_point": {"row": 199, "column": 40}, "end_point": {"row": 199, "column": 55}}, {"id": 655, "type": "identifier", "text": "proc_wait_list", "parent": 654, "children": [], "start_point": {"row": 199, "column": 41}, "end_point": {"row": 199, "column": 55}}, {"id": 656, "type": "assignment_expression", "text": "p = p2", "parent": 628, "children": [657, 658, 659], "start_point": {"row": 200, "column": 4}, "end_point": {"row": 200, "column": 10}}, {"id": 657, "type": "identifier", "text": "p", "parent": 656, "children": [], "start_point": {"row": 200, "column": 4}, "end_point": {"row": 200, "column": 5}}, {"id": 658, "type": "=", "text": "=", "parent": 656, "children": [], "start_point": {"row": 200, "column": 6}, "end_point": {"row": 200, "column": 7}}, {"id": 659, "type": "identifier", "text": "p2", "parent": 656, "children": [], "start_point": {"row": 200, "column": 8}, "end_point": {"row": 200, "column": 10}}, {"id": 660, "type": "if_statement", "text": "if (p->pid == pid) {\n\t\t\t\tp->w = w;\n\t\t\t\twakeupjob(p);\n\t\t\t\tbreak;\n\t\t\t}", "parent": 628, "children": [661], "start_point": {"row": 201, "column": 3}, "end_point": {"row": 205, "column": 4}}, {"id": 661, "type": "parenthesized_expression", "text": "(p->pid == pid)", "parent": 660, "children": [662], "start_point": {"row": 201, "column": 6}, "end_point": {"row": 201, "column": 21}}, {"id": 662, "type": "binary_expression", "text": "p->pid == pid", "parent": 661, "children": [663, 666, 667], "start_point": {"row": 201, "column": 7}, "end_point": {"row": 201, "column": 20}}, {"id": 663, "type": "field_expression", "text": "p->pid", "parent": 662, "children": [664, 665], "start_point": {"row": 201, "column": 7}, "end_point": {"row": 201, "column": 13}}, {"id": 664, "type": "identifier", "text": "p", "parent": 663, "children": [], "start_point": {"row": 201, "column": 7}, "end_point": {"row": 201, "column": 8}}, {"id": 665, "type": "field_identifier", "text": "pid", "parent": 663, "children": [], "start_point": {"row": 201, "column": 10}, "end_point": {"row": 201, "column": 13}}, {"id": 666, "type": "==", "text": "==", "parent": 662, "children": [], "start_point": {"row": 201, "column": 14}, "end_point": {"row": 201, "column": 16}}, {"id": 667, "type": "identifier", "text": "pid", "parent": 662, "children": [], "start_point": {"row": 201, "column": 17}, "end_point": {"row": 201, "column": 20}}, {"id": 668, "type": "assignment_expression", "text": "p->w = w", "parent": 660, "children": [669, 672, 673], "start_point": {"row": 202, "column": 4}, "end_point": {"row": 202, "column": 12}}, {"id": 669, "type": "field_expression", "text": "p->w", "parent": 668, "children": [670, 671], "start_point": {"row": 202, "column": 4}, "end_point": {"row": 202, "column": 8}}, {"id": 670, "type": "identifier", "text": "p", "parent": 669, "children": [], "start_point": {"row": 202, "column": 4}, "end_point": {"row": 202, "column": 5}}, {"id": 671, "type": "field_identifier", "text": "w", "parent": 669, "children": [], "start_point": {"row": 202, "column": 7}, "end_point": {"row": 202, "column": 8}}, {"id": 672, "type": "=", "text": "=", "parent": 668, "children": [], "start_point": {"row": 202, "column": 9}, "end_point": {"row": 202, "column": 10}}, {"id": 673, "type": "identifier", "text": "w", "parent": 668, "children": [], "start_point": {"row": 202, "column": 11}, "end_point": {"row": 202, "column": 12}}, {"id": 674, "type": "call_expression", "text": "wakeupjob(p)", "parent": 660, "children": [675, 676], "start_point": {"row": 203, "column": 4}, "end_point": {"row": 203, "column": 16}}, {"id": 675, "type": "identifier", "text": "wakeupjob", "parent": 674, "children": [], "start_point": {"row": 203, "column": 4}, "end_point": {"row": 203, "column": 13}}, {"id": 676, "type": "argument_list", "text": "(p)", "parent": 674, "children": [677], "start_point": {"row": 203, "column": 13}, "end_point": {"row": 203, "column": 16}}, {"id": 677, "type": "identifier", "text": "p", "parent": 676, "children": [], "start_point": {"row": 203, "column": 14}, "end_point": {"row": 203, "column": 15}}, {"id": 678, "type": "break_statement", "text": "break;", "parent": 660, "children": [679], "start_point": {"row": 204, "column": 4}, "end_point": {"row": 204, "column": 10}}, {"id": 679, "type": "break", "text": "break", "parent": 678, "children": [], "start_point": {"row": 204, "column": 4}, "end_point": {"row": 204, "column": 9}}, {"id": 680, "type": "preproc_ifdef", "text": "#ifdef DEBUG\n\t\tif (p) ; else dlog(\"can't locate task block for pid %d\", pid);\n#endif", "parent": 562, "children": [681, 682, 683, 692], "start_point": {"row": 208, "column": 0}, "end_point": {"row": 210, "column": 6}}, {"id": 681, "type": "#ifdef", "text": "#ifdef", "parent": 680, "children": [], "start_point": {"row": 208, "column": 0}, "end_point": {"row": 208, "column": 6}}, {"id": 682, "type": "identifier", "text": "DEBUG", "parent": 680, "children": [], "start_point": {"row": 208, "column": 7}, "end_point": {"row": 208, "column": 12}}, {"id": 683, "type": "if_statement", "text": "if (p) ; else dlog(\"can't locate task block for pid %d\", pid);", "parent": 680, "children": [684, 686], "start_point": {"row": 209, "column": 2}, "end_point": {"row": 209, "column": 64}}, {"id": 684, "type": "parenthesized_expression", "text": "(p)", "parent": 683, "children": [685], "start_point": {"row": 209, "column": 5}, "end_point": {"row": 209, "column": 8}}, {"id": 685, "type": "identifier", "text": "p", "parent": 684, "children": [], "start_point": {"row": 209, "column": 6}, "end_point": {"row": 209, "column": 7}}, {"id": 686, "type": "else_clause", "text": "else dlog(\"can't locate task block for pid %d\", pid);", "parent": 683, "children": [], "start_point": {"row": 209, "column": 11}, "end_point": {"row": 209, "column": 64}}, {"id": 687, "type": "call_expression", "text": "dlog(\"can't locate task block for pid %d\", pid)", "parent": 686, "children": [688, 689], "start_point": {"row": 209, "column": 16}, "end_point": {"row": 209, "column": 63}}, {"id": 688, "type": "identifier", "text": "dlog", "parent": 687, "children": [], "start_point": {"row": 209, "column": 16}, "end_point": {"row": 209, "column": 20}}, {"id": 689, "type": "argument_list", "text": "(\"can't locate task block for pid %d\", pid)", "parent": 687, "children": [690, 691], "start_point": {"row": 209, "column": 20}, "end_point": {"row": 209, "column": 63}}, {"id": 690, "type": "string_literal", "text": "\"can't locate task block for pid %d\"", "parent": 689, "children": [], "start_point": {"row": 209, "column": 21}, "end_point": {"row": 209, "column": 57}}, {"id": 691, "type": "identifier", "text": "pid", "parent": 689, "children": [], "start_point": {"row": 209, "column": 59}, "end_point": {"row": 209, "column": 62}}, {"id": 692, "type": "#endif", "text": "#endif", "parent": 680, "children": [], "start_point": {"row": 210, "column": 0}, "end_point": {"row": 210, "column": 6}}, {"id": 693, "type": "preproc_ifdef", "text": "#ifdef SYS5_SIGNALS\n\tsignal(sig, sigchld);\n#endif", "parent": 546, "children": [694, 695, 701], "start_point": {"row": 213, "column": 0}, "end_point": {"row": 215, "column": 6}}, {"id": 694, "type": "#ifdef", "text": "#ifdef", "parent": 693, "children": [], "start_point": {"row": 213, "column": 0}, "end_point": {"row": 213, "column": 6}}, {"id": 695, "type": "identifier", "text": "SYS5_SIGNALS", "parent": 693, "children": [], "start_point": {"row": 213, "column": 7}, "end_point": {"row": 213, "column": 19}}, {"id": 696, "type": "call_expression", "text": "signal(sig, sigchld)", "parent": 693, "children": [697, 698], "start_point": {"row": 214, "column": 1}, "end_point": {"row": 214, "column": 21}}, {"id": 697, "type": "identifier", "text": "signal", "parent": 696, "children": [], "start_point": {"row": 214, "column": 1}, "end_point": {"row": 214, "column": 7}}, {"id": 698, "type": "argument_list", "text": "(sig, sigchld)", "parent": 696, "children": [699, 700], "start_point": {"row": 214, "column": 7}, "end_point": {"row": 214, "column": 21}}, {"id": 699, "type": "identifier", "text": "sig", "parent": 698, "children": [], "start_point": {"row": 214, "column": 8}, "end_point": {"row": 214, "column": 11}}, {"id": 700, "type": "identifier", "text": "sigchld", "parent": 698, "children": [], "start_point": {"row": 214, "column": 13}, "end_point": {"row": 214, "column": 20}}, {"id": 701, "type": "#endif", "text": "#endif", "parent": 693, "children": [], "start_point": {"row": 215, "column": 0}, "end_point": {"row": 215, "column": 6}}, {"id": 702, "type": "if_statement", "text": "if (select_intr_valid)\n\t\tlongjmp(select_intr, sig);", "parent": 546, "children": [703], "start_point": {"row": 216, "column": 1}, "end_point": {"row": 217, "column": 28}}, {"id": 703, "type": "parenthesized_expression", "text": "(select_intr_valid)", "parent": 702, "children": [704], "start_point": {"row": 216, "column": 4}, "end_point": {"row": 216, "column": 23}}, {"id": 704, "type": "identifier", "text": "select_intr_valid", "parent": 703, "children": [], "start_point": {"row": 216, "column": 5}, "end_point": {"row": 216, "column": 22}}, {"id": 705, "type": "call_expression", "text": "longjmp(select_intr, sig)", "parent": 702, "children": [706, 707], "start_point": {"row": 217, "column": 2}, "end_point": {"row": 217, "column": 27}}, {"id": 706, "type": "identifier", "text": "longjmp", "parent": 705, "children": [], "start_point": {"row": 217, "column": 2}, "end_point": {"row": 217, "column": 9}}, {"id": 707, "type": "argument_list", "text": "(select_intr, sig)", "parent": 705, "children": [708, 709], "start_point": {"row": 217, "column": 9}, "end_point": {"row": 217, "column": 27}}, {"id": 708, "type": "identifier", "text": "select_intr", "parent": 707, "children": [], "start_point": {"row": 217, "column": 10}, "end_point": {"row": 217, "column": 21}}, {"id": 709, "type": "identifier", "text": "sig", "parent": 707, "children": [], "start_point": {"row": 217, "column": 23}, "end_point": {"row": 217, "column": 26}}, {"id": 710, "type": "function_definition", "text": "void do_task_notify(P_void)\n{\n\t/*\n\t * Keep taking the first item off the list and processing it.\n\t *\n\t * Done this way because the the callback can, quite reasonably,\n\t * queue a new task, so no local reference into the list can be\n\t * held here.\n\t */\n\twhile (FIRST(pjob, &proc_list_head) != HEAD(pjob, &proc_list_head)) {\n\t\tpjob *p = FIRST(pjob, &proc_list_head);\n\t\trem_que(&p->hdr);\n\t\t/*\n\t\t * This job has completed\n\t\t */\n\t\t--task_notify_todo;\n\n\t\t/*\n\t\t * Do callback if it exists\n\t\t */\n\t\tif (p->cb_fun)\n\t\t\t(*p->cb_fun)(p->w.w_retcode,\n\t\t\t\tp->w.w_termsig, p->cb_closure);\n\n\t\tfree((voidp) p);\n\t}\n}", "parent": 527, "children": [711, 712], "start_point": {"row": 224, "column": 0}, "end_point": {"row": 250, "column": 1}}, {"id": 711, "type": "primitive_type", "text": "void", "parent": 710, "children": [], "start_point": {"row": 224, "column": 0}, "end_point": {"row": 224, "column": 4}}, {"id": 712, "type": "function_declarator", "text": "do_task_notify(P_void)", "parent": 710, "children": [713, 714], "start_point": {"row": 224, "column": 5}, "end_point": {"row": 224, "column": 27}}, {"id": 713, "type": "identifier", "text": "do_task_notify", "parent": 712, "children": [], "start_point": {"row": 224, "column": 5}, "end_point": {"row": 224, "column": 19}}, {"id": 714, "type": "parameter_list", "text": "(P_void)", "parent": 712, "children": [715], "start_point": {"row": 224, "column": 19}, "end_point": {"row": 224, "column": 27}}, {"id": 715, "type": "parameter_declaration", "text": "P_void", "parent": 714, "children": [716], "start_point": {"row": 224, "column": 20}, "end_point": {"row": 224, "column": 26}}, {"id": 716, "type": "type_identifier", "text": "P_void", "parent": 715, "children": [], "start_point": {"row": 224, "column": 20}, "end_point": {"row": 224, "column": 26}}, {"id": 717, "type": "while_statement", "text": "while (FIRST(pjob, &proc_list_head) != HEAD(pjob, &proc_list_head)) {\n\t\tpjob *p = FIRST(pjob, &proc_list_head);\n\t\trem_que(&p->hdr);\n\t\t/*\n\t\t * This job has completed\n\t\t */\n\t\t--task_notify_todo;\n\n\t\t/*\n\t\t * Do callback if it exists\n\t\t */\n\t\tif (p->cb_fun)\n\t\t\t(*p->cb_fun)(p->w.w_retcode,\n\t\t\t\tp->w.w_termsig, p->cb_closure);\n\n\t\tfree((voidp) p);\n\t}", "parent": 710, "children": [718], "start_point": {"row": 233, "column": 1}, "end_point": {"row": 249, "column": 2}}, {"id": 718, "type": "parenthesized_expression", "text": "(FIRST(pjob, &proc_list_head) != HEAD(pjob, &proc_list_head))", "parent": 717, "children": [719], "start_point": {"row": 233, "column": 7}, "end_point": {"row": 233, "column": 68}}, {"id": 719, "type": "binary_expression", "text": "FIRST(pjob, &proc_list_head) != HEAD(pjob, &proc_list_head)", "parent": 718, "children": [720, 726, 727], "start_point": {"row": 233, "column": 8}, "end_point": {"row": 233, "column": 67}}, {"id": 720, "type": "call_expression", "text": "FIRST(pjob, &proc_list_head)", "parent": 719, "children": [721, 722], "start_point": {"row": 233, "column": 8}, "end_point": {"row": 233, "column": 36}}, {"id": 721, "type": "identifier", "text": "FIRST", "parent": 720, "children": [], "start_point": {"row": 233, "column": 8}, "end_point": {"row": 233, "column": 13}}, {"id": 722, "type": "argument_list", "text": "(pjob, &proc_list_head)", "parent": 720, "children": [723, 724], "start_point": {"row": 233, "column": 13}, "end_point": {"row": 233, "column": 36}}, {"id": 723, "type": "identifier", "text": "pjob", "parent": 722, "children": [], "start_point": {"row": 233, "column": 14}, "end_point": {"row": 233, "column": 18}}, {"id": 724, "type": "pointer_expression", "text": "&proc_list_head", "parent": 722, "children": [725], "start_point": {"row": 233, "column": 20}, "end_point": {"row": 233, "column": 35}}, {"id": 725, "type": "identifier", "text": "proc_list_head", "parent": 724, "children": [], "start_point": {"row": 233, "column": 21}, "end_point": {"row": 233, "column": 35}}, {"id": 726, "type": "!=", "text": "!=", "parent": 719, "children": [], "start_point": {"row": 233, "column": 37}, "end_point": {"row": 233, "column": 39}}, {"id": 727, "type": "call_expression", "text": "HEAD(pjob, &proc_list_head)", "parent": 719, "children": [728, 729], "start_point": {"row": 233, "column": 40}, "end_point": {"row": 233, "column": 67}}, {"id": 728, "type": "identifier", "text": "HEAD", "parent": 727, "children": [], "start_point": {"row": 233, "column": 40}, "end_point": {"row": 233, "column": 44}}, {"id": 729, "type": "argument_list", "text": "(pjob, &proc_list_head)", "parent": 727, "children": [730, 731], "start_point": {"row": 233, "column": 44}, "end_point": {"row": 233, "column": 67}}, {"id": 730, "type": "identifier", "text": "pjob", "parent": 729, "children": [], "start_point": {"row": 233, "column": 45}, "end_point": {"row": 233, "column": 49}}, {"id": 731, "type": "pointer_expression", "text": "&proc_list_head", "parent": 729, "children": [732], "start_point": {"row": 233, "column": 51}, "end_point": {"row": 233, "column": 66}}, {"id": 732, "type": "identifier", "text": "proc_list_head", "parent": 731, "children": [], "start_point": {"row": 233, "column": 52}, "end_point": {"row": 233, "column": 66}}, {"id": 733, "type": "declaration", "text": "pjob *p = FIRST(pjob, &proc_list_head);", "parent": 717, "children": [734, 735], "start_point": {"row": 234, "column": 2}, "end_point": {"row": 234, "column": 41}}, {"id": 734, "type": "type_identifier", "text": "pjob", "parent": 733, "children": [], "start_point": {"row": 234, "column": 2}, "end_point": {"row": 234, "column": 6}}, {"id": 735, "type": "init_declarator", "text": "*p = FIRST(pjob, &proc_list_head)", "parent": 733, "children": [736, 739, 740], "start_point": {"row": 234, "column": 7}, "end_point": {"row": 234, "column": 40}}, {"id": 736, "type": "pointer_declarator", "text": "*p", "parent": 735, "children": [737, 738], "start_point": {"row": 234, "column": 7}, "end_point": {"row": 234, "column": 9}}, {"id": 737, "type": "*", "text": "*", "parent": 736, "children": [], "start_point": {"row": 234, "column": 7}, "end_point": {"row": 234, "column": 8}}, {"id": 738, "type": "identifier", "text": "p", "parent": 736, "children": [], "start_point": {"row": 234, "column": 8}, "end_point": {"row": 234, "column": 9}}, {"id": 739, "type": "=", "text": "=", "parent": 735, "children": [], "start_point": {"row": 234, "column": 10}, "end_point": {"row": 234, "column": 11}}, {"id": 740, "type": "call_expression", "text": "FIRST(pjob, &proc_list_head)", "parent": 735, "children": [741, 742], "start_point": {"row": 234, "column": 12}, "end_point": {"row": 234, "column": 40}}, {"id": 741, "type": "identifier", "text": "FIRST", "parent": 740, "children": [], "start_point": {"row": 234, "column": 12}, "end_point": {"row": 234, "column": 17}}, {"id": 742, "type": "argument_list", "text": "(pjob, &proc_list_head)", "parent": 740, "children": [743, 744], "start_point": {"row": 234, "column": 17}, "end_point": {"row": 234, "column": 40}}, {"id": 743, "type": "identifier", "text": "pjob", "parent": 742, "children": [], "start_point": {"row": 234, "column": 18}, "end_point": {"row": 234, "column": 22}}, {"id": 744, "type": "pointer_expression", "text": "&proc_list_head", "parent": 742, "children": [745], "start_point": {"row": 234, "column": 24}, "end_point": {"row": 234, "column": 39}}, {"id": 745, "type": "identifier", "text": "proc_list_head", "parent": 744, "children": [], "start_point": {"row": 234, "column": 25}, "end_point": {"row": 234, "column": 39}}, {"id": 746, "type": "call_expression", "text": "rem_que(&p->hdr)", "parent": 717, "children": [747, 748], "start_point": {"row": 235, "column": 2}, "end_point": {"row": 235, "column": 18}}, {"id": 747, "type": "identifier", "text": "rem_que", "parent": 746, "children": [], "start_point": {"row": 235, "column": 2}, "end_point": {"row": 235, "column": 9}}, {"id": 748, "type": "argument_list", "text": "(&p->hdr)", "parent": 746, "children": [749], "start_point": {"row": 235, "column": 9}, "end_point": {"row": 235, "column": 18}}, {"id": 749, "type": "pointer_expression", "text": "&p->hdr", "parent": 748, "children": [750], "start_point": {"row": 235, "column": 10}, "end_point": {"row": 235, "column": 17}}, {"id": 750, "type": "field_expression", "text": "p->hdr", "parent": 749, "children": [751, 752], "start_point": {"row": 235, "column": 11}, "end_point": {"row": 235, "column": 17}}, {"id": 751, "type": "identifier", "text": "p", "parent": 750, "children": [], "start_point": {"row": 235, "column": 11}, "end_point": {"row": 235, "column": 12}}, {"id": 752, "type": "field_identifier", "text": "hdr", "parent": 750, "children": [], "start_point": {"row": 235, "column": 14}, "end_point": {"row": 235, "column": 17}}, {"id": 753, "type": "update_expression", "text": "--task_notify_todo", "parent": 717, "children": [754, 755], "start_point": {"row": 239, "column": 2}, "end_point": {"row": 239, "column": 20}}, {"id": 754, "type": "--", "text": "--", "parent": 753, "children": [], "start_point": {"row": 239, "column": 2}, "end_point": {"row": 239, "column": 4}}, {"id": 755, "type": "identifier", "text": "task_notify_todo", "parent": 753, "children": [], "start_point": {"row": 239, "column": 4}, "end_point": {"row": 239, "column": 20}}, {"id": 756, "type": "if_statement", "text": "if (p->cb_fun)\n\t\t\t(*p->cb_fun)(p->w.w_retcode,\n\t\t\t\tp->w.w_termsig, p->cb_closure);", "parent": 717, "children": [757], "start_point": {"row": 244, "column": 2}, "end_point": {"row": 246, "column": 35}}, {"id": 757, "type": "parenthesized_expression", "text": "(p->cb_fun)", "parent": 756, "children": [758], "start_point": {"row": 244, "column": 5}, "end_point": {"row": 244, "column": 16}}, {"id": 758, "type": "field_expression", "text": "p->cb_fun", "parent": 757, "children": [759, 760], "start_point": {"row": 244, "column": 6}, "end_point": {"row": 244, "column": 15}}, {"id": 759, "type": "identifier", "text": "p", "parent": 758, "children": [], "start_point": {"row": 244, "column": 6}, "end_point": {"row": 244, "column": 7}}, {"id": 760, "type": "field_identifier", "text": "cb_fun", "parent": 758, "children": [], "start_point": {"row": 244, "column": 9}, "end_point": {"row": 244, "column": 15}}, {"id": 761, "type": "call_expression", "text": "(*p->cb_fun)(p->w.w_retcode,\n\t\t\t\tp->w.w_termsig, p->cb_closure)", "parent": 756, "children": [762, 768], "start_point": {"row": 245, "column": 3}, "end_point": {"row": 246, "column": 34}}, {"id": 762, "type": "parenthesized_expression", "text": "(*p->cb_fun)", "parent": 761, "children": [763], "start_point": {"row": 245, "column": 3}, "end_point": {"row": 245, "column": 15}}, {"id": 763, "type": "pointer_expression", "text": "*p->cb_fun", "parent": 762, "children": [764, 765], "start_point": {"row": 245, "column": 4}, "end_point": {"row": 245, "column": 14}}, {"id": 764, "type": "*", "text": "*", "parent": 763, "children": [], "start_point": {"row": 245, "column": 4}, "end_point": {"row": 245, "column": 5}}, {"id": 765, "type": "field_expression", "text": "p->cb_fun", "parent": 763, "children": [766, 767], "start_point": {"row": 245, "column": 5}, "end_point": {"row": 245, "column": 14}}, {"id": 766, "type": "identifier", "text": "p", "parent": 765, "children": [], "start_point": {"row": 245, "column": 5}, "end_point": {"row": 245, "column": 6}}, {"id": 767, "type": "field_identifier", "text": "cb_fun", "parent": 765, "children": [], "start_point": {"row": 245, "column": 8}, "end_point": {"row": 245, "column": 14}}, {"id": 768, "type": "argument_list", "text": "(p->w.w_retcode,\n\t\t\t\tp->w.w_termsig, p->cb_closure)", "parent": 761, "children": [769, 774, 779], "start_point": {"row": 245, "column": 15}, "end_point": {"row": 246, "column": 34}}, {"id": 769, "type": "field_expression", "text": "p->w.w_retcode", "parent": 768, "children": [770, 773], "start_point": {"row": 245, "column": 16}, "end_point": {"row": 245, "column": 30}}, {"id": 770, "type": "field_expression", "text": "p->w", "parent": 769, "children": [771, 772], "start_point": {"row": 245, "column": 16}, "end_point": {"row": 245, "column": 20}}, {"id": 771, "type": "identifier", "text": "p", "parent": 770, "children": [], "start_point": {"row": 245, "column": 16}, "end_point": {"row": 245, "column": 17}}, {"id": 772, "type": "field_identifier", "text": "w", "parent": 770, "children": [], "start_point": {"row": 245, "column": 19}, "end_point": {"row": 245, "column": 20}}, {"id": 773, "type": "field_identifier", "text": "w_retcode", "parent": 769, "children": [], "start_point": {"row": 245, "column": 21}, "end_point": {"row": 245, "column": 30}}, {"id": 774, "type": "field_expression", "text": "p->w.w_termsig", "parent": 768, "children": [775, 778], "start_point": {"row": 246, "column": 4}, "end_point": {"row": 246, "column": 18}}, {"id": 775, "type": "field_expression", "text": "p->w", "parent": 774, "children": [776, 777], "start_point": {"row": 246, "column": 4}, "end_point": {"row": 246, "column": 8}}, {"id": 776, "type": "identifier", "text": "p", "parent": 775, "children": [], "start_point": {"row": 246, "column": 4}, "end_point": {"row": 246, "column": 5}}, {"id": 777, "type": "field_identifier", "text": "w", "parent": 775, "children": [], "start_point": {"row": 246, "column": 7}, "end_point": {"row": 246, "column": 8}}, {"id": 778, "type": "field_identifier", "text": "w_termsig", "parent": 774, "children": [], "start_point": {"row": 246, "column": 9}, "end_point": {"row": 246, "column": 18}}, {"id": 779, "type": "field_expression", "text": "p->cb_closure", "parent": 768, "children": [780, 781], "start_point": {"row": 246, "column": 20}, "end_point": {"row": 246, "column": 33}}, {"id": 780, "type": "identifier", "text": "p", "parent": 779, "children": [], "start_point": {"row": 246, "column": 20}, "end_point": {"row": 246, "column": 21}}, {"id": 781, "type": "field_identifier", "text": "cb_closure", "parent": 779, "children": [], "start_point": {"row": 246, "column": 23}, "end_point": {"row": 246, "column": 33}}, {"id": 782, "type": "call_expression", "text": "free((voidp) p)", "parent": 717, "children": [783, 784], "start_point": {"row": 248, "column": 2}, "end_point": {"row": 248, "column": 17}}, {"id": 783, "type": "identifier", "text": "free", "parent": 782, "children": [], "start_point": {"row": 248, "column": 2}, "end_point": {"row": 248, "column": 6}}, {"id": 784, "type": "argument_list", "text": "((voidp) p)", "parent": 782, "children": [785], "start_point": {"row": 248, "column": 6}, "end_point": {"row": 248, "column": 17}}, {"id": 785, "type": "cast_expression", "text": "(voidp) p", "parent": 784, "children": [786, 788], "start_point": {"row": 248, "column": 7}, "end_point": {"row": 248, "column": 16}}, {"id": 786, "type": "type_descriptor", "text": "voidp", "parent": 785, "children": [787], "start_point": {"row": 248, "column": 8}, "end_point": {"row": 248, "column": 13}}, {"id": 787, "type": "type_identifier", "text": "voidp", "parent": 786, "children": [], "start_point": {"row": 248, "column": 8}, "end_point": {"row": 248, "column": 13}}, {"id": 788, "type": "identifier", "text": "p", "parent": 785, "children": [], "start_point": {"row": 248, "column": 15}, "end_point": {"row": 248, "column": 16}}, {"id": 789, "type": "preproc_ifdef", "text": "#ifdef HAS_SVR3_SIGNALS\n/*\n * 4.2 signal library based on svr3 (4.1+ bsd) interface\n * From <NAME> <<EMAIL>).\n */\n\nstatic int current_mask = 0;\n\nint sigblock(mask)\nint mask;\n{\n int sig;\n int m;\n int oldmask;\n\n oldmask = current_mask;\n for ( sig = 1, m = 1; sig <= MAXSIG; sig++, m <<= 1 ) {\n if (mask & m) {\n\t sighold(sig);\n current_mask |= m;\n }\n }\n return oldmask;\n}\n\nint sigsetmask(mask)\nint mask;\n{\n int sig;\n int m;\n int oldmask;\n\n oldmask = current_mask;\n for ( sig = 1, m = 1; sig <= MAXSIG; sig++, m <<= 1 ) {\n if (mask & m) {\n sighold(sig);\n current_mask |= m;\n }\n else {\n sigrelse(sig);\n current_mask &= ~m;\n }\n }\n return oldmask;\n}\n\n#endif", "parent": 527, "children": [790, 791, 792, 798, 857, 927], "start_point": {"row": 252, "column": 0}, "end_point": {"row": 298, "column": 6}}, {"id": 790, "type": "#ifdef", "text": "#ifdef", "parent": 789, "children": [], "start_point": {"row": 252, "column": 0}, "end_point": {"row": 252, "column": 6}}, {"id": 791, "type": "identifier", "text": "HAS_SVR3_SIGNALS", "parent": 789, "children": [], "start_point": {"row": 252, "column": 7}, "end_point": {"row": 252, "column": 23}}, {"id": 792, "type": "declaration", "text": "static int current_mask = 0;", "parent": 789, "children": [793, 794], "start_point": {"row": 258, "column": 0}, "end_point": {"row": 258, "column": 28}}, {"id": 793, "type": "primitive_type", "text": "int", "parent": 792, "children": [], "start_point": {"row": 258, "column": 7}, "end_point": {"row": 258, "column": 10}}, {"id": 794, "type": "init_declarator", "text": "current_mask = 0", "parent": 792, "children": [795, 796, 797], "start_point": {"row": 258, "column": 11}, "end_point": {"row": 258, "column": 27}}, {"id": 795, "type": "identifier", "text": "current_mask", "parent": 794, "children": [], "start_point": {"row": 258, "column": 11}, "end_point": {"row": 258, "column": 23}}, {"id": 796, "type": "=", "text": "=", "parent": 794, "children": [], "start_point": {"row": 258, "column": 24}, "end_point": {"row": 258, "column": 25}}, {"id": 797, "type": "number_literal", "text": "0", "parent": 794, "children": [], "start_point": {"row": 258, "column": 26}, "end_point": {"row": 258, "column": 27}}, {"id": 798, "type": "function_definition", "text": "int sigblock(mask)\nint mask;\n{\n int sig;\n int m;\n int oldmask;\n\n oldmask = current_mask;\n for ( sig = 1, m = 1; sig <= MAXSIG; sig++, m <<= 1 ) {\n if (mask & m) {\n\t sighold(sig);\n current_mask |= m;\n }\n }\n return oldmask;\n}", "parent": 789, "children": [799, 800, 804], "start_point": {"row": 260, "column": 0}, "end_point": {"row": 275, "column": 1}}, {"id": 799, "type": "primitive_type", "text": "int", "parent": 798, "children": [], "start_point": {"row": 260, "column": 0}, "end_point": {"row": 260, "column": 3}}, {"id": 800, "type": "function_declarator", "text": "sigblock(mask)", "parent": 798, "children": [801, 802], "start_point": {"row": 260, "column": 4}, "end_point": {"row": 260, "column": 18}}, {"id": 801, "type": "identifier", "text": "sigblock", "parent": 800, "children": [], "start_point": {"row": 260, "column": 4}, "end_point": {"row": 260, "column": 12}}, {"id": 802, "type": "parameter_list", "text": "(mask)", "parent": 800, "children": [803], "start_point": {"row": 260, "column": 12}, "end_point": {"row": 260, "column": 18}}, {"id": 803, "type": "identifier", "text": "mask", "parent": 802, "children": [], "start_point": {"row": 260, "column": 13}, "end_point": {"row": 260, "column": 17}}, {"id": 804, "type": "declaration", "text": "int mask;", "parent": 798, "children": [805, 806], "start_point": {"row": 261, "column": 0}, "end_point": {"row": 261, "column": 9}}, {"id": 805, "type": "primitive_type", "text": "int", "parent": 804, "children": [], "start_point": {"row": 261, "column": 0}, "end_point": {"row": 261, "column": 3}}, {"id": 806, "type": "identifier", "text": "mask", "parent": 804, "children": [], "start_point": {"row": 261, "column": 4}, "end_point": {"row": 261, "column": 8}}, {"id": 807, "type": "declaration", "text": "int sig;", "parent": 798, "children": [808, 809], "start_point": {"row": 263, "column": 4}, "end_point": {"row": 263, "column": 12}}, {"id": 808, "type": "primitive_type", "text": "int", "parent": 807, "children": [], "start_point": {"row": 263, "column": 4}, "end_point": {"row": 263, "column": 7}}, {"id": 809, "type": "identifier", "text": "sig", "parent": 807, "children": [], "start_point": {"row": 263, "column": 8}, "end_point": {"row": 263, "column": 11}}, {"id": 810, "type": "declaration", "text": "int m;", "parent": 798, "children": [811, 812], "start_point": {"row": 264, "column": 4}, "end_point": {"row": 264, "column": 10}}, {"id": 811, "type": "primitive_type", "text": "int", "parent": 810, "children": [], "start_point": {"row": 264, "column": 4}, "end_point": {"row": 264, "column": 7}}, {"id": 812, "type": "identifier", "text": "m", "parent": 810, "children": [], "start_point": {"row": 264, "column": 8}, "end_point": {"row": 264, "column": 9}}, {"id": 813, "type": "declaration", "text": "int oldmask;", "parent": 798, "children": [814, 815], "start_point": {"row": 265, "column": 4}, "end_point": {"row": 265, "column": 16}}, {"id": 814, "type": "primitive_type", "text": "int", "parent": 813, "children": [], "start_point": {"row": 265, "column": 4}, "end_point": {"row": 265, "column": 7}}, {"id": 815, "type": "identifier", "text": "oldmask", "parent": 813, "children": [], "start_point": {"row": 265, "column": 8}, "end_point": {"row": 265, "column": 15}}, {"id": 816, "type": "assignment_expression", "text": "oldmask = current_mask", "parent": 798, "children": [817, 818, 819], "start_point": {"row": 267, "column": 4}, "end_point": {"row": 267, "column": 26}}, {"id": 817, "type": "identifier", "text": "oldmask", "parent": 816, "children": [], "start_point": {"row": 267, "column": 4}, "end_point": {"row": 267, "column": 11}}, {"id": 818, "type": "=", "text": "=", "parent": 816, "children": [], "start_point": {"row": 267, "column": 12}, "end_point": {"row": 267, "column": 13}}, {"id": 819, "type": "identifier", "text": "current_mask", "parent": 816, "children": [], "start_point": {"row": 267, "column": 14}, "end_point": {"row": 267, "column": 26}}, {"id": 820, "type": "for_statement", "text": "for ( sig = 1, m = 1; sig <= MAXSIG; sig++, m <<= 1 ) {\n if (mask & m) {\n\t sighold(sig);\n current_mask |= m;\n }\n }", "parent": 798, "children": [821, 830, 834], "start_point": {"row": 268, "column": 4}, "end_point": {"row": 273, "column": 5}}, {"id": 821, "type": "comma_expression", "text": "sig = 1, m = 1", "parent": 820, "children": [822, 826], "start_point": {"row": 268, "column": 10}, "end_point": {"row": 268, "column": 24}}, {"id": 822, "type": "assignment_expression", "text": "sig = 1", "parent": 821, "children": [823, 824, 825], "start_point": {"row": 268, "column": 10}, "end_point": {"row": 268, "column": 17}}, {"id": 823, "type": "identifier", "text": "sig", "parent": 822, "children": [], "start_point": {"row": 268, "column": 10}, "end_point": {"row": 268, "column": 13}}, {"id": 824, "type": "=", "text": "=", "parent": 822, "children": [], "start_point": {"row": 268, "column": 14}, "end_point": {"row": 268, "column": 15}}, {"id": 825, "type": "number_literal", "text": "1", "parent": 822, "children": [], "start_point": {"row": 268, "column": 16}, "end_point": {"row": 268, "column": 17}}, {"id": 826, "type": "assignment_expression", "text": "m = 1", "parent": 821, "children": [827, 828, 829], "start_point": {"row": 268, "column": 19}, "end_point": {"row": 268, "column": 24}}, {"id": 827, "type": "identifier", "text": "m", "parent": 826, "children": [], "start_point": {"row": 268, "column": 19}, "end_point": {"row": 268, "column": 20}}, {"id": 828, "type": "=", "text": "=", "parent": 826, "children": [], "start_point": {"row": 268, "column": 21}, "end_point": {"row": 268, "column": 22}}, {"id": 829, "type": "number_literal", "text": "1", "parent": 826, "children": [], "start_point": {"row": 268, "column": 23}, "end_point": {"row": 268, "column": 24}}, {"id": 830, "type": "binary_expression", "text": "sig <= MAXSIG", "parent": 820, "children": [831, 832, 833], "start_point": {"row": 268, "column": 26}, "end_point": {"row": 268, "column": 39}}, {"id": 831, "type": "identifier", "text": "sig", "parent": 830, "children": [], "start_point": {"row": 268, "column": 26}, "end_point": {"row": 268, "column": 29}}, {"id": 832, "type": "<=", "text": "<=", "parent": 830, "children": [], "start_point": {"row": 268, "column": 30}, "end_point": {"row": 268, "column": 32}}, {"id": 833, "type": "identifier", "text": "MAXSIG", "parent": 830, "children": [], "start_point": {"row": 268, "column": 33}, "end_point": {"row": 268, "column": 39}}, {"id": 834, "type": "comma_expression", "text": "sig++, m <<= 1", "parent": 820, "children": [835, 838], "start_point": {"row": 268, "column": 41}, "end_point": {"row": 268, "column": 55}}, {"id": 835, "type": "update_expression", "text": "sig++", "parent": 834, "children": [836, 837], "start_point": {"row": 268, "column": 41}, "end_point": {"row": 268, "column": 46}}, {"id": 836, "type": "identifier", "text": "sig", "parent": 835, "children": [], "start_point": {"row": 268, "column": 41}, "end_point": {"row": 268, "column": 44}}, {"id": 837, "type": "++", "text": "++", "parent": 835, "children": [], "start_point": {"row": 268, "column": 44}, "end_point": {"row": 268, "column": 46}}, {"id": 838, "type": "assignment_expression", "text": "m <<= 1", "parent": 834, "children": [839, 840, 841], "start_point": {"row": 268, "column": 48}, "end_point": {"row": 268, "column": 55}}, {"id": 839, "type": "identifier", "text": "m", "parent": 838, "children": [], "start_point": {"row": 268, "column": 48}, "end_point": {"row": 268, "column": 49}}, {"id": 840, "type": "<<=", "text": "<<=", "parent": 838, "children": [], "start_point": {"row": 268, "column": 50}, "end_point": {"row": 268, "column": 53}}, {"id": 841, "type": "number_literal", "text": "1", "parent": 838, "children": [], "start_point": {"row": 268, "column": 54}, "end_point": {"row": 268, "column": 55}}, {"id": 842, "type": "if_statement", "text": "if (mask & m) {\n\t sighold(sig);\n current_mask |= m;\n }", "parent": 820, "children": [843], "start_point": {"row": 269, "column": 8}, "end_point": {"row": 272, "column": 9}}, {"id": 843, "type": "parenthesized_expression", "text": "(mask & m)", "parent": 842, "children": [844], "start_point": {"row": 269, "column": 11}, "end_point": {"row": 269, "column": 21}}, {"id": 844, "type": "binary_expression", "text": "mask & m", "parent": 843, "children": [845, 846], "start_point": {"row": 269, "column": 12}, "end_point": {"row": 269, "column": 20}}, {"id": 845, "type": "identifier", "text": "mask", "parent": 844, "children": [], "start_point": {"row": 269, "column": 12}, "end_point": {"row": 269, "column": 16}}, {"id": 846, "type": "identifier", "text": "m", "parent": 844, "children": [], "start_point": {"row": 269, "column": 19}, "end_point": {"row": 269, "column": 20}}, {"id": 847, "type": "call_expression", "text": "sighold(sig)", "parent": 842, "children": [848, 849], "start_point": {"row": 270, "column": 5}, "end_point": {"row": 270, "column": 17}}, {"id": 848, "type": "identifier", "text": "sighold", "parent": 847, "children": [], "start_point": {"row": 270, "column": 5}, "end_point": {"row": 270, "column": 12}}, {"id": 849, "type": "argument_list", "text": "(sig)", "parent": 847, "children": [850], "start_point": {"row": 270, "column": 12}, "end_point": {"row": 270, "column": 17}}, {"id": 850, "type": "identifier", "text": "sig", "parent": 849, "children": [], "start_point": {"row": 270, "column": 13}, "end_point": {"row": 270, "column": 16}}, {"id": 851, "type": "assignment_expression", "text": "current_mask |= m", "parent": 842, "children": [852, 853, 854], "start_point": {"row": 271, "column": 12}, "end_point": {"row": 271, "column": 29}}, {"id": 852, "type": "identifier", "text": "current_mask", "parent": 851, "children": [], "start_point": {"row": 271, "column": 12}, "end_point": {"row": 271, "column": 24}}, {"id": 853, "type": "|=", "text": "|=", "parent": 851, "children": [], "start_point": {"row": 271, "column": 25}, "end_point": {"row": 271, "column": 27}}, {"id": 854, "type": "identifier", "text": "m", "parent": 851, "children": [], "start_point": {"row": 271, "column": 28}, "end_point": {"row": 271, "column": 29}}, {"id": 855, "type": "return_statement", "text": "return oldmask;", "parent": 798, "children": [856], "start_point": {"row": 274, "column": 4}, "end_point": {"row": 274, "column": 19}}, {"id": 856, "type": "identifier", "text": "oldmask", "parent": 855, "children": [], "start_point": {"row": 274, "column": 11}, "end_point": {"row": 274, "column": 18}}, {"id": 857, "type": "function_definition", "text": "int sigsetmask(mask)\nint mask;\n{\n int sig;\n int m;\n int oldmask;\n\n oldmask = current_mask;\n for ( sig = 1, m = 1; sig <= MAXSIG; sig++, m <<= 1 ) {\n if (mask & m) {\n sighold(sig);\n current_mask |= m;\n }\n else {\n sigrelse(sig);\n current_mask &= ~m;\n }\n }\n return oldmask;\n}", "parent": 789, "children": [858, 859, 863], "start_point": {"row": 277, "column": 0}, "end_point": {"row": 296, "column": 1}}, {"id": 858, "type": "primitive_type", "text": "int", "parent": 857, "children": [], "start_point": {"row": 277, "column": 0}, "end_point": {"row": 277, "column": 3}}, {"id": 859, "type": "function_declarator", "text": "sigsetmask(mask)", "parent": 857, "children": [860, 861], "start_point": {"row": 277, "column": 4}, "end_point": {"row": 277, "column": 20}}, {"id": 860, "type": "identifier", "text": "sigsetmask", "parent": 859, "children": [], "start_point": {"row": 277, "column": 4}, "end_point": {"row": 277, "column": 14}}, {"id": 861, "type": "parameter_list", "text": "(mask)", "parent": 859, "children": [862], "start_point": {"row": 277, "column": 14}, "end_point": {"row": 277, "column": 20}}, {"id": 862, "type": "identifier", "text": "mask", "parent": 861, "children": [], "start_point": {"row": 277, "column": 15}, "end_point": {"row": 277, "column": 19}}, {"id": 863, "type": "declaration", "text": "int mask;", "parent": 857, "children": [864, 865], "start_point": {"row": 278, "column": 0}, "end_point": {"row": 278, "column": 9}}, {"id": 864, "type": "primitive_type", "text": "int", "parent": 863, "children": [], "start_point": {"row": 278, "column": 0}, "end_point": {"row": 278, "column": 3}}, {"id": 865, "type": "identifier", "text": "mask", "parent": 863, "children": [], "start_point": {"row": 278, "column": 4}, "end_point": {"row": 278, "column": 8}}, {"id": 866, "type": "declaration", "text": "int sig;", "parent": 857, "children": [867, 868], "start_point": {"row": 280, "column": 4}, "end_point": {"row": 280, "column": 12}}, {"id": 867, "type": "primitive_type", "text": "int", "parent": 866, "children": [], "start_point": {"row": 280, "column": 4}, "end_point": {"row": 280, "column": 7}}, {"id": 868, "type": "identifier", "text": "sig", "parent": 866, "children": [], "start_point": {"row": 280, "column": 8}, "end_point": {"row": 280, "column": 11}}, {"id": 869, "type": "declaration", "text": "int m;", "parent": 857, "children": [870, 871], "start_point": {"row": 281, "column": 4}, "end_point": {"row": 281, "column": 10}}, {"id": 870, "type": "primitive_type", "text": "int", "parent": 869, "children": [], "start_point": {"row": 281, "column": 4}, "end_point": {"row": 281, "column": 7}}, {"id": 871, "type": "identifier", "text": "m", "parent": 869, "children": [], "start_point": {"row": 281, "column": 8}, "end_point": {"row": 281, "column": 9}}, {"id": 872, "type": "declaration", "text": "int oldmask;", "parent": 857, "children": [873, 874], "start_point": {"row": 282, "column": 4}, "end_point": {"row": 282, "column": 16}}, {"id": 873, "type": "primitive_type", "text": "int", "parent": 872, "children": [], "start_point": {"row": 282, "column": 4}, "end_point": {"row": 282, "column": 7}}, {"id": 874, "type": "identifier", "text": "oldmask", "parent": 872, "children": [], "start_point": {"row": 282, "column": 8}, "end_point": {"row": 282, "column": 15}}, {"id": 875, "type": "assignment_expression", "text": "oldmask = current_mask", "parent": 857, "children": [876, 877, 878], "start_point": {"row": 284, "column": 4}, "end_point": {"row": 284, "column": 26}}, {"id": 876, "type": "identifier", "text": "oldmask", "parent": 875, "children": [], "start_point": {"row": 284, "column": 4}, "end_point": {"row": 284, "column": 11}}, {"id": 877, "type": "=", "text": "=", "parent": 875, "children": [], "start_point": {"row": 284, "column": 12}, "end_point": {"row": 284, "column": 13}}, {"id": 878, "type": "identifier", "text": "current_mask", "parent": 875, "children": [], "start_point": {"row": 284, "column": 14}, "end_point": {"row": 284, "column": 26}}, {"id": 879, "type": "for_statement", "text": "for ( sig = 1, m = 1; sig <= MAXSIG; sig++, m <<= 1 ) {\n if (mask & m) {\n sighold(sig);\n current_mask |= m;\n }\n else {\n sigrelse(sig);\n current_mask &= ~m;\n }\n }", "parent": 857, "children": [880, 889, 893], "start_point": {"row": 285, "column": 4}, "end_point": {"row": 294, "column": 5}}, {"id": 880, "type": "comma_expression", "text": "sig = 1, m = 1", "parent": 879, "children": [881, 885], "start_point": {"row": 285, "column": 10}, "end_point": {"row": 285, "column": 24}}, {"id": 881, "type": "assignment_expression", "text": "sig = 1", "parent": 880, "children": [882, 883, 884], "start_point": {"row": 285, "column": 10}, "end_point": {"row": 285, "column": 17}}, {"id": 882, "type": "identifier", "text": "sig", "parent": 881, "children": [], "start_point": {"row": 285, "column": 10}, "end_point": {"row": 285, "column": 13}}, {"id": 883, "type": "=", "text": "=", "parent": 881, "children": [], "start_point": {"row": 285, "column": 14}, "end_point": {"row": 285, "column": 15}}, {"id": 884, "type": "number_literal", "text": "1", "parent": 881, "children": [], "start_point": {"row": 285, "column": 16}, "end_point": {"row": 285, "column": 17}}, {"id": 885, "type": "assignment_expression", "text": "m = 1", "parent": 880, "children": [886, 887, 888], "start_point": {"row": 285, "column": 19}, "end_point": {"row": 285, "column": 24}}, {"id": 886, "type": "identifier", "text": "m", "parent": 885, "children": [], "start_point": {"row": 285, "column": 19}, "end_point": {"row": 285, "column": 20}}, {"id": 887, "type": "=", "text": "=", "parent": 885, "children": [], "start_point": {"row": 285, "column": 21}, "end_point": {"row": 285, "column": 22}}, {"id": 888, "type": "number_literal", "text": "1", "parent": 885, "children": [], "start_point": {"row": 285, "column": 23}, "end_point": {"row": 285, "column": 24}}, {"id": 889, "type": "binary_expression", "text": "sig <= MAXSIG", "parent": 879, "children": [890, 891, 892], "start_point": {"row": 285, "column": 26}, "end_point": {"row": 285, "column": 39}}, {"id": 890, "type": "identifier", "text": "sig", "parent": 889, "children": [], "start_point": {"row": 285, "column": 26}, "end_point": {"row": 285, "column": 29}}, {"id": 891, "type": "<=", "text": "<=", "parent": 889, "children": [], "start_point": {"row": 285, "column": 30}, "end_point": {"row": 285, "column": 32}}, {"id": 892, "type": "identifier", "text": "MAXSIG", "parent": 889, "children": [], "start_point": {"row": 285, "column": 33}, "end_point": {"row": 285, "column": 39}}, {"id": 893, "type": "comma_expression", "text": "sig++, m <<= 1", "parent": 879, "children": [894, 897], "start_point": {"row": 285, "column": 41}, "end_point": {"row": 285, "column": 55}}, {"id": 894, "type": "update_expression", "text": "sig++", "parent": 893, "children": [895, 896], "start_point": {"row": 285, "column": 41}, "end_point": {"row": 285, "column": 46}}, {"id": 895, "type": "identifier", "text": "sig", "parent": 894, "children": [], "start_point": {"row": 285, "column": 41}, "end_point": {"row": 285, "column": 44}}, {"id": 896, "type": "++", "text": "++", "parent": 894, "children": [], "start_point": {"row": 285, "column": 44}, "end_point": {"row": 285, "column": 46}}, {"id": 897, "type": "assignment_expression", "text": "m <<= 1", "parent": 893, "children": [898, 899, 900], "start_point": {"row": 285, "column": 48}, "end_point": {"row": 285, "column": 55}}, {"id": 898, "type": "identifier", "text": "m", "parent": 897, "children": [], "start_point": {"row": 285, "column": 48}, "end_point": {"row": 285, "column": 49}}, {"id": 899, "type": "<<=", "text": "<<=", "parent": 897, "children": [], "start_point": {"row": 285, "column": 50}, "end_point": {"row": 285, "column": 53}}, {"id": 900, "type": "number_literal", "text": "1", "parent": 897, "children": [], "start_point": {"row": 285, "column": 54}, "end_point": {"row": 285, "column": 55}}, {"id": 901, "type": "if_statement", "text": "if (mask & m) {\n sighold(sig);\n current_mask |= m;\n }\n else {\n sigrelse(sig);\n current_mask &= ~m;\n }", "parent": 879, "children": [902, 914], "start_point": {"row": 286, "column": 8}, "end_point": {"row": 293, "column": 9}}, {"id": 902, "type": "parenthesized_expression", "text": "(mask & m)", "parent": 901, "children": [903], "start_point": {"row": 286, "column": 11}, "end_point": {"row": 286, "column": 21}}, {"id": 903, "type": "binary_expression", "text": "mask & m", "parent": 902, "children": [904, 905], "start_point": {"row": 286, "column": 12}, "end_point": {"row": 286, "column": 20}}, {"id": 904, "type": "identifier", "text": "mask", "parent": 903, "children": [], "start_point": {"row": 286, "column": 12}, "end_point": {"row": 286, "column": 16}}, {"id": 905, "type": "identifier", "text": "m", "parent": 903, "children": [], "start_point": {"row": 286, "column": 19}, "end_point": {"row": 286, "column": 20}}, {"id": 906, "type": "call_expression", "text": "sighold(sig)", "parent": 901, "children": [907, 908], "start_point": {"row": 287, "column": 12}, "end_point": {"row": 287, "column": 24}}, {"id": 907, "type": "identifier", "text": "sighold", "parent": 906, "children": [], "start_point": {"row": 287, "column": 12}, "end_point": {"row": 287, "column": 19}}, {"id": 908, "type": "argument_list", "text": "(sig)", "parent": 906, "children": [909], "start_point": {"row": 287, "column": 19}, "end_point": {"row": 287, "column": 24}}, {"id": 909, "type": "identifier", "text": "sig", "parent": 908, "children": [], "start_point": {"row": 287, "column": 20}, "end_point": {"row": 287, "column": 23}}, {"id": 910, "type": "assignment_expression", "text": "current_mask |= m", "parent": 901, "children": [911, 912, 913], "start_point": {"row": 288, "column": 12}, "end_point": {"row": 288, "column": 29}}, {"id": 911, "type": "identifier", "text": "current_mask", "parent": 910, "children": [], "start_point": {"row": 288, "column": 12}, "end_point": {"row": 288, "column": 24}}, {"id": 912, "type": "|=", "text": "|=", "parent": 910, "children": [], "start_point": {"row": 288, "column": 25}, "end_point": {"row": 288, "column": 27}}, {"id": 913, "type": "identifier", "text": "m", "parent": 910, "children": [], "start_point": {"row": 288, "column": 28}, "end_point": {"row": 288, "column": 29}}, {"id": 914, "type": "else_clause", "text": "else {\n sigrelse(sig);\n current_mask &= ~m;\n }", "parent": 901, "children": [], "start_point": {"row": 290, "column": 8}, "end_point": {"row": 293, "column": 9}}, {"id": 915, "type": "call_expression", "text": "sigrelse(sig)", "parent": 914, "children": [916, 917], "start_point": {"row": 291, "column": 12}, "end_point": {"row": 291, "column": 25}}, {"id": 916, "type": "identifier", "text": "sigrelse", "parent": 915, "children": [], "start_point": {"row": 291, "column": 12}, "end_point": {"row": 291, "column": 20}}, {"id": 917, "type": "argument_list", "text": "(sig)", "parent": 915, "children": [918], "start_point": {"row": 291, "column": 20}, "end_point": {"row": 291, "column": 25}}, {"id": 918, "type": "identifier", "text": "sig", "parent": 917, "children": [], "start_point": {"row": 291, "column": 21}, "end_point": {"row": 291, "column": 24}}, {"id": 919, "type": "assignment_expression", "text": "current_mask &= ~m", "parent": 914, "children": [920, 921, 922], "start_point": {"row": 292, "column": 12}, "end_point": {"row": 292, "column": 30}}, {"id": 920, "type": "identifier", "text": "current_mask", "parent": 919, "children": [], "start_point": {"row": 292, "column": 12}, "end_point": {"row": 292, "column": 24}}, {"id": 921, "type": "&=", "text": "&=", "parent": 919, "children": [], "start_point": {"row": 292, "column": 25}, "end_point": {"row": 292, "column": 27}}, {"id": 922, "type": "unary_expression", "text": "~m", "parent": 919, "children": [923, 924], "start_point": {"row": 292, "column": 28}, "end_point": {"row": 292, "column": 30}}, {"id": 923, "type": "~", "text": "~", "parent": 922, "children": [], "start_point": {"row": 292, "column": 28}, "end_point": {"row": 292, "column": 29}}, {"id": 924, "type": "identifier", "text": "m", "parent": 922, "children": [], "start_point": {"row": 292, "column": 29}, "end_point": {"row": 292, "column": 30}}, {"id": 925, "type": "return_statement", "text": "return oldmask;", "parent": 857, "children": [926], "start_point": {"row": 295, "column": 4}, "end_point": {"row": 295, "column": 19}}, {"id": 926, "type": "identifier", "text": "oldmask", "parent": 925, "children": [], "start_point": {"row": 295, "column": 11}, "end_point": {"row": 295, "column": 18}}, {"id": 927, "type": "#endif", "text": "#endif", "parent": 789, "children": [], "start_point": {"row": 298, "column": 0}, "end_point": {"row": 298, "column": 6}}]}, "node_categories": {"declarations": {"functions": [84, 86, 133, 135, 180, 226, 228, 309, 311, 373, 375, 403, 405, 506, 508, 529, 710, 712, 798, 800, 857, 859], "variables": [12, 17, 22, 31, 34, 37, 40, 43, 48, 51, 56, 66, 71, 81, 91, 99, 139, 144, 154, 176, 183, 185, 189, 192, 235, 238, 241, 244, 247, 259, 317, 320, 323, 326, 379, 409, 412, 423, 514, 517, 520, 533, 536, 541, 592, 715, 733, 792, 804, 807, 810, 813, 863, 866, 869, 872], "classes": [13, 18, 24, 25, 28, 29, 44, 45, 52, 67, 537, 538, 582, 583], "imports": [0, 1, 3, 4, 6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [62, 64, 77, 79, 106, 110, 116, 122, 128, 151, 161, 165, 171, 199, 204, 210, 215, 218, 219, 222, 254, 263, 267, 274, 277, 282, 284, 288, 291, 296, 299, 300, 301, 306, 333, 341, 348, 354, 359, 362, 363, 365, 368, 369, 370, 384, 387, 388, 391, 394, 395, 398, 400, 431, 432, 444, 448, 450, 454, 459, 462, 466, 473, 474, 475, 488, 496, 497, 500, 523, 547, 548, 549, 553, 556, 563, 564, 565, 569, 572, 577, 580, 601, 602, 606, 612, 620, 622, 624, 632, 636, 638, 642, 647, 650, 654, 661, 662, 663, 669, 674, 684, 687, 696, 703, 705, 718, 719, 720, 724, 727, 731, 740, 744, 746, 749, 750, 753, 757, 758, 761, 762, 763, 765, 769, 770, 774, 775, 779, 782, 785, 821, 830, 834, 835, 843, 844, 847, 880, 889, 893, 894, 902, 903, 906, 915, 922], "assignments": [109, 115, 121, 127, 164, 170, 203, 209, 262, 271, 283, 347, 353, 441, 451, 468, 483, 550, 566, 629, 639, 656, 668, 816, 822, 826, 838, 851, 875, 881, 885, 897, 910, 919], "loops": [440, 562, 628, 717, 820, 879], "conditionals": [8, 15, 16, 21, 26, 27, 30, 32, 33, 36, 38, 39, 41, 42, 46, 47, 49, 50, 54, 55, 57, 59, 63, 65, 69, 70, 72, 74, 78, 80, 83, 87, 89, 90, 92, 95, 98, 100, 104, 107, 108, 111, 112, 114, 117, 118, 120, 123, 124, 126, 129, 130, 132, 136, 138, 140, 143, 145, 149, 152, 153, 155, 159, 162, 163, 166, 167, 169, 172, 173, 175, 177, 181, 184, 186, 187, 188, 190, 191, 193, 197, 200, 202, 205, 206, 208, 211, 212, 214, 216, 220, 221, 223, 225, 229, 231, 232, 233, 234, 236, 237, 239, 240, 242, 243, 245, 246, 248, 252, 255, 257, 258, 261, 264, 265, 269, 270, 272, 275, 278, 280, 281, 285, 286, 289, 292, 294, 297, 303, 305, 307, 312, 314, 315, 316, 318, 319, 321, 322, 324, 325, 327, 331, 334, 336, 337, 338, 339, 340, 342, 345, 346, 349, 350, 352, 355, 356, 360, 364, 366, 367, 371, 372, 376, 378, 380, 383, 385, 389, 390, 392, 396, 397, 399, 401, 406, 408, 410, 411, 413, 416, 419, 420, 421, 422, 426, 429, 430, 434, 436, 437, 438, 439, 442, 445, 447, 449, 452, 455, 457, 458, 460, 463, 465, 467, 469, 471, 472, 476, 477, 479, 480, 481, 482, 484, 487, 489, 491, 492, 493, 494, 495, 499, 501, 504, 505, 509, 511, 512, 513, 516, 519, 521, 522, 524, 526, 530, 532, 535, 539, 540, 543, 544, 545, 546, 551, 554, 557, 567, 570, 578, 579, 584, 593, 596, 599, 600, 603, 605, 607, 609, 611, 613, 614, 615, 616, 617, 619, 623, 625, 626, 627, 630, 633, 635, 637, 640, 643, 645, 646, 648, 651, 653, 655, 657, 659, 660, 664, 665, 667, 670, 671, 673, 675, 677, 680, 681, 682, 683, 685, 688, 691, 692, 693, 694, 695, 697, 699, 700, 701, 702, 704, 706, 708, 709, 713, 716, 721, 723, 725, 728, 730, 732, 734, 738, 741, 743, 745, 747, 751, 752, 755, 756, 759, 760, 766, 767, 771, 772, 773, 776, 777, 778, 780, 781, 783, 787, 788, 789, 790, 791, 795, 801, 803, 806, 809, 812, 815, 817, 819, 823, 827, 831, 833, 836, 839, 842, 845, 846, 848, 850, 852, 854, 856, 860, 862, 865, 868, 871, 874, 876, 878, 882, 886, 890, 892, 895, 898, 901, 904, 905, 907, 909, 911, 913, 916, 918, 920, 924, 926, 927], "returns": [224, 295, 435, 855, 925], "exceptions": []}, "expressions": {"calls": [560, 590], "literals": [2, 5, 11, 344, 358, 428, 486, 503, 559, 587, 589, 610, 621, 690, 797, 825, 829, 841, 884, 888, 900], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 84, "universal_type": "function", "name": "ins_que", "text_snippet": "void ins_que(elem, pred)\nqelem *elem, *pred;\n{\n\tqelem *p = pred->q_forw;\n\telem->q_back = pred;\n\telem"}, {"node_id": 86, "universal_type": "function", "name": "unknown", "text_snippet": "ins_que(elem, pred)"}, {"node_id": 133, "universal_type": "function", "name": "rem_que", "text_snippet": "void rem_que(elem)\nqelem *elem;\n{\n\tqelem *p = elem->q_forw;\n\tqelem *p2 = elem->q_back;\n\tp2->q_forw ="}, {"node_id": 135, "universal_type": "function", "name": "unknown", "text_snippet": "rem_que(elem)"}, {"node_id": 180, "universal_type": "function", "name": "unknown", "text_snippet": "sched_job(cf, ca)\ncb_fun cf"}, {"node_id": 226, "universal_type": "function", "name": "run_task", "text_snippet": "void run_task(tf, ta, cf, ca)\ntask_fun tf;\nvoidp ta;\ncb_fun cf;\nvoidp ca;\n{\n\tpjob *p = sched_job(cf,"}, {"node_id": 228, "universal_type": "function", "name": "unknown", "text_snippet": "run_task(tf, ta, cf, ca)"}, {"node_id": 309, "universal_type": "function", "name": "sched_task", "text_snippet": "void sched_task(cf, ca, wchan)\ncb_fun cf;\nvoidp ca;\nvoidp wchan;\n{\n\t/*\n\t * Allocate a new task\n\t */\n"}, {"node_id": 311, "universal_type": "function", "name": "unknown", "text_snippet": "sched_task(cf, ca, wchan)"}, {"node_id": 373, "universal_type": "function", "name": "wakeupjob", "text_snippet": "static void wakeupjob(p)\npjob *p;\n{\n\trem_que(&p->hdr);\n\tins_que(&p->hdr, &proc_list_head);\n\ttask_not"}, {"node_id": 375, "universal_type": "function", "name": "unknown", "text_snippet": "wakeupjob(p)"}, {"node_id": 403, "universal_type": "function", "name": "wakeup", "text_snippet": "void wakeup(wchan)\nvoidp wchan;\n{\n\tpjob *p, *p2;\n#ifdef DEBUG_SLEEP\n\tint done = 0;\n#endif\n\tif (!fore"}, {"node_id": 405, "universal_type": "function", "name": "unknown", "text_snippet": "wakeup(wchan)"}, {"node_id": 506, "universal_type": "function", "name": "wakeup_task", "text_snippet": "void wakeup_task(rc, term, cl)\nint rc;\nint term;\nvoidp cl;\n{\n\twakeup(cl);\n}"}, {"node_id": 508, "universal_type": "function", "name": "unknown", "text_snippet": "wakeup_task(rc, term, cl)"}, {"node_id": 529, "universal_type": "function", "name": "unknown", "text_snippet": "sigchld(sig)"}, {"node_id": 710, "universal_type": "function", "name": "do_task_notify", "text_snippet": "void do_task_notify(P_void)\n{\n\t/*\n\t * Keep taking the first item off the list and processing it.\n\t *"}, {"node_id": 712, "universal_type": "function", "name": "unknown", "text_snippet": "do_task_notify(P_void)"}, {"node_id": 798, "universal_type": "function", "name": "sigblock", "text_snippet": "int sigblock(mask)\nint mask;\n{\n int sig;\n int m;\n int oldmask;\n\n oldmask = current_mask;"}, {"node_id": 800, "universal_type": "function", "name": "unknown", "text_snippet": "sigblock(mask)"}, {"node_id": 857, "universal_type": "function", "name": "sigsetmask", "text_snippet": "int sigsetmask(mask)\nint mask;\n{\n int sig;\n int m;\n int oldmask;\n\n oldmask = current_mas"}, {"node_id": 859, "universal_type": "function", "name": "unknown", "text_snippet": "sigsetmask(mask)"}], "class_declarations": [{"node_id": 13, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 18, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 24, "universal_type": "class", "name": "pjob", "text_snippet": "struct pjob"}, {"node_id": 25, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 28, "universal_type": "class", "name": "pjob", "text_snippet": "struct pjob {\n\tqelem hdr;\t\t\t/* Linked list */\n\tint pid;\t\t\t/* Process ID of job */\n\tcb_fun cb_fun;\t\t\t"}, {"node_id": 29, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 44, "universal_type": "class", "name": "wait", "text_snippet": "union wait"}, {"node_id": 45, "universal_type": "class", "name": "unknown", "text_snippet": "union"}, {"node_id": 52, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 67, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 537, "universal_type": "class", "name": "wait", "text_snippet": "union wait"}, {"node_id": 538, "universal_type": "class", "name": "unknown", "text_snippet": "union"}, {"node_id": 582, "universal_type": "class", "name": "rusage", "text_snippet": "struct rusage"}, {"node_id": 583, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include \"am.h\"\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <sys/signal.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include WAIT\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <setjmp.h>\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "/*\n * Copyright (c) 1990 <NAME>\n * Copyright (c) 1990 Imperial College of Science, Technology & Medicine\n * Copyright (c) 1990, 1993\n *\tThe Regents of the University of California. All rights reserved.\n *\n * This code is derived from software contributed to Berkeley by\n * <NAME> at Imperial College, London.\n *\n * %sccs.include.redist.c%\n *\n *\t@(#)sched.c\t8.1 (Berkeley) 06/06/93\n *\n * $Id: sched.c,v 5.2.2.1 1992/02/09 15:09:02 jsp beta $\n *\n */\n\n/*\n * Process scheduler\n */\n\n#include \"am.h\"\n#include <sys/signal.h>\n#include WAIT\n#include <setjmp.h>\nextern jmp_buf select_intr;\nextern int select_intr_valid;\n\ntypedef struct pjob pjob;\nstruct pjob {\n\tqelem hdr;\t\t\t/* Linked list */\n\tint pid;\t\t\t/* Process ID of job */\n\tcb_fun cb_fun;\t\t\t/* Callback function */\n\tvoidp cb_closure;\t\t/* Closure for callback */\n\tunion wait w;\t\t\t/* Status filled in by sigchld */\n\tvoidp wchan;\t\t\t/* Wait channel */\n};\n\nextern qelem proc_list_head;\nqelem proc_list_head = { &proc_list_head, &proc_list_head };\nextern qelem proc_wait_list;\nqelem proc_wait_list = { &proc_wait_list, &proc_wait_list };\n\nint task_notify_todo;\n\nvoid ins_que(elem, pred)\nqelem *elem, *pred;\n{\n\tqelem *p = pred->q_forw;\n\telem->q_back = pred;\n\telem->q_forw = p;\n\tpred->q_forw = elem;\n\tp->q_back = elem;\n}\n\nvoid rem_que(elem)\nqelem *elem;\n{\n\tqelem *p = elem->q_forw;\n\tqelem *p2 = elem->q_back;\n\tp2->q_forw = p;\n\tp->q_back = p2;\n}\n\nstatic pjob *sched_job(cf, ca)\ncb_fun cf;\nvoidp ca;\n{\n\tpjob *p = ALLOC(pjob);\n\n\tp->cb_fun = cf;\n\tp->cb_closure = ca;\n\n\t/*\n\t * Now place on wait queue\n\t */\n\tins_que(&p->hdr, &proc_wait_list);\n\n\treturn p;\n}\n\nvoid run_task(tf, ta, cf, ca)\ntask_fun tf;\nvoidp ta;\ncb_fun cf;\nvoidp ca;\n{\n\tpjob *p = sched_job(cf, ca);\n\tint mask;\n\n\tp->wchan = (voidp) p;\n\n\tmask = sigblock(sigmask(SIGCHLD));\n\n\tif (p->pid = background()) {\n\t\tsigsetmask(mask);\n\t\treturn;\n\t}\n\n\texit((*tf)(ta));\n\t/* firewall... */\n\tabort();\n}\n\n/*\n * Schedule a task to be run when woken up\n */\nvoid sched_task(cf, ca, wchan)\ncb_fun cf;\nvoidp ca;\nvoidp wchan;\n{\n\t/*\n\t * Allocate a new task\n\t */\n\tpjob *p = sched_job(cf, ca);\n#ifdef DEBUG_SLEEP\n\tdlog(\"SLEEP on %#x\", wchan);\n#endif\n\tp->wchan = wchan;\n\tp->pid = 0;\n\tbzero((voidp) &p->w, sizeof(p->w));\n}\n\nstatic void wakeupjob(p)\npjob *p;\n{\n\trem_que(&p->hdr);\n\tins_que(&p->hdr, &proc_list_head);\n\ttask_notify_todo++;\n}\n\nvoid wakeup(wchan)\nvoidp wchan;\n{\n\tpjob *p, *p2;\n#ifdef DEBUG_SLEEP\n\tint done = 0;\n#endif\n\tif (!foreground)\n\t\treturn;\n\n#ifdef DEBUG_SLEEP\n\t/*dlog(\"wakeup(%#x)\", wchan);*/\n#endif\n\t/*\n\t * Can't user ITER() here because\n\t * wakeupjob() juggles the list.\n\t */\n\tfor (p = FIRST(pjob, &proc_wait_list);\n\t\t\tp2 = NEXT(pjob, p), p != HEAD(pjob, &proc_wait_list);\n\t\t\tp = p2) {\n\t\tif (p->wchan == wchan) {\n#ifdef DEBUG_SLEEP\n\t\t\tdone = 1;\n#endif\n\t\t\twakeupjob(p);\n\t\t}\n\t}\n\n#ifdef DEBUG_SLEEP\n\tif (!done)\n\t\tdlog(\"Nothing SLEEPing on %#x\", wchan);\n#endif\n}\n\nvoid wakeup_task(rc, term, cl)\nint rc;\nint term;\nvoidp cl;\n{\n\twakeup(cl);\n}\n\n/*ARGSUSED*/\n\nvoid sigchld(sig)\nint sig;\n{\n\tunion wait w;\n\tint pid;\n\n#ifdef SYS5_SIGNALS\n\tif ((pid = wait(&w)) > 0) {\n#else\n\twhile ((pid = wait3((int *) &w, WNOHANG, (struct rusage *) 0)) > 0) {\n#endif /* SYS5_SIGNALS */\n\t\tpjob *p, *p2;\n\n\t\tif (WIFSIGNALED(w))\n\t\t\tplog(XLOG_ERROR, \"Process %d exited with signal %d\",\n\t\t\t\tpid, w.w_termsig);\n#ifdef DEBUG\n\t\telse\n\t\t\tdlog(\"Process %d exited with status %d\",\n\t\t\t\tpid, w.w_retcode);\n#endif /* DEBUG */\n\n\t\tfor (p = FIRST(pjob, &proc_wait_list);\n\t\t\t\tp2 = NEXT(pjob, p), p != HEAD(pjob, &proc_wait_list);\n\t\t\t\tp = p2) {\n\t\t\tif (p->pid == pid) {\n\t\t\t\tp->w = w;\n\t\t\t\twakeupjob(p);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n#ifdef DEBUG\n\t\tif (p) ; else dlog(\"can't locate task block for pid %d\", pid);\n#endif /* DEBUG */\n\t}\n\n#ifdef SYS5_SIGNALS\n\tsignal(sig, sigchld);\n#endif /* SYS5_SIGNALS */\n\tif (select_intr_valid)\n\t\tlongjmp(select_intr, sig);\n}\n\n/*\n * Run any pending tasks.\n * This must be called with SIGCHLD disabled\n */\nvoid do_task_notify(P_void)\n{\n\t/*\n\t * Keep taking the first item off the list and processing it.\n\t *\n\t * Done this way because the the callback can, quite reasonably,\n\t * queue a new task, so no local reference into the list can be\n\t * held here.\n\t */\n\twhile (FIRST(pjob, &proc_list_head) != HEAD(pjob, &proc_list_head)) {\n\t\tpjob *p = FIRST(pjob, &proc_list_head);\n\t\trem_que(&p->hdr);\n\t\t/*\n\t\t * This job has completed\n\t\t */\n\t\t--task_notify_todo;\n\n\t\t/*\n\t\t * Do callback if it exists\n\t\t */\n\t\tif (p->cb_fun)\n\t\t\t(*p->cb_fun)(p->w.w_retcode,\n\t\t\t\tp->w.w_termsig, p->cb_closure);\n\n\t\tfree((voidp) p);\n\t}\n}\n\n#ifdef HAS_SVR3_SIGNALS\n/*\n * 4.2 signal library based on svr3 (4.1+ bsd) interface\n * From <NAME> <<EMAIL>).\n */\n\nstatic int current_mask = 0;\n\nint sigblock(mask)\nint mask;\n{\n int sig;\n int m;\n int oldmask;\n\n oldmask = current_mask;\n for ( sig = 1, m = 1; sig <= MAXSIG; sig++, m <<= 1 ) {\n if (mask & m) {\n\t sighold(sig);\n current_mask |= m;\n }\n }\n return oldmask;\n}\n\nint sigsetmask(mask)\nint mask;\n{\n int sig;\n int m;\n int oldmask;\n\n oldmask = current_mask;\n for ( sig = 1, m = 1; sig <= MAXSIG; sig++, m <<= 1 ) {\n if (mask & m) {\n sighold(sig);\n current_mask |= m;\n }\n else {\n sigrelse(sig);\n current_mask &= ~m;\n }\n }\n return oldmask;\n}\n\n#endif /* HAS_SVR3_SIGNALS */\n"}
| 81,240
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.