In This Article

Free Languages

SyntaxEditor includes over 20 free syntax language implementations that can be used in your applications, everything from C# and VB, to HTML, CSS, Java, and more.

Plain Text Language

The plain text language is included as a syntax language to use when no other language is applicable. Since the ICodeDocument.Language property cannot be set to a null value, the plain text language is the ideal language to use when a document doesn't need a language implementation assigned.

The plain text language can be retrieved via the SyntaxLanguage.PlainText property.

Open Source Languages with a Dynamic Lexer

There are a number of open source languages included that use a dynamic lexer.

The languages each have a language project that can be opened and edited using the Language Designer tool. That tool allows you to modify information about a language in a language project and generate code for the language based on the project. Language project files are located in this folder relative to the Sample Browser project's root:

\ProductSamples\SyntaxEditorSamples\Languages\Projects

Important

The language projects all specify a relative code generation output path that may not be present on other machines. The Language Designer will warn you with an error when building the language projects if the path does not exist on your machine. In that case, simply change to the code generation output path to another location that is valid for your machine.

Each of the languages that have language projects in the folder above have had a language definition file code-generated by the Language Designer tool. The language definition files can be distributed with your applications and loaded at run-time. Language definition files are located in this folder relative to the Sample Browser project's root:

\ProductSamples\SyntaxEditorSamples\Languages\Definitions

This is the list of languages included:

Language Name Project Filename Definition Filename
Assembly Assembly.langproj Assembly.langdef
Batch File BatchFile.langproj BatchFile.langdef
C C.langproj C.langdef
C# CSharp.langproj CSharp.langdef
C++ Cpp.langproj Cpp.langdef
CSS Css.langproj Css.langdef
HTML Html.langproj Html.langdef
INI File IniFile.langproj IniFile.langdef
Java Java.langproj Java.langdef
JavaScript JavaScript.langproj JavaScript.langdef
Lua Lua.langproj Lua.langdef
Markdown Markdown.langproj Markdown.langdef
MSIL Msil.langproj Msil.langdef
Pascal Pascal.langproj Pascal.langdef
Perl Perl.langproj Perl.langdef
PHP Php.langproj Php.langdef
PowerShell PowerShell.langproj PowerShell.langdef
Python Python.langproj Python.langdef
RTF Rtf.langproj Rtf.langdef
Ruby Ruby.langproj Ruby.langdef
SQL Sql.langproj Sql.langdef
VB VB.langproj VB.langdef
VBScript VBScript.langproj VBScript.langdef
XAML Xaml.langproj Xaml.langdef
XML Xml.langproj Xml.langdef

Creating a New Language

Don't see a language listed above that fits your needs? No problem!

One option if one of the languages above is close to your language syntactically, is to copy the related language project file, and open your copied language project in the Language Designer tool to change its lexer configuration and other features appropriately.

Another option is to use the Language Designer tool to create a new language project from scratch. It has a bunch of helpful features to get you up and running quickly with a custom syntax language implementation.

Be sure to read through the Language Creation Guide for details on what a syntax language is and what features are available to be added to a language. That is essential information for building your own syntax language.