Commit a4b10a48 authored by Maxime Perrotin's avatar Maxime Perrotin

Fix script to cope with latest ASN1SCC

CHOICE type now have a separate _selection type for the choice
discriminant. This broke the script that extracted the constants from
the .h file generated by asn1scc
parent dbd8d780
......@@ -15,10 +15,13 @@ There is no name clash thanks to the rename policy of the ASN.1 compiler
for line in open(sys.argv[1] + '.h', 'r'):
if '_PRESENT' in line and not line.startswith('#define'):
choices.append(line.strip().replace(",", ""))
bEnum = False
elif line.strip().startswith('typedef enum {'):
bEnum = True
elif line.strip().startswith('}') and bEnum:
bEnum = False
elif '_NONE' in line or '_PRESENT' in line:
bEnum = False
elif bEnum:
enums.append(line.strip().replace(",", "").split("="))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment