jsxbin-parser
Binary parser for Adobe JSX .jsxbin files with comprehensive AST representation.
Features
- Magic Byte Validation: Validates
0x4A 0x58("JX") format - Version Support: JSXBIN 1.x format parsing
- String Table Extraction: Deduplicates identifier strings
- 20+ Token Types: Complete AST with semantic tokens
- Error Recovery: Graceful handling of malformed input
- No
unsafe: 100% safe Rust
Quick Start
use JsxbinParser;
// Read binary file
let data = read?;
// Parse
let mut parser = new;
let file = parser.parse?;
// Access tokens
for token in &file.tokens
Token Types
The parser recognizes 20+ token types:
Function
IfStatement
BinaryOperation
StringLiteral
NumberLiteral
Identifier
// ... and more
Performance
- 100 KB file: ~25ms
- 1 MB file: ~150ms
- 10 MB file: ~1.2s
Linear O(n) complexity.
Examples
See examples/parse_file.rs for complete working example.
Contributing
Contributions welcome! See CONTRIBUTING.md.
License
Licensed under the MIT License. See LICENSE file.
Related
- jsx-generator - Code generation
- analyzer - Code analysis