When the included GLM from a #include () macro contains macros or comments, the GLM compile fails.
Steps to reproduce
File test.glm:
#include (echo "#print test")
Shell:
gridlabd test.glm
Output:
/tmp/test.glm(1): syntax error at '#print test...'
Expected behavior
Output:
/tmp/test.glm(1): test
System information
GridLAB-D version: HiPAS GridLAB-D 4.3.3-231006 (develop) Darwin
Operating system: Darwin MacBook-Pro-2.local 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:17 PST 2023; root:xnu-8796.101.5~3/RELEASE_X86_64 x86_64
Problem description
When the included GLM from a
#include ()
macro contains macros or comments, the GLM compile fails.Steps to reproduce
File
test.glm
:Shell:
Output:
Expected behavior
Output:
System information
HiPAS GridLAB-D 4.3.3-231006 (develop) Darwin
Darwin MacBook-Pro-2.local 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:17 PST 2023; root:xnu-8796.101.5~3/RELEASE_X86_64 x86_64
Workaround
Replace
#include (COMMAND)
with