[esnacc-dev] [RFC v2 0/2] Python backend
Aaron Conole
aconole at bytheb.org
Tue Jan 10 22:13:06 UTC 2017
This is the second posting of the Python backend. At present, it is
definitely not ready for primetime. However, it can be used to start
generating very simple asn.1 files. As an example, much of the
developer sample 'discovery' app could be successfully encoded / decoded.
CHOICEs, in particular, are not working. Additionally, compound tags are not
working. Finally, tags with code > 128 will also not work.
This only currently supports BER (well, really it's pretty much DER) encoding.
It is intended to release this with 1.10.
Aaron Conole (2):
python: Introduce Python library
ENOTREADY: Python backend
compiler/automake.mk | 5 +
compiler/back-ends/py-gen/gen-any.c | 300 ++++
compiler/back-ends/py-gen/gen-code.c | 2722 ++++++++++++++++++++++++++++++++++
compiler/back-ends/py-gen/rules.c | 569 +++++++
compiler/back-ends/py-gen/rules.h | 36 +
compiler/back-ends/py-gen/types.c | 529 +++++++
compiler/back-ends/str-util.c | 48 +-
compiler/back-ends/str-util.h | 1 +
compiler/core/define.c | 3 +-
compiler/core/snacc.c | 171 ++-
py-lib/.gitignore | 1 +
py-lib/esnacc/__init__.py | 7 +
py-lib/esnacc/asn_base.py | 160 ++
py-lib/esnacc/asn_bool.py | 53 +
py-lib/esnacc/asn_buffer.py | 124 ++
py-lib/esnacc/asn_ints.py | 202 +++
py-lib/esnacc/asn_list.py | 89 ++
py-lib/esnacc/asn_octs.py | 110 ++
py-lib/esnacc/asn_useful.py | 35 +
py-lib/esnacctests/__init__.py | 7 +
py-lib/esnacctests/asn_ints_test.py | 192 +++
21 files changed, 5321 insertions(+), 43 deletions(-)
create mode 100644 compiler/back-ends/py-gen/gen-any.c
create mode 100644 compiler/back-ends/py-gen/gen-code.c
create mode 100644 compiler/back-ends/py-gen/rules.c
create mode 100644 compiler/back-ends/py-gen/rules.h
create mode 100644 compiler/back-ends/py-gen/types.c
create mode 100644 py-lib/.gitignore
create mode 100644 py-lib/esnacc/__init__.py
create mode 100644 py-lib/esnacc/asn_base.py
create mode 100644 py-lib/esnacc/asn_bool.py
create mode 100644 py-lib/esnacc/asn_buffer.py
create mode 100644 py-lib/esnacc/asn_ints.py
create mode 100644 py-lib/esnacc/asn_list.py
create mode 100644 py-lib/esnacc/asn_octs.py
create mode 100644 py-lib/esnacc/asn_useful.py
create mode 100644 py-lib/esnacctests/__init__.py
create mode 100755 py-lib/esnacctests/asn_ints_test.py
--
2.7.4
More information about the dev
mailing list