Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

We have a plan to introduce Splicer as a web service - this is important as TM1 v12 will no longer support running executable files through ExecuteCommand. Splicer wrapper already has support for the web service call, but Splicer should be added web service endpoint.

Package Parser

Splicer is implemented as an application utilizing parser and providing its rule transformations based on the parser output. Parser is a generated class based on simplified TM1 rule grammar.

Parser is generated by a parser compiler Canopy with output set to Python. Information about Canopy can be found here: https://canopy.jcoglan.com , repository is available here: https://github.com/jcoglan/canopy . Canopy uses PEG (Parsing Expression Grammar) grammar specification, its syntax is described on the project site, theoretical information may be found here: https://en.wikipedia.org/wiki/Parsing_expression_grammar

Package Parser/Grammar

The TM1 grammar implemented in scope of Splicer is covering only area statement of a rule or a feeder statement, the right hand side after equal sign is not used by the parser. Additionally the parser recognizes Splicer specific regions and directives with splicing instructions. The other tokens are ignored by the parser and are passed through.

Package Objects

The architecture of Splicer uses classes in Object package to represent various TM1 syntactical constructs (non-terminal symbols) that the Parser recognized when parsing a TM1 rule. These are described in below table.

...

The creation of objects consistently aligns with the PEG grammar, ensuring that if there's any uncertainty about what each object signifies or encompasses, one can always consult the grammar for clarification.

Package Containers

Similarly as in object case these classes represent syntactical constructs, but in this case owned by Splicer. The classes are containers of objects that are subpackage of Containers with exception of TM1SpliceConfigContainer. These are described in below table.

Class

Usage

TM1DirectiveContainer

Container of all splicing directives represented by objects of TM1Directive class.

TM1DirectiveResolver

Used to retrieve directives that apply to instance of TM1CalcRule. The class implements method of prioritization of directives based on regions in which the directive is enclosed.

TM1RegionContainer

Used to store regions of the TM1 rule, the container stores start and end positions (measured in characters from start of the rule) of each region. Each region might be defined several times in the rule, this feature is supported by TM1RegionStore.

TM1RegionStore

Represents all instances of named region enclosed in pair of #Region and #EndRegion meta-commands.

TM1ReverseDirectiveContainer

Container of desplicing (directives reversing splicing) directives represented by TM1ReverseDirective class instances.

TM1ReverseDirectiveResolver

Used to retrieve reverse directives that apply to instance of TM1CalcRule. The class implements method of prioritization of reverse directives based on regions in which the directive is enclosed.

TM1SpliceConfigContainer

Configuration container responsible for loading configuration from config files connection.json, fpm.json and kpi_template.json. The configuration is consolidated into the object and accessible from there.

Package Containers/Objects

The contained classes represent contained objects by containers described in above paragraph. The classes are described in below table.

...