Skip to content
/ py-osc2 Public

PMSF py-osc2 package for working with ASAM OpenSCENARIO 2.x files

License

Notifications You must be signed in to change notification settings

PMSFIT/py-osc2

Repository files navigation

PMSF py-osc2 Framework

Build and Publish to PyPI PyPI Latest Release Package Status License Downloads

What is it?

PMSF py-osc2 is a Python package for working with ASAM OpenSCENARIO DSL 2.x scenario files.

Note that this package is currently provided as a community service. It is based on the current public review draft of version 2.1.0 of the language, which is non-final, and might include updates based on current developments. It is offered without any support and should be considered draft alpha quality.

Specifically both the public review draft standard, this rendering of the grammar in ANTLR4, and any intermediate fixes might contain errors.

Nor is the rendering of the grammar in ANTLR4 intended for purposes other than the goals of this package.

If you are interested in OpenSCENARIO DSL development, please feel free to contact us directly.

Main features

  • ANTLR4-based parser and lexer for parsing ASAM OpenSCENARIO DSL 2.x files.
  • Simple syntax checking driver osc2parser for parsing and checking ASAM OpenSCENARIO DSL 2.x files.

Where to get it

The source code is currently hosted on GitHub at: https://github.com/PMSFIT/py-osc2

Binary installers for the latest released version are available at the Python Package Index (PyPI).

# or PyPI
pip install py-osc2

Dependencies

When rebuilding the parser from its grammar:

Rebuilding the parser

To rebuild the parser, you need setuptools-antlr in addition to the normal dependencies above:

pip install setuptools-antlr

To rebuild the package with a rebuilt parser, execute:

python setup.py antlr build

or for installing:

python setup.py antlr install

or alternatively to install in development mode:

python setup.py antlr develop

License

(C) 2021-2024 PMSF IT Consulting Pierre R. Mai

MPL 2.0

Documentation

After installation of the package, an executable script, called osc2parser, is available to parse and check ASAM OpenSCENARIO DSL 2.x files:

osc2parser examples/demo.osc

This script can optionally also output a tree-view of the parsed file contents:

osc2parser -t examples/demo.osc

About

PMSF py-osc2 package for working with ASAM OpenSCENARIO 2.x files

Resources

License

Stars

Watchers

Forks

Packages

No packages published