Commit 48946410 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Fixed ASN.1/SDL char conversion (dash/underscore)

parent 2361a814
......@@ -692,7 +692,8 @@ def check_type_compatibility(primary, type_ref, context):
elif isinstance(primary, ogAST.PrimChoiceItem) \
and basic_type.kind.startswith('Choice'):
for choicekey, choice in basic_type.Children.viewitems():
if choicekey.lower() == primary.value['choice'].lower():
if choicekey.lower().replace('-', '_') == \
primary.value['choice'].lower().replace('-', '_'):
break
else:
raise TypeError('Non-existent choice "{choice}" in type {t1}'
......@@ -1112,7 +1113,8 @@ def expression(root, context):
elif root.type == lexer.SELECTOR:
return selector_expression(root, context)
else:
raise NotImplementedError
raise NotImplementedError(sdl92Parser.tokenNames[root.type] +
' - line ' + str(root.getLine()))
def logic_expression(root, context):
......
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