Menu

Tree [571b7e] master 2023y08m09d-rename-mandatory_follower_n /
 History

HTTPS access


File Date Author Commit
 TEST 2023-04-12 Frank-Rene Schaefer Frank-Rene Schaefer [33f21d] Fix missing license headers.
 adm 2023-05-12 Frank-Rene Schaefer Frank-Rene Schaefer [75caf5] Refactor towards the concept of a core engine p...
 languages 2023-08-09 Frank-Rene Schaefer Frank-Rene Schaefer [571b7e] Replaced 'mandatory_follower_n' by 'follower_n_...
 podman 2023-05-18 Frank-Rene Schaefer Frank-Rene Schaefer [225f6f] Terminated major refactorings
 .gitignore 2023-06-07 Frank-Rene Schaefer Frank-Rene Schaefer [66101a] Adapting directory structure
 LICENSE.txt 2023-04-12 Frank-Rene Schaefer Frank-Rene Schaefer [66f2af] adding whitespace for test
 README.rst 2023-06-07 Frank-Rene Schaefer Frank-Rene Schaefer [66101a] Adapting directory structure
 generator.py 2023-04-12 Frank-Rene Schaefer Frank-Rene Schaefer [33f21d] Fix missing license headers.
 old_parser.py 2023-04-12 Frank-Rene Schaefer Frank-Rene Schaefer [33f21d] Fix missing license headers.
 option_format.py 2023-04-12 Frank-Rene Schaefer Frank-Rene Schaefer [33f21d] Fix missing license headers.
 options.py 2023-04-12 Frank-Rene Schaefer Frank-Rene Schaefer [33f21d] Fix missing license headers.
 parse_argument.py 2023-04-12 Frank-Rene Schaefer Frank-Rene Schaefer [33f21d] Fix missing license headers.
 parser-else.py 2023-04-18 Frank-Rene Schaefer Frank-Rene Schaefer [2fd85b] setup unit tests for on_match_actions-tests
 parser.py 2023-04-12 Frank-Rene Schaefer Frank-Rene Schaefer [33f21d] Fix missing license headers.
 parser_regular_expressions.py 2023-04-12 Frank-Rene Schaefer Frank-Rene Schaefer [33f21d] Fix missing license headers.

Read Me

PRINCIPLES

The ManiArg core engine shall be designed such that it can be easily transcoded into a wide range of diverse programming languages. It operates utilizing a minimum of language features to maximize the portability of the core engine's code.

Dynamic memory allocation is avoided. First, this serves the goal of applicability in embedded systems and other environments where dynamic memory allocation is not allowed. Second, it supports the minimization of the memory footprint. Since the amount of data processed on the command line is considered negligible, memory footprint and portability was always given preceedence over execution speed in the design of the engine.

A prototype implementation of a backbone engine has been developed in C, which serves as the reference implementation. This engine undergoes rigorous testing procedures, including comprehensive unit tests and static code analysis.

An additional set of unit tests externally interacts with the C engine, achieving 100% code coverage. These tests function as a model for testing implementations in other programming languages.

DESIGN

The design considers the following components:

  • application at run time

    The user's application relies on an API provided by the code generator for its particular application. The application passes the command line argument vector to the parser and interacts with it to access values from the command line.

  • generated code to serve a particular application

    Generated code initializes the core engine by passing a sequence of match instructions to its 'constructor'. Additionally, it may pass chunks of pre-allocated memory. Further, it can produce a list of flag constraints which allow to judge the consistency of the argument vector.

    Generated code is produced to provide access functions to values extracted from the command line. These access functions get information about flags and strings from the core engine. If necessary they interact with converter functions to provide the type required by the user.

Once code has been generated, an application can pass the command line vector to the initialization function of the command line parser. The initialization function initializes the core engine and prepares its parsing. In object orientation.