kimgr / asn1ate

A Python library for translating ASN.1 into other forms.
Other
69 stars 41 forks source link

Single value constraint handled as a list #14

Closed fzonneveld closed 5 years ago

fzonneveld commented 9 years ago

Creates a list for the SingleValueConstraint. Added some extra examples in builtin_types.asn.

kimgr commented 9 years ago

This still has the CLI changes mixed with the single-value constraint stuff. Did your branching go awry?

I think I'll try to extract the constraint commit from this and try to apply it with some style changes.

fzonneveld commented 9 years ago

Sorry, I will have a look again what I have done. Also do some reading about the branching in github.

Thanks Frank,

On 9 December 2014 at 20:39, Kim Gräsman notifications@github.com wrote:

This still has the CLI changes mixed with the single-value constraint stuff. Did your branching go awry?

I think I'll try to extract the constraint commit from this and try to apply it with some style changes.

— Reply to this email directly or view it on GitHub https://github.com/kimgr/asn1ate/pull/14#issuecomment-66343899.

kimgr commented 9 years ago

Usually what I do is keep my master branch a pure mirror of the upstream repo. Then I create a topic branch for each thing I want to do and send pull requests from these branches. When/if a pull request is accepted, I resync master against the upstream repo, and then rebase my local topic branches. Then I can delete topic branches that have been accepted.

fzonneveld commented 9 years ago

Thanks for the explanation, I just reset my master hard to upstream, I think it worked. If you want another pull request without the CLI stuff, it would be no problem for me to create it like you suggested.

Thanks Frank,

On 9 December 2014 at 21:09, Kim Gräsman notifications@github.com wrote:

Usually what I do is keep my master branch a pure mirror of the upstream repo. Then I create a topic branch for each thing I want to do and send pull requests from these branches. When/if a pull request is accepted, I resync master against the upstream repo, and then rebase my local topic branches. Then I can delete topic branches that have been accepted.

— Reply to this email directly or view it on GitHub https://github.com/kimgr/asn1ate/pull/14#issuecomment-66348683.

kimgr commented 9 years ago

OK, I've just started digging into this (sorry it took so long!)

I think this is fundamentally the wrong way to solve the problem -- you seem to be effectively implementing a narrow subset of the UNION syntax in ASN.1 X.680 46.1.

That said, it enables nice translation of simple integer enumerations, so I think I'll add it anyway :-)

I still want to support ASN.1's full constraint syntax (which is extremely complicated), but I can save that for some other rainy day... I won't merge this PR, especially since there are so many other things intermingled, but I'll pick up the good bits and integrate into mainline asn1ate. Thanks for the help!

kimgr commented 5 years ago

A variant on this is now implemented on master. Thanks for the suggestion. Closing.