Tíquete #45186

generate_packets.py: Parse input line by line

: 2022-07-22 00:01 Última Atualização: 2022-07-23 19:18

Relator:
Tipo:
Estado:
Fechado
Componente:
Marcos:
Prioridade:
5 - Medium
Gravidade:
5 - Medium
Resolução:
Fixed
Arquivo:
Nenhum

Details

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
Comentário

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

2022-07-23 19:18 Updated by: alienvalkyrie
  • Estado Update from Aberto to Fechado
  • Resolução Update from Nenhum to Fixed

Attachment File List

No attachments

Editar

Please login to add comment to this ticket » Login