lib/libesp32/berry/REPOSITORY_MAP.md
Berry is an ultra-lightweight dynamically typed embedded scripting language designed for lower-performance embedded devices. The interpreter core is less than 40KiB and can run on less than 4KiB heap.
/src/ - Core Source Code (152 files)Main Components:
be_vm.c (1419 lines) - Register-based VM executionbe_parser.c (1841 lines) - One-pass compiler and syntax analysisbe_lexer.c (914 lines) - Tokenization and lexical analysisbe_api.c (1179 lines) - External C API interfacebe_code.c (983 lines) - Bytecode generationbe_gc.c (613 lines) - Mark-sweep garbage collectionData Types & Objects:
be_string.c (326 lines), be_strlib.c (1137 lines)be_list.c (207 lines), be_listlib.c (556 lines)be_map.c (354 lines), be_maplib.c (265 lines)be_class.c (374 lines)be_func.c (183 lines)be_byteslib.c (1992 lines) - Binary data handlingBuilt-in Libraries:
be_jsonlib.c (645 lines) - JSON parsing/generationbe_mathlib.c (438 lines) - Mathematical functionsbe_oslib.c (271 lines) - Operating system interfacebe_filelib.c (265 lines) - File I/O operationsbe_debug.c (418 lines), be_debuglib.c (289 lines)be_introspectlib.c (298 lines)be_timelib.c (72 lines)Memory & Execution:
be_mem.c (377 lines)be_exec.c (531 lines)be_bytecode.c (634 lines)be_var.c (201 lines)be_module.c (509 lines)Headers:
berry.h (2395 lines) - Primary API definitionsbe_constobj.h (505 lines) - Constant object definitions/tests/ - Unit Tests (54 files)Core Language Tests:
assignment.be, bool.be, class.be, closure.be, function.befor.be, vararg.be, cond_expr.be, exceptions.beData Type Tests:
list.be, map.be, range.be, string.be, int.be, bytes.beLibrary Tests:
json.be (9168 lines) - Comprehensive JSON security testsmath.be, os.be, debug.be, introspect.beParser & Compiler Tests:
parser.be, lexer.be, compiler.be, suffix.beAdvanced Feature Tests:
virtual_methods.be, super_auto.be, class_static.bedivision_by_zero.be, reference.be, compound.be/examples/ - Example Programs (16 files)fib_rec.be - Fibonacci recursionqsort.be - Quick sort implementationbintree.be - Binary tree operationsjson.be - JSON usage examplesrepl.be - REPL implementation/default/ - Default Configuration (17 files)berry_conf.h - Configuration settingsbe_modtab.c - Module table definitionsbe_port.c - Platform-specific codeberry.c - Main executable entry point/generate/ - Generated Files (31 files)be_const_strtab.h - String table constantsbe_fixed_*.h - Fixed/compiled module definitions/tools/ - Development ToolsCode Generation:
/coc/ - Compile-on-command tools (13 files)Editor Support:
/plugins/vscode/ - Visual Studio Code plugin/plugins/Notepad++/ - Notepad++ syntax highlightingGrammar:
berry.ebnf - EBNF grammar definitionberry.bytecode - Bytecode format specificationbe_vm.c)be_parser.c, be_lexer.c)be_mem.c, be_gc.c)be_jsonlib.c)make testThis repository represents a complete, production-ready embedded scripting language with comprehensive testing, security features, and development tools.