-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
4,087 additions
and
340 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,24 @@ | ||
[[source]] | ||
|
||
url = "https://pypi.python.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
|
||
[packages] | ||
|
||
attrs = ">=17.0" | ||
pandas = ">=0.22" | ||
plumbum = ">=1.6.6" | ||
numpy = ">=1.12" | ||
six = ">=1.11" | ||
pathlib2 = {version = ">=2.3", markers="python_version < '3.5'"} | ||
enum34 = {version = ">=1.1", markers="python_version < '3.4'"} | ||
|
||
lark-parser = ">=0.6.3" | ||
|
||
[dev-packages] | ||
|
||
graphviz = ">=0.8.2"" | ||
graphviz = ">=0.8.2" | ||
pytest = "*" | ||
jupyter = {extras = ["all"]} | ||
sphinx = "*" | ||
sphinx-rtd-theme = "*" | ||
|
||
jupyterlab = "*" | ||
ipykernel = "*" | ||
decaylanguage = {editable = true, path = "."} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
start : _NEWLINE? (line _NEWLINE)+ | ||
|
||
?line : cplx_decay_line | cart_decay_line | invert_line | constant | variable | options | event_type | ||
|
||
options : fast_coherent_sum | output | nevents | ||
|
||
fast_coherent_sum : "FastCoherentSum::UseCartesian" INT | ||
output : "Output" ESCAPED_STRING | ||
nevents : "nEvents" INT | ||
event_type : "EventType" particle particle+ | ||
|
||
constant : particle SIGNED_NUMBER | ||
variable : particle fix SIGNED_NUMBER SIGNED_NUMBER | ||
cplx_decay_line : decay fixed_cplx fixed_cplx | ||
cart_decay_line : decay fixed_cplx | ||
|
||
// Particle could have a number in front | ||
// TODO: This could pull out the - or -NUMBER* part | ||
invert_line : particle "=" particle | ||
|
||
fixed_cplx : fix SIGNED_NUMBER SIGNED_NUMBER | ||
|
||
fix : "0" -> free | ||
| "2" -> fixed | ||
|
||
decay : particle ( decaytype? subdecay )? | ||
|
||
decaytype : "[" (spinfactor | lineshape) (";" lineshape)? "]" | ||
|
||
spinfactor : SPIN | ||
lineshape : LINESHAPE | ||
|
||
particle : LABEL | ||
|
||
subdecay : "{" decay "," decay "}" | ||
|
||
// Terminal defintions | ||
|
||
%import common.WS_INLINE | ||
%import common.SIGNED_NUMBER | ||
%import common.DIGIT | ||
%import common.INT | ||
%import common.LETTER | ||
%import common.ESCAPED_STRING | ||
|
||
SPIN : "S" | "P" | "D" | ||
LINESHAPE : CHAR (CHAR | ".")+ | ||
CHAR : LETTER | DIGIT | "_" | "/" | ||
PRIME : "'" | ||
STAR : "*" | ||
PARENS : "(" | ")" | ||
LABEL : ( CHAR | DIGIT | PRIME | STAR | "::" | "+" | "-" | PARENS )+ | ||
COMMENT : /[#][^\n]*/ | ||
_NEWLINE: ( /\r?\n[\t ]*/ | COMMENT )+ | ||
|
||
// We should ignore comments | ||
%ignore COMMENT | ||
|
||
// Disregard spaces in text | ||
%ignore WS_INLINE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
start : _NEWLINE? (line _NEWLINE)+ ("End" _NEWLINE)? | ||
?line : define | pythia_def | alias | chargeconj | commands | decay | cdecay | setlspw | ||
|
||
pythia_def : "PythiaBothParam" LABEL ":" LABEL "=" (LABEL | SIGNED_NUMBER) | ||
|
||
setlspw : "SetLineshapePW" label label label value | ||
|
||
cdecay : "CDecay" label | ||
|
||
define : "Define" label value | ||
|
||
alias : "Alias" label label | ||
|
||
chargeconj : "ChargeConj" label label | ||
|
||
?commands : global_photos | ||
|
||
global_photos : boolean_photos | ||
|
||
boolean_photos : "yesPhotos" -> yes | ||
| "noPhotos" -> no | ||
|
||
decay : "Decay" particle _NEWLINE decayline+ "Enddecay" | ||
decayline : value particle* photos? model _NEWLINE // There is always a ; here | ||
value : SIGNED_NUMBER | ||
photos : "PHOTOS" | ||
|
||
label : LABEL | ||
particle : LABEL // Add full particle parsing here | ||
|
||
model : MODEL_NAME model_options? | ||
model_options : (value | LABEL)+ | ||
|
||
// model : model_generic | ||
// model_helamp : "HELAMP" (SIGNED_NUMBER SIGNED_NUMBER)+ | ||
|
||
// Terminal defintions | ||
// To use a fast parser, we need to avoid conflicts | ||
|
||
%import common.WS_INLINE | ||
%import common.SIGNED_NUMBER | ||
|
||
// New lines filter our comments too, and multiple new lines | ||
_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" | ||
|
||
LABEL : /[a-zA-Z0-9\/\-+*_()']+/ | ||
COMMENT : /[;#][^\n]*/ | ||
|
||
// We should ignore comments | ||
%ignore COMMENT | ||
|
||
// Disregard spaces in text | ||
%ignore WS_INLINE |
Oops, something went wrong.