Skip to content

Instantly share code, notes, and snippets.

@mtrovo
Created February 13, 2012 01:49
Show Gist options
  • Save mtrovo/1812611 to your computer and use it in GitHub Desktop.
Save mtrovo/1812611 to your computer and use it in GitHub Desktop.
Sintax highlighting for gedit 3 and GtkSourceView 3 for MonitorScript language used on Progress Apama product. This was based on Progress Apama version 4.2.
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Moises Trovo <moises.trovo@gmail.com>
Copyright (C) 2012 Moises Trovo <moises.trovo@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-->
<language id="monitorscript" _name="MonitorScript" version="2.0" _section="Sources">
<metadata>
<property name="globs">*.mon</property>
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
</metadata>
<styles>
<style id="escaped-character" _name="Escaped Character" map-to="def:special-char"/>
<style id="string" _name="String" map-to="def:string"/>
<!-- Translators: refered to some specific keywords of the language that
allow to get external functionalities -->
<style id="external" _name="External" map-to="def:preprocessor"/>
<style id="declaration" _name="Declaration" map-to="def:type"/>
<style id="storage-class" _name="Storage Class" map-to="def:type"/>
<style id="scope-declaration" _name="Scope Declaration" map-to="def:type"/>
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
<style id="null-value" _name="Null Value" map-to="def:special-constant"/>
<style id="boolean" _name="Boolean value" map-to="def:boolean"/>
<style id="number" _name="Number" map-to="def:decimal"/>
<style id="reserved" _name="Future Reserved Keywords" map-to="def:reserved"/>
<style id="type" _name="Data Type" map-to="def:type"/>
</styles>
<definitions>
<define-regex id="escaped-character" extended="true">
\\( # leading backslash
[\\\"\'nrbtf] # escaped character
)
</define-regex>
<context id="string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<include>
<context id="escaped-character" style-ref="escaped-character">
<match>\%{escaped-character}</match>
</context>
</include>
</context>
<context id="externals" style-ref="external">
<keyword>package</keyword>
</context>
<context id="declarations" style-ref="declaration">
<keyword>action</keyword>
<keyword>as</keyword>
<keyword>event</keyword>
<keyword>import</keyword>
<keyword>monitor</keyword>
<keyword>returns</keyword>
<keyword>wildcard</keyword>
</context>
<context id="primitive-types" style-ref="type">
<keyword>boolean</keyword>
<keyword>chunk</keyword>
<keyword>context</keyword>
<keyword>dictionary</keyword>
<keyword>float</keyword>
<keyword>integer</keyword>
<keyword>listener</keyword>
<keyword>location</keyword>
<keyword>sequence</keyword>
<keyword>string</keyword>
</context>
<context id="flow" style-ref="keyword">
<keyword>and</keyword>
<keyword>break</keyword>
<keyword>call</keyword>
<keyword>continue</keyword>
<keyword>currentTime</keyword>
<keyword>die</keyword>
<keyword>else</keyword>
<keyword>emit</keyword>
<keyword>enqueue</keyword>
<keyword>for</keyword>
<keyword>if</keyword>
<keyword>in</keyword>
<keyword>log</keyword>
<keyword>or</keyword>
<keyword>print</keyword>
<keyword>return</keyword>
<keyword>route</keyword>
<keyword>spawn</keyword>
<keyword>then</keyword>
<keyword>to</keyword>
<keyword>try</keyword>
<keyword>while</keyword>
</context>
<context id="eventTemplate" style-ref="keyword">
<keyword>all</keyword>
<keyword>at</keyword>
<keyword>completed</keyword>
<keyword>not</keyword>
<keyword>on</keyword>
<keyword>unmatched</keyword>
<keyword>wait</keyword>
<keyword>xor</keyword>
</context>
<context id="memory" style-ref="keyword">
<keyword>new</keyword>
</context>
<context id="future-reserved-words" style-ref="reserved">
<keyword>abstract</keyword>
<keyword>aggregate</keyword>
<keyword>ALL</keyword>
<keyword>assert</keyword>
<keyword>bignum</keyword>
<keyword>byte</keyword>
<keyword>case</keyword>
<keyword>catch</keyword>
<keyword>char</keyword>
<keyword>class</keyword>
<keyword>constant</keyword>
<keyword>decimal</keyword>
<keyword>default</keyword>
<keyword>enum</keyword>
<keyword>eval</keyword>
<keyword>except</keyword>
<keyword>extends</keyword>
<keyword>finally</keyword>
<keyword>from</keyword>
<keyword>FROM</keyword>
<keyword>immutable</keyword>
<keyword>implements</keyword>
<keyword>instanceof</keyword>
<keyword>interface</keyword>
<keyword>join</keyword>
<keyword>native</keyword>
<keyword>null</keyword>
<keyword>otherwise</keyword>
<keyword>private</keyword>
<keyword>protected</keyword>
<keyword>public</keyword>
<keyword>runtime</keyword>
<keyword>select</keyword>
<keyword>SELECT</keyword>
<keyword>sortedsequence</keyword>
<keyword>static</keyword>
<keyword>stream</keyword>
<keyword>super</keyword>
<keyword>switch</keyword>
<keyword>sync</keyword>
<keyword>SYNC</keyword>
<keyword>synchronized</keyword>
<keyword>table</keyword>
<keyword>throw</keyword>
<keyword>throws</keyword>
<keyword>transient</keyword>
<keyword>try</keyword>
<keyword>using</keyword>
<keyword>void</keyword>
<keyword>volatile</keyword>
<keyword>window</keyword>
</context>
<context id="boolean" style-ref="boolean">
<keyword>false</keyword>
<keyword>true</keyword>
</context>
<context id="numeric" style-ref="number">
<match extended="true">
(\b([0-9]+|0[xX][0-9a-fA-F]+)[Ll]?\b|
\b(([0-9]+[Ee][-]?[0-9]+|
([0-9]*\.[0-9]+|[0-9]+\.)([Ee][-]?[0-9]+)?)[fFdD]?|
[0-9]+[FfDd]))
</match>
</context>
<context id="monitorscript" class="no-spell-check">
<include>
<context ref="string"/>
<context ref="def:c-like-comment"/>
<context ref="def:c-like-comment-multiline"/>
<context ref="def:c-like-close-comment-outside-comment"/>
<context ref="externals"/>
<context ref="declarations"/>
<context ref="primitive-types"/>
<context ref="flow"/>
<context ref="memory"/>
<context ref="eventTemplate"/>
<context ref="future-reserved-words"/>
<context ref="boolean"/>
<context ref="numeric"/>
</include>
</context>
</definitions>
</language>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment