autogenerating codes paths in Protocol.py

autogenerating codes paths in Protocol.py

For the discussion of infrastructure improvements and changes.

Moderator: Moderators

Post Reply
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

autogenerating codes paths in Protocol.py

Post by Silentwings »

A while ago I wrote some code that searches through the AST tree of Uberserver code, and tracks the possible paths the server takes in response to incoming protocol commands. Then, with some hacks, for each incoming command I outputted a list of (i) the outgoing commands that might be sent as a response (ii) the lines of code which send these responses. It's fairly accurate. E.g. https://pastebin.com/hgmsEPBR

Here's the code. It's only going to be useful to someone trying to fix up the lobby protocol docs after they fall into dis-repair (which is what I was doing). Leaving it here in case someone wants it years into the future..
Attachments
parse_Protocol.py
(3.03 KiB) Downloaded 15 times
Post Reply

Return to “Infrastructure Development”