Page tree
Skip to end of metadata
Go to start of metadata

Package definition

A user-defined Universal Analyzer language must be created in the form of a language package. A package consists of a folder whose name is the same as the language name (represented by xxx below). This directory must contain certain files (marked as obligatory below) and can contain other optional files:

File nameDescriptionIs this file obligatory in the Language Package?
xxxMetaModel.xmlA metamodel that describes objects defined in the language together with their characteristics and properties. See xxxMetaModel.xml file for more information.(tick)
xxxLanguagePattern.xmlA language pattern file that describes how to recognize objects within source files using regular expressions. See xxxLanguagePattern.xml - defining how to analyze a language for more information.(tick)
xxxInformationTracking.xmlAn optional file used to reduce the number of incorrect links detected during the analysis of your language with CAST Universal Analyzer. See xxxInformationTracking.xml file for more information.


A set of image iconsThe icons associated with your language's objects for display in CAST Enlighten and in the CAST Discovery Portal - icons are located in a Res subdirectory (a subdirectory of the main package folder). The title of the icon file must match the name of the object. See Binding icons and pictures to object types in Defining a new language for more information.(tick)
xxxCastMetrics.xmlAn optional file used to define custom grep based metrics using regular expressions. See xxxCastMetrics.xml - defining new metrics for a UA language for more information.(error)

An optional file used to pre-process your source code just prior to analysis. This file will contain instructions that will launch a pre-processing action if your source code needs any sort of pre-processing before analysis. See Configuring code pre-processing for your Universal Analyzer language for more information.

plugin\launch.batAn optional file used to execute a third party tool that can analyze source code and generate Quality Rule data. See Configuring a plugin for your Universal Analyzer language for more information.(error)

For example, for the fictitious language "test":

Directory nameTEST
MetaModel nameTESTMetaModel.xml
LanguagePattern nameTESTLanguagePattern.xml
InformationTracking nameTESTInformationTracking.xml
CastMetrics nameTESTCastMetrics.xml
Preprocessing nameprepro\launch.bat - plus any additional files used in the pre-processing action.
Plugin nameplugin\launch.bat - plus any additional files used in the plugin.
Icon image namesEnlightenTEST.ICO, TESTClass.ICO, TESTFunction.ICO, TESTInterface.ICO, TESTMember.ICO, TESTMethod.ICO, TESTProject.ICO

XML file encoding

All XML files used in the Language Package must use the UTF-8 encoding as follows:

  • The XML declaration (the first line of the file) must include the UTF-8 encoding attribute:
<?xml version="1.0" encoding="utf-8" ?>
  • All XML files must be saved in UTF-8 format

Package handling

Instructions for creating and editing the various configuration files are provided in forthcoming pages.

Once your package has been developed, you need to validate it and then include the package files in your custom SDK extension. Please see Configuring CAST to accept your Universal Analyzer language package for more detailed information about this.

  • No labels