Skip to content

Commit 33ff459

Browse files
committed
extract-formats: allow UPPERCASE in field lengths.
For example, @cdecker used a FRAME_SIZE constant in lightning#593 which broke parsing. Signed-off-by: Rusty Russell <[email protected]>
1 parent 773a87e commit 33ff459

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/extract-formats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def main(options, args=None, output=sys.stdout, lines=None):
5858
typeline = re.compile(
5959
'(?P<leading>\s*)1\. (?P<type>((sub)*?type|tlv)):( (?P<value>[-0-9A-Za-z_|]+))? \(?`(?P<name>[A-Za-z2_]+)`\)?( \(`?(?P<option>[^)`]*)`?\))?')
6060
dataline = re.compile(
61-
'\s+\* \[`((?P<size>[_a-z0-9*+]+)`:`(?P<name>[_a-z0-9]+)|(?P<count>[_a-z0-9+]+)(?P<multi>\*)(?P<subtype>[_a-z0-9]+))`\]( \(`?(?P<option>[^)`]*)`?\))?')
61+
'\s+\* \[`((?P<size>[_a-zA-Z0-9*+]+)`:`(?P<name>[_a-z0-9]+)|(?P<count>[_a-z0-9+]+)(?P<multi>\*)(?P<subtype>[_a-z0-9]+))`\]( \(`?(?P<option>[^)`]*)`?\))?')
6262

6363
if lines is None:
6464
lines = fileinput.input(args)

0 commit comments

Comments
 (0)