How to fix parsing issues in decfiles?
Morning @kreps, @adavis, while exchanging and working on some DecayLanguage package enhancements for the "simulation wizard" under development by @admorris and others, we discussed certain issues in parsing dec files. @admorris mentioned that he could parse just about everything with his enhancements and that triggered me to check matters to improve even more DecayLanguage.
Turns out, I can at present parse everything but 7 out of the 7831 decfiles in version v32r9. Not bad! Along the way I had to correct tiny things that seem to be ignored by EvtGen. At large I noticed the following:
- Encoding errors for certain characters such as
ó
. That can be because I'm on Windows but no harm in fixing special characters that should not be in the files. - Spurious lines of the kind
~
. Strange that this goes unnoticed but my parser is strict and such lines anyway look like a bug. - Spurious end of decay lines with
;2
instead of;
. This is harmless but, again, my parser is strict, which is not a bad thing IMO.
[Yes the whole test took about 14 minutes. That's reasonable given that it parsed and constructed the chains of millions in the job. For reference parsing the whole DECAY.DEC with 10k-ish lines takes approximately 2 seconds, storing all info in there.]
The updates I'm suggesting to commit make no change to physics or anything, hence safe. Assuming you welcome such an update, to where would you like me to commit the fixes?
Many thanks and let me know soon so that I tick this off.