What are TGBegin/TGEnd, ... in the wordfile?

Syntax highlighting, code folding, brace matching, code indenting, and function list

What are TGBegin/TGEnd, ... in the wordfile?

Postby Taoism » Tue Aug 28, 2012 11:31 am

Hi all,

Is there a page that explains in detail what these switches are for? I don't see them listed in the online documentation. Maybe I missed them in one of the stickies?
Taoism
Newbie
 
Posts: 2
Joined: Wed Aug 08, 2012 10:19 am

Re: What are TGBegin/TGEnd, ... in the wordfile?

Postby Mofi » Tue Aug 28, 2012 12:48 pm

They are not document respectively explained as:

  1. It can be easily seen on wordfile c_cplusplus.uew installed with UltraEdit for which purpose those keywords for the hierarchical function list feature introduced with UE v16.00 are used for.
  2. Users don't need to know anything about them as configuration for the hierarchical function strings can be done in UltraEdit and therefore there is no need to define them directly in the wordfile (and make mistakes in the hierarchic resulting in a not working function string feature). Just right click into Function List view and left click on context menu item Configuration to open the dialog for configuring the function strings for the current syntax highlighting language.
The names of those keywords are perhaps build from:

TGBegin ... tree group begin
TGEnd ... tree group end
TGFindStr ... tree group find string
TGFindBStart ... tree group find block start string
TGFindBEnd ... tree group find block end string
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 3937
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: What are TGBegin/TGEnd, ... in the wordfile?

Postby min2max » Mon Dec 10, 2012 7:41 am

An concrete example would be helpful.

Which version of Regex is used here? UltraEdit, Unix, or Perl?
min2max
Basic User
Basic User
 
Posts: 18
Joined: Mon Dec 10, 2012 5:41 am

Re: What are TGBegin/TGEnd, ... in the wordfile?

Postby Mofi » Mon Dec 10, 2012 9:11 am

If you need an example, use syntax highlighting language C/C++ as defined in c_cplusplus.uew installed with UltraEdit.

Open a file with file extension C or CPP and it will be highlighted with C/C++. Open the function list for example via View - Views/Lists - Function List, right click into the function list and left click on last context menu item Configuration.

Or alternatively open Advanced - Configuration - Function List, select language C/C++ and click on button Modify Groups.

The regular expressions are by default for the UltraEdit regular expression engine. Unix regexp engine is not supported. Perl regular expression engine can be used with adding manually to the wordfile the line

/Regexp Type = Perl

as explained on syntax highlighting help page and on Template for syntax highlighting language wordfile.

There is no option in the dialog for creating the expressions for choosing the regular expression engine.

As written at Subgroups in function list using Perl regular expressions (and some other topics in syntax highlighting forum) UltraEdit v18.20.0.1028 uses the Perl regular expression engine when above line exists only for the regular expression searches in top level of the hierarchy. For subgroups always the UltraEdit regular expression is used which of course is inconsistent and will be hopefully changed in a future version. Therefore the UltraEdit regular expression engine should be used if that engine is enough which is the case for 99% of all wordfiles. The greater power of Perl regular expressions is really needed only rarely.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 3937
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: What are TGBegin/TGEnd, ... in the wordfile?

Postby min2max » Mon Dec 10, 2012 9:00 pm

Thank you Mofi.
min2max
Basic User
Basic User
 
Posts: 18
Joined: Mon Dec 10, 2012 5:41 am


Return to Syntax Highlighting