================================================================================
EXABGP GENERATOR USAGE - ORGANIZED FILE LISTING
================================================================================

PRODUCTION CODE FILES WITH GENERATORS (41 files)
================================================

REACTOR MODULE - Core Event Loop and Networking (16 files)
---------
/home/user/exabgp/src/exabgp/reactor/loop.py                           1 generator, 1 yield
/home/user/exabgp/src/exabgp/reactor/protocol.py                      14 generators, 29 yields
/home/user/exabgp/src/exabgp/reactor/peer.py                           9 generators, 31 yields
/home/user/exabgp/src/exabgp/reactor/keepalive.py                      3 generators
/home/user/exabgp/src/exabgp/reactor/listener.py                       1 generator
/home/user/exabgp/src/exabgp/reactor/network/tcp.py                    6 generators
/home/user/exabgp/src/exabgp/reactor/network/connection.py             3 generators, 18 yields
/home/user/exabgp/src/exabgp/reactor/network/outgoing.py               4 generators
/home/user/exabgp/src/exabgp/reactor/network/incoming.py               4 generators
/home/user/exabgp/src/exabgp/reactor/api/processes.py                  1 generator
/home/user/exabgp/src/exabgp/reactor/api/command/announce.py          30 generators, 69 yields  [CRITICAL]
/home/user/exabgp/src/exabgp/reactor/api/command/neighbor.py           5 generators, 4 yields
/home/user/exabgp/src/exabgp/reactor/api/command/rib.py                6 generators, 5 yields
/home/user/exabgp/src/exabgp/reactor/api/command/watchdog.py           4 generators, 4 yields
/home/user/exabgp/src/exabgp/reactor/api/command/reactor.py            1 generator

BGP MESSAGE MODULE - Protocol Parsing (5 files)
---------
/home/user/exabgp/src/exabgp/bgp/message/update/__init__.py            4 generators, 8 yields
/home/user/exabgp/src/exabgp/bgp/message/update/attribute/attributes.py 4 generators, 13 yields
/home/user/exabgp/src/exabgp/bgp/message/update/attribute/mprnlri.py   3 generators, 5 yields
/home/user/exabgp/src/exabgp/bgp/message/update/attribute/mpurnlri.py  3 generators, 5 yields
/home/user/exabgp/src/exabgp/bgp/message/update/attribute/aigp.py      2 generators, 2 yields
/home/user/exabgp/src/exabgp/bgp/message/refresh.py                    1 generator

CONFIGURATION MODULE - Config Parsing (5 files)
---------
/home/user/exabgp/src/exabgp/configuration/core/tokeniser.py           6 generators, 6 yields
/home/user/exabgp/src/exabgp/configuration/core/format.py              6 generators, 10 yields
/home/user/exabgp/src/exabgp/configuration/flow/parser.py             16 generators, 21 yields
/home/user/exabgp/src/exabgp/configuration/announce/__init__.py        3 generators, 5 yields
/home/user/exabgp/src/exabgp/configuration/static/route.py             1 generator

RIB MODULE - Route Information Base (2 files)
---------
/home/user/exabgp/src/exabgp/rib/outgoing.py                           2 generators, 8 yields
/home/user/exabgp/src/exabgp/rib/cache.py                              1 generator, 1 yield

CLI MODULE - Command-Line Interface (1 file)
---------
/home/user/exabgp/src/exabgp/cli/completer.py                          9 generators, 21 yields

NETLINK MODULE - OS Integration (4 files)
---------
/home/user/exabgp/src/exabgp/netlink/old.py                            5 generators, 7 yields
/home/user/exabgp/src/exabgp/netlink/message.py                        4 generators
/home/user/exabgp/src/exabgp/netlink/netlink.py                        3 generators
/home/user/exabgp/src/exabgp/netlink/attributes.py                     3 generators

UTILITY & SUPPORTING MODULES (6 files)
---------
/home/user/exabgp/src/exabgp/util/__init__.py                          2 generators, 2 yields
/home/user/exabgp/src/exabgp/util/od.py                                1 generator
/home/user/exabgp/src/exabgp/environment/environment.py                3 generators, 5 yields
/home/user/exabgp/src/exabgp/protocol/resource.py                      2 generators, 2 yields
/home/user/exabgp/src/exabgp/protocol/ip/__init__.py                   2 generators, 2 yields
/home/user/exabgp/src/exabgp/conf/yang/code.py                         5 generators, 8 yields


================================================================================
TEST FILES WITH GENERATORS (3 files)
================================================================================

/home/user/exabgp/tests/unit/test_connection_advanced.py               22 generator functions
/home/user/exabgp/tests/fuzz/test_connection_reader.py                 2 generator functions
/home/user/exabgp/tests/unit/test_route_refresh.py                     1 generator function

Additional test files with generator expressions (15+ files)
/home/user/exabgp/tests/fuzz/test_update_eor.py
/home/user/exabgp/tests/fuzz/test_update_integration.py
/home/user/exabgp/tests/fuzz/test_update_message_integration.py
/home/user/exabgp/tests/unit/test_attributes.py
/home/user/exabgp/tests/unit/test_communities.py
/home/user/exabgp/tests/unit/test_multiprotocol.py
/home/user/exabgp/tests/unit/test_path_attributes.py
/home/user/exabgp/tests/unit/test_protocol_handler.py
/home/user/exabgp/tests/fuzz/update_helpers.py
/home/user/exabgp/tests/unit/test_decode.py
/home/user/exabgp/tests/unit/test_ipvpn.py
/home/user/exabgp/tests/unit/test_bgpls.py
/home/user/exabgp/tests/unit/test_rtc.py
/home/user/exabgp/tests/unit/test_sr_attributes.py
/home/user/exabgp/tests/unit/test_update_message.py


================================================================================
ASYNC/AWAIT USAGE (1 file only)
================================================================================

/home/user/exabgp/qa/sbin/bgp                                          Test utility using asyncio


================================================================================
KEY INFRASTRUCTURE - CUSTOM ASYNC FRAMEWORK
================================================================================

/home/user/exabgp/src/exabgp/reactor/asynchronous.py                  ASYNC class - Generator scheduler
/home/user/exabgp/src/exabgp/reactor/loop.py                           Main event loop - calls async.run()


================================================================================
PRIORITY FOR CONVERSION
================================================================================

CRITICAL (Must Convert First) - 58 generators
-----
1. API Command Handlers (announce.py)             30 generators - Routes announcements/withdrawals
2. Protocol Handler (protocol.py)                 14 generators - BGP message I/O
3. Peer State Machine (peer.py)                    9 generators - Connection lifecycle
4. Connection Handler (network/connection.py)      3 generators - TCP read/write
5. RIB Generator (outgoing.py)                     2 generators - UPDATE message generation

HIGH (Should Convert) - 50 generators
-----
6. Flow Parser (flow/parser.py)                   16 generators - BGP flow specifications
7. Configuration Parsing (multiple files)         20+ generators - Config tokenization
8. Binary Message Parsing (attributes.py, etc.)   13+ generators - BGP binary protocol
9. Supporting Files (rib.py, neighbor.py, etc.)   10+ generators

MEDIUM (Can Convert Gradually) - 40+ generators
-----
10. Utility Functions (completer.py, util/*, etc.) - CLI, formatting, etc.
11. Netlink Module (netlink/*)                     - OS-specific integration
12. Tests and Test Utilities                       - Mock objects, test helpers


================================================================================
SUMMARY STATISTICS
================================================================================

Total Python Files in Codebase:      412
  Production Code:                   341 files
  Test Code:                         48 files
  Other:                             23 files

Files Using Generators:              44 files
  Production:                        41 files
  Test:                              3 files

Generator Functions:                 ~150 functions
Generator Expressions:               ~70 expressions
Yield Statements:                    ~280+ total yields

Existing Async/Await:                1 file (test utility only)

Migration Complexity:
  High Priority Conversions:         58 generator functions (37%)
  Medium Priority Conversions:        50 generator functions (33%)
  Low Priority Conversions:           40+ generator functions (30%)

Key Challenge:
  - Custom ASYNC framework must be updated/replaced
  - Nested generators in API handlers
  - Multiple for-loops with yields
  - Integration with select.poll() event loop

