This is an old revision of the document!


Syntax schema definition

Here you can find basic description of HippoEDIT syntax schema structure and navigate to more detailed topics.

The definition of the programming language (syntax) in HippoEDIT is based on two files: {lang_name}_spec.xml and {lang_name}_user.xml. Names of the file is not important – definition recognized by XML header. {lang_name}_spec.xml contains general definition of the syntax and is obligatory. {lang_name}_user.xml contains definition of the user specific settings for language (such as code templates, programming language specific tools, language help urls etc.) and is optional. Definition files should be placed in directory defined in Tools → Options → General → Settings Path. By default this is {Installation Directory}\data\syntax.

To create your own syntax I would suggest to search some existing schema for language similar to one you want to have and copy + rename files. Then open new files and search for something similar to this:

<SYNTAX id="asm" name="ASM" inherit="def_source" inherit_url="defsource_spec.xml">
  • id (any string, preferable low case, without spaces and symbol : ) – unique id of the language (obligatory)
  • name (any string) – description of the language that would be used in UI
  • inherit (any id) – name of base (parent) schema. New schema would inherit all settings, styles of parent. Normally you need to inherit from def or def_text or def_source. These schemes contain base definition for styles, without them a lot of functionality would not be available.
  • inhertit_url (file path, relative or absolute) – name of parent schema file. Used only fir navigation between schemes when opened in browser (optional).

After creating of the definition files and copying them into {Data} folder, HippoEDIT should load definitions and display them in Available Languages list (Tools→Options→Available Languages).

  • There is no specific order in XML tags necessary. But for keywords it is better to keep alphabetic order - this way internal loading faster.
  • All tags and attribute name are CASE SENSITIVE.
  • All not English text should be correctly encoded in UTF-8
  • You can use comments, comment some parts etc.
The easiest way to start with creating of new syntax schema, is to import one of of the existing syntax definitions from other editors with help of Syntax Tools plugin.