DVT e Language IDE User Guide
Rev. 20.1.41, 20 November 2020

33.8 Syntax Coloring

Source code is colored in the DVT editor. Some language constructs are colored based on a syntactical analysis of the code, while others require a more elaborate semantic analysis, as detailed in the table below. Semantic coloring is only performed when the source code is compiled.

Category Requires compilation Details
ArgumentsyFunction arguments
Comment Hyperlinks  
Comment PragmasyCompilation is required for Custom Pragmas
ConstantsyConst fields, enum members and predefined constants like TRUE, FALSE
Default Any word which does not belong to other categories
Define Groups Syntactical category tag of a define as or define as computed macro
Expansion Literals  
Expansion Replacements  
FieldsyStruct fields and union fields
HDL Paths  
Javadoc Tags  
Keyphrases Combination of keywords: "is a", "keep for each"
MethodsyMethods and time consuming methods
Ports - Input, Inouty 
Ports - Outputy 
Preprocessing Preprocessing #macros
Replacement Terms Constructs like <any>, <exp>, <type>
Section Start/End Begin or end of code section <' and '>
String Literals  
Task Tags  
Typesyscalar types, units, structs
Template Identifiers  
Time Units Time units like ms, ns or ps

You can change the coloring style for each of the categories. Go to Window > Preferences > DVT > e Language > Editor > Syntax Coloring, select the category you wish to modify from the list and set the color and font style.

A code sample in the Syntax Coloring preference page helps you preview the changes instantly. The default style is shown below:

Note: Inside macro definitions and macro calls, only syntactic coloring is performed.