This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Currently, GLF/Schliemann only allows the .nbs author to transition to a named lexical state, but to facilitate the development of syntax definitions for highly context-dependent languages (like XQuery, for example), .nbs syntax definition files need to allow transitioning to the _previous_ lexical state when the name of that state may not be known. For example, when I come across a left brace '}' token in an XQuery expression, I may need to simply retain the current DEFAULT state or, if the expression was inside an XML element or attribute, I will need to revert to the previous XML_ELEMENT or XML_ATTRIBUTE lexical state. Or, as another example, comments in XQuery can be nested, so if I come across an end comment ":)" token, I will need to return the state before the last begin comment "(:" token, which may be the DEFAULT state or the IN_COMMENT state. Currently, the only way I have found to correctly handle cases such as these is to use the language embedding feature which, to my mind, is less than ideal, as XQuery really has no language embedding.