Skip to content

Commit

Permalink
Add new DecFileParser class, with test suite (#21)
Browse files Browse the repository at this point in the history
* Add new DecFileNotParsed class, with test suite

* [skip ci] More functionality and doc to DecFileParser class and related helper functions

* Method added to build a complete decay chain. More doc on DecFileParser class

* [skip-ci] Add missing model to decfile.lark

* Add more tests

* Clean up tox

* Fix Python < 3.6, add __slots__

* Add new DecFileNotParsed class, with test suite

* [skip ci] More functionality and doc to DecFileParser class and related helper functions

* Method added to build a complete decay chain. More doc on DecFileParser class

* [skip-ci] Add missing model to decfile.lark

* Add more tests
  • Loading branch information
eduardo-rodrigues committed Apr 5, 2019
1 parent 6369662 commit 3f6151c
Show file tree
Hide file tree
Showing 5 changed files with 496 additions and 6 deletions.
4 changes: 2 additions & 2 deletions decaylanguage/data/decfile.lark
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ model_options : (value | LABEL)+
_NEWLINE: ( /\r?\n[\t ]*/ | COMMENT )+

// We must set priorities here to use lalr - match model name above label, and label above something else
MODEL_NAME.2 : "BaryonPCR"|"BTO3PI_CP"|"BTOSLLALI"|"BTOSLLBALL"|"BTOXSGAMMA"|"BTOXSLL"|"CB3PI-MPP"|"CB3PI-P00"|"D_DALITZ"|"ETA_DALITZ"|"GOITY_ROBERTS"|"HELAMP"|"HQET"|"ISGW2"|"OMEGA_DALITZ"|"PARTWAVE"|"PHSP"|"PI0_DALITZ"|"PYTHIA"|"SLN"|"STS"|"SVP_HELAMP"|"SVS"|"SVV_HELAMP"|"TAUHADNU"|"TAULNUNU"|"TAUSCALARNU"|"TAUVECTORNU"|"TSS"|"TVS_PWAVE"|"VLL"|"VSP_PWAVE"|"VSS"|"VSS_BMIX"|"VUB"|"VVP"|"VVPIPI"|"VVS_PWAVE"
MODEL_NAME.2 : "BaryonPCR"|"BTO3PI_CP"|"BTOSLLALI"|"BTOSLLBALL"|"BTOXSGAMMA"|"BTOXSLL"|"CB3PI-MPP"|"CB3PI-P00"|"D_DALITZ"|"ETA_DALITZ"|"GOITY_ROBERTS"|"HELAMP"|"HQET"|"ISGW2"|"OMEGA_DALITZ"|"PARTWAVE"|"PHSP"|"PI0_DALITZ"|"PYTHIA"|"SLN"|"STS"|"SVP_HELAMP"|"SVS"|"SVV_HELAMP"|"TAUHADNU"|"TAULNUNU"|"TAUSCALARNU"|"TAUVECTORNU"|"TSS"|"TVS_PWAVE"|"VLL"|"VSP_PWAVE"|"VSS"|"VSS_BMIX"|"VUB"|"VVP"|"VVPIPI"|"VVS_PWAVE"|"SSD_CP"

LABEL : /[a-zA-Z0-9\/\-+*_()']+/
COMMENT : /[;#][^\n]*/
Expand All @@ -53,4 +53,4 @@ COMMENT : /[;#][^\n]*/
%ignore COMMENT

// Disregard spaces in text
%ignore WS_INLINE
%ignore WS_INLINE

0 comments on commit 3f6151c

Please sign in to comment.