#2443: piraha incorrectly removes newline from first line of multi-line string
Reporter:Roland Haas
Status:new
Milestone:
Version:
Type:bug
Priority:major
Component:

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.

--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2443/piraha-incorrectly-removes-newline-from