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 is used to store all objects and files relevant to parser used by Splicer to be able to recompile the parser with Canopy. This should be done only in cases when there is a change required in grammar (for example when adding a new splicing feature).

PEG Grammar (file TM1RuleGrammar.peg)

The grammar is defined in TM1RuleGrammar.peg file and contains parsing rules defining accepted syntax and custom actions that call methods defined in Parser/TM1RuleParser class. The grammar follows PEG notation required by Canopy compiler generator. The grammar serves as input for Canopy when generating new TM1RuleGrammar.py parser.

TM1RuleGrammar (class in Parser/Grammar/TM1RuleGrammar.py)

Content of the file is completely generated by Canopy based on the PEG Grammar described above. Thus there are no manual modifications allowed, all modifications must be provided through the PEG Grammar so the changes are persistent between generating each parser version.

The parser might be generated by running the compile_peg.bat file contained in the package. You should have Canopy installed on your system to be able to properly run the compilation process. Please refer to https://canopy.jcoglan.com for installation instructions.

  • No labels