piraha incorrectly removes newline from first line of multi-line string
Issue #2443
resolved
This parfile:
ActiveThorns = "IOUtil
Cactus"
results in an error:
$ exe/cactus_sim -S firstline.par
[...]
Activating thorn Cactus...Success -> active implementation Cactus
Activation requested for
--->IOUtilCactus <---
Error: Thorn IOUtilCactus not found
Activation failed - 1 errors in activation sequence
WARNING level 0 from host ekohaes8 process 0
in thorn Cactus, file /data/rhaas/postdoc/gr/cactus/ET_trunk/src/main/SetParams.c:93:
-> CCTKi_SetParameter: Error at line 1 in parameter file firstline.par while activating thorns
since the parser incorrectly removed whitespace (a newline) at the end of the first line of the multi-line ActiveThorns value.
My (untested) guess is that these lines in par.peg
is repsonsible:
stringfirstline = .
stringcomment = #.*
stringparser = ^({var}|{name}|{stringfirstline})*(\n({stringcomment}|{var}|{name}|{any})*)?$
since it will make the \n
in (\n({stringcomment}|…
not part of a stringcomment,
a var
, a name
or an any
group.
Comments (8)
-
reporter -
reporter Pull request:
https://bitbucket.org/cactuscode/cactus/pull-requests/111/cactus-handle-first-line-of-string-in
addresses this issue.
-
reporter It also “normalizes” the activethorns list in the log output to be a single space separated list.
-
reporter Please review.
-
reporter - changed status to open
-
reporter - changed milestone to ET_2020_11
-
reporter -
reporter - changed status to resolved
- Log in to comment
@Steven R. Brandt this is piraha / PEG bug. Will you have time to look into it (you are most qualified)?