LMD SyntaxEdit Schemes Language Reference


Keywords


Keywords in scheme are described with three XML elements: <KeywordRegex>, <Keyword> and <Keywords>.
 

First, text is searched for <KeywordRegex> as candidate for language keyword.

Second, if text matches for <KeywordRegex>, then it will be checked against scheme’s keyword list, specified by joined <Keyword> and <Keywords> elements. If text ill be found in one of those elements, then keyword token will be produced. Otherwise, id token will be produced.

 

Element: <KeywordRegex>

 

Regexp used for searching language identifiers and keywords.

 

Attribute: regex, type: Regular expression
You can give regexp inside <KeywordRegex> element instead of regex attribute:

Attribute: moreWordSeparators.
This attribute extends default word separator chars, used by \b regexp operator, for this regex attribute only. See topic in regexps section. See the same Scheme attribute also.

Attribute: moreWordChars
This attribute extends default word chars, used by \b regexp operator, for all regexps used in Scheme. See topic in regexps section. See the same Scheme attribute also. For example:

 

<KeywordRegex>\b[a-zA-Z_][\w_]*\b</KeywordRegex>

<KeywordRegex regex='\b[a-zA-Z_][\w_]*\b' />

<!-- 

  Suppose VB scheme:

  This will highlight VB expressions like  

     Session.CreateObject

  correctly: 

  'CreateObject' will not be highlighted as 'keyword'.

  but:

     set bounce = CreateObject("ChilkatBounce.ChilkatBounce")

  will highlight 'CreateObject' as keyword -->

<KeywordRegex moreWordChars='.'>\b[a-zA-Z_][\w_]*\b</KeywordRegex>

<Keywords>CreateObject set dim Execute ...</Keywords>

 

Element: <Keyword>

 

Specifies single keyword in scheme. Keyword is specified inside element:

 

<Keyword>goto</Keyword>

<Keyword>if</Keyword>

<Keyword>then</Keyword>     

 

Element: <Keywords>

 

Specifies list of keywords, separated by spaces, tabs, or newlines:

 

<Keywords>

    asm auto bool break case char const continue

    default do double else enum export

    extern false float for goto if inline int long 

    register return short signed sizeof static 

    switch typedef union unsigned void volatile wchar_t 

    while NULL __try __finally __catch

</Keywords>