For reasons I won't bore you with, I have a need to create a UDL based on XML, but that also allows/highlights some additional non-XML tags (rather like the formatting tags you get in some forums), e.g.:
[b] .... [/b]
[i] ... [/i]
[p] ... [/p]
[^]
[~]
Two questions:
1) The N++ help suggests that basing a UDL on an existing language is simply a case of selecting the required language, bringing up the UDL dialogue, and selecting 'Save As'. But is doesn't seem to work for me.
2) I can get N++ to identify [b] [i] [p] correctly via the UDL dialogue, but how to code for [/b] etc, or for [^] or [~]? Or do I have to edit an XML file for the UDL?
Any help gratefully received.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
. further to the above, I can get N++ to recognise (for example) '[b]' with a preceding space (e.g. 'blah blah [b] blah blah...') but NOT if it is contiguous with the adjacent text (e.g. blahblah[b]blahblah....'). XML tags don't have this problem, so what am I missing, or is there a bug/restriction in UDL vs. built-in languages?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There are many restrictions. Actually, the UDL system enables defining a single language with some parameters - what the keywords, operators and other stuff are. But hardly any of the byult-in languages could be done properly through the UDL panel.
You may want to read about the main two rules for keyword recognition. They are buried in the Operator panel section.
CChris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For reasons I won't bore you with, I have a need to create a UDL based on XML, but that also allows/highlights some additional non-XML tags (rather like the formatting tags you get in some forums), e.g.:
[b] .... [/b]
[i] ... [/i]
[p] ... [/p]
[^]
[~]
Two questions:
1) The N++ help suggests that basing a UDL on an existing language is simply a case of selecting the required language, bringing up the UDL dialogue, and selecting 'Save As'. But is doesn't seem to work for me.
2) I can get N++ to identify [b] [i] [p] correctly via the UDL dialogue, but how to code for [/b] etc, or for [^] or [~]? Or do I have to edit an XML file for the UDL?
Any help gratefully received.
... and where is the 'Operator panel section' ?
. further to the above, I can get N++ to recognise (for example) '[b]' with a preceding space (e.g. 'blah blah [b] blah blah...') but NOT if it is contiguous with the adjacent text (e.g. blahblah[b]blahblah....'). XML tags don't have this problem, so what am I missing, or is there a bug/restriction in UDL vs. built-in languages?
There are many restrictions. Actually, the UDL system enables defining a single language with some parameters - what the keywords, operators and other stuff are. But hardly any of the byult-in languages could be done properly through the UDL panel.
You may want to read about the main two rules for keyword recognition. They are buried in the Operator panel section.
CChris