I'm consistently seeing this "syntax error" message as well.
Honestly, we've not touched the ICE tool in a few releases. Could you please submit a PR for this? I'm thinking it will be extremely easy for the developers to replicate.
The main thing to remember with ICE is that you're not just running a text editor... It's a "live" NX session, with an editor attached to it. So as you work, you'll always have an NX part open, and you'll be evaluating rules against that part while you work.
You can do this either in conjunction with the NX session, or in a completely standalone mode, but in both cases, the presence of the NX session is a somewhat unique aspect of KF development.
The question comes up from time to time, so let me make a clear statement here: KF is not "going away" by any stretch of the imagination... We use it extensively inside NX for tools like Product Template Studio and Check-Mate, not to mention the evaluation of
all of the modeling expressions in all parts in every session all the time.

KF is a uniquely powerful language for certain specific tasks, but we really don't recommend KF as the first choice for general-purpose NX automation, given the very unique way it behaves, and the challenges in debugging a demand-driven language (which makes traditional breakpoint-based debugging methods virtually impossible.)
I hope that helps, both with the specific problem and with the more general philosophy here.
Thanks!
Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)