Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve imported type declarations #59

Open
karlsv opened this issue Nov 16, 2017 · 1 comment
Open

resolve imported type declarations #59

karlsv opened this issue Nov 16, 2017 · 1 comment

Comments

@karlsv
Copy link

karlsv commented Nov 16, 2017

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

@kimgr
Copy link
Owner

kimgr commented Nov 17, 2017

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants