Ok, bad choice of words, they aren't illegal, but they are defined in the JavaScript spec as punctuators. In this case you are trying to use them as a notational element to access a specific node in an XFA DOM, which is not how it's intended to be used. Since the JavaScript Interpreter has no idea of these things it doesn't like it.
It works in FormCalc because it is a scripting language designed by us specifically for working with an XFA DOM.
Chris
Adobe Enteprise Developer Support