[esnacc-dev,0/2] Library and Back-end support: Python

Message ID 1485633123-4103-1-git-send-email-aconole@bytheb.org
Headers show
Series
  • Library and Back-end support: Python
Related show

Message

Aaron Conole Jan. 28, 2017, 7:52 p.m.
This 'series' introduces a python library, and code generation back-end.

It is useful to have the option of generating python versions of asn.1 code
for rapid prototyping, interoperability, and because python is a popular
language.

The intent isn't to be completely feature complete out of the gate, but to
provide just enough for initial testing and integration.  More backend work
is needed to have implicit tag, and extension support, among other very
important features.

Aaron Conole (2):
  python: Introduce Python library
  compiler/python: Initial handling of Python code

 NEWS                                 |   3 +
 compiler/automake.mk                 |   5 +
 compiler/back-ends/py-gen/gen-any.c  | 265 ++++++++++
 compiler/back-ends/py-gen/gen-code.c | 929 +++++++++++++++++++++++++++++++++++
 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            | 189 +++++++++++++++++++
 py-lib/esnacc/asn_bool.py            |  53 ++++++
 py-lib/esnacc/asn_buffer.py          | 124 +++++++++++++
 py-lib/esnacc/asn_ints.py            | 356 ++++++++++++++++++++++++++++++++++++
 py-lib/esnacc/asn_list.py            |  98 ++++++++++
 py-lib/esnacc/asn_octs.py            | 112 ++++++++++++
 py-lib/esnacc/asn_useful.py          |  35 ++++
 py-lib/esnacctests/__init__.py       |   7 +
 py-lib/esnacctests/asn_ints_test.py  | 192 +++++++++++++++++++
 22 files changed, 3690 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

Comments

Aaron Conole Feb. 3, 2017, 3 p.m. | #1
Aaron Conole <aconole@bytheb.org> writes:

> This 'series' introduces a python library, and code generation back-end.
>
> It is useful to have the option of generating python versions of asn.1 code
> for rapid prototyping, interoperability, and because python is a popular
> language.
>
> The intent isn't to be completely feature complete out of the gate, but to
> provide just enough for initial testing and integration.  More backend work
> is needed to have implicit tag, and extension support, among other very
> important features.
>
> Aaron Conole (2):
>   python: Introduce Python library
>   compiler/python: Initial handling of Python code

Applied.  This means we now support a very 'basic' form of python
backend.

I'm expecting there will be many additions to this in the future.

-Aaron