🚀 Hybrid Sequence Parser Test Page

Testing the new hybrid AST approach: Order-preserving AST + TokenStreamRewriter for optimal performance

🔧 Parser Information

Environment Variable: Loading...

Expected: USE_ANTLR_PARSER=true

Status: Checking...

Hybrid Features: AST Building, Order Preservation, Smart Regeneration

Test 1: Basic Sequence Diagram

Simple sequence diagram to test basic ANTLR parser functionality:

sequenceDiagram
  Alice->>Bob: Hello Bob, how are you?
  Bob-->>Alice: Great!
    

🔄 AST-to-Code Regeneration Test

Test the ability to regenerate sequence diagram code from the parsed AST:

First click "Debug Globals" to check if the parser is available, then select a test case and click "Test AST Regeneration". After that, you can test various modifications:
🔧 Test AST Modification - Change message text with surgical editing
➕ Test Add Participant - Add new participant using HybridSequenceEditor
🏷️ Test Update Participant Alias - Add alias to existing participant
Check the debug logs below for results.

🎨 AST-Generated Diagram

This diagram is rendered using code generated from the AST (not the original input):

Click "🎨 Render AST-Generated Diagram" to render a diagram from AST-generated code

🚀 Hybrid AST Features Test

Test the new hybrid AST features: structured AST building, order preservation, and enhanced debugging:

These features demonstrate the enhanced AST capabilities: structured data, validation, and comprehensive statistics.

🔍 Debug Logs

🔍 Debug Logs:

Test results and debug information will appear here...