Complete String Parser Purge
Current Status
- โ
process_set.c replaced with AST-based parsing
- โ
Complete AST infrastructure implemented and tested
- ๐ Need to identify and purge ALL remaining string parsing
String Parsing Locations to Remove
1. Expression Evaluation Functions
evaluate_concatenation_expression() - string-based expression parsing
parse_array_literal() - string-based array parsing
evaluate_condition() - string-based condition evaluation
2. Process Functions Using String Parsing
process_directive.c - command extraction with strchr/strcmp
process_if.c - condition parsing with string manipulation
process_script_block.c - expression parsing with string operations
3. Multiline Processing
process_multiline_directive_enhanced.c - line-by-line string tokenization
- Manual string splitting and directive detection
AST Replacement Strategy
Replace with AST Functions
evaluate_concatenation_expression() โ ast_evaluate_expression()
parse_array_literal() โ ast_parse_array_literal()
evaluate_condition() โ ast_evaluate_conditional_expression()
process_directive() โ ast_process_directive()
Integration Points
- All string parsing functions must be replaced with AST equivalents
- Maintain same external API for backward compatibility
- Ensure all tests continue to pass after replacement
Purge Verification
- Grep for
strchr, strstr, strncmp in parsing contexts
- Remove all manual string tokenization
- Verify no string manipulation in expression/directive parsing
- Test all functionality after complete removal
Implementation Order
- Create AST-based replacements for remaining functions
- Replace function calls throughout codebase
- Delete string parsing function files
- Update includes to remove string parsing headers
- Verify build and test success