Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The package represents parsing functionality of Splicer and contains following classes:

  • TM1RuleParser - implements custom actions that get called from the generated parser to create object tree representing parsed TM1 rule.

  • ArgumentParser - implements CLI parsing and is used by Splicer.py to run required actions by instantiating TM1SpliceExecutor and running its method corresponding to the action required from CLI.

TM1RuleParser (class in TM1RuleParser.py)

This class is responsible to translate parsed rule into objects in memory that represent the parsed syntax. Methods with name starting with make_ or add_match custom actions as defined in TM1RuleGrammar.peg (described later). These methods are called during parsing of the TM1 rule and are fed with data from the parser defined in TM1RuleGrammar.py.

ArgumentParser (class in ArgumentParser.py)

The class implements command line parsing and is used by main application defined in Splicer.py.

The class is using argparse library which doesn’t allow too much flexibility as library click does. Consider changing the library to allow better CLI user experience. The class might also serve as support to expose Splicer as a web service and provide basic parsing of web service headers.

  • No labels