Ticket #45186

generate_packets.py: Parse input line by line

Date d'ouverture: 2022-07-22 00:01 Dernière mise à jour: 2022-07-23 19:18

Rapporteur:
Propriétaire:
Type:
État:
Atteints
Composant:
Jalon:
Priorité:
5 - moyen
Sévérité:
5 - moyen
Résolution:
Fixed
Fichier:
Aucun

Détails

Part of #43927. Apart from C-style multiline/block comments, the packets.def format is entirely line-based; however, current parsing code joins its input into one large string and splits it into lines again multiple times. This meta-ticket is about changing it to do everything on a per-line basis.

Things to note:

  • This will mean that type aliases have to be defined before they're used
  • This will also mean that type aliases can no longer be defined inside packet definitions
  • The current packets.def is not affected by either of those things, but it will break any third-party packets.def which does those things
  • Stripping out multiline /* */ comments while working line-by-line is nontrivial but doable

Steps to implement this (in order):

  • Separate Packet header parsing from the rest of Packet initialization #45187
  • Make PacketsDefinition parse the (cleaned) input line by line #45188
  • Make PacketsDefinition clean the the input line by line #45189

Ticket History (3/4 Histories)

2022-07-22 00:01 Updated by: alienvalkyrie
  • New Ticket "generate_packets.py: Parse input line by line" created
2022-07-22 00:19 Updated by: alienvalkyrie
  • Details Updated
2022-07-22 00:42 Updated by: alienvalkyrie
Commentaire

All sub-issues are now in review. Once they are merged, this ticket will be closed.

2022-07-23 19:18 Updated by: alienvalkyrie
  • État Update from Ouvert to Atteints
  • Résolution Update from Aucun to Fixed

Attachment File List

No attachments

Modifier

Please login to add comment to this ticket » Connexion