The pattern you provided is not working. This is what is happening. I define the operators in the default state within an XML file. After the XML is read in, I then create a new LexicalGroup for the variable names. This is because the variables can change all the time. I then insert the variable name token group at the beginning of the lexical groups for the default state. I am only using one lexical state.
By the way, the variable names I listed in my original post don't have to have var in the name. The names can be anything, including any characters and white space. Would the Syntax Editor be able to handle this? For example, it would be perfectly feasable to have "this + is - a > variable.name" as a variable name. If I made sure that I had the right pattern for identifying the variable name token and I made sure that the lexical group for variable names came before anything else in the lexical groups for the default state, would it be possible for the weird variable names to be recognized as lexical tokens? Would I need to create a different state for variable names or a different scope?
Thanks, Brian B.