From 2900bba2a2bdfec0cd111b85c4c0a1878ae1c5ed Mon Sep 17 00:00:00 2001 From: Eduardo Rodrigues Date: Wed, 28 Jul 2021 17:51:08 +0200 Subject: [PATCH] Decay model parsing bug fix and preparation of release 0.11.3 (#174) * Fix decay model ordering issue for Lark parsing * CHANGELOG update for new patch release --- CHANGELOG.md | 7 +++++++ src/decaylanguage/data/decfile.lark | 2 +- src/decaylanguage/dec/enums.py | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ff08459..120e212d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## Version 0.11.3 (2021-07-28) + +* Parsing of decay files (aka .dec files): + - Fix to parsing of a couple of decay models (subtletly of Lark parsing priorities). +* Miscellaneous: + - CI updates. + ## Version 0.11.2 (2021-06-24) * Universal representation of decay chains: diff --git a/src/decaylanguage/data/decfile.lark b/src/decaylanguage/data/decfile.lark index 5be60fae..fcc8d4ff 100644 --- a/src/decaylanguage/data/decfile.lark +++ b/src/decaylanguage/data/decfile.lark @@ -54,7 +54,7 @@ _NEWLINE: ( /\r?\n[\t ]*/ | COMMENT ) _SEMICOLON: /;/ // We must set priorities here to use lalr - match model name above label, and label above something else -MODEL_NAME.2 : "BaryonPCR"|"BCL"|"BGL"|"BT02PI_CP_ISO"|"BTO3PI_CP"|"BTOSLLALI"|"BTOSLLBALL"|"BTOXSGAMMA"|"BTOXSLL"|"CB3PI-MPP"|"CB3PI-P00"|"D_DALITZ"|"ETAPRIME_DALITZ"|"ETA_DALITZ"|"ETA_FULLDALITZ"|"ETA_PI0DALITZ"|"FLATQ2"|"GENERIC_DALITZ"|"GOITY_ROBERTS"|"HELAMP"|"HQET"|"HQET2"|"ISGW"|"ISGW2"|"LbAmpGen"|"LLSW"|"MELIKHOV"|"OMEGA_DALITZ"|"PARTWAVE"|"PHSP"|"PI0_DALITZ"|"PROPSLPOLE"|"PVV_CPLH"|"PYC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IX"|"TAUHADNU"|"TAULNUNU"|"TAUSCALARNU"|"TAUVECTORNU"|"TSS"|"TVP"|"TVS_PWAVE"|"VLL"|"VSP_PWAVE"|"VSS_BMIX"|"VSS_MIX"|"VSS"|"VUB"|"VVPIPI"|"VVP"|"VVS_PWAVE"|"YMSTOYNSPIPICLEO" LABEL : /[a-zA-Z0-9\/\-+*_()']+/ COMMENT : /[#][^\n]*/ diff --git a/src/decaylanguage/dec/enums.py b/src/decaylanguage/dec/enums.py index e72b2704..ca2efbea 100644 --- a/src/decaylanguage/dec/enums.py +++ b/src/decaylanguage/dec/enums.py @@ -40,10 +40,10 @@ class PhotosEnum(IntEnum): "GENERIC_DALITZ", "GOITY_ROBERTS", "HELAMP", - "HQET", "HQET2", - "ISGW", + "HQET", "ISGW2", + "ISGW", "LbAmpGen", "LLSW", "MELIKHOV",