From f8236efffda2043f810999b028e0eeb7ba9bfe59 Mon Sep 17 00:00:00 2001 From: Sky Johnson Date: Sun, 31 Aug 2025 21:03:55 -0500 Subject: [PATCH] delete old struct parser --- structs/PARSER.md | 284 -------- structs/builder.go | 454 ------------- structs/builder_test.go | 173 ----- structs/loader.go | 146 ---- structs/opcode_manager.go | 239 ------- structs/opcodes.go | 162 ----- structs/parser/context.go | 447 ------------ structs/parser/parser.go | 1199 --------------------------------- structs/parser/parser_test.go | 933 ------------------------- structs/parser/structs.go | 135 ---- structs/parser_test.go | 370 ---------- structs/reader.go | 255 ------- 12 files changed, 4797 deletions(-) delete mode 100644 structs/PARSER.md delete mode 100644 structs/builder.go delete mode 100644 structs/builder_test.go delete mode 100644 structs/loader.go delete mode 100644 structs/opcode_manager.go delete mode 100644 structs/opcodes.go delete mode 100644 structs/parser/context.go delete mode 100644 structs/parser/parser.go delete mode 100644 structs/parser/parser_test.go delete mode 100644 structs/parser/structs.go delete mode 100644 structs/parser_test.go delete mode 100644 structs/reader.go diff --git a/structs/PARSER.md b/structs/PARSER.md deleted file mode 100644 index 8d2e394..0000000 --- a/structs/PARSER.md +++ /dev/null @@ -1,284 +0,0 @@ -# Packet Definition Parser - -Fast XML-like parser for binary packet structures with versioning and conditional fields. - -## Basic Syntax - -```xml - - - - - - - -``` - -## Field Types - -| Type | Size | Description | -|------|------|-------------| -| `u8`, `u16`, `u32`, `u64` | 1-8 bytes | Unsigned integers | -| `i8`, `i16`, `i32`, `i64` | 1-8 bytes | Signed integers | -| `f32`, `f64`, `double` | 4-8 bytes | Floating point | -| `str8`, `str16`, `str32` | Variable | Length-prefixed strings | -| `char` | Fixed | Fixed-size byte array | -| `color` | 3 bytes | RGB color (r,g,b) | -| `equip` | 8 bytes | Equipment item | -| `array` | Variable | Array of substructures | - -## Multiple Field Names - -```xml - - -``` - -## Conditional Fields - -```xml - - - - -``` - -### Condition Types - -**Flag Conditions:** -- `flag:name` - Flag is set -- `!flag:name` - Flag not set - -**Variable Conditions:** -- `var:name` - Variable exists and is non-zero -- `!var:name` - Variable doesn't exist or is zero - -**Version Conditions:** -- `version>=562` - Version comparisons -- `version<1200` - Supports `>=`, `<=`, `>`, `<` - -**Value Comparisons:** -- `field>=value` - Numeric comparisons -- `field!=0` - Supports `>=`, `<=`, `>`, `<`, `==`, `!=` - -**String Length:** -- `name!>5` - String longer than 5 chars -- `name!<=100` - String 100 chars or less -- Supports `!>`, `!<`, `!>=`, `!<=`, `!=` - -**Bitwise Operations:** -- `field&0x01` - Bitwise AND with hex value - -**Complex Logic:** -- `cond1,cond2` - OR logic (comma-separated) -- `cond1&cond2` - AND logic (ampersand) -- `version>=562&level>10` - Multiple conditions - -**Array Context:** -- `item_type_%i!=0` - `%i` substitutes current array index - -## Groups - -Organize related fields with automatic prefixing: - -```xml - - - - - - -``` - -## Templates - -Define reusable field groups that can be injected into packets: - -```xml - - - - - - - - - -