asn1ate icon indicating copy to clipboard operation
asn1ate copied to clipboard

resolve imported type declarations

Open karlsv opened this issue 8 years ago • 1 comments

I'm not quite sure how imports are handled right now, but it seems I can't use imported types. I'm guessing types are resolved when they are referenced with their module explicitly, with a dot BasicContainer ::= SEQUENCE { someVar SomeModule.SomeType } But it should be possible to use the type without the module reference when it is imported. My guess is that this can be fixed in resolve_type_decl, line 287 in sema.py, with a loop through the imported types if type_decl.module_ref doesn't exist. Will look into it

karlsv avatar Nov 16 '17 10:11 karlsv

Thanks! I did some work on this this summer, but it's still lying around in a branch in one of my machines, and I don't think I ever finished. The challenge is the mapping from asn.1 modules to python modules and their respective symbol lookup/reference syntax.

But please do give it a shot of you have time, it can only get better :)

kimgr avatar Nov 17 '17 06:11 kimgr