In principle my question is answered here, but in my case the variables are not simply X or Y, but pretty complex. My expression looks like
"plc3.gs_Data[1].tag1 + plc3.gs_Data[1].tag2"
and I would like to get a List {"plc3.gs_Data[1].tag1", "plc3.gs_Data[1].tag2"} as result, but NCalc.Compile() throws an Exception "missing EndOfFile at line 1:6" (which is the first character after the first period). Adding quotes around the parameters doesn't help.