Synced with gtksourceview upstream
parent
761e5350a0
commit
159beb8657
|
@ -30,5 +30,6 @@ Makefile(\.in)?$
|
|||
^moo/moopython/pygtk/goocanvas/.cvsignore
|
||||
^patches/
|
||||
^po(-gsv)?/(dist|pot)$
|
||||
^po-gsv/po-(stripped|orig)
|
||||
^ppc-configure$
|
||||
/CVS/
|
||||
|
|
|
@ -227,10 +227,10 @@ detectDE()
|
|||
|
||||
open_kde()
|
||||
{
|
||||
if [ `which khelpcenter` = "" ]; then
|
||||
exec xdg-open "$1"
|
||||
else
|
||||
if (which khelpcenter > /dev/null); then
|
||||
khelpcenter "$1"
|
||||
else
|
||||
exec xdg-open "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ upstream_sources = \
|
|||
upstream/gtksourcelanguage-parser-2.c \
|
||||
upstream/gtksourcelanguagemanager.c \
|
||||
upstream/gtksourcestyle.c \
|
||||
upstream/gtksourcestylemanager.c \
|
||||
upstream/gtksourcestyleschememanager.c \
|
||||
upstream/gtksourcestylescheme.c \
|
||||
upstream/gtksourcestylescheme-noxml.c \
|
||||
upstream/gtktextregion.c \
|
||||
|
@ -34,7 +34,7 @@ upstream_sources = \
|
|||
upstream/gtksourcelanguagemanager.h \
|
||||
upstream/gtksourcestyle-private.h \
|
||||
upstream/gtksourcestyle.h \
|
||||
upstream/gtksourcestylemanager.h \
|
||||
upstream/gtksourcestyleschememanager.h \
|
||||
upstream/gtksourcestylescheme.h \
|
||||
upstream/gtktextregion.h \
|
||||
upstream/gtksourceview-utils.h \
|
||||
|
@ -46,7 +46,7 @@ gtksourceview_sources = \
|
|||
gtksourceiter-mangled.c \
|
||||
gtksourcelanguagemanager-mangled.c \
|
||||
gtksourcestyle-mangled.c \
|
||||
gtksourcestylemanager-mangled.c \
|
||||
gtksourcestyleschememanager-mangled.c \
|
||||
gtktextregion-mangled.c \
|
||||
gtksourceview-utils-mangled.c \
|
||||
gtksourcecontextengine-mangled.h \
|
||||
|
@ -55,7 +55,7 @@ gtksourceview_sources = \
|
|||
gtksourcelanguagemanager-mangled.h \
|
||||
gtksourcestyle-private-mangled.h \
|
||||
gtksourcestyle-mangled.h \
|
||||
gtksourcestylemanager-mangled.h \
|
||||
gtksourcestyleschememanager-mangled.h \
|
||||
gtksourcestylescheme-mangled.h \
|
||||
gtktextregion-mangled.h \
|
||||
gtksourceview-utils-mangled.h
|
||||
|
|
|
@ -4,29 +4,30 @@
|
|||
|
||||
#include "mooedit/gtksourceview/gtksourcelanguage-private-mangled.h"
|
||||
#include "mooedit/gtksourceview/gtksourcelanguagemanager-mangled.h"
|
||||
#include "mooedit/gtksourceview/gtksourcestylemanager-mangled.h"
|
||||
#include "mooedit/gtksourceview/gtksourcestyleschememanager-mangled.h"
|
||||
#include "mooedit/gtksourceview/gtksourceiter-mangled.h"
|
||||
#include "mooedit/gtksourceview/gtksourcestyle-private-mangled.h"
|
||||
|
||||
#define GtkSourceLanguage MooGtkSourceLanguage
|
||||
#define GtkSourceLanguageClass MooGtkSourceLanguageClass
|
||||
#define GtkSourceEngine MooGtkSourceEngine
|
||||
#define GtkSourceLanguageManager MooGtkSourceLanguageManager
|
||||
#define GtkSourceLanguageManagerClass MooGtkSourceLanguageManagerClass
|
||||
#define GtkSourceStyle MooGtkSourceStyle
|
||||
#define GtkSourceStyleScheme MooGtkSourceStyleScheme
|
||||
#define GtkSourceStyleManager MooGtkSourceStyleManager
|
||||
#define GtkSourceStyleManagerClass MooGtkSourceStyleManagerClass
|
||||
#define GtkSourceSearchFlags MooGtkSourceSearchFlags
|
||||
#define GtkSourceLanguage MooGtkSourceLanguage
|
||||
#define GtkSourceLanguageClass MooGtkSourceLanguageClass
|
||||
#define GtkSourceEngine MooGtkSourceEngine
|
||||
#define GtkSourceLanguageManager MooGtkSourceLanguageManager
|
||||
#define GtkSourceLanguageManagerClass MooGtkSourceLanguageManagerClass
|
||||
#define GtkSourceStyle MooGtkSourceStyle
|
||||
#define GtkSourceStyleScheme MooGtkSourceStyleScheme
|
||||
#define GtkSourceStyleSchemeManager MooGtkSourceStyleSchemeManager
|
||||
#define GtkSourceStyleSchemeManagerClass MooGtkSourceStyleSchemeManagerClass
|
||||
#define GtkSourceSearchFlags MooGtkSourceSearchFlags
|
||||
|
||||
#define _gtk_source_language_create_engine _moo_gtk_source_language_create_engine
|
||||
#define _gtk_source_language_get_language_manager _moo_gtk_source_language_get_language_manager
|
||||
#define gtk_source_language_get_metadata _moo_gtk_source_language_get_metadata
|
||||
#define gtk_source_style_manager_new _moo_gtk_source_style_manager_new
|
||||
#define gtk_source_style_manager_set_search_path _moo_gtk_source_style_manager_set_search_path
|
||||
#define gtk_source_style_manager_get_scheme_ids _moo_gtk_source_style_manager_get_scheme_ids
|
||||
#define gtk_source_style_manager_get_scheme _moo_gtk_source_style_manager_get_scheme
|
||||
#define gtk_source_language_manager_list_languages _moo_gtk_source_language_manager_list_languages
|
||||
#define gtk_source_style_scheme_manager_new _moo_gtk_source_style_scheme_manager_new
|
||||
#define gtk_source_style_scheme_manager_set_search_path _moo_gtk_source_style_scheme_manager_set_search_path
|
||||
#define gtk_source_style_scheme_manager_get_scheme_ids _moo_gtk_source_style_scheme_manager_get_scheme_ids
|
||||
#define gtk_source_style_scheme_manager_get_scheme _moo_gtk_source_style_scheme_manager_get_scheme
|
||||
#define gtk_source_language_manager_get_language_ids _moo_gtk_source_language_manager_get_language_ids
|
||||
#define gtk_source_language_manager_get_language _moo_gtk_source_language_manager_get_language
|
||||
#define _gtk_source_engine_attach_buffer _moo_gtk_source_engine_attach_buffer
|
||||
#define _gtk_source_engine_text_inserted _moo_gtk_source_engine_text_inserted
|
||||
#define _gtk_source_engine_text_deleted _moo_gtk_source_engine_text_deleted
|
||||
|
|
|
@ -7,7 +7,7 @@ upstream_sources = \
|
|||
gtksourcelanguage-parser-2.c \
|
||||
gtksourcelanguagemanager.c \
|
||||
gtksourcestyle.c \
|
||||
gtksourcestylemanager.c \
|
||||
gtksourcestyleschememanager.c \
|
||||
gtksourcestylescheme.c \
|
||||
gtktextregion.c \
|
||||
gtksourcecontextengine.h \
|
||||
|
@ -18,7 +18,7 @@ upstream_sources = \
|
|||
gtksourcelanguagemanager.h \
|
||||
gtksourcestyle.h \
|
||||
gtksourcestyle-private.h \
|
||||
gtksourcestylemanager.h \
|
||||
gtksourcestyleschememanager.h \
|
||||
gtksourcestylescheme.h \
|
||||
gtktextregion.h \
|
||||
gtksourceview-utils.h \
|
||||
|
|
|
@ -1999,10 +1999,10 @@ enable_highlight (GtkSourceContextEngine *ce,
|
|||
}
|
||||
|
||||
static void
|
||||
buffer_notify_highlight_cb (GtkSourceContextEngine *ce)
|
||||
buffer_notify_highlight_syntax_cb (GtkSourceContextEngine *ce)
|
||||
{
|
||||
gboolean highlight;
|
||||
g_object_get (ce->priv->buffer, "highlight", &highlight, NULL);
|
||||
g_object_get (ce->priv->buffer, "highlight-syntax", &highlight, NULL);
|
||||
enable_highlight (ce, highlight);
|
||||
}
|
||||
|
||||
|
@ -2196,7 +2196,7 @@ gtk_source_context_engine_attach_buffer (GtkSourceEngine *engine,
|
|||
if (ce->priv->buffer != NULL)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (ce->priv->buffer,
|
||||
(gpointer) buffer_notify_highlight_cb,
|
||||
(gpointer) buffer_notify_highlight_syntax_cb,
|
||||
ce);
|
||||
|
||||
if (ce->priv->first_update != 0)
|
||||
|
@ -2285,12 +2285,14 @@ gtk_source_context_engine_attach_buffer (GtkSourceEngine *engine,
|
|||
ce->priv->invalid_region.delta = 0;
|
||||
}
|
||||
|
||||
g_object_get (ce->priv->buffer, "highlight", &ce->priv->highlight, NULL);
|
||||
g_object_get (ce->priv->buffer, "highlight-syntax", &ce->priv->highlight, NULL);
|
||||
ce->priv->refresh_region = gtk_text_region_new (buffer);
|
||||
ce->priv->highlight_requests = gtk_text_region_new (buffer);
|
||||
|
||||
g_signal_connect_swapped (buffer, "notify::highlight",
|
||||
G_CALLBACK (buffer_notify_highlight_cb), ce);
|
||||
g_signal_connect_swapped (buffer,
|
||||
"notify::highlight-syntax",
|
||||
G_CALLBACK (buffer_notify_highlight_syntax_cb),
|
||||
ce);
|
||||
|
||||
install_first_update (ce);
|
||||
}
|
||||
|
@ -3907,6 +3909,23 @@ container_context_starts_here (GtkSourceContextEngine *ce,
|
|||
line->start_at + match_end,
|
||||
TRUE,
|
||||
ce->priv->hint2);
|
||||
|
||||
/* This new context could end at the same position (i.e. have zero length),
|
||||
* and then we get an infinite loop. We can't possibly know about it at this point
|
||||
* (since we need to know that the context indeed *ends* here, and that's
|
||||
* discovered only later) so we look at the previous sibling: if it's the same,
|
||||
* and has zero length then we remove the segment. We do it this way instead of
|
||||
* checking before creating the segment because it's more convenient. */
|
||||
if (*line_pos == match_end &&
|
||||
new_segment->prev != NULL &&
|
||||
new_segment->prev->context == new_segment->context &&
|
||||
new_segment->prev->start_at == new_segment->prev->end_at &&
|
||||
new_segment->prev->start_at == line->start_at + *line_pos)
|
||||
{
|
||||
segment_remove (ce, new_segment);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
apply_sub_patterns (new_segment, line,
|
||||
definition->u.start_end.start,
|
||||
SUB_PATTERN_WHERE_START);
|
||||
|
@ -3953,9 +3972,9 @@ simple_context_starts_here (GtkSourceContextEngine *ce,
|
|||
/* If length of the match is zero, then we get zero-length segment and return to
|
||||
* the same state, so it's an infinite loop. But, if this child ends parent, we
|
||||
* do want to terminate parent. Still, if match is at the beginning of the parent
|
||||
* then we get an infinite loop again, so we check that (FIXME it really should destroy
|
||||
* then we get an infinite loop again, so we check that (NOTE it really should destroy
|
||||
* parent context then, but then we again can get parent context be recreated here and
|
||||
* so on) */
|
||||
* so on). */
|
||||
if (*line_pos == match_end &&
|
||||
(!CONTEXT_ENDS_PARENT (new_context) || *line_pos == state->start_at))
|
||||
{
|
||||
|
@ -6074,7 +6093,7 @@ resolve_reference (G_GNUC_UNUSED const gchar *id,
|
|||
{
|
||||
g_set_error (&data->error, GTK_SOURCE_CONTEXT_ENGINE_ERROR,
|
||||
GTK_SOURCE_CONTEXT_ENGINE_ERROR_INVALID_REF,
|
||||
_("invalid reference '%s'"), child_def->u.id);
|
||||
_("invalid context reference '%s'"), child_def->u.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,6 +67,7 @@ struct _ParserState
|
|||
{
|
||||
/* The args passed to _file_parse_version2() */
|
||||
xmlTextReader *reader;
|
||||
char *filename;
|
||||
GtkSourceLanguage *language;
|
||||
GtkSourceContextData *ctx_data;
|
||||
|
||||
|
@ -130,6 +131,7 @@ static ParserState *parser_state_new (GtkSourceLanguage *language
|
|||
GHashTable *styles_mapping,
|
||||
GQueue *replacements,
|
||||
xmlTextReader *reader,
|
||||
const char *filename,
|
||||
GHashTable *loaded_lang_ids);
|
||||
static void parser_state_destroy (ParserState *parser_state);
|
||||
|
||||
|
@ -514,7 +516,7 @@ add_ref (ParserState *parser_state,
|
|||
GtkSourceLanguage *imported_language;
|
||||
|
||||
lm = _gtk_source_language_get_language_manager (parser_state->language);
|
||||
imported_language = gtk_source_language_manager_get_language_by_id (lm, lang_id);
|
||||
imported_language = gtk_source_language_manager_get_language (lm, lang_id);
|
||||
|
||||
if (imported_language == NULL)
|
||||
{
|
||||
|
@ -693,14 +695,15 @@ handle_context_element (ParserState *parser_state)
|
|||
options |= GTK_SOURCE_CONTEXT_IGNORE_STYLE;
|
||||
|
||||
if (style_ref != NULL)
|
||||
g_warning ("style-ref and ignore-style used simultaneously");
|
||||
g_warning ("in file %s: style-ref and ignore-style used simultaneously",
|
||||
parser_state->filename);
|
||||
}
|
||||
|
||||
/* XXX */
|
||||
if (!ignore_style && style_ref != NULL &&
|
||||
g_hash_table_lookup (parser_state->styles_mapping, style_ref) == NULL)
|
||||
{
|
||||
g_warning ("style '%s' not defined", style_ref);
|
||||
g_warning ("in file %s: style '%s' not defined", parser_state->filename, style_ref);
|
||||
}
|
||||
|
||||
if (ref != NULL)
|
||||
|
@ -1268,7 +1271,7 @@ parse_language_with_id (ParserState *parser_state,
|
|||
g_return_if_fail (parser_state->error == NULL);
|
||||
|
||||
lm = _gtk_source_language_get_language_manager (parser_state->language);
|
||||
imported_language = gtk_source_language_manager_get_language_by_id (lm, lang_id);
|
||||
imported_language = gtk_source_language_manager_get_language (lm, lang_id);
|
||||
|
||||
if (imported_language == NULL)
|
||||
{
|
||||
|
@ -1356,6 +1359,12 @@ parse_style (ParserState *parser_state)
|
|||
DEBUG (g_message ("style %s (%s) to be mapped to '%s'",
|
||||
name, id, map_to ? (char*) map_to : "(null)"));
|
||||
|
||||
if (map_to != NULL &&
|
||||
g_hash_table_lookup (parser_state->styles_mapping, map_to) == NULL)
|
||||
{
|
||||
g_warning ("in file %s: style '%s' not defined", parser_state->filename, map_to);
|
||||
}
|
||||
|
||||
if (parser_state->error == NULL)
|
||||
{
|
||||
|
||||
|
@ -1571,7 +1580,7 @@ file_parse (gchar *filename,
|
|||
parser_state = parser_state_new (language, ctx_data,
|
||||
defined_regexes, styles,
|
||||
replacements, reader,
|
||||
loaded_lang_ids);
|
||||
filename, loaded_lang_ids);
|
||||
xmlTextReaderSetStructuredErrorHandler (reader,
|
||||
(xmlStructuredErrorFunc) text_reader_structured_error_func,
|
||||
parser_state);
|
||||
|
@ -1629,6 +1638,7 @@ parser_state_new (GtkSourceLanguage *language,
|
|||
GHashTable *styles_mapping,
|
||||
GQueue *replacements,
|
||||
xmlTextReader *reader,
|
||||
const char *filename,
|
||||
GHashTable *loaded_lang_ids)
|
||||
{
|
||||
ParserState *parser_state;
|
||||
|
@ -1646,6 +1656,7 @@ parser_state_new (GtkSourceLanguage *language,
|
|||
parser_state->regex_compile_flags = 0;
|
||||
|
||||
parser_state->reader = reader;
|
||||
parser_state->filename = g_filename_display_name (filename);
|
||||
parser_state->error = NULL;
|
||||
|
||||
parser_state->defined_regexes = defined_regexes;
|
||||
|
@ -1678,6 +1689,7 @@ parser_state_destroy (ParserState *parser_state)
|
|||
g_free (parser_state->closing_delimiter);
|
||||
|
||||
g_free (parser_state->language_decoration);
|
||||
g_free (parser_state->filename);
|
||||
|
||||
g_slice_free (ParserState, parser_state);
|
||||
}
|
||||
|
|
|
@ -784,10 +784,10 @@ force_styles (GtkSourceLanguage *language)
|
|||
*
|
||||
* @language: a #GtkSourceLanguage
|
||||
*
|
||||
* Returns the ids of the styles defined by this @langage.
|
||||
* Returns the ids of the styles defined by this @language.
|
||||
*
|
||||
* Returns: a %NULL terminated array containing
|
||||
* ids of the styles defined by this @langage or %NULL if no style is
|
||||
* ids of the styles defined by this @language or %NULL if no style is
|
||||
* defined. The returned array must be freed with g_strfreev().
|
||||
*/
|
||||
gchar **
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; coding: utf-8 -*-
|
||||
* gtksourcelanguagemanager.c
|
||||
*
|
||||
* Copyright (C) 2003 - Paolo Maggi <paolo.maggi@polito.it>
|
||||
* Copyright (C) 2003-2007 - Paolo Maggi <paolo.maggi@polito.it>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as published by
|
||||
|
@ -34,15 +34,18 @@
|
|||
|
||||
enum {
|
||||
PROP_0,
|
||||
PROP_SEARCH_PATH
|
||||
PROP_SEARCH_PATH,
|
||||
PROP_LANGUAGE_IDS
|
||||
};
|
||||
|
||||
struct _GtkSourceLanguageManagerPrivate
|
||||
{
|
||||
GHashTable *language_ids;
|
||||
GSList *available_languages;
|
||||
char **lang_dirs;
|
||||
char *rng_file;
|
||||
|
||||
gchar **lang_dirs;
|
||||
gchar *rng_file;
|
||||
|
||||
gchar **ids; /* Cache the IDs of the available languages */
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (GtkSourceLanguageManager, gtk_source_language_manager, G_TYPE_OBJECT)
|
||||
|
@ -86,6 +89,10 @@ gtk_source_language_manager_get_property (GObject *object,
|
|||
g_value_set_boxed (value, gtk_source_language_manager_get_search_path (lm));
|
||||
break;
|
||||
|
||||
case PROP_LANGUAGE_IDS:
|
||||
g_value_set_boxed (value, gtk_source_language_manager_get_language_ids (lm));
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
|
@ -102,8 +109,8 @@ gtk_source_language_manager_finalize (GObject *object)
|
|||
if (lm->priv->language_ids)
|
||||
g_hash_table_destroy (lm->priv->language_ids);
|
||||
|
||||
g_slist_foreach (lm->priv->available_languages, (GFunc) g_object_unref, NULL);
|
||||
g_slist_free (lm->priv->available_languages);
|
||||
g_strfreev (lm->priv->ids);
|
||||
|
||||
g_strfreev (lm->priv->lang_dirs);
|
||||
g_free (lm->priv->rng_file);
|
||||
|
||||
|
@ -130,6 +137,15 @@ gtk_source_language_manager_class_init (GtkSourceLanguageManagerClass *klass)
|
|||
G_TYPE_STRV,
|
||||
G_PARAM_READWRITE));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_LANGUAGE_IDS,
|
||||
g_param_spec_boxed ("language-ids",
|
||||
_("Language ids"),
|
||||
_("List of the ids of the available "
|
||||
"languages"),
|
||||
G_TYPE_STRV,
|
||||
G_PARAM_READABLE));
|
||||
|
||||
g_type_class_add_private (object_class, sizeof(GtkSourceLanguageManagerPrivate));
|
||||
}
|
||||
|
||||
|
@ -139,7 +155,7 @@ gtk_source_language_manager_init (GtkSourceLanguageManager *lm)
|
|||
lm->priv = G_TYPE_INSTANCE_GET_PRIVATE (lm, GTK_TYPE_SOURCE_LANGUAGE_MANAGER,
|
||||
GtkSourceLanguageManagerPrivate);
|
||||
lm->priv->language_ids = NULL;
|
||||
lm->priv->available_languages = NULL;
|
||||
lm->priv->ids = NULL;
|
||||
lm->priv->lang_dirs = NULL;
|
||||
lm->priv->rng_file = NULL;
|
||||
}
|
||||
|
@ -182,6 +198,13 @@ gtk_source_language_manager_get_default (void)
|
|||
return instance;
|
||||
}
|
||||
|
||||
static void
|
||||
notify_search_path (GtkSourceLanguageManager *mgr)
|
||||
{
|
||||
g_object_notify (G_OBJECT (mgr), "search-path");
|
||||
g_object_notify (G_OBJECT (mgr), "language-ids");
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_source_language_manager_set_search_path:
|
||||
* @lm: a #GtkSourceLanguageManager.
|
||||
|
@ -209,14 +232,19 @@ gtk_source_language_manager_set_search_path (GtkSourceLanguageManager *lm,
|
|||
g_return_if_fail (GTK_IS_SOURCE_LANGUAGE_MANAGER (lm));
|
||||
|
||||
/* Search path cannot be changed in the list of available languages
|
||||
* as been already changed */
|
||||
g_return_if_fail (lm->priv->available_languages == NULL);
|
||||
* as been already computed */
|
||||
g_return_if_fail (lm->priv->ids == NULL);
|
||||
|
||||
tmp = lm->priv->lang_dirs;
|
||||
lm->priv->lang_dirs = g_strdupv (dirs);
|
||||
|
||||
if (dirs == NULL)
|
||||
lm->priv->lang_dirs = _gtk_source_view_get_default_dirs (LANGUAGE_DIR, TRUE);
|
||||
else
|
||||
lm->priv->lang_dirs = g_strdupv (dirs);
|
||||
|
||||
g_strfreev (tmp);
|
||||
|
||||
g_object_notify (G_OBJECT (lm), "search-path");
|
||||
notify_search_path (lm);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -226,9 +254,9 @@ gtk_source_language_manager_set_search_path (GtkSourceLanguageManager *lm,
|
|||
* Gets the list directories where @lm looks for language files.
|
||||
*
|
||||
* Returns: %NULL-terminated array containg a list of language files directories.
|
||||
* It is owned by @lm and must not be modified or freed.
|
||||
* The array is owned by @lm and must not be modified.
|
||||
*/
|
||||
gchar **
|
||||
G_CONST_RETURN gchar* G_CONST_RETURN *
|
||||
gtk_source_language_manager_get_search_path (GtkSourceLanguageManager *lm)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_SOURCE_LANGUAGE_MANAGER (lm), NULL);
|
||||
|
@ -236,7 +264,7 @@ gtk_source_language_manager_get_search_path (GtkSourceLanguageManager *lm)
|
|||
if (lm->priv->lang_dirs == NULL)
|
||||
lm->priv->lang_dirs = _gtk_source_view_get_default_dirs (LANGUAGE_DIR, TRUE);
|
||||
|
||||
return lm->priv->lang_dirs;
|
||||
return (const gchar * const *)lm->priv->lang_dirs;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -254,7 +282,7 @@ _gtk_source_language_manager_get_rng_file (GtkSourceLanguageManager *lm)
|
|||
|
||||
if (lm->priv->rng_file == NULL)
|
||||
{
|
||||
gchar **dirs;
|
||||
const gchar * const *dirs;
|
||||
|
||||
for (dirs = gtk_source_language_manager_get_search_path (lm);
|
||||
dirs != NULL && *dirs != NULL;
|
||||
|
@ -276,19 +304,11 @@ _gtk_source_language_manager_get_rng_file (GtkSourceLanguageManager *lm)
|
|||
return lm->priv->rng_file;
|
||||
}
|
||||
|
||||
static void
|
||||
prepend_lang (G_GNUC_UNUSED gchar *id,
|
||||
GtkSourceLanguage *lang,
|
||||
GtkSourceLanguageManager *lm)
|
||||
{
|
||||
lm->priv->available_languages =
|
||||
g_slist_prepend (lm->priv->available_languages, g_object_ref (lang));
|
||||
}
|
||||
|
||||
static void
|
||||
ensure_languages (GtkSourceLanguageManager *lm)
|
||||
{
|
||||
GSList *filenames, *l;
|
||||
GPtrArray *ids_array = NULL;
|
||||
|
||||
if (lm->priv->language_ids != NULL)
|
||||
return;
|
||||
|
@ -296,7 +316,7 @@ ensure_languages (GtkSourceLanguageManager *lm)
|
|||
lm->priv->language_ids = g_hash_table_new_full (g_str_hash, g_str_equal,
|
||||
g_free, g_object_unref);
|
||||
|
||||
filenames = _gtk_source_view_get_file_list (gtk_source_language_manager_get_search_path (lm),
|
||||
filenames = _gtk_source_view_get_file_list ((gchar **)gtk_source_language_manager_get_search_path (lm),
|
||||
LANG_FILE_SUFFIX,
|
||||
TRUE);
|
||||
|
||||
|
@ -320,6 +340,11 @@ ensure_languages (GtkSourceLanguageManager *lm)
|
|||
g_hash_table_insert (lm->priv->language_ids,
|
||||
g_strdup (lang->priv->id),
|
||||
lang);
|
||||
|
||||
if (ids_array == NULL)
|
||||
ids_array = g_ptr_array_new ();
|
||||
|
||||
g_ptr_array_add (ids_array, g_strdup (lang->priv->id));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -327,33 +352,40 @@ ensure_languages (GtkSourceLanguageManager *lm)
|
|||
}
|
||||
}
|
||||
|
||||
g_hash_table_foreach (lm->priv->language_ids, (GHFunc) prepend_lang, lm);
|
||||
if (ids_array != NULL)
|
||||
{
|
||||
/* Ensure the array is NULL terminated */
|
||||
g_ptr_array_add (ids_array, NULL);
|
||||
lm->priv->ids = (gchar **)g_ptr_array_free (ids_array, FALSE);
|
||||
}
|
||||
|
||||
g_slist_foreach (filenames, (GFunc) g_free, NULL);
|
||||
g_slist_free (filenames);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* gtk_source_language_manager_get_available_languages:
|
||||
* @lm: a #GtkSourceLanguageManager.
|
||||
* gtk_source_language_manager_get_language_ids:
|
||||
* @lm: a #GtkSourceLanguageManager
|
||||
*
|
||||
* Gets a list of available languages for the given language manager.
|
||||
* Returns the ids of the available languages.
|
||||
*
|
||||
* Returns: a list of #GtkSourceLanguage objects. It must be freed with
|
||||
* g_slist_free(), but its elements must not be unref'ed.
|
||||
* Returns: a %NULL-terminated array of string containing the ids of the
|
||||
* available languages or %NULL if no language is available. The array
|
||||
* is owned by @lm and must not be modified.
|
||||
*/
|
||||
GSList *
|
||||
gtk_source_language_manager_list_languages (GtkSourceLanguageManager *lm)
|
||||
G_CONST_RETURN gchar* G_CONST_RETURN *
|
||||
gtk_source_language_manager_get_language_ids (GtkSourceLanguageManager *lm)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_SOURCE_LANGUAGE_MANAGER (lm), NULL);
|
||||
|
||||
ensure_languages (lm);
|
||||
|
||||
return g_slist_copy (lm->priv->available_languages);
|
||||
return (const gchar * const *)lm->priv->ids;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_source_language_manager_get_language_by_id:
|
||||
* gtk_source_language_manager_get_language:
|
||||
* @lm: a #GtkSourceLanguageManager.
|
||||
* @id: a language id.
|
||||
*
|
||||
|
@ -365,11 +397,14 @@ gtk_source_language_manager_list_languages (GtkSourceLanguageManager *lm)
|
|||
* be freed.
|
||||
*/
|
||||
GtkSourceLanguage *
|
||||
gtk_source_language_manager_get_language_by_id (GtkSourceLanguageManager *lm,
|
||||
const gchar *id)
|
||||
gtk_source_language_manager_get_language (GtkSourceLanguageManager *lm,
|
||||
const gchar *id)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_SOURCE_LANGUAGE_MANAGER (lm), NULL);
|
||||
g_return_val_if_fail (id != NULL, NULL);
|
||||
|
||||
ensure_languages (lm);
|
||||
|
||||
return g_hash_table_lookup (lm->priv->language_ids, id);
|
||||
}
|
||||
|
||||
|
|
|
@ -59,18 +59,23 @@ struct _GtkSourceLanguageManagerClass
|
|||
GType gtk_source_language_manager_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GtkSourceLanguageManager *gtk_source_language_manager_new (void);
|
||||
|
||||
GtkSourceLanguageManager *gtk_source_language_manager_get_default (void);
|
||||
|
||||
/* list must be freed, its elements no */
|
||||
GSList *gtk_source_language_manager_list_languages (GtkSourceLanguageManager *lm);
|
||||
G_CONST_RETURN gchar* G_CONST_RETURN *
|
||||
gtk_source_language_manager_get_search_path (GtkSourceLanguageManager *lm);
|
||||
|
||||
GtkSourceLanguage *gtk_source_language_manager_get_language_by_id (GtkSourceLanguageManager *lm,
|
||||
const gchar *id);
|
||||
|
||||
gchar **gtk_source_language_manager_get_search_path (GtkSourceLanguageManager *lm);
|
||||
void gtk_source_language_manager_set_search_path (GtkSourceLanguageManager *lm,
|
||||
gchar **dirs);
|
||||
|
||||
G_CONST_RETURN gchar* G_CONST_RETURN *
|
||||
gtk_source_language_manager_get_language_ids (GtkSourceLanguageManager *lm);
|
||||
|
||||
GtkSourceLanguage *gtk_source_language_manager_get_language (GtkSourceLanguageManager *lm,
|
||||
const gchar *id);
|
||||
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_SOURCE_LANGUAGE_MANAGER_H__ */
|
||||
|
|
|
@ -1,89 +0,0 @@
|
|||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; coding: utf-8 -*-
|
||||
* gtksourcestylemanager.h
|
||||
*
|
||||
* Copyright (C) 2003 - Paolo Maggi <paolo.maggi@polito.it>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program 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 Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GTK_SOURCE_STYLE_MANAGER_H__
|
||||
#define __GTK_SOURCE_STYLE_MANAGER_H__
|
||||
|
||||
#include <gtksourceview/gtksourcestylescheme.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GTK_TYPE_SOURCE_STYLE_MANAGER (gtk_source_style_manager_get_type ())
|
||||
#define GTK_SOURCE_STYLE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_SOURCE_STYLE_MANAGER, GtkSourceStyleManager))
|
||||
#define GTK_SOURCE_STYLE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_SOURCE_STYLE_MANAGER, GtkSourceStyleManagerClass))
|
||||
#define GTK_IS_SOURCE_STYLE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_SOURCE_STYLE_MANAGER))
|
||||
#define GTK_IS_SOURCE_STYLE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SOURCE_STYLE_MANAGER))
|
||||
#define GTK_SOURCE_STYLE_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_SOURCE_STYLE_MANAGER, GtkSourceStyleManagerClass))
|
||||
|
||||
|
||||
typedef struct _GtkSourceStyleManager GtkSourceStyleManager;
|
||||
typedef struct _GtkSourceStyleManagerClass GtkSourceStyleManagerClass;
|
||||
typedef struct _GtkSourceStyleManagerPrivate GtkSourceStyleManagerPrivate;
|
||||
|
||||
struct _GtkSourceStyleManager
|
||||
{
|
||||
GObject parent;
|
||||
|
||||
GtkSourceStyleManagerPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GtkSourceStyleManagerClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
/* Padding for future expansion */
|
||||
void (*_gtk_source_reserved1) (void);
|
||||
void (*_gtk_source_reserved2) (void);
|
||||
void (*_gtk_source_reserved3) (void);
|
||||
void (*_gtk_source_reserved4) (void);
|
||||
};
|
||||
|
||||
|
||||
GType gtk_source_style_manager_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GtkSourceStyleManager *gtk_source_style_manager_new (void);
|
||||
GtkSourceStyleManager *gtk_source_style_manager_get_default (void);
|
||||
|
||||
void gtk_source_style_manager_set_search_path (GtkSourceStyleManager *manager,
|
||||
gchar **path);
|
||||
|
||||
void gtk_source_style_manager_append_search_path (GtkSourceStyleManager *manager,
|
||||
const gchar *path);
|
||||
|
||||
void gtk_source_style_manager_prepend_search_path (GtkSourceStyleManager *manager,
|
||||
const gchar *path);
|
||||
|
||||
G_CONST_RETURN gchar* G_CONST_RETURN *
|
||||
gtk_source_style_manager_get_search_path
|
||||
(GtkSourceStyleManager *manager);
|
||||
|
||||
void gtk_source_style_manager_force_rescan (GtkSourceStyleManager *manager);
|
||||
|
||||
G_CONST_RETURN gchar * G_CONST_RETURN *
|
||||
gtk_source_style_manager_get_scheme_ids
|
||||
(GtkSourceStyleManager *manager);
|
||||
|
||||
GtkSourceStyleScheme *gtk_source_style_manager_get_scheme (GtkSourceStyleManager *manager,
|
||||
const gchar *scheme_id);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_SOURCE_STYLE_MANAGER_H__ */
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include "gtksourceview-i18n.h"
|
||||
#include "gtksourcestylemanager.h"
|
||||
#include "gtksourcestyleschememanager.h"
|
||||
#include "gtksourceview.h"
|
||||
#include "gtksourcelanguage-private.h"
|
||||
#include "gtksourcestyle-private.h"
|
||||
|
@ -138,7 +138,7 @@ gtk_source_style_scheme_class_init (GtkSourceStyleSchemeClass *klass)
|
|||
* GtkSourceStyleScheme:id:
|
||||
*
|
||||
* Style scheme id, a unique string used to identify the style scheme
|
||||
* in #GtkSourceStyleManager.
|
||||
* in #GtkSourceStyleSchemeManager.
|
||||
*
|
||||
* Since: 2.0
|
||||
*/
|
||||
|
@ -622,9 +622,9 @@ _gtk_source_style_scheme_set_parent (GtkSourceStyleScheme *scheme,
|
|||
GtkSourceStyleScheme *
|
||||
_gtk_source_style_scheme_get_default (void)
|
||||
{
|
||||
GtkSourceStyleManager *manager;
|
||||
GtkSourceStyleSchemeManager *manager;
|
||||
|
||||
manager = gtk_source_style_manager_get_default ();
|
||||
manager = gtk_source_style_scheme_manager_get_default ();
|
||||
|
||||
return gtk_source_style_manager_get_scheme (manager, "gvim");
|
||||
return gtk_source_style_scheme_manager_get_scheme (manager, "kate");
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include "gtksourceview-i18n.h"
|
||||
#include "gtksourcestylemanager.h"
|
||||
#include "gtksourcestyleschememanager.h"
|
||||
#include "gtksourceview.h"
|
||||
#include "gtksourcelanguage-private.h"
|
||||
#include "gtksourcestyle-private.h"
|
||||
|
@ -35,6 +35,7 @@
|
|||
#define STYLE_SECONDARY_CURSOR "secondary-cursor"
|
||||
#define STYLE_CURRENT_LINE "current-line"
|
||||
#define STYLE_LINE_NUMBERS "line-numbers"
|
||||
#define STYLE_RIGHT_MARGIN "right-margin"
|
||||
|
||||
#define STYLE_SCHEME_VERSION "1.0"
|
||||
|
||||
|
@ -45,6 +46,7 @@ enum {
|
|||
PROP_0,
|
||||
PROP_ID,
|
||||
PROP_NAME,
|
||||
PROP_DESCRIPTION,
|
||||
PROP_FILENAME
|
||||
};
|
||||
|
||||
|
@ -52,7 +54,7 @@ struct _GtkSourceStyleSchemePrivate
|
|||
{
|
||||
gchar *id;
|
||||
gchar *name;
|
||||
gchar *author;
|
||||
GPtrArray *authors;
|
||||
gchar *description;
|
||||
gchar *filename;
|
||||
GtkSourceStyleScheme *parent;
|
||||
|
@ -73,7 +75,13 @@ gtk_source_style_scheme_finalize (GObject *object)
|
|||
g_hash_table_destroy (scheme->priv->style_cache);
|
||||
g_hash_table_destroy (scheme->priv->defined_styles);
|
||||
g_free (scheme->priv->filename);
|
||||
g_free (scheme->priv->author);
|
||||
|
||||
if (scheme->priv->authors != NULL)
|
||||
{
|
||||
g_ptr_array_foreach (scheme->priv->authors, (GFunc)g_free, NULL);
|
||||
g_ptr_array_free (scheme->priv->authors, TRUE);
|
||||
}
|
||||
|
||||
g_free (scheme->priv->description);
|
||||
g_free (scheme->priv->id);
|
||||
g_free (scheme->priv->name);
|
||||
|
@ -102,13 +110,6 @@ gtk_source_style_scheme_set_property (GObject *object,
|
|||
g_free (tmp);
|
||||
break;
|
||||
|
||||
case PROP_NAME:
|
||||
tmp = scheme->priv->name;
|
||||
scheme->priv->name = g_value_dup_string (value);
|
||||
g_free (tmp);
|
||||
g_object_notify (object, "name");
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
|
@ -133,6 +134,10 @@ gtk_source_style_scheme_get_property (GObject *object,
|
|||
g_value_set_string (value, scheme->priv->name);
|
||||
break;
|
||||
|
||||
case PROP_DESCRIPTION:
|
||||
g_value_set_string (value, scheme->priv->description);
|
||||
break;
|
||||
|
||||
case PROP_FILENAME:
|
||||
g_value_set_string (value, scheme->priv->filename);
|
||||
break;
|
||||
|
@ -156,9 +161,7 @@ gtk_source_style_scheme_class_init (GtkSourceStyleSchemeClass *klass)
|
|||
* GtkSourceStyleScheme:id:
|
||||
*
|
||||
* Style scheme id, a unique string used to identify the style scheme
|
||||
* in #GtkSourceStyleManager.
|
||||
*
|
||||
* Since: 2.0
|
||||
* in #GtkSourceStyleSchemeManager.
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_ID,
|
||||
|
@ -172,8 +175,6 @@ gtk_source_style_scheme_class_init (GtkSourceStyleSchemeClass *klass)
|
|||
* GtkSourceStyleScheme:name:
|
||||
*
|
||||
* Style scheme name, a translatable string to present to user.
|
||||
*
|
||||
* Since: 2.0
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_NAME,
|
||||
|
@ -181,14 +182,25 @@ gtk_source_style_scheme_class_init (GtkSourceStyleSchemeClass *klass)
|
|||
_("Style scheme name"),
|
||||
_("Style scheme name"),
|
||||
NULL,
|
||||
G_PARAM_READWRITE));
|
||||
G_PARAM_READABLE));
|
||||
|
||||
/**
|
||||
* GtkSourceStyleScheme:name:
|
||||
*
|
||||
* Style scheme name, a translatable string to present to user.
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_NAME,
|
||||
g_param_spec_string ("description",
|
||||
_("Style scheme description"),
|
||||
_("Style scheme description"),
|
||||
NULL,
|
||||
G_PARAM_READABLE));
|
||||
|
||||
/**
|
||||
* GtkSourceStyleScheme:filename:
|
||||
*
|
||||
* Style scheme filename or NULL.
|
||||
*
|
||||
* Since: 2.0
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_FILENAME,
|
||||
|
@ -268,6 +280,27 @@ gtk_source_style_scheme_get_description (GtkSourceStyleScheme *scheme)
|
|||
return scheme->priv->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_source_style_scheme_get_authors:
|
||||
* @scheme: a #GtkSourceStyleScheme.
|
||||
*
|
||||
* Returns: a %NULL-terminated array containing the @scheme authors or
|
||||
* %NULL if no author is specified by the style
|
||||
* scheme.
|
||||
*
|
||||
* Since: 2.0
|
||||
*/
|
||||
G_CONST_RETURN gchar* G_CONST_RETURN *
|
||||
gtk_source_style_scheme_get_authors (GtkSourceStyleScheme *scheme)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_SOURCE_STYLE_SCHEME (scheme), NULL);
|
||||
|
||||
if (scheme->priv->authors == NULL)
|
||||
return NULL;
|
||||
|
||||
return (G_CONST_RETURN gchar* G_CONST_RETURN *)scheme->priv->authors->pdata;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_source_style_scheme_get_filename:
|
||||
* @scheme: a #GtkSourceStyleScheme.
|
||||
|
@ -472,22 +505,20 @@ gtk_source_style_scheme_set_style (GtkSourceStyleScheme *scheme,
|
|||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* gtk_source_style_scheme_get_matching_brackets_style:
|
||||
* @scheme: a #GtkSourceStyleScheme.
|
||||
*
|
||||
* Returns: style which corresponds to "bracket-match" name, to use
|
||||
* in an editor. It is owned by @scheme and may not be unref'ed.
|
||||
*
|
||||
* Since: 2.0
|
||||
*/
|
||||
GtkSourceStyle *
|
||||
gtk_source_style_scheme_get_matching_brackets_style (GtkSourceStyleScheme *scheme)
|
||||
_gtk_source_style_scheme_get_matching_brackets_style (GtkSourceStyleScheme *scheme)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_SOURCE_STYLE_SCHEME (scheme), NULL);
|
||||
return gtk_source_style_scheme_get_style (scheme, STYLE_BRACKET_MATCH);
|
||||
}
|
||||
|
||||
GtkSourceStyle *
|
||||
_gtk_source_style_scheme_get_right_margin_style (GtkSourceStyleScheme *scheme)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_SOURCE_STYLE_SCHEME (scheme), NULL);
|
||||
return gtk_source_style_scheme_get_style (scheme, STYLE_RIGHT_MARGIN);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
get_color (GtkSourceStyle *style,
|
||||
gboolean foreground,
|
||||
|
@ -525,19 +556,12 @@ get_color (GtkSourceStyle *style,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_source_style_scheme_get_current_line_color:
|
||||
* @scheme: a #GtkSourceStyleScheme.
|
||||
* @color: a #GdkColor structure to fill.
|
||||
*
|
||||
* Returns: %TRUE if @scheme has style for current line set, or %FALSE
|
||||
* otherwise.
|
||||
*
|
||||
* Since: 2.0
|
||||
/*
|
||||
* Returns TRUE if the style for current-line set in the scheme
|
||||
*/
|
||||
gboolean
|
||||
gtk_source_style_scheme_get_current_line_color (GtkSourceStyleScheme *scheme,
|
||||
GdkColor *color)
|
||||
_gtk_source_style_scheme_get_current_line_color (GtkSourceStyleScheme *scheme,
|
||||
GdkColor *color)
|
||||
{
|
||||
GtkSourceStyle *style;
|
||||
|
||||
|
@ -625,7 +649,7 @@ set_cursor_colors (GtkWidget *widget,
|
|||
gtk_widget_set_name (widget, widget_name);
|
||||
|
||||
g_object_set_data (G_OBJECT (widget),
|
||||
"gtk-source-view-cursor-color",
|
||||
"gtk-source-view-cursor-color-set",
|
||||
GINT_TO_POINTER (TRUE));
|
||||
|
||||
g_free (rc_string);
|
||||
|
@ -639,7 +663,7 @@ static void
|
|||
unset_cursor_colors (GtkWidget *widget)
|
||||
{
|
||||
#if !GTK_CHECK_VERSION(2,11,3)
|
||||
if (g_object_get_data (G_OBJECT (widget), "gtk-source-view-cursor-color"))
|
||||
if (g_object_get_data (G_OBJECT (widget), "gtk-source-view-cursor-color-set") != NULL)
|
||||
set_cursor_colors (widget,
|
||||
&widget->style->text[GTK_STATE_NORMAL],
|
||||
&widget->style->text_aa[GTK_STATE_NORMAL]);
|
||||
|
@ -929,7 +953,11 @@ parse_style_scheme_child (GtkSourceStyleScheme *scheme,
|
|||
else if (strcmp ((char*) node->name, "author") == 0)
|
||||
{
|
||||
xmlChar *tmp = xmlNodeGetContent (node);
|
||||
scheme->priv->author = g_strdup ((char*) tmp);
|
||||
if (scheme->priv->authors == NULL)
|
||||
scheme->priv->authors = g_ptr_array_new ();
|
||||
|
||||
g_ptr_array_add (scheme->priv->authors, g_strdup ((char*) tmp));
|
||||
|
||||
xmlFree (tmp);
|
||||
}
|
||||
else if (strcmp ((char*) node->name, "description") == 0)
|
||||
|
@ -1013,6 +1041,10 @@ parse_style_scheme_element (GtkSourceStyleScheme *scheme,
|
|||
if (node->type == XML_ELEMENT_NODE)
|
||||
if (!parse_style_scheme_child (scheme, node, error))
|
||||
return;
|
||||
|
||||
/* NULL-terminate the array of authors */
|
||||
if (scheme->priv->authors != NULL)
|
||||
g_ptr_array_add (scheme->priv->authors, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1142,10 +1174,10 @@ _gtk_source_style_scheme_set_parent (GtkSourceStyleScheme *scheme,
|
|||
GtkSourceStyleScheme *
|
||||
_gtk_source_style_scheme_get_default (void)
|
||||
{
|
||||
GtkSourceStyleManager *manager;
|
||||
GtkSourceStyleSchemeManager *manager;
|
||||
|
||||
manager = gtk_source_style_manager_get_default ();
|
||||
manager = gtk_source_style_scheme_manager_get_default ();
|
||||
|
||||
return gtk_source_style_manager_get_scheme (manager,
|
||||
DEFAULT_STYLE_SCHEME);
|
||||
return gtk_source_style_scheme_manager_get_scheme (manager,
|
||||
DEFAULT_STYLE_SCHEME);
|
||||
}
|
||||
|
|
|
@ -60,24 +60,30 @@ GtkSourceStyleScheme *_gtk_source_style_scheme_new (const gchar *id,
|
|||
const gchar *gtk_source_style_scheme_get_id (GtkSourceStyleScheme *scheme);
|
||||
const gchar *gtk_source_style_scheme_get_name (GtkSourceStyleScheme *scheme);
|
||||
const gchar *gtk_source_style_scheme_get_description(GtkSourceStyleScheme *scheme);
|
||||
|
||||
G_CONST_RETURN gchar* G_CONST_RETURN *
|
||||
gtk_source_style_scheme_get_authors (GtkSourceStyleScheme *scheme);
|
||||
|
||||
const gchar *gtk_source_style_scheme_get_filename (GtkSourceStyleScheme *scheme);
|
||||
|
||||
GtkSourceStyle *gtk_source_style_scheme_get_style (GtkSourceStyleScheme *scheme,
|
||||
const gchar *style_id);
|
||||
GtkSourceStyle *gtk_source_style_scheme_get_matching_brackets_style
|
||||
(GtkSourceStyleScheme *scheme);
|
||||
gboolean gtk_source_style_scheme_get_current_line_color
|
||||
(GtkSourceStyleScheme *scheme,
|
||||
GdkColor *color);
|
||||
|
||||
void _gtk_source_style_scheme_apply (GtkSourceStyleScheme *scheme,
|
||||
GtkWidget *widget);
|
||||
GtkSourceStyleScheme *_gtk_source_style_scheme_new_from_file (const gchar *filename);
|
||||
GtkSourceStyleScheme *_gtk_source_style_scheme_get_default (void);
|
||||
const gchar *_gtk_source_style_scheme_get_parent_id (GtkSourceStyleScheme *scheme);
|
||||
void _gtk_source_style_scheme_set_parent (GtkSourceStyleScheme *scheme,
|
||||
GtkSourceStyleScheme *parent_scheme);
|
||||
|
||||
/* private */
|
||||
void _gtk_source_style_scheme_apply (GtkSourceStyleScheme *scheme,
|
||||
GtkWidget *widget);
|
||||
GtkSourceStyle *_gtk_source_style_scheme_get_matching_brackets_style
|
||||
(GtkSourceStyleScheme *scheme);
|
||||
GtkSourceStyle *_gtk_source_style_scheme_get_right_margin_style
|
||||
(GtkSourceStyleScheme *scheme);
|
||||
gboolean _gtk_source_style_scheme_get_current_line_color
|
||||
(GtkSourceStyleScheme *scheme,
|
||||
GdkColor *color);
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_SOURCE_STYLE_SCHEME_H__ */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; coding: utf-8 -*-
|
||||
* gtksourcestylemanager.c
|
||||
* gtksourcestyleschememanager.c
|
||||
*
|
||||
* Copyright (C) 2003-2007 - Paolo Maggi <paolo@gnome.org>
|
||||
*
|
||||
|
@ -18,7 +18,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "gtksourcestylemanager.h"
|
||||
#include "gtksourcestyleschememanager.h"
|
||||
#include "gtksourceview-marshal.h"
|
||||
#include "gtksourceview-i18n.h"
|
||||
#include "gtksourceview-utils.h"
|
||||
|
@ -28,7 +28,7 @@
|
|||
#define STYLES_DIR "styles"
|
||||
|
||||
|
||||
struct _GtkSourceStyleManagerPrivate
|
||||
struct _GtkSourceStyleSchemeManagerPrivate
|
||||
{
|
||||
GHashTable *schemes_hash;
|
||||
|
||||
|
@ -46,22 +46,23 @@ enum {
|
|||
};
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GtkSourceStyleManager, gtk_source_style_manager, G_TYPE_OBJECT)
|
||||
G_DEFINE_TYPE (GtkSourceStyleSchemeManager, gtk_source_style_scheme_manager, G_TYPE_OBJECT)
|
||||
|
||||
static void
|
||||
gtk_source_style_manager_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
gtk_source_style_scheme_manager_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GtkSourceStyleManager *sm;
|
||||
GtkSourceStyleSchemeManager *sm;
|
||||
|
||||
sm = GTK_SOURCE_STYLE_MANAGER (object);
|
||||
sm = GTK_SOURCE_STYLE_SCHEME_MANAGER (object);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_SEARCH_PATH:
|
||||
gtk_source_style_manager_set_search_path (sm, g_value_get_boxed (value));
|
||||
gtk_source_style_scheme_manager_set_search_path
|
||||
(sm, g_value_get_boxed (value));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -73,23 +74,25 @@ gtk_source_style_manager_set_property (GObject *object,
|
|||
}
|
||||
|
||||
static void
|
||||
gtk_source_style_manager_get_property (GObject *object,
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
gtk_source_style_scheme_manager_get_property (GObject *object,
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GtkSourceStyleManager *sm;
|
||||
GtkSourceStyleSchemeManager *sm;
|
||||
|
||||
sm = GTK_SOURCE_STYLE_MANAGER (object);
|
||||
sm = GTK_SOURCE_STYLE_SCHEME_MANAGER (object);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_SEARCH_PATH:
|
||||
g_value_set_boxed (value, gtk_source_style_manager_get_search_path (sm));
|
||||
g_value_set_boxed (value,
|
||||
gtk_source_style_scheme_manager_get_search_path (sm));
|
||||
break;
|
||||
|
||||
case PROP_SCHEME_IDS:
|
||||
g_value_set_boxed (value, gtk_source_style_manager_get_scheme_ids (sm));
|
||||
g_value_set_boxed (value,
|
||||
gtk_source_style_scheme_manager_get_scheme_ids (sm));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -101,7 +104,7 @@ gtk_source_style_manager_get_property (GObject *object,
|
|||
}
|
||||
|
||||
static void
|
||||
free_schemes (GtkSourceStyleManager *mgr)
|
||||
free_schemes (GtkSourceStyleSchemeManager *mgr)
|
||||
{
|
||||
if (mgr->priv->schemes_hash != NULL)
|
||||
{
|
||||
|
@ -114,27 +117,27 @@ free_schemes (GtkSourceStyleManager *mgr)
|
|||
}
|
||||
|
||||
static void
|
||||
gtk_source_style_manager_finalize (GObject *object)
|
||||
gtk_source_style_scheme_manager_finalize (GObject *object)
|
||||
{
|
||||
GtkSourceStyleManager *mgr;
|
||||
GtkSourceStyleSchemeManager *mgr;
|
||||
|
||||
mgr = GTK_SOURCE_STYLE_MANAGER (object);
|
||||
mgr = GTK_SOURCE_STYLE_SCHEME_MANAGER (object);
|
||||
|
||||
free_schemes (mgr);
|
||||
|
||||
g_strfreev (mgr->priv->search_path);
|
||||
|
||||
G_OBJECT_CLASS (gtk_source_style_manager_parent_class)->finalize (object);
|
||||
G_OBJECT_CLASS (gtk_source_style_scheme_manager_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_source_style_manager_class_init (GtkSourceStyleManagerClass *klass)
|
||||
gtk_source_style_scheme_manager_class_init (GtkSourceStyleSchemeManagerClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->finalize = gtk_source_style_manager_finalize;
|
||||
object_class->set_property = gtk_source_style_manager_set_property;
|
||||
object_class->get_property = gtk_source_style_manager_get_property;
|
||||
object_class->finalize = gtk_source_style_scheme_manager_finalize;
|
||||
object_class->set_property = gtk_source_style_scheme_manager_set_property;
|
||||
object_class->get_property = gtk_source_style_scheme_manager_get_property;
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_SEARCH_PATH,
|
||||
|
@ -154,14 +157,15 @@ gtk_source_style_manager_class_init (GtkSourceStyleManagerClass *klass)
|
|||
G_TYPE_STRV,
|
||||
G_PARAM_READABLE));
|
||||
|
||||
g_type_class_add_private (object_class, sizeof(GtkSourceStyleManagerPrivate));
|
||||
g_type_class_add_private (object_class, sizeof(GtkSourceStyleSchemeManagerPrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_source_style_manager_init (GtkSourceStyleManager *mgr)
|
||||
gtk_source_style_scheme_manager_init (GtkSourceStyleSchemeManager *mgr)
|
||||
{
|
||||
mgr->priv = G_TYPE_INSTANCE_GET_PRIVATE (mgr, GTK_TYPE_SOURCE_STYLE_MANAGER,
|
||||
GtkSourceStyleManagerPrivate);
|
||||
mgr->priv = G_TYPE_INSTANCE_GET_PRIVATE (mgr,
|
||||
GTK_TYPE_SOURCE_STYLE_SCHEME_MANAGER,
|
||||
GtkSourceStyleSchemeManagerPrivate);
|
||||
mgr->priv->schemes_hash = NULL;
|
||||
mgr->priv->ids = NULL;
|
||||
mgr->priv->search_path = NULL;
|
||||
|
@ -169,35 +173,35 @@ gtk_source_style_manager_init (GtkSourceStyleManager *mgr)
|
|||
}
|
||||
|
||||
/**
|
||||
* gtk_source_style_manager_new:
|
||||
* gtk_source_style_scheme_manager_new:
|
||||
*
|
||||
* Creates a new style manager. If you do not need more than one style
|
||||
* manager then use gtk_source_style_manager_get_default() instead.
|
||||
* manager then use gtk_source_style_scheme_manager_get_default() instead.
|
||||
*
|
||||
* Returns: a #GtkSourceStyleManager.
|
||||
* Returns: a #GtkSourceStyleSchemeManager.
|
||||
*/
|
||||
GtkSourceStyleManager *
|
||||
gtk_source_style_manager_new (void)
|
||||
GtkSourceStyleSchemeManager *
|
||||
gtk_source_style_scheme_manager_new (void)
|
||||
{
|
||||
return g_object_new (GTK_TYPE_SOURCE_STYLE_MANAGER, NULL);
|
||||
return g_object_new (GTK_TYPE_SOURCE_STYLE_SCHEME_MANAGER, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_source_style_manager_get_default:
|
||||
* gtk_source_style_scheme_manager_get_default:
|
||||
*
|
||||
* Returns the default #GtkSourceStyleManager instance.
|
||||
* Returns the default #GtkSourceStyleSchemeManager instance.
|
||||
*
|
||||
* Returns: a #GtkSourceStyleManager. Return value is owned
|
||||
* Returns: a #GtkSourceStyleSchemeManager. Return value is owned
|
||||
* by GtkSourceView library and must not be unref'ed.
|
||||
*/
|
||||
GtkSourceStyleManager *
|
||||
gtk_source_style_manager_get_default (void)
|
||||
GtkSourceStyleSchemeManager *
|
||||
gtk_source_style_scheme_manager_get_default (void)
|
||||
{
|
||||
static GtkSourceStyleManager *instance;
|
||||
static GtkSourceStyleSchemeManager *instance;
|
||||
|
||||
if (instance == NULL)
|
||||
{
|
||||
instance = gtk_source_style_manager_new ();
|
||||
instance = gtk_source_style_scheme_manager_new ();
|
||||
g_object_add_weak_pointer (G_OBJECT (instance),
|
||||
(gpointer) &instance);
|
||||
}
|
||||
|
@ -209,6 +213,7 @@ static GSList *
|
|||
ids_list_remove (GSList *ids, const gchar *id, gboolean free_data)
|
||||
{
|
||||
GSList *o = g_slist_find_custom (ids, id, (GCompareFunc) strcmp);
|
||||
|
||||
if (o != NULL)
|
||||
{
|
||||
if (free_data)
|
||||
|
@ -328,7 +333,7 @@ slist_to_strv (GSList *list)
|
|||
}
|
||||
|
||||
static void
|
||||
reload_if_needed (GtkSourceStyleManager *mgr)
|
||||
reload_if_needed (GtkSourceStyleSchemeManager *mgr)
|
||||
{
|
||||
GSList *ids = NULL;
|
||||
GSList *files;
|
||||
|
@ -340,7 +345,7 @@ reload_if_needed (GtkSourceStyleManager *mgr)
|
|||
|
||||
schemes_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
|
||||
|
||||
files = _gtk_source_view_get_file_list ((gchar **)gtk_source_style_manager_get_search_path (mgr),
|
||||
files = _gtk_source_view_get_file_list ((gchar **)gtk_source_style_scheme_manager_get_search_path (mgr),
|
||||
SCHEME_FILE_SUFFIX,
|
||||
FALSE);
|
||||
|
||||
|
@ -384,7 +389,7 @@ reload_if_needed (GtkSourceStyleManager *mgr)
|
|||
}
|
||||
|
||||
static void
|
||||
notify_search_path (GtkSourceStyleManager *mgr)
|
||||
notify_search_path (GtkSourceStyleSchemeManager *mgr)
|
||||
{
|
||||
mgr->priv->need_reload = TRUE;
|
||||
|
||||
|
@ -393,8 +398,8 @@ notify_search_path (GtkSourceStyleManager *mgr)
|
|||
}
|
||||
|
||||
/**
|
||||
* gtk_source_style_manager_set_search_path:
|
||||
* @manager: a #GtkSourceStyleManager.
|
||||
* gtk_source_style_scheme_manager_set_search_path:
|
||||
* @manager: a #GtkSourceStyleSchemeManager.
|
||||
* @path: a %NULL-terminated array of strings or %NULL.
|
||||
*
|
||||
* Sets the list of directories where the @manager looks for
|
||||
|
@ -402,12 +407,12 @@ notify_search_path (GtkSourceStyleManager *mgr)
|
|||
* If @dirs is %NULL, the search path is reset to default.
|
||||
*/
|
||||
void
|
||||
gtk_source_style_manager_set_search_path (GtkSourceStyleManager *manager,
|
||||
gchar **path)
|
||||
gtk_source_style_scheme_manager_set_search_path (GtkSourceStyleSchemeManager *manager,
|
||||
gchar **path)
|
||||
{
|
||||
gchar **tmp;
|
||||
|
||||
g_return_if_fail (GTK_IS_SOURCE_STYLE_MANAGER (manager));
|
||||
g_return_if_fail (GTK_IS_SOURCE_STYLE_SCHEME_MANAGER (manager));
|
||||
|
||||
tmp = manager->priv->search_path;
|
||||
|
||||
|
@ -422,21 +427,21 @@ gtk_source_style_manager_set_search_path (GtkSourceStyleManager *manager,
|
|||
}
|
||||
|
||||
/**
|
||||
* gtk_source_style_manager_append_search_path:
|
||||
* @manager: a #GtkSourceStyleManager.
|
||||
* gtk_source_style_scheme_manager_append_search_path:
|
||||
* @manager: a #GtkSourceStyleSchemeManager.
|
||||
* @path: a directory or a filename.
|
||||
*
|
||||
* Appends @path to the list of directories where the @manager looks for
|
||||
* style scheme files.
|
||||
* See gtk_source_style_manager_set_search_path() for details.
|
||||
* See gtk_source_style_scheme_manager_set_search_path() for details.
|
||||
*/
|
||||
void
|
||||
gtk_source_style_manager_append_search_path (GtkSourceStyleManager *manager,
|
||||
const gchar *path)
|
||||
gtk_source_style_scheme_manager_append_search_path (GtkSourceStyleSchemeManager *manager,
|
||||
const gchar *path)
|
||||
{
|
||||
guint len = 0;
|
||||
|
||||
g_return_if_fail (GTK_IS_SOURCE_STYLE_MANAGER (manager));
|
||||
g_return_if_fail (GTK_IS_SOURCE_STYLE_SCHEME_MANAGER (manager));
|
||||
g_return_if_fail (path != NULL);
|
||||
|
||||
if (manager->priv->search_path == NULL)
|
||||
|
@ -457,22 +462,22 @@ gtk_source_style_manager_append_search_path (GtkSourceStyleManager *manager,
|
|||
}
|
||||
|
||||
/**
|
||||
* gtk_source_style_manager_prepend_search_path:
|
||||
* @manager: a #GtkSourceStyleManager.
|
||||
* gtk_source_style_scheme_manager_prepend_search_path:
|
||||
* @manager: a #GtkSourceStyleSchemeManager.
|
||||
* @path: a directory or a filename.
|
||||
*
|
||||
* Prepends @path to the list of directories where the @manager looks
|
||||
* for style scheme files.
|
||||
* See gtk_source_style_manager_set_search_path() for details.
|
||||
* See gtk_source_style_scheme_manager_set_search_path() for details.
|
||||
*/
|
||||
void
|
||||
gtk_source_style_manager_prepend_search_path (GtkSourceStyleManager *manager,
|
||||
const gchar *path)
|
||||
gtk_source_style_scheme_manager_prepend_search_path (GtkSourceStyleSchemeManager *manager,
|
||||
const gchar *path)
|
||||
{
|
||||
guint len = 0;
|
||||
gchar **new_search_path;
|
||||
|
||||
g_return_if_fail (GTK_IS_SOURCE_STYLE_MANAGER (manager));
|
||||
g_return_if_fail (GTK_IS_SOURCE_STYLE_SCHEME_MANAGER (manager));
|
||||
g_return_if_fail (path != NULL);
|
||||
|
||||
if (manager->priv->search_path == NULL)
|
||||
|
@ -483,32 +488,29 @@ gtk_source_style_manager_prepend_search_path (GtkSourceStyleManager *manager,
|
|||
len = g_strv_length (manager->priv->search_path);
|
||||
|
||||
new_search_path = g_new (gchar *, len + 2);
|
||||
|
||||
new_search_path[0] = g_strdup (path);
|
||||
|
||||
memcpy (new_search_path + 1, manager->priv->search_path, (len + 1) * sizeof (gchar*));
|
||||
|
||||
g_free (manager->priv->search_path);
|
||||
|
||||
manager->priv->search_path = new_search_path;
|
||||
|
||||
notify_search_path (manager);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_source_style_manager_get_search_path:
|
||||
* @manager: a #GtkSourceStyleManager.
|
||||
* gtk_source_style_scheme_manager_get_search_path:
|
||||
* @manager: a #GtkSourceStyleSchemeManager.
|
||||
*
|
||||
* Returns the current search path for the @manager.
|
||||
* See gtk_source_style_manager_set_search_path() for details.
|
||||
* See gtk_source_style_scheme_manager_set_search_path() for details.
|
||||
*
|
||||
* Returns: a NULL-terminated array of string containing the search path.
|
||||
* The array is owned by the @manager and must not be modified.
|
||||
*/
|
||||
G_CONST_RETURN gchar* G_CONST_RETURN *
|
||||
gtk_source_style_manager_get_search_path (GtkSourceStyleManager *manager)
|
||||
gtk_source_style_scheme_manager_get_search_path (GtkSourceStyleSchemeManager *manager)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_SOURCE_STYLE_MANAGER (manager), NULL);
|
||||
g_return_val_if_fail (GTK_IS_SOURCE_STYLE_SCHEME_MANAGER (manager), NULL);
|
||||
|
||||
if (manager->priv->search_path == NULL)
|
||||
manager->priv->search_path = _gtk_source_view_get_default_dirs (STYLES_DIR, FALSE);
|
||||
|
@ -517,15 +519,15 @@ gtk_source_style_manager_get_search_path (GtkSourceStyleManager *manager)
|
|||
}
|
||||
|
||||
/**
|
||||
* gtk_source_style_manager_force_rescan:
|
||||
* @manager: a #GtkSourceStyleManager
|
||||
* gtk_source_style_scheme_manager_force_rescan:
|
||||
* @manager: a #GtkSourceStyleSchemeManager
|
||||
*
|
||||
* Mark any currently cached information about the available style scehems
|
||||
* as invalid. All the available style schemes will be reloaded next time
|
||||
* the @manager is accessed.
|
||||
*/
|
||||
void
|
||||
gtk_source_style_manager_force_rescan (GtkSourceStyleManager *manager)
|
||||
gtk_source_style_scheme_manager_force_rescan (GtkSourceStyleSchemeManager *manager)
|
||||
{
|
||||
manager->priv->need_reload = TRUE;
|
||||
|
||||
|
@ -533,8 +535,8 @@ gtk_source_style_manager_force_rescan (GtkSourceStyleManager *manager)
|
|||
}
|
||||
|
||||
/**
|
||||
* gtk_source_style_manager_get_scheme_ids:
|
||||
* @manager: a #GtkSourceStyleManager
|
||||
* gtk_source_style_scheme_manager_get_scheme_ids:
|
||||
* @manager: a #GtkSourceStyleSchemeManager
|
||||
*
|
||||
* Returns the ids of the available style schemes.
|
||||
*
|
||||
|
@ -542,10 +544,10 @@ gtk_source_style_manager_force_rescan (GtkSourceStyleManager *manager)
|
|||
* available style schemes or %NULL if no style scheme is available. The array
|
||||
* is owned by the @manager and must not be modified.
|
||||
*/
|
||||
const gchar* G_CONST_RETURN *
|
||||
gtk_source_style_manager_get_scheme_ids (GtkSourceStyleManager *manager)
|
||||
G_CONST_RETURN gchar* G_CONST_RETURN *
|
||||
gtk_source_style_scheme_manager_get_scheme_ids (GtkSourceStyleSchemeManager *manager)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_SOURCE_STYLE_MANAGER (manager), NULL);
|
||||
g_return_val_if_fail (GTK_IS_SOURCE_STYLE_SCHEME_MANAGER (manager), NULL);
|
||||
|
||||
reload_if_needed (manager);
|
||||
|
||||
|
@ -553,8 +555,8 @@ gtk_source_style_manager_get_scheme_ids (GtkSourceStyleManager *manager)
|
|||
}
|
||||
|
||||
/**
|
||||
* gtk_source_style_manager_get_scheme:
|
||||
* @manager: a #GtkSourceStyleManager
|
||||
* gtk_source_style_scheme_manager_get_scheme:
|
||||
* @manager: a #GtkSourceStyleSchemeManager
|
||||
* @scheme_id: style scheme id to find
|
||||
*
|
||||
* Looks up style scheme by id.
|
||||
|
@ -563,10 +565,10 @@ gtk_source_style_manager_get_scheme_ids (GtkSourceStyleManager *manager)
|
|||
* @manager and must not be unref'ed.
|
||||
*/
|
||||
GtkSourceStyleScheme *
|
||||
gtk_source_style_manager_get_scheme (GtkSourceStyleManager *manager,
|
||||
const gchar *scheme_id)
|
||||
gtk_source_style_scheme_manager_get_scheme (GtkSourceStyleSchemeManager *manager,
|
||||
const gchar *scheme_id)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_SOURCE_STYLE_MANAGER (manager), NULL);
|
||||
g_return_val_if_fail (GTK_IS_SOURCE_STYLE_SCHEME_MANAGER (manager), NULL);
|
||||
g_return_val_if_fail (scheme_id != NULL, NULL);
|
||||
|
||||
reload_if_needed (manager);
|
|
@ -0,0 +1,90 @@
|
|||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; coding: utf-8 -*-
|
||||
* gtksourcestyleschememanager.h
|
||||
*
|
||||
* Copyright (C) 2003-2007 - Paolo Maggi <paolo.maggi@polito.it>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program 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 Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GTK_SOURCE_STYLE_SCHEME_MANAGER_H__
|
||||
#define __GTK_SOURCE_STYLE_SCHEME_MANAGER_H__
|
||||
|
||||
#include <gtksourceview/gtksourcestylescheme.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GTK_TYPE_SOURCE_STYLE_SCHEME_MANAGER (gtk_source_style_scheme_manager_get_type ())
|
||||
#define GTK_SOURCE_STYLE_SCHEME_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_SOURCE_STYLE_SCHEME_MANAGER, GtkSourceStyleSchemeManager))
|
||||
#define GTK_SOURCE_STYLE_SCHEME_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_SOURCE_STYLE_SCHEME_MANAGER, GtkSourceStyleSchemeManagerClass))
|
||||
#define GTK_IS_SOURCE_STYLE_SCHEME_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_SOURCE_STYLE_SCHEME_MANAGER))
|
||||
#define GTK_IS_SOURCE_STYLE_SCHEME_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SOURCE_STYLE_SCHEME_MANAGER))
|
||||
#define GTK_SOURCE_STYLE_SCHEME_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_SOURCE_STYLE_SCHEME_MANAGER, GtkSourceStyleSchemeManagerClass))
|
||||
|
||||
|
||||
typedef struct _GtkSourceStyleSchemeManager GtkSourceStyleSchemeManager;
|
||||
typedef struct _GtkSourceStyleSchemeManagerClass GtkSourceStyleSchemeManagerClass;
|
||||
typedef struct _GtkSourceStyleSchemeManagerPrivate GtkSourceStyleSchemeManagerPrivate;
|
||||
|
||||
struct _GtkSourceStyleSchemeManager
|
||||
{
|
||||
GObject parent;
|
||||
|
||||
GtkSourceStyleSchemeManagerPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GtkSourceStyleSchemeManagerClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
/* Padding for future expansion */
|
||||
void (*_gtk_source_reserved1) (void);
|
||||
void (*_gtk_source_reserved2) (void);
|
||||
void (*_gtk_source_reserved3) (void);
|
||||
void (*_gtk_source_reserved4) (void);
|
||||
};
|
||||
|
||||
|
||||
GType gtk_source_style_scheme_manager_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GtkSourceStyleSchemeManager
|
||||
*gtk_source_style_scheme_manager_new (void);
|
||||
|
||||
GtkSourceStyleSchemeManager
|
||||
*gtk_source_style_scheme_manager_get_default (void);
|
||||
|
||||
void gtk_source_style_scheme_manager_set_search_path (GtkSourceStyleSchemeManager *manager,
|
||||
gchar **path);
|
||||
|
||||
void gtk_source_style_scheme_manager_append_search_path (GtkSourceStyleSchemeManager *manager,
|
||||
const gchar *path);
|
||||
|
||||
void gtk_source_style_scheme_manager_prepend_search_path (GtkSourceStyleSchemeManager *manager,
|
||||
const gchar *path);
|
||||
|
||||
G_CONST_RETURN gchar* G_CONST_RETURN *
|
||||
gtk_source_style_scheme_manager_get_search_path (GtkSourceStyleSchemeManager *manager);
|
||||
|
||||
void gtk_source_style_scheme_manager_force_rescan (GtkSourceStyleSchemeManager *manager);
|
||||
|
||||
G_CONST_RETURN gchar* G_CONST_RETURN *
|
||||
gtk_source_style_scheme_manager_get_scheme_ids (GtkSourceStyleSchemeManager *manager);
|
||||
|
||||
GtkSourceStyleScheme *gtk_source_style_scheme_manager_get_scheme (GtkSourceStyleSchemeManager *manager,
|
||||
const gchar *scheme_id);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_SOURCE_STYLE_SCHEME_MANAGER_H__ */
|
||||
|
|
@ -34,41 +34,41 @@ case "$base" in
|
|||
esac
|
||||
echo "#line 1 \"$srcdir/$base\""
|
||||
|
||||
sed -e 's/#include \"gtksourcecontextengine.h\"/#include \"gtksourcecontextengine-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourceengine.h\"/#include \"gtksourceengine-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourceiter.h\"/#include \"gtksourceiter-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourcelanguage.h\"/#include \"gtksourcelanguage-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourcelanguage-private.h\"/#include \"gtksourcelanguage-private-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourcelanguagemanager.h\"/#include \"gtksourcelanguagemanager-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourcestyle.h\"/#include \"gtksourcestyle-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourcestylemanager.h\"/#include \"gtksourcestylemanager-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourcestylescheme.h\"/#include \"gtksourcestylescheme-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourcestyle-private.h\"/#include \"gtksourcestyle-private-mangled.h\"/' \
|
||||
-e 's/#include \"gtktextregion.h\"/#include \"gtktextregion-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourceview-utils.h\"/#include \"gtksourceview-utils-mangled.h\"/' \
|
||||
\
|
||||
-e 's@#include <gtksourceview/gtksourcecontextengine.h>@#include <gtksourceview/gtksourcecontextengine-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtksourceengine.h>@#include <gtksourceview/gtksourceengine-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtksourceiter.h>@#include <gtksourceview/gtksourceiter-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtksourcelanguage.h>@#include <gtksourceview/gtksourcelanguage-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtksourcelanguage-private.h>@#include <gtksourceview/gtksourcelanguage-private-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtksourcelanguagemanager.h>@#include <gtksourceview/gtksourcelanguagemanager-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtksourcestyle.h>@#include <gtksourceview/gtksourcestyle-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtksourcestylemanager.h>@#include <gtksourceview/gtksourcestylemanager-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtksourcestylescheme.h>@#include <gtksourceview/gtksourcestylescheme-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtktextregion.h>@#include <gtksourceview/gtktextregion-mangled.h>@' \
|
||||
\
|
||||
-e 's@#include \"gtksourcebuffer.h\"@@' \
|
||||
-e 's@#include \"gtksourceview.h\"@@' \
|
||||
\
|
||||
-e 's/GtkSource/MooGtkSource/g' \
|
||||
-e 's/GtkTextRegion/MooGtkTextRegion/g' \
|
||||
-e 's/_gtk_source/gtk_source/g' \
|
||||
-e 's/gtk_source/_moo_gtk_source/g' \
|
||||
-e 's/_gtk_text_region/gtk_text_region/g' \
|
||||
-e 's/gtk_text_region/_moo_gtk_text_region/g' \
|
||||
\
|
||||
-e 's/g_slice_new/_moo_new/g' \
|
||||
-e 's/g_slice_free/_moo_free/g' \
|
||||
\
|
||||
sed -e 's/#include \"gtksourcecontextengine.h\"/#include \"gtksourcecontextengine-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourceengine.h\"/#include \"gtksourceengine-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourceiter.h\"/#include \"gtksourceiter-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourcelanguage.h\"/#include \"gtksourcelanguage-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourcelanguage-private.h\"/#include \"gtksourcelanguage-private-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourcelanguagemanager.h\"/#include \"gtksourcelanguagemanager-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourcestyle.h\"/#include \"gtksourcestyle-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourcestyleschememanager.h\"/#include \"gtksourcestyleschememanager-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourcestylescheme.h\"/#include \"gtksourcestylescheme-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourcestyle-private.h\"/#include \"gtksourcestyle-private-mangled.h\"/' \
|
||||
-e 's/#include \"gtktextregion.h\"/#include \"gtktextregion-mangled.h\"/' \
|
||||
-e 's/#include \"gtksourceview-utils.h\"/#include \"gtksourceview-utils-mangled.h\"/' \
|
||||
\
|
||||
-e 's@#include <gtksourceview/gtksourcecontextengine.h>@#include <gtksourceview/gtksourcecontextengine-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtksourceengine.h>@#include <gtksourceview/gtksourceengine-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtksourceiter.h>@#include <gtksourceview/gtksourceiter-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtksourcelanguage.h>@#include <gtksourceview/gtksourcelanguage-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtksourcelanguage-private.h>@#include <gtksourceview/gtksourcelanguage-private-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtksourcelanguagemanager.h>@#include <gtksourceview/gtksourcelanguagemanager-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtksourcestyle.h>@#include <gtksourceview/gtksourcestyle-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtksourcestyleschememanager.h>@#include <gtksourceview/gtksourcestyleschememanager-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtksourcestylescheme.h>@#include <gtksourceview/gtksourcestylescheme-mangled.h>@' \
|
||||
-e 's@#include <gtksourceview/gtktextregion.h>@#include <gtksourceview/gtktextregion-mangled.h>@' \
|
||||
\
|
||||
-e 's@#include \"gtksourcebuffer.h\"@@' \
|
||||
-e 's@#include \"gtksourceview.h\"@@' \
|
||||
\
|
||||
-e 's/GtkSource/MooGtkSource/g' \
|
||||
-e 's/GtkTextRegion/MooGtkTextRegion/g' \
|
||||
-e 's/_gtk_source/gtk_source/g' \
|
||||
-e 's/gtk_source/_moo_gtk_source/g' \
|
||||
-e 's/_gtk_text_region/gtk_text_region/g' \
|
||||
-e 's/gtk_text_region/_moo_gtk_text_region/g' \
|
||||
\
|
||||
-e 's/g_slice_new/_moo_new/g' \
|
||||
-e 's/g_slice_free/_moo_free/g' \
|
||||
\
|
||||
$custom_cmd "$1" || exit $?
|
||||
|
|
|
@ -5,17 +5,21 @@ languagespecsdir = ${MOO_TEXT_LANG_FILES_DIR}
|
|||
langs2 = \
|
||||
ada.lang \
|
||||
awk.lang \
|
||||
boo.lang \
|
||||
changelog.lang \
|
||||
c.lang \
|
||||
chdr.lang \
|
||||
c.lang \
|
||||
cpp.lang \
|
||||
csharp.lang \
|
||||
css.lang \
|
||||
def.lang \
|
||||
desktop.lang \
|
||||
diff.lang \
|
||||
d.lang \
|
||||
docbook.lang \
|
||||
dpatch.lang \
|
||||
dtd.lang \
|
||||
erlang.lang \
|
||||
fortran.lang \
|
||||
gap.lang \
|
||||
gtk-doc.lang \
|
||||
|
@ -30,10 +34,12 @@ langs2 = \
|
|||
javascript.lang \
|
||||
latex.lang \
|
||||
libtool.lang \
|
||||
lua.lang \
|
||||
m4.lang \
|
||||
makefile.lang \
|
||||
ms.lang \
|
||||
nemerle.lang \
|
||||
objc.lang \
|
||||
ocaml.lang \
|
||||
ocl.lang \
|
||||
octave.lang \
|
||||
pascal.lang \
|
||||
|
@ -43,33 +49,28 @@ langs2 = \
|
|||
po.lang \
|
||||
python-console.lang \
|
||||
python.lang \
|
||||
R.lang \
|
||||
rpmspec.lang \
|
||||
ruby.lang \
|
||||
scheme.lang \
|
||||
sh.lang \
|
||||
sql.lang \
|
||||
tcl.lang \
|
||||
texinfo.lang \
|
||||
vala.lang \
|
||||
vbnet.lang \
|
||||
verilog.lang \
|
||||
vhdl.lang \
|
||||
xml.lang \
|
||||
yacc.lang
|
||||
|
||||
langs1 = \
|
||||
boo.lang \
|
||||
check.sh \
|
||||
d.lang \
|
||||
docbook.lang \
|
||||
lua.lang \
|
||||
msil.lang \
|
||||
nemerle.lang \
|
||||
ocaml.lang \
|
||||
R.lang \
|
||||
spec.lang \
|
||||
vbnet.lang \
|
||||
verilog.lang \
|
||||
vhdl.lang
|
||||
msil.lang
|
||||
|
||||
styles = \
|
||||
kate.xml \
|
||||
gvim.xml \
|
||||
classic.xml \
|
||||
oblivion.xml \
|
||||
tango.xml
|
||||
|
||||
languagespecs_DATA = \
|
||||
|
|
|
@ -20,66 +20,109 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
-->
|
||||
<language name="R" version="1.0" _section="Scripts" mimetypes="text/x-R">
|
||||
<escape-char>\</escape-char>
|
||||
<string _name="Double Quoted String" style="String" end-at-line-end="TRUE">
|
||||
<start-regex>"</start-regex>
|
||||
<end-regex>"</end-regex>
|
||||
</string>
|
||||
<string _name="Single Quoted String" style="String" end-at-line-end="TRUE">
|
||||
<start-regex>'</start-regex>
|
||||
<end-regex>'</end-regex>
|
||||
</string>
|
||||
<line-comment _name="Line Comment" style="Comment">
|
||||
<start-regex>#</start-regex>
|
||||
</line-comment>
|
||||
<keyword-list _name="Reserved Constant" style="String" case-sensitive="TRUE">
|
||||
<keyword>FALSE</keyword>
|
||||
<keyword>TRUE</keyword>
|
||||
<keyword>T</keyword>
|
||||
<keyword>F</keyword>
|
||||
<keyword>NULL</keyword>
|
||||
<keyword>NA</keyword>
|
||||
<keyword>Inf</keyword>
|
||||
</keyword-list>
|
||||
<keyword-list _name="Keyword" style="Keyword" case-sensitive="TRUE">
|
||||
<keyword>break</keyword>
|
||||
<keyword>next</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>while</keyword>
|
||||
<keyword>repeat</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>try</keyword>
|
||||
<keyword>switch</keyword>
|
||||
<keyword>in</keyword>
|
||||
</keyword-list>
|
||||
<keyword-list _name="Reserved Class" style="Data Type" case-sensitive="TRUE">
|
||||
<keyword>array</keyword>
|
||||
<keyword>character</keyword>
|
||||
<keyword>complex</keyword>
|
||||
<keyword>data.frame</keyword>
|
||||
<keyword>double</keyword>
|
||||
<keyword>factor</keyword>
|
||||
<keyword>function</keyword>
|
||||
<keyword>integer</keyword>
|
||||
<keyword>list</keyword>
|
||||
<keyword>logical</keyword>
|
||||
<keyword>matrix</keyword>
|
||||
<keyword>numeric</keyword>
|
||||
<keyword>vector</keyword>
|
||||
</keyword-list>
|
||||
<pattern-item _name="Integer Number" style="Decimal">
|
||||
<regex>\b([1-9][0-9]*|0)[i]?\b</regex>
|
||||
</pattern-item>
|
||||
<pattern-item _name="Floating Point Number" style="Floating Point">
|
||||
<regex>\b([0-9]+[Ee][-+]?[0-9]+|([0-9]*\.[0-9]+|[0-9]+\.)([Ee][-+]?[0-9]+)?)[i]?\b</regex>
|
||||
</pattern-item>
|
||||
<pattern-item _name="Assignment Operator" style="Keyword">
|
||||
<regex>(<){1,2}-</regex>
|
||||
</pattern-item>
|
||||
<pattern-item _name="Delimiter" style="Others 3">
|
||||
<regex>[\)\(]+|[\{\}]+|[][]+</regex>
|
||||
</pattern-item>
|
||||
<language id="r" _name="R" version="2.0" _section="Scripts">
|
||||
<metadata>
|
||||
<property name="mimetypes">text/x-R</property>
|
||||
<property name="globs">*.R,*.Rout;*.r;*.Rhistory;*.Rt;*.Rout.save;*.Rout.fail</property>
|
||||
<property name="line-comment-start">#</property>
|
||||
</metadata>
|
||||
|
||||
<styles>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="reserved-classes" _name="Reserved Class" map-to="def:type"/>
|
||||
<style id="assignment-operator" _name="Assignment Operator" map-to="def:operator"/>
|
||||
<style id="delimiter" _name="Delimiter" map-to="def:operator"/>
|
||||
<style id="special-constant" _name="Special Constant" map-to="def:special-constant"/>
|
||||
<style id="boolean" _name="Boolean value" map-to="def:boolean"/>
|
||||
<style id="integer-number" _name="Integer Number" map-to="def:base-n-integer"/>
|
||||
<style id="floating-point" _name="Floating point number" map-to="def:floating-point"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
||||
<context id="keywords" style-ref="keyword">
|
||||
<keyword>break</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>in</keyword>
|
||||
<keyword>next</keyword>
|
||||
<keyword>repeat</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>switch</keyword>
|
||||
<keyword>try</keyword>
|
||||
<keyword>while</keyword>
|
||||
</context>
|
||||
|
||||
<context id="reserved-classes" style-ref="reserved-classes">
|
||||
<keyword>array</keyword>
|
||||
<keyword>character</keyword>
|
||||
<keyword>complex</keyword>
|
||||
<keyword>data.frame</keyword>
|
||||
<keyword>double</keyword>
|
||||
<keyword>factor</keyword>
|
||||
<keyword>function</keyword>
|
||||
<keyword>integer</keyword>
|
||||
<keyword>list</keyword>
|
||||
<keyword>logical</keyword>
|
||||
<keyword>matrix</keyword>
|
||||
<keyword>numeric</keyword>
|
||||
<keyword>vector</keyword>
|
||||
</context>
|
||||
|
||||
<context id="assignment-operator" style-ref="assignment-operator">
|
||||
<match>(<){1,2}-</match>
|
||||
</context>
|
||||
|
||||
<context id="delimiters" style-ref="delimiter">
|
||||
<match>[\)\(]+|[\{\}]+|[][]+</match>
|
||||
</context>
|
||||
|
||||
<context id="special-constants" style-ref="special-constant">
|
||||
<keyword>Inf</keyword>
|
||||
<keyword>NA</keyword>
|
||||
<keyword>NaN</keyword>
|
||||
<keyword>NULL</keyword>
|
||||
</context>
|
||||
|
||||
<context id="boolean" style-ref="boolean">
|
||||
<keyword>FALSE</keyword>
|
||||
<keyword>TRUE</keyword>
|
||||
</context>
|
||||
|
||||
<context id="integer-number" style-ref="integer-number">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
([1-9][0-9]*|0)[i]?
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="floating-point" style-ref="floating-point">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
([0-9]+[Ee][-+]?[0-9]+|
|
||||
([0-9]*\.[0-9]+|[0-9]+\.)([Ee][-+]?[0-9]+)?)
|
||||
[i]?
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="r">
|
||||
<include>
|
||||
<context ref="def:shell-like-comment"/>
|
||||
<context ref="def:string"/>
|
||||
<context ref="def:single-quoted-string"/>
|
||||
<context ref="keywords"/>
|
||||
<context ref="assignment-operator"/>
|
||||
<context ref="delimiters"/>
|
||||
<context ref="special-constants"/>
|
||||
<context ref="boolean"/>
|
||||
<context ref="integer-number"/>
|
||||
<context ref="floating-point"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
</definitions>
|
||||
|
||||
</language>
|
||||
|
|
|
@ -26,71 +26,73 @@
|
|||
<metadata>
|
||||
<property name="mimetypes">text/x-ada;text/x-adasrc</property>
|
||||
<property name="globs">*.adb;*.ads</property>
|
||||
<property name="line-comment-start">--</property>
|
||||
</metadata>
|
||||
|
||||
<styles>
|
||||
<style id="comment" _name="Comment" map-to="def:comment"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="decimal" _name="Decimal" map-to="def:decimal"/>
|
||||
<style id="boolean" _name="Boolean" map-to="def:string"/>
|
||||
<style id="data-type" _name="Data Type" map-to="def:data-type"/>
|
||||
<style id="decimal" _name="Decimal number" map-to="def:decimal"/>
|
||||
<style id="boolean" _name="Boolean value" map-to="def:boolean"/>
|
||||
<style id="storage-class" _name="Storage Class" map-to="def:type"/>
|
||||
<style id="type" _name="Data Type" map-to="def:type"/>
|
||||
<style id="preprocessor" _name="Preprocessor" map-to="def:preprocessor"/>
|
||||
<style id="base-n-number" _name="Arbitrary base number" map-to="def:base-n-integer"/>
|
||||
<style id="real" _name="Real number" map-to="def:floating-point"/>
|
||||
<style id="escape" _name="Character Escape" map-to="def:escape"/>
|
||||
<style id="ident" _name="Ada Identifier"/>
|
||||
<style id="escaped-character" _name="Escaped Character" map-to="def:special-char"/>
|
||||
</styles>
|
||||
|
||||
<default-regex-options case-sensitive="false"/>
|
||||
|
||||
<definitions>
|
||||
|
||||
<context id="line-comment" style-ref="comment" end-at-line-end="true">
|
||||
<start>--</start>
|
||||
<include>
|
||||
<context ref="def:in-line-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="string" style-ref="string" end-at-line-end="true">
|
||||
<start>"</start>
|
||||
<end>"</end>
|
||||
<!-- no escapes possible except for "" = literal " -->
|
||||
<include>
|
||||
<context id="string-esc" style-ref="escape" extend-parent="true">
|
||||
<context id="string-esc" style-ref="escaped-character" extend-parent="true">
|
||||
<match>""</match>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="character-constant" style-ref="string">
|
||||
<match>'.'</match>
|
||||
</context>
|
||||
|
||||
<context id="preprocessor-keyword" style-ref="preprocessor">
|
||||
<keyword>package</keyword>
|
||||
<keyword>pragma</keyword>
|
||||
<keyword>use</keyword>
|
||||
<keyword>with</keyword>
|
||||
</context>
|
||||
|
||||
<context id="function" style-ref="keyword">
|
||||
<keyword>function</keyword>
|
||||
<keyword>procedure</keyword>
|
||||
<keyword>return</keyword>
|
||||
</context>
|
||||
|
||||
<context id="keyword" style-ref="keyword">
|
||||
<keyword>abort</keyword>
|
||||
<keyword>abs</keyword>
|
||||
<keyword>abstract</keyword>
|
||||
<keyword>accept</keyword>
|
||||
<keyword>access</keyword>
|
||||
<keyword>aliased</keyword>
|
||||
<keyword>all</keyword>
|
||||
<keyword>and</keyword>
|
||||
<keyword>array</keyword>
|
||||
<keyword>at</keyword>
|
||||
<keyword>begin</keyword>
|
||||
<keyword>body</keyword>
|
||||
<keyword>case</keyword>
|
||||
<keyword>constant</keyword>
|
||||
<keyword>declare</keyword>
|
||||
<keyword>delay</keyword>
|
||||
<keyword>delta</keyword>
|
||||
<keyword>digits</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>elsif</keyword>
|
||||
|
@ -104,20 +106,16 @@
|
|||
<keyword>if</keyword>
|
||||
<keyword>in</keyword>
|
||||
<keyword>is</keyword>
|
||||
<keyword>limited</keyword>
|
||||
<keyword>loop</keyword>
|
||||
<keyword>mod</keyword>
|
||||
<keyword>new</keyword>
|
||||
<keyword>not</keyword>
|
||||
<keyword>null</keyword>
|
||||
<keyword>of</keyword>
|
||||
<keyword>or</keyword>
|
||||
<keyword>others</keyword>
|
||||
<keyword>out</keyword>
|
||||
<keyword>private</keyword>
|
||||
<keyword>protected</keyword>
|
||||
<keyword>raise</keyword>
|
||||
<keyword>range</keyword>
|
||||
<keyword>record</keyword>
|
||||
<keyword>rem</keyword>
|
||||
<keyword>renames</keyword>
|
||||
|
@ -126,7 +124,6 @@
|
|||
<keyword>select</keyword>
|
||||
<keyword>separate</keyword>
|
||||
<keyword>subtype</keyword>
|
||||
<keyword>tagged</keyword>
|
||||
<keyword>task</keyword>
|
||||
<keyword>terminate</keyword>
|
||||
<keyword>then</keyword>
|
||||
|
@ -136,7 +133,26 @@
|
|||
<keyword>while</keyword>
|
||||
<keyword>xor</keyword>
|
||||
</context>
|
||||
<context id="type" style-ref="data-type">
|
||||
|
||||
<context id="storage-class" style-ref="storage-class">
|
||||
<keyword>abstract</keyword>
|
||||
<keyword>access</keyword>
|
||||
<keyword>aliased</keyword>
|
||||
<keyword>array</keyword>
|
||||
<keyword>at</keyword>
|
||||
<keyword>constant</keyword>
|
||||
<keyword>delta</keyword>
|
||||
<keyword>digits</keyword>
|
||||
<keyword>interface</keyword>
|
||||
<keyword>limited</keyword>
|
||||
<keyword>of</keyword>
|
||||
<keyword>private</keyword>
|
||||
<keyword>range</keyword>
|
||||
<keyword>tagged</keyword>
|
||||
<keyword>synchronized</keyword>
|
||||
</context>
|
||||
|
||||
<context id="type" style-ref="type">
|
||||
<keyword>boolean</keyword>
|
||||
<keyword>character</keyword>
|
||||
<keyword>count</keyword>
|
||||
|
@ -150,8 +166,10 @@
|
|||
<keyword>short_integer</keyword>
|
||||
<keyword>string</keyword>
|
||||
</context>
|
||||
|
||||
<define-regex id="hexnum">[0-9a-f][0-9a-f_]*</define-regex>
|
||||
<define-regex id="exponent">[Ee][+-]?[0-9][0-9_]*</define-regex>
|
||||
|
||||
<context id="based-numeral" style-ref="base-n-number">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
|
@ -159,6 +177,7 @@
|
|||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="real" style-ref="real">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
|
@ -166,6 +185,7 @@
|
|||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="number" style-ref="decimal">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
|
@ -173,10 +193,12 @@
|
|||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
<context id="true-and-false" style-ref="boolean">
|
||||
|
||||
<context id="boolean" style-ref="boolean">
|
||||
<keyword>true</keyword>
|
||||
<keyword>false</keyword>
|
||||
</context>
|
||||
|
||||
<context id="ada">
|
||||
<include>
|
||||
<context ref="line-comment"/>
|
||||
|
@ -185,12 +207,14 @@
|
|||
<context ref="preprocessor-keyword"/>
|
||||
<context ref="function"/>
|
||||
<context ref="keyword"/>
|
||||
<context ref="storage-class"/>
|
||||
<context ref="type"/>
|
||||
<context ref="based-numeral"/>
|
||||
<context ref="real"/>
|
||||
<context ref="number"/>
|
||||
<context ref="true-and-false"/>
|
||||
<context ref="boolean"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
</definitions>
|
||||
</language>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<styles>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="pattern" _name="Pattern" map-to="def:preprocessor"/>
|
||||
<style id="variable" _name="Type" map-to="sh:variable1"/>
|
||||
<style id="variable" _name="Variable" map-to="def:identifier"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
<!--
|
||||
|
||||
Author: Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
@ -21,174 +20,237 @@
|
|||
Boston, MA 02111-1307, USA.
|
||||
|
||||
-->
|
||||
<language name="Boo" version="1.0" _section="Sources" mimetypes="text/x-boo">
|
||||
<language id="boo" _name="Boo" version="2.0" _section="Sources">
|
||||
<metadata>
|
||||
<property name="mimetypes">text/x-boo</property>
|
||||
<property name="globs">*.boo</property>
|
||||
<property name="line-comment-start">#</property>
|
||||
<property name="block-comment-start">/*</property>
|
||||
<property name="block-comment-end">*/</property>
|
||||
</metadata>
|
||||
|
||||
<escape-char>\</escape-char>
|
||||
<styles>
|
||||
<style id="comment" _name="Comment" map-to="def:comment"/>
|
||||
<style id="multiline-string" _name="Multiline string" map-to="def:string"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="regex" _name="Regular Expression" map-to="def:string"/>
|
||||
<style id="namespace" _name="Namespace" map-to="def:preprocessor"/>
|
||||
<style id="type" _name="Data Type" map-to="def:type"/>
|
||||
<style id="definition" _name="Definition" map-to="def:keyword"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="special-variable" _name="Special Variable" map-to="def:identifier"/>
|
||||
<style id="null-value" _name="Null Value" map-to="def:special-constant"/>
|
||||
<style id="boolean" _name="Boolean" map-to="def:boolean"/>
|
||||
<style id="number" _name="Number" map-to="def:number"/>
|
||||
<style id="builtin" _name="Builtin Function" map-to="def:builtin"/>
|
||||
</styles>
|
||||
|
||||
<string name = "Multiline String" style = "String" end-at-line-end = "false">
|
||||
<start-regex>"""</start-regex>
|
||||
<end-regex>"""</end-regex>
|
||||
</string>
|
||||
<definitions>
|
||||
|
||||
<string name = "Double Quoted String" style = "String" end-at-line-end = "true">
|
||||
<start-regex>"</start-regex>
|
||||
<end-regex>"</end-regex>
|
||||
</string>
|
||||
<context id="c-style-line-comment" style-ref="comment" end-at-line-end="true">
|
||||
<start>//</start>
|
||||
<include>
|
||||
<context ref="def:in-line-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<string name = "Single Quoted String" style = "String" end-at-line-end = "true">
|
||||
<start-regex>'</start-regex>
|
||||
<end-regex>'</end-regex>
|
||||
</string>
|
||||
|
||||
<line-comment name = "Line Comment" style= "Comment">
|
||||
<start-regex>#</start-regex>
|
||||
</line-comment>
|
||||
|
||||
<line-comment name = "C Style Line Comment" style = "Comment">
|
||||
<start-regex>//</start-regex>
|
||||
</line-comment>
|
||||
|
||||
<string name = "Regular Expression" style = "String" end-at-line-end = "true">
|
||||
<start-regex>/[^/]</start-regex>
|
||||
<end-regex>/</end-regex>
|
||||
</string>
|
||||
|
||||
<block-comment name = "Block Comment" style = "Comment">
|
||||
<start-regex>/\*</start-regex>
|
||||
<end-regex>\*/</end-regex>
|
||||
</block-comment>
|
||||
<context id="block-comment" style-ref="comment">
|
||||
<start>/\*</start>
|
||||
<end>\*/</end>
|
||||
<include>
|
||||
<context ref="def:in-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<keyword-list name = "Namespace" style = "Preprocessor" case-sensitive = "true">
|
||||
<keyword>import</keyword>
|
||||
<keyword>from</keyword>
|
||||
<keyword>as</keyword>
|
||||
<keyword>namespace</keyword>
|
||||
</keyword-list>
|
||||
<context id="multiline-string" style-ref="multiline-string">
|
||||
<start>"""</start>
|
||||
<end>"""</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<keyword-list _name = "Primitive" style = "Data Type" case-sensitive = "true">
|
||||
<keyword>bool</keyword>
|
||||
<keyword>byte</keyword>
|
||||
<keyword>sbyte</keyword>
|
||||
<keyword>double</keyword>
|
||||
<keyword>decimal</keyword>
|
||||
<keyword>single</keyword>
|
||||
<keyword>short</keyword>
|
||||
<keyword>ushort</keyword>
|
||||
<keyword>int</keyword>
|
||||
<keyword>char</keyword>
|
||||
<keyword>uint</keyword>
|
||||
<keyword>long</keyword>
|
||||
<keyword>ulong</keyword>
|
||||
<keyword>object</keyword>
|
||||
<keyword>duck</keyword>
|
||||
<keyword>string</keyword>
|
||||
<keyword>regex</keyword>
|
||||
<keyword>date</keyword>
|
||||
<keyword>timespan</keyword>
|
||||
</keyword-list>
|
||||
<context id="double-quoted-string" style-ref="string" end-at-line-end="true">
|
||||
<start>"</start>
|
||||
<end>"</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<keyword-list name="Definition" style = "Keyword" case-sensitive="true">
|
||||
<keyword>abstract</keyword>
|
||||
<keyword>virtual</keyword>
|
||||
<keyword>override</keyword>
|
||||
<keyword>static</keyword>
|
||||
<keyword>final</keyword>
|
||||
<keyword>transient</keyword>
|
||||
|
||||
<keyword>protected</keyword>
|
||||
<keyword>private</keyword>
|
||||
<keyword>public</keyword>
|
||||
<keyword>internal</keyword>
|
||||
<keyword>partial</keyword>
|
||||
|
||||
<keyword>class</keyword>
|
||||
<keyword>struct</keyword>
|
||||
<keyword>interface</keyword>
|
||||
<keyword>enum</keyword>
|
||||
<keyword>callable</keyword>
|
||||
<keyword>of</keyword>
|
||||
|
||||
<keyword>def</keyword>
|
||||
<keyword>constructor</keyword>
|
||||
<keyword>destructor</keyword>
|
||||
|
||||
<keyword>do</keyword>
|
||||
<keyword>get</keyword>
|
||||
<keyword>set</keyword>
|
||||
<keyword>event</keyword>
|
||||
|
||||
<keyword>return</keyword>
|
||||
<keyword>yield</keyword>
|
||||
</keyword-list>
|
||||
|
||||
<pattern-item _name = "Number" style = "Decimal">
|
||||
<regex>\b[0-9][0-9\.]*(m|ms|d|h|s|f|F|l|L)?\b</regex>
|
||||
</pattern-item>
|
||||
<context id="single-quoted-string" style-ref="string" end-at-line-end="true">
|
||||
<start>'</start>
|
||||
<end>'</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<keyword-list _name = "Boolean" style = "Decimal" case-sensitive="true">
|
||||
<keyword>true</keyword>
|
||||
<keyword>false</keyword>
|
||||
</keyword-list>
|
||||
|
||||
<keyword-list _name = "Literals" style="Keyword" case-sensitive="true">
|
||||
<keyword>null</keyword>
|
||||
<keyword>self</keyword>
|
||||
<keyword>super</keyword>
|
||||
</keyword-list>
|
||||
<context id="regex" style-ref="regex" end-at-line-end="true">
|
||||
<start>/(?!/)</start>
|
||||
<end>/</end>
|
||||
</context>
|
||||
|
||||
<keyword-list _name = "Keywords" style = "Keyword" case-sensitive="true">
|
||||
<keyword>and</keyword>
|
||||
<keyword>break</keyword>
|
||||
<keyword>cast</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>elif</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>except</keyword>
|
||||
<keyword>ensure</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>given</keyword>
|
||||
<keyword>goto</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>in</keyword>
|
||||
<keyword>is</keyword>
|
||||
<keyword>isa</keyword>
|
||||
<keyword>not</keyword>
|
||||
<keyword>or</keyword>
|
||||
<keyword>otherwise</keyword>
|
||||
<keyword>pass</keyword>
|
||||
<keyword>raise</keyword>
|
||||
<keyword>try</keyword>
|
||||
<keyword>unless</keyword>
|
||||
<keyword>when</keyword>
|
||||
<keyword>while</keyword>
|
||||
<keyword>ref</keyword>
|
||||
</keyword-list>
|
||||
<context id="namespace" style-ref="namespace">
|
||||
<keyword>as</keyword>
|
||||
<keyword>from</keyword>
|
||||
<keyword>import</keyword>
|
||||
<keyword>namespace</keyword>
|
||||
</context>
|
||||
|
||||
<keyword-list name = "Builtins" style = "Others" case-sensitive="true">
|
||||
<keyword>assert</keyword>
|
||||
<keyword>__eval__</keyword>
|
||||
<keyword>__switch__</keyword>
|
||||
<keyword>enumerate</keyword>
|
||||
<keyword>filter</keyword>
|
||||
<keyword>len</keyword>
|
||||
<keyword>typeof</keyword>
|
||||
<keyword>map</keyword>
|
||||
<keyword>max</keyword>
|
||||
<keyword>min</keyword>
|
||||
<keyword>property</keyword>
|
||||
<keyword>using</keyword>
|
||||
<keyword>getter</keyword>
|
||||
<keyword>required</keyword>
|
||||
<keyword>lock</keyword>
|
||||
<keyword>range</keyword>
|
||||
<keyword>zip</keyword>
|
||||
<keyword>checked</keyword>
|
||||
<keyword>unchecked</keyword>
|
||||
<keyword>rawArrayIndexing</keyword>
|
||||
<keyword>normalArrayIndexing</keyword>
|
||||
<keyword>print</keyword>
|
||||
<keyword>array</keyword>
|
||||
<keyword>matrix</keyword>
|
||||
<keyword>yieldAll</keyword>
|
||||
</keyword-list>
|
||||
<context id="primitives" style-ref="type">
|
||||
<keyword>bool</keyword>
|
||||
<keyword>byte</keyword>
|
||||
<keyword>char</keyword>
|
||||
<keyword>date</keyword>
|
||||
<keyword>decimal</keyword>
|
||||
<keyword>double</keyword>
|
||||
<keyword>duck</keyword>
|
||||
<keyword>float</keyword>
|
||||
<keyword>int</keyword>
|
||||
<keyword>long</keyword>
|
||||
<keyword>object</keyword>
|
||||
<keyword>operator</keyword>
|
||||
<keyword>regex</keyword>
|
||||
<keyword>sbyte</keyword>
|
||||
<keyword>short</keyword>
|
||||
<keyword>single</keyword>
|
||||
<keyword>string</keyword>
|
||||
<keyword>timespan</keyword>
|
||||
<keyword>uint</keyword>
|
||||
<keyword>ulong</keyword>
|
||||
<keyword>ushort</keyword>
|
||||
</context>
|
||||
|
||||
<context id="definitions" style-ref="definition">
|
||||
<keyword>abstract</keyword>
|
||||
<keyword>callable</keyword>
|
||||
<keyword>class</keyword>
|
||||
<keyword>constructor</keyword>
|
||||
<keyword>def</keyword>
|
||||
<keyword>destructor</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>enum</keyword>
|
||||
<keyword>event</keyword>
|
||||
<keyword>final</keyword>
|
||||
<keyword>get</keyword>
|
||||
<keyword>interface</keyword>
|
||||
<keyword>internal</keyword>
|
||||
<keyword>of</keyword>
|
||||
<keyword>override</keyword>
|
||||
<keyword>partial</keyword>
|
||||
<keyword>private</keyword>
|
||||
<keyword>protected</keyword>
|
||||
<keyword>public</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>set</keyword>
|
||||
<keyword>static</keyword>
|
||||
<keyword>struct</keyword>
|
||||
<keyword>transient</keyword>
|
||||
<keyword>virtual</keyword>
|
||||
<keyword>yield</keyword>
|
||||
</context>
|
||||
|
||||
<context id="keywords" style-ref="keyword">
|
||||
<keyword>and</keyword>
|
||||
<keyword>break</keyword>
|
||||
<keyword>cast</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>elif</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>ensure</keyword>
|
||||
<keyword>except</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>given</keyword>
|
||||
<keyword>goto</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>in</keyword>
|
||||
<keyword>isa</keyword>
|
||||
<keyword>is</keyword>
|
||||
<keyword>not</keyword>
|
||||
<keyword>or</keyword>
|
||||
<keyword>otherwise</keyword>
|
||||
<keyword>pass</keyword>
|
||||
<keyword>raise</keyword>
|
||||
<keyword>ref</keyword>
|
||||
<keyword>try</keyword>
|
||||
<keyword>unless</keyword>
|
||||
<keyword>when</keyword>
|
||||
<keyword>while</keyword>
|
||||
</context>
|
||||
|
||||
<context id="special-variables" style-ref="special-variable">
|
||||
<keyword>self</keyword>
|
||||
<keyword>super</keyword>
|
||||
</context>
|
||||
|
||||
<context id="null-value" style-ref="null-value">
|
||||
<keyword>null</keyword>
|
||||
</context>
|
||||
|
||||
<context id="boolean" style-ref="boolean">
|
||||
<keyword>false</keyword>
|
||||
<keyword>true</keyword>
|
||||
</context>
|
||||
|
||||
<context id="numbers" style-ref="number">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
[0-9][0-9\.]*(m|ms|d|h|s|f|F|l|L)?
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="builtins" style-ref="builtin">
|
||||
<keyword>array</keyword>
|
||||
<keyword>assert</keyword>
|
||||
<keyword>checked</keyword>
|
||||
<keyword>enumerate</keyword>
|
||||
<keyword>__eval__</keyword>
|
||||
<keyword>filter</keyword>
|
||||
<keyword>getter</keyword>
|
||||
<keyword>len</keyword>
|
||||
<keyword>lock</keyword>
|
||||
<keyword>map</keyword>
|
||||
<keyword>matrix</keyword>
|
||||
<keyword>max</keyword>
|
||||
<keyword>min</keyword>
|
||||
<keyword>normalArrayIndexing</keyword>
|
||||
<keyword>print</keyword>
|
||||
<keyword>property</keyword>
|
||||
<keyword>range</keyword>
|
||||
<keyword>rawArrayIndexing</keyword>
|
||||
<keyword>required</keyword>
|
||||
<keyword>__switch__</keyword>
|
||||
<keyword>typeof</keyword>
|
||||
<keyword>unchecked</keyword>
|
||||
<keyword>using</keyword>
|
||||
<keyword>yieldAll</keyword>
|
||||
<keyword>zip</keyword>
|
||||
</context>
|
||||
|
||||
<context id="boo">
|
||||
<include>
|
||||
<context ref="def:shell-like-comment" style-ref="comment"/>
|
||||
<context ref="c-style-line-comment"/>
|
||||
<context ref="block-comment"/>
|
||||
<context ref="multiline-string"/>
|
||||
<context ref="double-quoted-string"/>
|
||||
<context ref="single-quoted-string"/>
|
||||
<context ref="regex"/>
|
||||
<context ref="namespace"/>
|
||||
<context ref="primitives"/>
|
||||
<context ref="definitions"/>
|
||||
<context ref="keywords"/>
|
||||
<context ref="special-variables"/>
|
||||
<context ref="null-value"/>
|
||||
<context ref="boolean"/>
|
||||
<context ref="numbers"/>
|
||||
<context ref="builtins"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
</definitions>
|
||||
</language>
|
||||
|
|
|
@ -34,19 +34,20 @@
|
|||
<style id="comment" _name="Comment" map-to="def:comment"/>
|
||||
<style id="error" _name="Error" map-to="def:error"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="escape" _name="Escape" map-to="def:escape"/>
|
||||
<style id="preprocessor" _name="Preprocessor" map-to="def:preprocessor"/>
|
||||
<style id="common-defines" _name="Common Defines" map-to="def:special-value"/>
|
||||
<style id="included-file" _name="Included File" map-to="c:preprocessor"/>
|
||||
<style id="common-defines" _name="Common Defines" map-to="def:special-constant"/>
|
||||
<style id="included-file" _name="Included File" map-to="def:string"/>
|
||||
<style id="char" _name="Character" map-to="def:character"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="data-type" _name="Data Type" map-to="def:data-type"/>
|
||||
<style id="type" _name="Data Type" map-to="def:type"/>
|
||||
<style id="storage-class" _name="Storage Class" map-to="def:type"/>
|
||||
<style id="printf" _name="printf Conversion" map-to="def:character"/>
|
||||
<style id="escaped-character" _name="Escaped Character" map-to="def:escape"/>
|
||||
<style id="floating-point" _name="Float" map-to="def:floating-point"/>
|
||||
<style id="decimal" _name="Decimal" map-to="def:decimal"/>
|
||||
<style id="octal" _name="Octal" map-to="def:base-n-integer"/>
|
||||
<style id="hexadecimal" _name="Hex" map-to="def:base-n-integer"/>
|
||||
<style id="escaped-character" _name="Escaped Character" map-to="def:special-char"/>
|
||||
<style id="floating-point" _name="Floating point number" map-to="def:floating-point"/>
|
||||
<style id="decimal" _name="Decimal number" map-to="def:decimal"/>
|
||||
<style id="octal" _name="Octal number" map-to="def:base-n-integer"/>
|
||||
<style id="hexadecimal" _name="Hexadecimal number" map-to="def:base-n-integer"/>
|
||||
<style id="boolean" _name="Boolean value" map-to="def:boolean"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
@ -67,7 +68,7 @@
|
|||
<!-- http://en.wikipedia.org/wiki/C_syntax#Strings -->
|
||||
<define-regex id="escaped-character" extended="true">
|
||||
\\( # leading backslash
|
||||
[\\\"\'nrtfbav\?e] | # escaped character
|
||||
[\\\"\'nrtfav\?e] | # escaped character
|
||||
[0-7]{1,3} | # one, two, or three octal digits
|
||||
x[0-9A-Fa-f]{0,2} # 'x' followed by zero, one, or two hex digits
|
||||
)
|
||||
|
@ -125,7 +126,7 @@
|
|||
(".*?"|<.*>)
|
||||
</match>
|
||||
<include>
|
||||
<context id="included-file" sub-pattern="1" style-ref="included-file"/>
|
||||
<context id="included-file" sub-pattern="2" style-ref="included-file"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
|
@ -217,36 +218,40 @@
|
|||
<keyword>while</keyword>
|
||||
</context>
|
||||
|
||||
<context id="types" style-ref="data-type">
|
||||
<context id="types" style-ref="type">
|
||||
<keyword>_Bool</keyword>
|
||||
<keyword>_Complex</keyword>
|
||||
<keyword>_Imaginary</keyword>
|
||||
<keyword>auto</keyword>
|
||||
<keyword>bool</keyword>
|
||||
<keyword>char</keyword>
|
||||
<keyword>const</keyword>
|
||||
<keyword>double</keyword>
|
||||
<keyword>extern</keyword>
|
||||
<keyword>float</keyword>
|
||||
<keyword>int</keyword>
|
||||
<keyword>inline</keyword>
|
||||
<keyword>long</keyword>
|
||||
<keyword>register</keyword>
|
||||
<keyword>restrict</keyword>
|
||||
<keyword>short</keyword>
|
||||
<keyword>signed</keyword>
|
||||
<keyword>size_t</keyword>
|
||||
<keyword>static</keyword>
|
||||
<keyword>unsigned</keyword>
|
||||
<keyword>void</keyword>
|
||||
</context>
|
||||
|
||||
<context id="storage-class" style-ref="storage-class">
|
||||
<keyword>auto</keyword>
|
||||
<keyword>const</keyword>
|
||||
<keyword>extern</keyword>
|
||||
<keyword>inline</keyword>
|
||||
<keyword>register</keyword>
|
||||
<keyword>restrict</keyword>
|
||||
<keyword>static</keyword>
|
||||
<keyword>volatile</keyword>
|
||||
</context>
|
||||
|
||||
<context id="common-defines" style-ref="common-defines">
|
||||
<keyword>NULL</keyword>
|
||||
<keyword>TRUE</keyword>
|
||||
<keyword>FALSE</keyword>
|
||||
<keyword>MAX</keyword>
|
||||
<keyword>MIN</keyword>
|
||||
<keyword>TRUE</keyword>
|
||||
<keyword>FALSE</keyword>
|
||||
<keyword>__LINE__</keyword>
|
||||
<keyword>__DATA__</keyword>
|
||||
<keyword>__FILE__</keyword>
|
||||
|
@ -255,6 +260,12 @@
|
|||
<keyword>__STDC__</keyword>
|
||||
</context>
|
||||
|
||||
<!-- C99 booleans -->
|
||||
<context id="boolean" style-ref="boolean">
|
||||
<keyword>true</keyword>
|
||||
<keyword>false</keyword>
|
||||
</context>
|
||||
|
||||
</include>
|
||||
</context>
|
||||
</definitions>
|
||||
|
|
|
@ -29,12 +29,13 @@
|
|||
</metadata>
|
||||
|
||||
<styles>
|
||||
<style id="date" name="Date" map-to="def:data-type"/>
|
||||
<style id="name" name="Name" map-to="def:keyword"/>
|
||||
<style id="email" name="Email"/>
|
||||
<style id="file" name="File" map-to="def:function"/>
|
||||
<style id="date" name="Date" map-to="def:number"/>
|
||||
<style id="name" name="Name" map-to="def:statement"/>
|
||||
<style id="email" name="E-mail address" map-to="def:identifier"/>
|
||||
<style id="file" name="File" map-to="def:comment"/>
|
||||
<style id="bullet" name="Bullet" map-to="def:type"/>
|
||||
<style id="function" name="Function" map-to="def:function"/>
|
||||
<style id="release" name="Release" map-to="def:function"/>
|
||||
<style id="release" name="Release" map-to="def:statement"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
@ -43,12 +44,13 @@
|
|||
<define-regex id="month">Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec</define-regex>
|
||||
|
||||
<define-regex id="date" extended="true">
|
||||
\%{weekday}\s+\%{month}\s+\d{1,2}\s+\d{1,2}:\d{1,2}:\d{1,2}\s+([aApP][mM]\s+)?(\w{3}\s+)?\d{4} | # Wed Jun 27 13:27:21 2007
|
||||
\%{weekday}\s+\%{month}\s+\d{1,2}\s+(\d{1,2}:\d{1,2}:\d{1,2}\s+)?([aApP][mM]\s+)?(\w{3}\s+)?\d{4} | # Wed Jun 27 13:27:21 2007
|
||||
\d{4}-\d{2}-\d{2} # 2007-06-28
|
||||
</define-regex>
|
||||
|
||||
<context id="changelog">
|
||||
<include>
|
||||
|
||||
<context id="date-and-stuff">
|
||||
<!-- FIXME: how to match date here? The date and name line is
|
||||
something like (DATE) (NAME) <EMAIL>, where DATE and NAME may
|
||||
|
@ -64,17 +66,24 @@
|
|||
<context sub-pattern="email" style-ref="email"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="release" style-ref="release">
|
||||
<match>^\s*\=.*\=\s*$</match>
|
||||
</context>
|
||||
|
||||
<context id="file" style-ref="file">
|
||||
<start>^\s+\*</start>
|
||||
<start>^\s+(\*)</start>
|
||||
<!-- end at blank lines if there's no colon -->
|
||||
<end>\:|^(?!\S)</end>
|
||||
<include>
|
||||
<context sub-pattern="1" where="start" style-ref="bullet"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="function" style-ref="function">
|
||||
<match>\(\s*\%{identifier}\s*\)</match>
|
||||
</context>
|
||||
|
||||
</include>
|
||||
</context>
|
||||
</definitions>
|
||||
|
|
|
@ -28,15 +28,7 @@ fi
|
|||
langs=""
|
||||
for l in *.lang; do
|
||||
case $l in
|
||||
boo.lang) ;;
|
||||
d.lang) ;;
|
||||
docbook.lang) ;;
|
||||
msil.lang) ;;
|
||||
nemerle.lang) ;;
|
||||
R.lang) ;;
|
||||
spec.lang) ;;
|
||||
vbnet.lang) ;;
|
||||
vhdl.lang) ;;
|
||||
*)
|
||||
langs="$langs $l"
|
||||
;;
|
||||
|
|
|
@ -0,0 +1,100 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2006-2007 GtkSourceView team
|
||||
Author: Yevgen Muntyan <muntyan@tamu.edu>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
|
||||
-->
|
||||
<style-scheme id="classic" _name="Classic" version="1.0">
|
||||
<author>GtkSourceView team</author>
|
||||
<_description>Classic color scheme</_description>
|
||||
|
||||
<!-- The scheme tries to look like the default GVim scheme,
|
||||
since it is also what the hardwired GtkSourceView 1 color
|
||||
scheme did -->
|
||||
|
||||
<!-- Palette -->
|
||||
<color name="blue" value="#0000FF"/>
|
||||
<color name="magenta" value="#FF00FF"/>
|
||||
<color name="violet" value="#6A5ACD"/>
|
||||
<color name="cyan" value="#008A8C"/>
|
||||
<color name="green" value="#2E8B57"/>
|
||||
<color name="bordeaux" value="#A52A2A"/>
|
||||
<color name="red" value="#FF0000"/>
|
||||
<color name="yellow" value="#FFFF00"/>
|
||||
<color name="purple" value="#A020F0"/>
|
||||
|
||||
<!-- Bracket Matching -->
|
||||
<style name="bracket-match" foreground="#white" background="#grey" bold="true"/>
|
||||
<style name="bracket-mismatch" foreground="#white" background="#red" bold="true"/>
|
||||
|
||||
<!-- Search Matching -->
|
||||
<style name="search-match" background="yellow"/>
|
||||
|
||||
<!-- Comments -->
|
||||
<style name="def:comment" foreground="blue"/>
|
||||
<style name="def:shebang" foreground="blue" bold="true"/>
|
||||
<style name="def:doc-comment-element" italic="true"/>
|
||||
|
||||
<!-- Constants -->
|
||||
<style name="def:constant" foreground="magenta"/>
|
||||
<style name="def:special-char" foreground="violet"/>
|
||||
|
||||
<!-- Identifiers -->
|
||||
<style name="def:identifier" foreground="cyan"/>
|
||||
|
||||
<!-- Statements -->
|
||||
<style name="def:statement" foreground="bordeaux" bold="true"/>
|
||||
|
||||
<!-- Types -->
|
||||
<style name="def:type" foreground="green" bold="true"/>
|
||||
|
||||
<!-- Others -->
|
||||
<style name="def:preprocessor" foreground="purple"/>
|
||||
<style name="def:error" background="red" bold="true"/>
|
||||
<style name="def:note" foreground="blue" background="yellow" bold="true"/>
|
||||
<style name="def:underlined" italic="true" underline="true"/>
|
||||
|
||||
<!-- Language specific styles -->
|
||||
<style name="diff:added-line" foreground="#008B8B"/>
|
||||
<style name="diff:removed-line" foreground="#6A5ACD"/>
|
||||
<style name="diff:changed-line" use-style="def:preprocessor"/>
|
||||
<style name="diff:special-case" use-style="def:constant"/>
|
||||
<style name="diff:location" use-style="def:statement"/>
|
||||
<style name="diff:diff-file" use-style="def:type"/>
|
||||
|
||||
<style name="xml:tags" foreground="cyan"/>
|
||||
<style name="xml:attribute-name" foreground="violet"/>
|
||||
<style name="xml:namespace" foreground="green" bold="true"/>
|
||||
|
||||
<style name="js:object" foreground="#2E8B57" bold="true"/>
|
||||
<style name="js:constructors" foreground="#008B8B"/>
|
||||
|
||||
<style name="latex:display-math" foreground="#6A5ACD"/>
|
||||
<style name="latex:command" foreground="#2E8B57" bold="true"/>
|
||||
<style name="latex:include" use-style="def:preprocessor"/>
|
||||
|
||||
<style name="sh:variable1" foreground="#6A5ACD"/>
|
||||
<style name="sh:variable2" foreground="#008B8B"/>
|
||||
|
||||
<!-- legacy styles for old lang files -->
|
||||
<style name="Others" foreground="#2E8B57" bold="true"/>
|
||||
<style name="Others 2" foreground="#008B8B"/>
|
||||
<style name="Others 3" foreground="#6A5ACD"/>
|
||||
|
||||
</style-scheme>
|
|
@ -2,14 +2,13 @@
|
|||
|
||||
import xml.dom.minidom as dom
|
||||
import cgi
|
||||
import sys
|
||||
|
||||
default_styles = {
|
||||
'Comment' : 'def:comment',
|
||||
'String' : 'def:string',
|
||||
'Preprocessor' : 'def:preprocessor',
|
||||
'Keyword' : 'def:keyword',
|
||||
'Data Type' : 'def:data-type',
|
||||
'Data Type' : 'def:type',
|
||||
'Decimal' : 'def:decimal',
|
||||
'Specials' : 'def:specials',
|
||||
'Function' : 'def:function',
|
||||
|
@ -22,15 +21,6 @@ default_styles = {
|
|||
'Others 3' : None,
|
||||
}
|
||||
|
||||
def get_default_style(style):
|
||||
map_to = default_styles[style]
|
||||
if map_to is None:
|
||||
print >> sys.stderr, "Warning: '%s' style is used, it is replaced with 'foobar'. Fix it after converting" % (style,)
|
||||
map_to = 'foobar'
|
||||
elif map_to == 'def:preprocessor':
|
||||
print >> sys.stderr, "Warning: '%s' style is used, it is highly unlikely this use is correct, check after converting" % (style,)
|
||||
return map_to
|
||||
|
||||
def escape_escape_char(ch):
|
||||
if ch == '\\':
|
||||
return '\\\\'
|
||||
|
@ -115,7 +105,7 @@ class LangFile(object):
|
|||
string = indent + "<styles>\n"
|
||||
styles = {}
|
||||
for ctx in self.contexts:
|
||||
map_to = get_default_style(ctx.style_name)
|
||||
map_to = default_styles[ctx.style_name]
|
||||
styles[ctx.style] = [ctx.style_name, map_to]
|
||||
for s in styles:
|
||||
id = s
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
<styles>
|
||||
<style id="keyword" _name="Keyword" map-to="c:keyword"/>
|
||||
<style id="data-type" _name="Data Type" map-to="c:data-type"/>
|
||||
<style id="type" _name="Data Type" map-to="c:type"/>
|
||||
<style id="common-defines" _name="Common Defines" map-to="c:common-defines"/>
|
||||
</styles>
|
||||
|
||||
|
@ -79,7 +79,7 @@
|
|||
<keyword>virtual</keyword>
|
||||
</context>
|
||||
|
||||
<context id="types" style-ref="data-type">
|
||||
<context id="types" style-ref="type">
|
||||
<keyword>bool</keyword>
|
||||
<keyword>explicit</keyword>
|
||||
<keyword>export</keyword>
|
||||
|
|
|
@ -27,15 +27,23 @@
|
|||
<metadata>
|
||||
<property name="mimetypes">text/x-csharpsrc;text/x-csharp</property>
|
||||
<property name="globs">*.cs</property>
|
||||
<property name="line-comment-start">//</property>
|
||||
<property name="block-comment-start">/*</property>
|
||||
<property name="block-comment-end">*/</property>
|
||||
</metadata>
|
||||
|
||||
<styles>
|
||||
<style id="comment" _name="Comment" map-to="def:comment"/>
|
||||
<style id="error" _name="Error" map-to="def:error"/>
|
||||
<style id="data-type" _name="Data Type" map-to="def:data-type"/>
|
||||
<style id="type" _name="Data Type" map-to="def:type"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="preprocessor" _name="Preprocessor" map-to="def:preprocessor"/>
|
||||
<style id="null-value" _name="Null Value" map-to="def:special-constant"/>
|
||||
<style id="boolean" _name="Boolean value" map-to="def:boolean"/>
|
||||
<style id="decimal" _name="Decimal number" map-to="def:decimal"/>
|
||||
<style id="hexadecimal" _name="Hexadecimal number" map-to="def:base-n-integer"/>
|
||||
<style id="real" _name="Real number" map-to="def:floating-point"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
@ -140,7 +148,6 @@
|
|||
<keyword>default</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>false</keyword>
|
||||
<keyword>finally</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>foreach</keyword>
|
||||
|
@ -150,7 +157,6 @@
|
|||
<keyword>in</keyword>
|
||||
<keyword>is</keyword>
|
||||
<keyword>new</keyword>
|
||||
<keyword>null</keyword>
|
||||
<keyword>remove</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>set</keyword>
|
||||
|
@ -160,7 +166,6 @@
|
|||
<keyword>switch</keyword>
|
||||
<keyword>this</keyword>
|
||||
<keyword>throw</keyword>
|
||||
<keyword>true</keyword>
|
||||
<keyword>try</keyword>
|
||||
<keyword>typeof</keyword>
|
||||
<keyword>unchecked</keyword>
|
||||
|
@ -170,7 +175,7 @@
|
|||
<keyword>yield</keyword>
|
||||
</context>
|
||||
|
||||
<context id="primitives" style-ref="data-type">
|
||||
<context id="primitives" style-ref="type">
|
||||
<keyword>bool</keyword>
|
||||
<keyword>byte</keyword>
|
||||
<keyword>char</keyword>
|
||||
|
@ -189,6 +194,41 @@
|
|||
<keyword>ushort</keyword>
|
||||
</context>
|
||||
|
||||
<context id="null-value" style-ref="null-value">
|
||||
<keyword>null</keyword>
|
||||
</context>
|
||||
|
||||
<context id="boolean" style-ref="boolean">
|
||||
<keyword>false</keyword>
|
||||
<keyword>true</keyword>
|
||||
</context>
|
||||
|
||||
<context id="decimal" style-ref="decimal">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
[0-9]+[uUlL]*
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="hexadecimal" style-ref="hexadecimal">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
0[xX][a-fA-F0-9]+[uUlL]*
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="real" style-ref="real">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
((\.[0-9]+|[0-9]+\.[0-9]*)([Ee][+-]?[0-9]*)?[FfDdMm]?|
|
||||
([0-9]+[Ee][+-]?[0-9]*)[FfDdMm]? |
|
||||
([0-9]+)[FfDdMm])
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="c-sharp">
|
||||
<include>
|
||||
<context ref="def:string"/>
|
||||
|
@ -201,6 +241,11 @@
|
|||
<context ref="preprocessor"/>
|
||||
<context ref="keywords"/>
|
||||
<context ref="primitives"/>
|
||||
<context ref="null-value"/>
|
||||
<context ref="boolean"/>
|
||||
<context ref="decimal"/>
|
||||
<context ref="hexadecimal"/>
|
||||
<context ref="real"/>
|
||||
</include>
|
||||
</context>
|
||||
</definitions>
|
||||
|
|
|
@ -20,6 +20,19 @@
|
|||
Boston, MA 02111-1307, USA.
|
||||
|
||||
-->
|
||||
<!--
|
||||
Proposed language specification for CSS (Cascading Style Sheet) files.
|
||||
|
||||
Reference used:
|
||||
http://www.w3.org/TR/CSS2/
|
||||
|
||||
Tested with:
|
||||
http://www.simplebits.com/css/simple.css
|
||||
|
||||
Submitted by
|
||||
|
||||
Converted to new format with convert.py
|
||||
-->
|
||||
<language id="css" _name="CSS" version="2.0" _section="Others">
|
||||
<metadata>
|
||||
<property name="mimetypes">text/css</property>
|
||||
|
@ -38,12 +51,28 @@
|
|||
<style id="function" _name="Function" map-to="def:function"/>
|
||||
<style id="decimal" _name="Decimal" map-to="def:decimal"/>
|
||||
<style id="dimension" _name="Dimension" map-to="def:floating-point"/>
|
||||
<style id="data-type" _name="Data Type" map-to="def:data-type"/>
|
||||
<style id="known-property-values" _name="Known Property Value" map-to="def:type"/>
|
||||
<style id="at-rules" _name="at-rules" map-to="def:keyword"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
||||
<context id="comment" style-ref="comment">
|
||||
<start>/\*</start>
|
||||
<end>\*/</end>
|
||||
<include>
|
||||
<context style-ref="error" extend-parent="false">
|
||||
<match>/\*</match>
|
||||
</context>
|
||||
<context ref="def:in-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="close-comment-outside-comment" style-ref="error">
|
||||
<match>\*/(?!\*)</match>
|
||||
</context>
|
||||
|
||||
<context id="unicode-character-reference" style-ref="others-2">
|
||||
<match>\\([a-fA-F0-9]{1,5}[ \t]|[a-fA-F0-9]{6})</match>
|
||||
</context>
|
||||
|
@ -104,8 +133,6 @@
|
|||
</context>
|
||||
|
||||
<context id="property-names" style-ref="keyword">
|
||||
<prefix>(?<![.#@\w\d-])</prefix>
|
||||
<suffix>(?=\s*:)</suffix>
|
||||
<keyword>azimuth</keyword>
|
||||
<keyword>background-attachment</keyword>
|
||||
<keyword>background-color</keyword>
|
||||
|
@ -229,9 +256,7 @@
|
|||
<keyword>z-index</keyword>
|
||||
</context>
|
||||
|
||||
<context id="known-property-values" style-ref="data-type">
|
||||
<prefix>(?<![.#@\w\d-])</prefix>
|
||||
<suffix>(?![.#@\w\d-])</suffix>
|
||||
<context id="known-property-values" style-ref="known-property-values">
|
||||
<keyword>above</keyword>
|
||||
<keyword>absolute</keyword>
|
||||
<keyword>always</keyword>
|
||||
|
@ -370,7 +395,7 @@
|
|||
<keyword>right-side</keyword>
|
||||
<keyword>right</keyword>
|
||||
<keyword>rightwards</keyword>
|
||||
<keyword>rtl</keyword>
|
||||
<keyword>rlt</keyword>
|
||||
<keyword>run-in</keyword>
|
||||
<keyword>sans-serif</keyword>
|
||||
<keyword>scroll</keyword>
|
||||
|
@ -458,10 +483,10 @@
|
|||
|
||||
<context id="css">
|
||||
<include>
|
||||
<context ref="def:string" style-ref="string"/>
|
||||
<context ref="def:single-quoted-string" style-ref="string"/>
|
||||
<context ref="c:comment-multiline" style-ref="comment"/>
|
||||
<context ref="c:close-comment-outside-comment" style-ref="error"/>
|
||||
<context ref="def:string"/>
|
||||
<context ref="def:single-quoted-string"/>
|
||||
<context ref="comment"/>
|
||||
<context ref="close-comment-outside-comment"/>
|
||||
<context ref="unicode-character-reference"/>
|
||||
<context ref="selector-pseudo-elements"/>
|
||||
<context ref="selector-pseudo-classes"/>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
<!--
|
||||
|
||||
Author: Martin Szulecki <compiz@sukimashita.com>
|
||||
|
@ -27,167 +26,270 @@
|
|||
Reference:
|
||||
http://www.digitalmars.com/d/lex.html
|
||||
-->
|
||||
<language id="d" _name="D" version="2.0" _section="Sources">
|
||||
<metadata>
|
||||
<property name="mimetypes">text/x-dsrc</property>
|
||||
<property name="globs">*.d</property>
|
||||
<property name="line-comment-start">//</property>
|
||||
<property name="block-comment-start">/*</property>
|
||||
<property name="block-comment-end">*/</property>
|
||||
</metadata>
|
||||
|
||||
<language _name="D" version="1.0" _section="Sources"
|
||||
mimetypes="text/x-dsrc">
|
||||
|
||||
<escape-char>\</escape-char>
|
||||
<styles>
|
||||
<style id="comment" _name="Comment" map-to="def:comment"/>
|
||||
<style id="error" _name="Error" map-to="def:error"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="type" _name="Data Type" map-to="def:type"/>
|
||||
<style id="special-token" _name="Special Token" map-to="def:preprocessor"/>
|
||||
<style id="null-value" _name="Null Value" map-to="def:special-constant"/>
|
||||
<style id="boolean" _name="Boolean" map-to="def:boolean"/>
|
||||
<style id="floating-point" _name="Floating point number" map-to="def:floating-point"/>
|
||||
<style id="decimal" _name="Decimal number" map-to="def:decimal"/>
|
||||
<style id="binary" _name="Binary number" map-to="def:base-n-integer"/>
|
||||
<style id="octal" _name="Octal number" map-to="def:base-n-integer"/>
|
||||
<style id="hexadecimal" _name="Hexadecimal number" map-to="def:base-n-integer"/>
|
||||
</styles>
|
||||
|
||||
<line-comment _name="Line Comment" style="Comment">
|
||||
<start-regex>//</start-regex>
|
||||
</line-comment>
|
||||
<definitions>
|
||||
|
||||
<block-comment _name="Block Comment" style="Comment">
|
||||
<start-regex>/\*</start-regex>
|
||||
<end-regex>\*/</end-regex>
|
||||
</block-comment>
|
||||
<context id="line-comment" style-ref="comment" end-at-line-end="true">
|
||||
<start>//</start>
|
||||
<include>
|
||||
<context ref="def:in-line-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<block-comment _name="Nested Comment" style="Comment">
|
||||
<start-regex>/\+</start-regex>
|
||||
<end-regex>\+/</end-regex>
|
||||
</block-comment>
|
||||
<context id="block-comment" style-ref="comment">
|
||||
<start>/\*</start>
|
||||
<end>\*/</end>
|
||||
<include>
|
||||
<context ref="def:in-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<string _name="Grave Literal" style="String" end-at-line-end="false">
|
||||
<start-regex>`</start-regex>
|
||||
<end-regex>`</end-regex>
|
||||
</string>
|
||||
<context id="close-comment-outside-comment" style-ref="error">
|
||||
<match>\*/(?!\*)</match>
|
||||
</context>
|
||||
|
||||
<string _name="String Literal" style="String" end-at-line-end="false">
|
||||
<start-regex>"</start-regex>
|
||||
<end-regex>"</end-regex>
|
||||
</string>
|
||||
<context id="nesting-comment" style-ref="comment">
|
||||
<start>/\+</start>
|
||||
<end>\+/</end>
|
||||
<include>
|
||||
<context ref="nesting-comment"/>
|
||||
<context ref="def:in-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<string _name="Char Literal" style="String" end-at-line-end="true">
|
||||
<start-regex>'</start-regex>
|
||||
<end-regex>'</end-regex>
|
||||
</string>
|
||||
<context id="double-quoted-string" style-ref="string">
|
||||
<start>"</start>
|
||||
<end>"</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<keyword-list _name="Keywords" style="Keyword" case-sensitive="true">
|
||||
<keyword>abstract</keyword>
|
||||
<keyword>alias</keyword>
|
||||
<keyword>align</keyword>
|
||||
<keyword>asm</keyword>
|
||||
<keyword>assert</keyword>
|
||||
<keyword>body</keyword>
|
||||
<keyword>break</keyword>
|
||||
<keyword>case</keyword>
|
||||
<keyword>cast</keyword>
|
||||
<keyword>catch</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>debug</keyword>
|
||||
<keyword>default</keyword>
|
||||
<keyword>delegate</keyword>
|
||||
<keyword>delete</keyword>
|
||||
<keyword>deprecated</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>false</keyword>
|
||||
<keyword>final</keyword>
|
||||
<keyword>finally</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>foreach</keyword>
|
||||
<keyword>function</keyword>
|
||||
<keyword>goto</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>import</keyword>
|
||||
<keyword>in</keyword>
|
||||
<keyword>inout</keyword>
|
||||
<keyword>is</keyword>
|
||||
<keyword>mixin</keyword>
|
||||
<keyword>new</keyword>
|
||||
<keyword>out</keyword>
|
||||
<keyword>override</keyword>
|
||||
<keyword>pragma</keyword>
|
||||
<keyword>private</keyword>
|
||||
<keyword>protected</keyword>
|
||||
<keyword>public</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>scope</keyword>
|
||||
<keyword>super</keyword>
|
||||
<keyword>switch</keyword>
|
||||
<keyword>synchronized</keyword>
|
||||
<keyword>this</keyword>
|
||||
<keyword>throw</keyword>
|
||||
<keyword>true</keyword>
|
||||
<keyword>try</keyword>
|
||||
<keyword>typeid</keyword>
|
||||
<keyword>typeof</keyword>
|
||||
<keyword>unittest</keyword>
|
||||
<keyword>version</keyword>
|
||||
<keyword>while</keyword>
|
||||
<keyword>with</keyword>
|
||||
</keyword-list>
|
||||
<context id="single-quoted-string" style-ref="string" end-at-line-end="true">
|
||||
<start>'</start>
|
||||
<end>'</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<keyword-list _name="Types" style="Data Type" case-sensitive="true">
|
||||
<keyword>auto</keyword>
|
||||
<keyword>bool</keyword>
|
||||
<keyword>byte</keyword>
|
||||
<keyword>cdouble</keyword>
|
||||
<keyword>cent</keyword>
|
||||
<keyword>cfloat</keyword>
|
||||
<keyword>char</keyword>
|
||||
<keyword>class</keyword>
|
||||
<keyword>const</keyword>
|
||||
<keyword>creal</keyword>
|
||||
<keyword>dchar</keyword>
|
||||
<keyword>double</keyword>
|
||||
<keyword>enum</keyword>
|
||||
<keyword>export</keyword>
|
||||
<keyword>extern</keyword>
|
||||
<keyword>float</keyword>
|
||||
<keyword>idouble</keyword>
|
||||
<keyword>ifloat</keyword>
|
||||
<keyword>int</keyword>
|
||||
<keyword>interface</keyword>
|
||||
<keyword>invariant</keyword>
|
||||
<keyword>ireal</keyword>
|
||||
<keyword>long</keyword>
|
||||
<keyword>module</keyword>
|
||||
<keyword>null</keyword>
|
||||
<keyword>package</keyword>
|
||||
<keyword>real</keyword>
|
||||
<keyword>short</keyword>
|
||||
<keyword>static</keyword>
|
||||
<keyword>struct</keyword>
|
||||
<keyword>template</keyword>
|
||||
<keyword>typedef</keyword>
|
||||
<keyword>ubyte</keyword>
|
||||
<keyword>ucent</keyword>
|
||||
<keyword>uint</keyword>
|
||||
<keyword>ulong</keyword>
|
||||
<keyword>union</keyword>
|
||||
<keyword>ushort</keyword>
|
||||
<keyword>void</keyword>
|
||||
<keyword>volatile</keyword>
|
||||
<keyword>wchar</keyword>
|
||||
</keyword-list>
|
||||
<context id="backtick-quoted-string" style-ref="string">
|
||||
<start>`</start>
|
||||
<end>`</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<pattern-item _name="Binary Number" style="Base-N Integer">
|
||||
<regex>\b0[bB][01_]*\b</regex>
|
||||
</pattern-item>
|
||||
<context id="keywords" style-ref="keyword">
|
||||
<keyword>abstract</keyword>
|
||||
<keyword>align</keyword>
|
||||
<keyword>asm</keyword>
|
||||
<keyword>assert</keyword>
|
||||
<keyword>body</keyword>
|
||||
<keyword>break</keyword>
|
||||
<keyword>case</keyword>
|
||||
<keyword>cast</keyword>
|
||||
<keyword>catch</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>debug</keyword>
|
||||
<keyword>default</keyword>
|
||||
<keyword>delegate</keyword>
|
||||
<keyword>delete</keyword>
|
||||
<keyword>deprecated</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>final</keyword>
|
||||
<keyword>finally</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>foreach</keyword>
|
||||
<keyword>function</keyword>
|
||||
<keyword>goto</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>import</keyword>
|
||||
<keyword>in</keyword>
|
||||
<keyword>inout</keyword>
|
||||
<keyword>is</keyword>
|
||||
<keyword>mixin</keyword>
|
||||
<keyword>new</keyword>
|
||||
<keyword>out</keyword>
|
||||
<keyword>override</keyword>
|
||||
<keyword>pragma</keyword>
|
||||
<keyword>private</keyword>
|
||||
<keyword>protected</keyword>
|
||||
<keyword>public</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>scope</keyword>
|
||||
<keyword>super</keyword>
|
||||
<keyword>switch</keyword>
|
||||
<keyword>synchronized</keyword>
|
||||
<keyword>this</keyword>
|
||||
<keyword>throw</keyword>
|
||||
<keyword>try</keyword>
|
||||
<keyword>typeid</keyword>
|
||||
<keyword>typeof</keyword>
|
||||
<keyword>unittest</keyword>
|
||||
<keyword>version</keyword>
|
||||
<keyword>while</keyword>
|
||||
<keyword>with</keyword>
|
||||
</context>
|
||||
|
||||
<pattern-item _name="Decimal" style="Decimal">
|
||||
<regex>\b([1-9][0-9_]*|0)([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</regex>
|
||||
</pattern-item>
|
||||
<context id="types" style-ref="type">
|
||||
<keyword>alias</keyword>
|
||||
<keyword>bool</keyword>
|
||||
<keyword>byte</keyword>
|
||||
<keyword>cdouble</keyword>
|
||||
<keyword>cent</keyword>
|
||||
<keyword>cfloat</keyword>
|
||||
<keyword>char</keyword>
|
||||
<keyword>class</keyword>
|
||||
<keyword>creal</keyword>
|
||||
<keyword>dchar</keyword>
|
||||
<keyword>double</keyword>
|
||||
<keyword>enum</keyword>
|
||||
<keyword>export</keyword>
|
||||
<keyword>float</keyword>
|
||||
<keyword>idouble</keyword>
|
||||
<keyword>ifloat</keyword>
|
||||
<keyword>int</keyword>
|
||||
<keyword>interface</keyword>
|
||||
<keyword>invariant</keyword>
|
||||
<keyword>ireal</keyword>
|
||||
<keyword>long</keyword>
|
||||
<keyword>module</keyword>
|
||||
<keyword>package</keyword>
|
||||
<keyword>real</keyword>
|
||||
<keyword>short</keyword>
|
||||
<keyword>struct</keyword>
|
||||
<keyword>template</keyword>
|
||||
<keyword>typedef</keyword>
|
||||
<keyword>ubyte</keyword>
|
||||
<keyword>ucent</keyword>
|
||||
<keyword>uint</keyword>
|
||||
<keyword>ulong</keyword>
|
||||
<keyword>union</keyword>
|
||||
<keyword>ushort</keyword>
|
||||
<keyword>void</keyword>
|
||||
<keyword>wchar</keyword>
|
||||
|
||||
<pattern-item _name="Floating Point Number" style="Floating Point">
|
||||
<regex>\b([0-9_]+[Ee][-]?[0-9_]+|([0-9_]*\.[0-9_]+|[0-9_]+\.)([Ee][-]?[0-9_]+)?)[fFLi]?</regex>
|
||||
</pattern-item>
|
||||
<!-- split these ones? -->
|
||||
<keyword>auto</keyword>
|
||||
<keyword>const</keyword>
|
||||
<keyword>extern</keyword>
|
||||
<keyword>static</keyword>
|
||||
<keyword>volatile</keyword>
|
||||
</context>
|
||||
|
||||
<pattern-item _name="Octal Number" style="Base-N Integer">
|
||||
<regex>\b0[0-7_]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</regex>
|
||||
</pattern-item>
|
||||
<context id="special-tokens" style-ref="special-token">
|
||||
<keyword>#line</keyword>
|
||||
<keyword>__FILE__</keyword>
|
||||
<keyword>__LINE__</keyword>
|
||||
<keyword>__DATE__</keyword>
|
||||
<keyword>__TIME__</keyword>
|
||||
<keyword>__TIMESTAMP__</keyword>
|
||||
<keyword>__VENDOR__</keyword>
|
||||
<keyword>__VERSION__</keyword>
|
||||
</context>
|
||||
|
||||
<pattern-item _name="Hex Number" style="Base-N Integer">
|
||||
<regex>\b0[xX][0-9a-fA-F_]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</regex>
|
||||
</pattern-item>
|
||||
<context id="null-value" style-ref="null-value">
|
||||
<keyword>null</keyword>
|
||||
</context>
|
||||
|
||||
<context id="boolean" style-ref="boolean">
|
||||
<keyword>false</keyword>
|
||||
<keyword>true</keyword>
|
||||
</context>
|
||||
|
||||
<context id="float" style-ref="floating-point">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
([0-9_]+[Ee][-]?[0-9_]+|([0-9_]*\.[0-9_]+|[0-9_]+\.)([Ee][-]?[0-9_]+)?)[fFLi]?
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="decimal" style-ref="decimal">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
([1-9][0-9_]*|0)([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="binary" style-ref="binary">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
0[bB][01_]*
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="octal" style-ref="octal">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
0[0-7_]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="hexadecimal" style-ref="hexadecimal">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
0[xX][0-9a-fA-F_]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="d">
|
||||
<include>
|
||||
<context ref="def:shebang"/>
|
||||
<context ref="line-comment"/>
|
||||
<context ref="block-comment"/>
|
||||
<context ref="close-comment-outside-comment"/>
|
||||
<context ref="nesting-comment"/>
|
||||
<context ref="double-quoted-string"/>
|
||||
<context ref="single-quoted-string"/>
|
||||
<context ref="backtick-quoted-string"/>
|
||||
<context ref="keywords"/>
|
||||
<context ref="types"/>
|
||||
<context ref="special-tokens"/>
|
||||
<context ref="null-value"/>
|
||||
<context ref="boolean"/>
|
||||
<context ref="float"/>
|
||||
<context ref="binary"/>
|
||||
<context ref="octal"/>
|
||||
<context ref="decimal"/>
|
||||
<context ref="hexadecimal"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
</definitions>
|
||||
|
||||
<keyword-list _name="Special Tokens" style="Preprocessor" case-sensitive="true">
|
||||
<keyword>#line</keyword>
|
||||
<keyword>__FILE__</keyword>
|
||||
<keyword>__LINE__</keyword>
|
||||
<keyword>__DATE__</keyword>
|
||||
<keyword>__TIME__</keyword>
|
||||
<keyword>__TIMESTAMP__</keyword>
|
||||
</keyword-list>
|
||||
</language>
|
||||
|
|
|
@ -23,27 +23,122 @@
|
|||
-->
|
||||
<language id="def" _name="Defaults" hidden="true" version="2.0">
|
||||
<styles>
|
||||
<style id="decimal" _name="Decimal"/>
|
||||
<style id="base-n-integer" _name="Base-N Integer"/>
|
||||
<style id="complex" _name="Complex number"/>
|
||||
<style id="floating-point" _name="Floating Point"/>
|
||||
<style id="net-address-in-comment" _name="Net Address"/>
|
||||
<style id="note" _name="Note"/>
|
||||
<style id="escape" _name="Escape"/>
|
||||
<style id="comment" _name="Comment"/>
|
||||
<style id="error" _name="Error"/>
|
||||
<style id="string" _name="String"/>
|
||||
<style id="keyword" _name="Keyword"/>
|
||||
<style id="data-type" _name="Data Type"/>
|
||||
<style id="character" _name="Character"/>
|
||||
<style id="function" _name="Function"/>
|
||||
<style id="shebang" _name="Shebang"/>
|
||||
<style id="doc-comment" _name="Documentation Comment" map-to="def:comment"/>
|
||||
<style id="doc-comment-element" _name="Documentation Comment Element"/>
|
||||
|
||||
<!-- styles defined here are all the styles that
|
||||
a language can use as default for its styles.
|
||||
The styles are defined in logical groups.
|
||||
A style scheme has to at least define the style
|
||||
for the first item of each group and if desired
|
||||
define the style for the other items to achieve a
|
||||
more finegrained control on the apperance.
|
||||
Finally a style scheme may also define language
|
||||
specific styles. -->
|
||||
|
||||
|
||||
<!-- Comment group -->
|
||||
|
||||
<!-- Any comment -->
|
||||
<style id="comment" _name="Comment"/>
|
||||
|
||||
<!-- A shebang: #!/bin/sh -->
|
||||
<style id="shebang" _name="Shebang" map-to="def:comment"/>
|
||||
|
||||
<!-- A special comment containing documentation like in javadoc or
|
||||
gtk-doc -->
|
||||
<style id="doc-comment" _name="Documentation comment" map-to="def:comment"/>
|
||||
|
||||
<!-- A element inside a documentation comment: @author -->
|
||||
<!-- This style doesn't map to anything since it must be used as an additional
|
||||
style for text which is already styled as a "doc-comment" -->
|
||||
<style id="doc-comment-element" _name="Documentation comment element" />
|
||||
|
||||
|
||||
<!-- Constant group -->
|
||||
|
||||
<!-- Any constant -->
|
||||
<style id="constant" _name="Constant"/>
|
||||
|
||||
<!-- A character constant: 'c' -->
|
||||
<style id="character" _name="Character" map-to="def:constant"/>
|
||||
|
||||
<!-- A string constant: "this is a string" -->
|
||||
<style id="string" _name="String" map-to="def:constant"/>
|
||||
|
||||
<!-- Special character in a string constant: "%s", "\t" -->
|
||||
<!-- This style doesn't map to anything since it must be used as an additional
|
||||
style for text which is already styled as a "string" -->
|
||||
<style id="special-char" _name="Special character (inside a string)" />
|
||||
|
||||
<!-- A generic number constant -->
|
||||
<style id="number" _name="Number" map-to="def:constant"/>
|
||||
|
||||
<!-- A floating point constant: 2.3e10 -->
|
||||
<style id="floating-point" _name="Floating point number" map-to="def:number"/>
|
||||
|
||||
<!-- A decimal number: 1234 -->
|
||||
<style id="decimal" _name="Decimal number" map-to="def:number"/>
|
||||
|
||||
<!-- A base-N number: 0xFFFF -->
|
||||
<style id="base-n-integer" _name="Base-N number" map-to="def:number"/>
|
||||
|
||||
<!-- A complex number -->
|
||||
<style id="complex" _name="Complex number" map-to="def:number"/>
|
||||
|
||||
<!-- A special constant like NULL in C or null in Java -->
|
||||
<style id="special-constant" _name="Special constant" map-to="def:constant"/>
|
||||
|
||||
<!-- A boolean constant: TRUE, false -->
|
||||
<style id="boolean" _name="Boolean value" map-to="def:special-constant"/>
|
||||
|
||||
|
||||
<!-- Identifier group -->
|
||||
|
||||
<!-- Any variable name -->
|
||||
<style id="identifier" _name="Identifier" />
|
||||
|
||||
<!-- A function name (also: methods for classes) -->
|
||||
<style id="function" _name="Function" map-to="def:identifier"/>
|
||||
|
||||
<!-- A builtin name: like __import__, abs in Python
|
||||
(see http://docs.python.org/lib/built-in-funcs.html) -->
|
||||
<style id="builtin" _name="Built-in identifier" map-to="def:identifier"/>
|
||||
|
||||
|
||||
<!-- Statement group -->
|
||||
|
||||
<!-- Any statement -->
|
||||
<style id="statement" _name="Statement"/>
|
||||
|
||||
<!-- Operators: "+", "*", etc. -->
|
||||
<style id="operator" _name="Operator" map-to="def:statement" />
|
||||
|
||||
<!-- keywords: "if", "for", "while", etc. -->
|
||||
<style id="keyword" _name="Keyword" map-to="def:statement" />
|
||||
|
||||
|
||||
<!-- Type group -->
|
||||
|
||||
<!--A primitive data type: int, long, char, etc. -->
|
||||
<style id="type" _name="Data type"/>
|
||||
|
||||
|
||||
<!-- Others -->
|
||||
|
||||
<!-- This one is for '#include <foo.h>' and "#pragma blah", or 'use foobar', etc.. -->
|
||||
<style id="preprocessor" _name="Preprocessor directive"/>
|
||||
<!-- For things like TRUE and NULL in C. -->
|
||||
<style id="special-value" _name="Special value" map-to="def:preprocessor"/>
|
||||
<style id="preprocessor" _name="Preprocessor directive"/>
|
||||
|
||||
<!-- Any erroneous construct -->
|
||||
<style id="error" _name="Error"/>
|
||||
|
||||
<!--Reserved keywords: like "const" and "goto" in Java -->
|
||||
<style id="reserved" _name="Reserved keyword" map-to="def:error" />
|
||||
|
||||
<!-- Anything that needs extra attention; mostly the keywords TODO, FIXME and XXX -->
|
||||
<style id="note" _name="Note (FIXME, TODO, XXX, etc.)"/>
|
||||
|
||||
<!-- Text that stands out, HTML links, e-mail addresses, etc. -->
|
||||
<style id="underlined" _name="Underlined"/>
|
||||
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
@ -84,28 +179,29 @@
|
|||
<match>\%{float}</match>
|
||||
</context>
|
||||
|
||||
<!-- FIXME no \n in patterns! -->
|
||||
<define-regex id="net-address" extended="true" case-sensitive="false">
|
||||
\%[ # separator
|
||||
(https?|ftp|nntp|news|javascript|about): # protocol
|
||||
\S* [^\s.:;,?><)] # address
|
||||
[^\ \n]* [^\ \n.:;,?><)] # address
|
||||
(?![a-z0-9_.-]) # separator
|
||||
</define-regex>
|
||||
|
||||
<define-regex id="email-address" extended="true" case-sensitive="false">
|
||||
\%[ # separator
|
||||
(mailto:)? # optional "mailto:"
|
||||
[a-z0-9_.-]+ # user name
|
||||
[a-z0-9_.+-]+ # user name
|
||||
@ # at
|
||||
[a-z0-9_.-]+ # domain
|
||||
[a-z0-9_.+-]+ # domain
|
||||
\%] # separator
|
||||
</define-regex>
|
||||
|
||||
<context id="in-comment">
|
||||
<include>
|
||||
<context id="net-address" extend-parent="false" style-ref="net-address-in-comment">
|
||||
<context id="net-address" extend-parent="false" style-ref="underlined">
|
||||
<match>\%{net-address}</match>
|
||||
</context>
|
||||
<context id="email-address" extend-parent="false" style-ref="net-address-in-comment">
|
||||
<context id="email-address" extend-parent="false" style-ref="underlined">
|
||||
<match>\%{email-address}</match>
|
||||
</context>
|
||||
<context id="comment-note" extend-parent="false" style-ref="note">
|
||||
|
@ -122,7 +218,7 @@
|
|||
</include>
|
||||
</context>
|
||||
|
||||
<context id="line-continue" style-ref="escape">
|
||||
<context id="line-continue" style-ref="preprocessor">
|
||||
<start>\\$</start>
|
||||
<end>^</end>
|
||||
</context>
|
||||
|
@ -141,7 +237,7 @@
|
|||
<end>$</end>
|
||||
</context>
|
||||
|
||||
<context id="escape" style-ref="escape">
|
||||
<context id="escape" style-ref="special-char">
|
||||
<match>\\.</match>
|
||||
</context>
|
||||
|
||||
|
|
|
@ -30,7 +30,9 @@
|
|||
|
||||
<styles>
|
||||
<style id="group" _name="Group" map-to="def:keyword"/>
|
||||
<style id="key" _name="Key" map-to="def:data-type"/>
|
||||
<!-- Translators: "Key" here means key value, that is the left hand
|
||||
side in a myoption=something line in a .desktop file -->
|
||||
<style id="key" _name="Key" map-to="def:type"/>
|
||||
<style id="language" _name="Translation" map-to="def:decimal"/>
|
||||
<style id="number" _name="Number" map-to="def:floating-point"/>
|
||||
<style id="boolean" _name="Boolean" map-to="def:floating-point"/>
|
||||
|
@ -50,17 +52,21 @@
|
|||
<context id="language" style-ref="language">
|
||||
<match>\[[a-zA-Z_]+\]</match>
|
||||
</context>
|
||||
|
||||
<context id="boolean" style-ref="boolean">
|
||||
<keyword>true</keyword>
|
||||
<keyword>false</keyword>
|
||||
</context>
|
||||
|
||||
<context id="exec-parameter" style-ref="exec-parameter">
|
||||
<match>%[fFuUdDnNimckv%]</match>
|
||||
</context>
|
||||
|
||||
<context id="encoding" style-ref="encoding">
|
||||
<keyword>UTF\-8</keyword>
|
||||
<keyword>Legacy\-Mixed</keyword>
|
||||
</context>
|
||||
|
||||
<context id="number" style-ref="number">
|
||||
<match>(.\b[0-9]+([Ll]?|[Ff]?)\b)|(b[0-9]*\.\W)</match>
|
||||
</context>
|
||||
|
@ -107,9 +113,11 @@
|
|||
<keyword>URL</keyword>
|
||||
<keyword>Version</keyword>
|
||||
</context>
|
||||
|
||||
<context id="non-standard-key" style-ref="key">
|
||||
<match>^_?X\-[a-zA-Z\-]+\%{key-suffix}</match>
|
||||
</context>
|
||||
|
||||
<context id="key-categories" end-at-line-end="true">
|
||||
<start>^(_?Categories)\%{key-suffix}</start>
|
||||
<include>
|
||||
|
|
|
@ -21,491 +21,456 @@
|
|||
Boston, MA 02111-1307, USA.
|
||||
|
||||
-->
|
||||
<language _name="DocBook" version="1.0" _section="Markup" mimetypes="application/docbook+xml">
|
||||
|
||||
<block-comment _name="Block Comment" style="Comment">
|
||||
<start-regex><!--</start-regex>
|
||||
<end-regex>--></end-regex>
|
||||
</block-comment>
|
||||
<language id="docbook" _name="Docbook" version="2.0" _section="Markup">
|
||||
<metadata>
|
||||
<property name="mimetypes">application/docbook+xml</property>
|
||||
<property name="globs">*.docbook</property>
|
||||
<property name="block-comment-start"><!--</property>
|
||||
<property name="block-comment-end">--></property>
|
||||
</metadata>
|
||||
|
||||
<syntax-item name="DOCTYPE" style="String">
|
||||
<start-regex><!DOCTYPE</start-regex>
|
||||
<end-regex>(\[.*\])?></end-regex>
|
||||
</syntax-item>
|
||||
|
||||
<syntax-item name="Entity definition" style="String">
|
||||
<start-regex><!ENTITY</start-regex>
|
||||
<end-regex>"></end-regex>
|
||||
</syntax-item>
|
||||
|
||||
<pattern-item _name="Entity" style="Keyword">
|
||||
<regex>(&|%)[a-zA-Z0-9#][a-zA-Z0-9]*;</regex>
|
||||
</pattern-item>
|
||||
|
||||
<syntax-item name="CDATA" style="String">
|
||||
<start-regex><!\[CDATA\[</start-regex>
|
||||
<end-regex>\]\]></end-regex>
|
||||
</syntax-item>
|
||||
<styles>
|
||||
<style id="header-elements" _name="Header Elements" map-to="def:keyword"/>
|
||||
<style id="formatting-elements" _name="Formatting Elements" map-to="def:keyword"/>
|
||||
<style id="gui-elements" _name="GUI Elements" map-to="def:keyword"/>
|
||||
<style id="structural-elements" _name="Structural Elements" map-to="def:keyword"/>
|
||||
</styles>
|
||||
|
||||
<pattern-item _name="String" style="String">
|
||||
<regex>("[^<"]*")|('[^<']*')</regex>
|
||||
</pattern-item>
|
||||
<definitions>
|
||||
|
||||
<pattern-item _name="Closing Bracket" style="Others 2">
|
||||
<regex>\??></regex>
|
||||
</pattern-item>
|
||||
<context id="header-elements" once-only="true" style-ref="header-elements">
|
||||
<suffix>\b(?!\s*=)</suffix>
|
||||
<keyword>abstract</keyword>
|
||||
<keyword>articleinfo</keyword>
|
||||
<keyword>article</keyword>
|
||||
<keyword>bookinfo</keyword>
|
||||
<keyword>authorgroup</keyword>
|
||||
<keyword>author</keyword>
|
||||
<keyword>affiliation</keyword>
|
||||
<keyword>copyright</keyword>
|
||||
<keyword>date</keyword>
|
||||
<keyword>email</keyword>
|
||||
<keyword>firstname</keyword>
|
||||
<keyword>orgname</keyword>
|
||||
<keyword>publishername</keyword>
|
||||
<keyword>publisher</keyword>
|
||||
<keyword>pubdate</keyword>
|
||||
<keyword>pubsnumber</keyword>
|
||||
<keyword>releaseinfo</keyword>
|
||||
<keyword>surname</keyword>
|
||||
<keyword>revdescription</keyword>
|
||||
<keyword>revhistory</keyword>
|
||||
<keyword>revision</keyword>
|
||||
<keyword>revnumber</keyword>
|
||||
</context>
|
||||
|
||||
<keyword-list _name="Header Elements" style="Keyword" case-sensitive="FALSE"
|
||||
match-empty-string-at-beginning = "FALSE"
|
||||
match-empty-string-at-end = "FALSE"
|
||||
beginning-regex="</?"
|
||||
end-regex="(\b|>)">
|
||||
<keyword>abstract</keyword>
|
||||
<keyword>article</keyword>
|
||||
<keyword>articleinfo</keyword>
|
||||
<keyword>bookinfo</keyword>
|
||||
<keyword>author</keyword>
|
||||
<keyword>authorgroup</keyword>
|
||||
<keyword>affiliation</keyword>
|
||||
<keyword>copyright</keyword>
|
||||
<keyword>date</keyword>
|
||||
<keyword>email</keyword>
|
||||
<keyword>firstname</keyword>
|
||||
<keyword>orgname</keyword>
|
||||
<keyword>publisher</keyword>
|
||||
<keyword>publishername</keyword>
|
||||
<keyword>pubdate</keyword>
|
||||
<keyword>pubsnumber</keyword>
|
||||
<keyword>releaseinfo</keyword>
|
||||
<keyword>surname</keyword>
|
||||
<keyword>revdescription</keyword>
|
||||
<keyword>revhistory</keyword>
|
||||
<keyword>revision</keyword>
|
||||
<keyword>revnumber</keyword>
|
||||
</keyword-list>
|
||||
|
||||
<keyword-list _name="Formatting Elements" style="Keyword" case-sensitive="FALSE"
|
||||
match-empty-string-at-beginning = "FALSE"
|
||||
match-empty-string-at-end = "FALSE"
|
||||
beginning-regex="</?"
|
||||
end-regex="(\b|>)">
|
||||
|
||||
<keyword>caution</keyword>
|
||||
<keyword>command</keyword>
|
||||
<keyword>computeroutput</keyword>
|
||||
<keyword>filename</keyword>
|
||||
<keyword>firstterm</keyword>
|
||||
<keyword>link</keyword>
|
||||
<keyword>note</keyword>
|
||||
<keyword>option</keyword>
|
||||
<keyword>para</keyword>
|
||||
<keyword>remark</keyword>
|
||||
<keyword>replaceable</keyword>
|
||||
<keyword>tip</keyword>
|
||||
<keyword>ulink</keyword>
|
||||
<keyword>variablelist</keyword>
|
||||
<keyword>varlistentry</keyword>
|
||||
<keyword>warning</keyword>
|
||||
<keyword>xref</keyword>
|
||||
</keyword-list>
|
||||
|
||||
<keyword-list _name="GUI Elements" style="Keyword" case-sensitive="FALSE"
|
||||
match-empty-string-at-beginning = "FALSE"
|
||||
match-empty-string-at-end = "FALSE"
|
||||
beginning-regex="</?"
|
||||
end-regex="(\b|>)">
|
||||
|
||||
<keyword>accel</keyword>
|
||||
<keyword>application</keyword>
|
||||
<keyword>guibutton</keyword>
|
||||
<keyword>guiicon</keyword>
|
||||
<keyword>guilabel</keyword>
|
||||
<keyword>guimenuitem</keyword>
|
||||
<keyword>guimenu</keyword>
|
||||
<keyword>guisubmenu</keyword>
|
||||
<keyword>interface</keyword>
|
||||
<keyword>keycap</keyword>
|
||||
<keyword>keycombo</keyword>
|
||||
<keyword>keysym</keyword>
|
||||
<keyword>menuchoice</keyword>
|
||||
</keyword-list>
|
||||
|
||||
<keyword-list _name="Structural Elements" style="Keyword" case-sensitive="FALSE"
|
||||
match-empty-string-at-beginning = "FALSE"
|
||||
match-empty-string-at-end = "FALSE"
|
||||
beginning-regex="</?"
|
||||
end-regex="(\b|>)">
|
||||
|
||||
<keyword>appendix</keyword>
|
||||
<keyword>book</keyword>
|
||||
<keyword>chapter</keyword>
|
||||
<keyword>anchor</keyword>
|
||||
<keyword>citetitle</keyword>
|
||||
<keyword>colspec</keyword>
|
||||
<keyword>emphasis</keyword>
|
||||
<keyword>entry</keyword>
|
||||
<keyword>figure</keyword>
|
||||
<keyword>glossary</keyword>
|
||||
<keyword>glossdef</keyword>
|
||||
<keyword>glossentry</keyword>
|
||||
<keyword>glossterm</keyword>
|
||||
<keyword>sect1</keyword>
|
||||
<keyword>sect2</keyword>
|
||||
<keyword>sect3</keyword>
|
||||
<keyword>sect4</keyword>
|
||||
<keyword>section</keyword>
|
||||
|
||||
<keyword>highlights</keyword>
|
||||
<keyword>holder</keyword>
|
||||
<keyword>imagedata</keyword>
|
||||
<keyword>imageobject</keyword>
|
||||
<keyword>indexterm</keyword>
|
||||
<keyword>informaltable</keyword>
|
||||
<keyword>inlinemediaobject</keyword>
|
||||
<keyword>itemizedlist</keyword>
|
||||
<keyword>literal</keyword>
|
||||
<keyword>legalnotice</keyword>
|
||||
<keyword>listitem</keyword>
|
||||
<keyword>mediaobject</keyword>
|
||||
<keyword>orderedlist</keyword>
|
||||
<keyword>phrase</keyword>
|
||||
<keyword>primary</keyword>
|
||||
<keyword>programlisting</keyword>
|
||||
|
||||
<keyword>row</keyword>
|
||||
<keyword>screen</keyword>
|
||||
<keyword>screenshot</keyword>
|
||||
<keyword>secondary</keyword>
|
||||
<keyword>see</keyword>
|
||||
<keyword>shortcut</keyword>
|
||||
|
||||
<keyword>table</keyword>
|
||||
<keyword>tbody</keyword>
|
||||
<keyword>term</keyword>
|
||||
<keyword>tertiary</keyword>
|
||||
<keyword>textobject</keyword>
|
||||
<keyword>tgroup</keyword>
|
||||
<keyword>thead</keyword>
|
||||
<keyword>title</keyword>
|
||||
<keyword>titleabbrev</keyword>
|
||||
<keyword>uri</keyword>
|
||||
<keyword>userinput</keyword>
|
||||
<keyword>year</keyword>
|
||||
|
||||
<keyword>ackno</keyword>
|
||||
<keyword>acronym</keyword>
|
||||
<keyword>action</keyword>
|
||||
<keyword>address</keyword>
|
||||
<keyword>answer</keyword>
|
||||
<keyword>appendixinfo</keyword>
|
||||
<keyword>area</keyword>
|
||||
<keyword>areaset</keyword>
|
||||
<keyword>areaspec</keyword>
|
||||
<keyword>arg</keyword>
|
||||
<keyword>artpagenums</keyword>
|
||||
<keyword>attribution</keyword>
|
||||
<keyword>audiodata</keyword>
|
||||
<keyword>audioobject</keyword>
|
||||
<keyword>authorblurb</keyword>
|
||||
<keyword>authorinitials</keyword>
|
||||
<keyword>beginpage</keyword>
|
||||
<keyword>bibliocoverage</keyword>
|
||||
<keyword>bibliodiv</keyword>
|
||||
<keyword>biblioentry</keyword>
|
||||
<keyword>bibliography</keyword>
|
||||
<keyword>bibliographyinfo</keyword>
|
||||
<keyword>biblioid</keyword>
|
||||
<keyword>bibliomisc</keyword>
|
||||
<keyword>bibliomixed</keyword>
|
||||
<keyword>bibliomset</keyword>
|
||||
<keyword>bibliorelation</keyword>
|
||||
<keyword>biblioset</keyword>
|
||||
<keyword>bibliosource</keyword>
|
||||
<keyword>blockinfo</keyword>
|
||||
<keyword>blockquote</keyword>
|
||||
<keyword>bridgehead</keyword>
|
||||
<keyword>callout</keyword>
|
||||
<keyword>calloutlist</keyword>
|
||||
<keyword>caption</keyword>
|
||||
<keyword>chapterinfo</keyword>
|
||||
<keyword>citation</keyword>
|
||||
<keyword>citebiblioid</keyword>
|
||||
<keyword>citerefentry</keyword>
|
||||
<keyword>city</keyword>
|
||||
<keyword>classname</keyword>
|
||||
<keyword>classsynopsis</keyword>
|
||||
<keyword>classsynopsisinfo</keyword>
|
||||
<keyword>cmdsynopsis</keyword>
|
||||
<keyword>code</keyword>
|
||||
<keyword>colgroup</keyword>
|
||||
<keyword>collab</keyword>
|
||||
<keyword>collabname</keyword>
|
||||
<keyword>colophon</keyword>
|
||||
<keyword>confdates</keyword>
|
||||
<keyword>confgroup</keyword>
|
||||
<keyword>confnum</keyword>
|
||||
<keyword>confsponsor</keyword>
|
||||
<keyword>conftitle</keyword>
|
||||
<keyword>constant</keyword>
|
||||
<keyword>constraint</keyword>
|
||||
<keyword>constraintdef</keyword>
|
||||
<keyword>constructorsynopsis</keyword>
|
||||
<keyword>contractnum</keyword>
|
||||
<keyword>contractsponsor</keyword>
|
||||
<keyword>contrib</keyword>
|
||||
<keyword>coref</keyword>
|
||||
<keyword>corpauthor</keyword>
|
||||
<keyword>corpcredit</keyword>
|
||||
<keyword>corpname</keyword>
|
||||
<keyword>country</keyword>
|
||||
<keyword>database</keyword>
|
||||
<keyword>dedication</keyword>
|
||||
<keyword>destructorsynopsis</keyword>
|
||||
<keyword>edition</keyword>
|
||||
<keyword>editor</keyword>
|
||||
<keyword>entrytbl</keyword>
|
||||
<keyword>envar</keyword>
|
||||
<keyword>epigraph</keyword>
|
||||
<keyword>equation</keyword>
|
||||
<keyword>errorcode</keyword>
|
||||
<keyword>errorname</keyword>
|
||||
<keyword>errortext</keyword>
|
||||
<keyword>errortype</keyword>
|
||||
<keyword>example</keyword>
|
||||
<keyword>exceptionname</keyword>
|
||||
<keyword>fax</keyword>
|
||||
<keyword>fieldsynopsis</keyword>
|
||||
<keyword>footnote</keyword>
|
||||
<keyword>footnoteref</keyword>
|
||||
<keyword>foreignphrase</keyword>
|
||||
<keyword>formalpara</keyword>
|
||||
<keyword>funcdef</keyword>
|
||||
<keyword>funcparams</keyword>
|
||||
<keyword>funcprototype</keyword>
|
||||
<keyword>funcsynopsis</keyword>
|
||||
<keyword>funcsynopsisinfo</keyword>
|
||||
<keyword>function</keyword>
|
||||
<keyword>glossaryinfo</keyword>
|
||||
<keyword>glossdiv</keyword>
|
||||
<keyword>glosslist</keyword>
|
||||
<keyword>glosssee</keyword>
|
||||
<keyword>glossseealso</keyword>
|
||||
<keyword>graphic</keyword>
|
||||
<keyword>graphicco</keyword>
|
||||
<keyword>hardware</keyword>
|
||||
<keyword>honorific</keyword>
|
||||
<keyword>imageobjectco</keyword>
|
||||
<keyword>important</keyword>
|
||||
<keyword>indexdiv</keyword>
|
||||
<keyword>indexentry</keyword>
|
||||
<keyword>indexinfo</keyword>
|
||||
<keyword>informalequation</keyword>
|
||||
<keyword>informalexample</keyword>
|
||||
<keyword>informalfigure</keyword>
|
||||
<keyword>initializer</keyword>
|
||||
<keyword>inlineequation</keyword>
|
||||
<keyword>inlinegraphic</keyword>
|
||||
<keyword>interfacename</keyword>
|
||||
<keyword>invpartnumber</keyword>
|
||||
<keyword>isbn</keyword>
|
||||
<keyword>issn</keyword>
|
||||
<keyword>issuenum</keyword>
|
||||
<keyword>itermset</keyword>
|
||||
<keyword>jobtitle</keyword>
|
||||
<keyword>keycode</keyword>
|
||||
<keyword>keyword</keyword>
|
||||
<keyword>keywordset</keyword>
|
||||
<keyword>lhs</keyword>
|
||||
<keyword>lineage</keyword>
|
||||
<keyword>lineannotation</keyword>
|
||||
<keyword>literallayout</keyword>
|
||||
<keyword>lot</keyword>
|
||||
<keyword>lotentry</keyword>
|
||||
<keyword>manvolnum</keyword>
|
||||
<keyword>markup</keyword>
|
||||
<keyword>medialabel</keyword>
|
||||
<keyword>mediaobjectco</keyword>
|
||||
<keyword>member</keyword>
|
||||
<keyword>methodname</keyword>
|
||||
<keyword>methodparam</keyword>
|
||||
<keyword>methodsynopsis</keyword>
|
||||
<keyword>modespec</keyword>
|
||||
<keyword>modifier</keyword>
|
||||
<keyword>mousebutton</keyword>
|
||||
<keyword>msg</keyword>
|
||||
<keyword>msgaud</keyword>
|
||||
<keyword>msgentry</keyword>
|
||||
<keyword>msgexplan</keyword>
|
||||
<keyword>msginfo</keyword>
|
||||
<keyword>msglevel</keyword>
|
||||
<keyword>msgmain</keyword>
|
||||
<keyword>msgorig</keyword>
|
||||
<keyword>msgrel</keyword>
|
||||
<keyword>msgset</keyword>
|
||||
<keyword>msgsub</keyword>
|
||||
<keyword>msgtext</keyword>
|
||||
<keyword>nonterminal</keyword>
|
||||
<keyword>objectinfo</keyword>
|
||||
<keyword>olink</keyword>
|
||||
<keyword>ooclass</keyword>
|
||||
<keyword>ooexception</keyword>
|
||||
<keyword>oointerface</keyword>
|
||||
<keyword>optional</keyword>
|
||||
<keyword>orgdiv</keyword>
|
||||
<keyword>otheraddr</keyword>
|
||||
<keyword>othercredit</keyword>
|
||||
<keyword>othername</keyword>
|
||||
<keyword>pagenums</keyword>
|
||||
<keyword>paramdef</keyword>
|
||||
<keyword>parameter</keyword>
|
||||
<keyword>part</keyword>
|
||||
<keyword>partinfo</keyword>
|
||||
<keyword>partintro</keyword>
|
||||
<keyword>personblurb</keyword>
|
||||
<keyword>personname</keyword>
|
||||
<keyword>phone</keyword>
|
||||
<keyword>pob</keyword>
|
||||
<keyword>postcode</keyword>
|
||||
<keyword>preface</keyword>
|
||||
<keyword>prefaceinfo</keyword>
|
||||
<keyword>primaryie</keyword>
|
||||
<keyword>printhistory</keyword>
|
||||
<keyword>procedure</keyword>
|
||||
<keyword>production</keyword>
|
||||
<keyword>productionrecap</keyword>
|
||||
<keyword>productionset</keyword>
|
||||
<keyword>productname</keyword>
|
||||
<keyword>productnumber</keyword>
|
||||
<context id="formatting-elements" once-only="true" style-ref="formatting-elements">
|
||||
<suffix>\b(?!\s*=)</suffix>
|
||||
<keyword>caution</keyword>
|
||||
<keyword>command</keyword>
|
||||
<keyword>computeroutput</keyword>
|
||||
<keyword>filename</keyword>
|
||||
<keyword>firstterm</keyword>
|
||||
<keyword>link</keyword>
|
||||
<keyword>note</keyword>
|
||||
<keyword>option</keyword>
|
||||
<keyword>para</keyword>
|
||||
<keyword>remark</keyword>
|
||||
<keyword>replaceable</keyword>
|
||||
<keyword>tip</keyword>
|
||||
<keyword>ulink</keyword>
|
||||
<keyword>variablelist</keyword>
|
||||
<keyword>varlistentry</keyword>
|
||||
<keyword>warning</keyword>
|
||||
<keyword>xref</keyword>
|
||||
</context>
|
||||
|
||||
</keyword-list>
|
||||
<!-- This split keeps each keyword-list under 250 elements.
|
||||
See bug #110991 for further details.
|
||||
-->
|
||||
|
||||
<keyword-list _name="Structural Elements 2" style="Keyword" case-sensitive="FALSE"
|
||||
match-empty-string-at-beginning = "FALSE"
|
||||
match-empty-string-at-end = "FALSE"
|
||||
beginning-regex="</?"
|
||||
end-regex="(\b|>)">
|
||||
|
||||
<keyword>programlistingco</keyword>
|
||||
<keyword>prompt</keyword>
|
||||
<keyword>property</keyword>
|
||||
<keyword>qandadiv</keyword>
|
||||
<keyword>qandaentry</keyword>
|
||||
<keyword>qandaset</keyword>
|
||||
<keyword>question</keyword>
|
||||
<keyword>quote</keyword>
|
||||
<keyword>refclass</keyword>
|
||||
<keyword>refdescriptor</keyword>
|
||||
<keyword>refentry</keyword>
|
||||
<keyword>refentryinfo</keyword>
|
||||
<keyword>refentrytitle</keyword>
|
||||
<keyword>reference</keyword>
|
||||
<keyword>referenceinfo</keyword>
|
||||
<keyword>refmeta</keyword>
|
||||
<keyword>refmiscinfo</keyword>
|
||||
<keyword>refname</keyword>
|
||||
<keyword>refnamediv</keyword>
|
||||
<keyword>refpurpose</keyword>
|
||||
<keyword>refsect1</keyword>
|
||||
<keyword>refsect1info</keyword>
|
||||
<keyword>refsect2</keyword>
|
||||
<keyword>refsect2info</keyword>
|
||||
<keyword>refsect3</keyword>
|
||||
<keyword>refsect3info</keyword>
|
||||
<keyword>refsection</keyword>
|
||||
<keyword>refsectioninfo</keyword>
|
||||
<keyword>refsynopsisdiv</keyword>
|
||||
<keyword>refsynopsisdivinfo</keyword>
|
||||
<keyword>returnvalue</keyword>
|
||||
<keyword>revremark</keyword>
|
||||
<keyword>rhs</keyword>
|
||||
<keyword>sbr</keyword>
|
||||
<keyword>screenco</keyword>
|
||||
<keyword>screeninfo</keyword>
|
||||
<keyword>secondaryie</keyword>
|
||||
<keyword>sect1info</keyword>
|
||||
<keyword>sect2info</keyword>
|
||||
<keyword>sect3info</keyword>
|
||||
<keyword>sect4info</keyword>
|
||||
<keyword>sect5</keyword>
|
||||
<keyword>sect5info</keyword>
|
||||
<keyword>sectioninfo</keyword>
|
||||
<keyword>seealso</keyword>
|
||||
<keyword>seealsoie</keyword>
|
||||
<keyword>seeie</keyword>
|
||||
<keyword>seg</keyword>
|
||||
<keyword>seglistitem</keyword>
|
||||
<keyword>segmentedlist</keyword>
|
||||
<keyword>segtitle</keyword>
|
||||
<keyword>seriesvolnums</keyword>
|
||||
<keyword>set</keyword>
|
||||
<keyword>setindex</keyword>
|
||||
<keyword>setindexinfo</keyword>
|
||||
<keyword>setinfo</keyword>
|
||||
<keyword>sgmltag</keyword>
|
||||
<keyword>shortaffil</keyword>
|
||||
<keyword>sidebar</keyword>
|
||||
<keyword>sidebarinfo</keyword>
|
||||
<keyword>simpara</keyword>
|
||||
<keyword>simplelist</keyword>
|
||||
<keyword>simplemsgentry</keyword>
|
||||
<keyword>simplesect</keyword>
|
||||
<keyword>spanspec</keyword>
|
||||
<keyword>state</keyword>
|
||||
<keyword>step</keyword>
|
||||
<keyword>stepalternatives</keyword>
|
||||
<keyword>street</keyword>
|
||||
<keyword>structfield</keyword>
|
||||
<keyword>structname</keyword>
|
||||
<keyword>subject</keyword>
|
||||
<keyword>subjectset</keyword>
|
||||
<keyword>subjectterm</keyword>
|
||||
<keyword>subscript</keyword>
|
||||
<keyword>substeps</keyword>
|
||||
<keyword>subtitle</keyword>
|
||||
<keyword>superscript</keyword>
|
||||
<keyword>symbol</keyword>
|
||||
<keyword>synopfragment</keyword>
|
||||
<keyword>synopfragmentref</keyword>
|
||||
<keyword>synopsis</keyword>
|
||||
<keyword>systemitem</keyword>
|
||||
<keyword>task</keyword>
|
||||
<keyword>taskprerequisites</keyword>
|
||||
<keyword>taskrelated</keyword>
|
||||
<keyword>tasksummary</keyword>
|
||||
<keyword>td</keyword>
|
||||
<keyword>tertiaryie</keyword>
|
||||
<keyword>textdata</keyword>
|
||||
<keyword>tfoot</keyword>
|
||||
<keyword>toc</keyword>
|
||||
<keyword>tocback</keyword>
|
||||
<keyword>tocchap</keyword>
|
||||
<keyword>tocentry</keyword>
|
||||
<keyword>tocfront</keyword>
|
||||
<keyword>toclevel</keyword>
|
||||
<keyword>tocpart</keyword>
|
||||
<keyword>token</keyword>
|
||||
<keyword>trademark</keyword>
|
||||
<keyword>type</keyword>
|
||||
<keyword>varargs</keyword>
|
||||
<keyword>varname</keyword>
|
||||
<keyword>videodata</keyword>
|
||||
<keyword>videoobject</keyword>
|
||||
<keyword>void</keyword>
|
||||
<keyword>volumenum</keyword>
|
||||
<keyword>wordasword</keyword>
|
||||
|
||||
</keyword-list>
|
||||
|
||||
<context id="gui-elements" once-only="true" style-ref="gui-elements">
|
||||
<suffix>\b(?!\s*=)</suffix>
|
||||
<keyword>accel</keyword>
|
||||
<keyword>application</keyword>
|
||||
<keyword>guibutton</keyword>
|
||||
<keyword>guiicon</keyword>
|
||||
<keyword>guilabel</keyword>
|
||||
<keyword>guimenuitem</keyword>
|
||||
<keyword>guimenu</keyword>
|
||||
<keyword>guisubmenu</keyword>
|
||||
<keyword>interface</keyword>
|
||||
<keyword>keycap</keyword>
|
||||
<keyword>keycombo</keyword>
|
||||
<keyword>keysym</keyword>
|
||||
<keyword>menuchoice</keyword>
|
||||
</context>
|
||||
|
||||
<pattern-item _name="Attribute" style = "Others">
|
||||
<regex>[ \t][a-zA-Z_:][a-zA-Z0-9_:-]*\b[ \t]*=</regex>
|
||||
</pattern-item>
|
||||
<context id="structural-elements" once-only="true" style-ref="structural-elements">
|
||||
<suffix>\b(?!\s*=)</suffix>
|
||||
<keyword>appendix</keyword>
|
||||
<keyword>book</keyword>
|
||||
<keyword>chapter</keyword>
|
||||
<keyword>anchor</keyword>
|
||||
<keyword>citetitle</keyword>
|
||||
<keyword>colspec</keyword>
|
||||
<keyword>emphasis</keyword>
|
||||
<keyword>entry</keyword>
|
||||
<keyword>figure</keyword>
|
||||
<keyword>glossary</keyword>
|
||||
<keyword>glossdef</keyword>
|
||||
<keyword>glossentry</keyword>
|
||||
<keyword>glossterm</keyword>
|
||||
<keyword>sect1</keyword>
|
||||
<keyword>sect2</keyword>
|
||||
<keyword>sect3</keyword>
|
||||
<keyword>sect4</keyword>
|
||||
<keyword>section</keyword>
|
||||
|
||||
<pattern-item _name ="Hexadecimal" style = "Base-N Integer">
|
||||
<regex>#[a-fA-F0-9][a-fA-F0-9][a-fA-F0-9][a-fA-F0-9][a-fA-F0-9][a-fA-F0-9]</regex>
|
||||
</pattern-item>
|
||||
<keyword>highlights</keyword>
|
||||
<keyword>holder</keyword>
|
||||
<keyword>imagedata</keyword>
|
||||
<keyword>imageobject</keyword>
|
||||
<keyword>indexterm</keyword>
|
||||
<keyword>informaltable</keyword>
|
||||
<keyword>inlinemediaobject</keyword>
|
||||
<keyword>itemizedlist</keyword>
|
||||
<keyword>literal</keyword>
|
||||
<keyword>legalnotice</keyword>
|
||||
<keyword>listitem</keyword>
|
||||
<keyword>mediaobject</keyword>
|
||||
<keyword>orderedlist</keyword>
|
||||
<keyword>phrase</keyword>
|
||||
<keyword>primary</keyword>
|
||||
<keyword>programlisting</keyword>
|
||||
|
||||
<keyword>row</keyword>
|
||||
<keyword>screen</keyword>
|
||||
<keyword>screenshot</keyword>
|
||||
<keyword>secondary</keyword>
|
||||
<keyword>see</keyword>
|
||||
<keyword>shortcut</keyword>
|
||||
|
||||
<keyword>table</keyword>
|
||||
<keyword>tbody</keyword>
|
||||
<keyword>term</keyword>
|
||||
<keyword>tertiary</keyword>
|
||||
<keyword>textobject</keyword>
|
||||
<keyword>tgroup</keyword>
|
||||
<keyword>thead</keyword>
|
||||
<keyword>titleabbrev</keyword>
|
||||
<keyword>title</keyword>
|
||||
<keyword>uri</keyword>
|
||||
<keyword>userinput</keyword>
|
||||
<keyword>year</keyword>
|
||||
|
||||
<keyword>ackno</keyword>
|
||||
<keyword>acronym</keyword>
|
||||
<keyword>action</keyword>
|
||||
<keyword>address</keyword>
|
||||
<keyword>answer</keyword>
|
||||
<keyword>appendixinfo</keyword>
|
||||
<keyword>areaset</keyword>
|
||||
<keyword>areaspec</keyword>
|
||||
<keyword>area</keyword>
|
||||
<keyword>arg</keyword>
|
||||
<keyword>artpagenums</keyword>
|
||||
<keyword>attribution</keyword>
|
||||
<keyword>audiodata</keyword>
|
||||
<keyword>audioobject</keyword>
|
||||
<keyword>authorblurb</keyword>
|
||||
<keyword>authorinitials</keyword>
|
||||
<keyword>beginpage</keyword>
|
||||
<keyword>bibliocoverage</keyword>
|
||||
<keyword>bibliodiv</keyword>
|
||||
<keyword>biblioentry</keyword>
|
||||
<keyword>bibliography</keyword>
|
||||
<keyword>bibliographyinfo</keyword>
|
||||
<keyword>biblioid</keyword>
|
||||
<keyword>bibliomisc</keyword>
|
||||
<keyword>bibliomixed</keyword>
|
||||
<keyword>bibliomset</keyword>
|
||||
<keyword>bibliorelation</keyword>
|
||||
<keyword>biblioset</keyword>
|
||||
<keyword>bibliosource</keyword>
|
||||
<keyword>blockinfo</keyword>
|
||||
<keyword>blockquote</keyword>
|
||||
<keyword>bridgehead</keyword>
|
||||
<keyword>calloutlist</keyword>
|
||||
<keyword>callout</keyword>
|
||||
<keyword>caption</keyword>
|
||||
<keyword>chapterinfo</keyword>
|
||||
<keyword>citation</keyword>
|
||||
<keyword>citebiblioid</keyword>
|
||||
<keyword>citerefentry</keyword>
|
||||
<keyword>city</keyword>
|
||||
<keyword>classname</keyword>
|
||||
<keyword>classsynopsis</keyword>
|
||||
<keyword>classsynopsisinfo</keyword>
|
||||
<keyword>cmdsynopsis</keyword>
|
||||
<keyword>code</keyword>
|
||||
<keyword>colgroup</keyword>
|
||||
<keyword>collabname</keyword>
|
||||
<keyword>collab</keyword>
|
||||
<keyword>colophon</keyword>
|
||||
<keyword>confdates</keyword>
|
||||
<keyword>confgroup</keyword>
|
||||
<keyword>confnum</keyword>
|
||||
<keyword>confsponsor</keyword>
|
||||
<keyword>conftitle</keyword>
|
||||
<keyword>constant</keyword>
|
||||
<keyword>constraintdef</keyword>
|
||||
<keyword>constraint</keyword>
|
||||
<keyword>constructorsynopsis</keyword>
|
||||
<keyword>contractnum</keyword>
|
||||
<keyword>contractsponsor</keyword>
|
||||
<keyword>contrib</keyword>
|
||||
<keyword>coref</keyword>
|
||||
<keyword>corpauthor</keyword>
|
||||
<keyword>corpcredit</keyword>
|
||||
<keyword>corpname</keyword>
|
||||
<keyword>country</keyword>
|
||||
<keyword>database</keyword>
|
||||
<keyword>dedication</keyword>
|
||||
<keyword>destructorsynopsis</keyword>
|
||||
<keyword>edition</keyword>
|
||||
<keyword>editor</keyword>
|
||||
<keyword>entrytbl</keyword>
|
||||
<keyword>envar</keyword>
|
||||
<keyword>epigraph</keyword>
|
||||
<keyword>equation</keyword>
|
||||
<keyword>errorcode</keyword>
|
||||
<keyword>errorname</keyword>
|
||||
<keyword>errortext</keyword>
|
||||
<keyword>errortype</keyword>
|
||||
<keyword>example</keyword>
|
||||
<keyword>exceptionname</keyword>
|
||||
<keyword>fax</keyword>
|
||||
<keyword>fieldsynopsis</keyword>
|
||||
<keyword>footnoteref</keyword>
|
||||
<keyword>footnote</keyword>
|
||||
<keyword>foreignphrase</keyword>
|
||||
<keyword>formalpara</keyword>
|
||||
<keyword>funcdef</keyword>
|
||||
<keyword>funcparams</keyword>
|
||||
<keyword>funcprototype</keyword>
|
||||
<keyword>funcsynopsis</keyword>
|
||||
<keyword>funcsynopsisinfo</keyword>
|
||||
<keyword>function</keyword>
|
||||
<keyword>glossaryinfo</keyword>
|
||||
<keyword>glossdiv</keyword>
|
||||
<keyword>glosslist</keyword>
|
||||
<keyword>glosssee</keyword>
|
||||
<keyword>glossseealso</keyword>
|
||||
<keyword>graphicco</keyword>
|
||||
<keyword>graphic</keyword>
|
||||
<keyword>hardware</keyword>
|
||||
<keyword>honorific</keyword>
|
||||
<keyword>imageobjectco</keyword>
|
||||
<keyword>important</keyword>
|
||||
<keyword>indexdiv</keyword>
|
||||
<keyword>indexentry</keyword>
|
||||
<keyword>indexinfo</keyword>
|
||||
<keyword>informalequation</keyword>
|
||||
<keyword>informalexample</keyword>
|
||||
<keyword>informalfigure</keyword>
|
||||
<keyword>initializer</keyword>
|
||||
<keyword>inlineequation</keyword>
|
||||
<keyword>inlinegraphic</keyword>
|
||||
<keyword>interfacename</keyword>
|
||||
<keyword>invpartnumber</keyword>
|
||||
<keyword>isbn</keyword>
|
||||
<keyword>issn</keyword>
|
||||
<keyword>issuenum</keyword>
|
||||
<keyword>itermset</keyword>
|
||||
<keyword>jobtitle</keyword>
|
||||
<keyword>keycode</keyword>
|
||||
<keyword>keywordset</keyword>
|
||||
<keyword>keyword</keyword>
|
||||
<keyword>lhs</keyword>
|
||||
<keyword>lineage</keyword>
|
||||
<keyword>lineannotation</keyword>
|
||||
<keyword>literallayout</keyword>
|
||||
<keyword>lot</keyword>
|
||||
<keyword>lotentry</keyword>
|
||||
<keyword>manvolnum</keyword>
|
||||
<keyword>markup</keyword>
|
||||
<keyword>medialabel</keyword>
|
||||
<keyword>mediaobjectco</keyword>
|
||||
<keyword>member</keyword>
|
||||
<keyword>methodname</keyword>
|
||||
<keyword>methodparam</keyword>
|
||||
<keyword>methodsynopsis</keyword>
|
||||
<keyword>modespec</keyword>
|
||||
<keyword>modifier</keyword>
|
||||
<keyword>mousebutton</keyword>
|
||||
<keyword>msgaud</keyword>
|
||||
<keyword>msgentry</keyword>
|
||||
<keyword>msgexplan</keyword>
|
||||
<keyword>msginfo</keyword>
|
||||
<keyword>msglevel</keyword>
|
||||
<keyword>msgmain</keyword>
|
||||
<keyword>msgorig</keyword>
|
||||
<keyword>msgrel</keyword>
|
||||
<keyword>msgset</keyword>
|
||||
<keyword>msgsub</keyword>
|
||||
<keyword>msgtext</keyword>
|
||||
<keyword>msg</keyword>
|
||||
<keyword>nonterminal</keyword>
|
||||
<keyword>objectinfo</keyword>
|
||||
<keyword>olink</keyword>
|
||||
<keyword>ooclass</keyword>
|
||||
<keyword>ooexception</keyword>
|
||||
<keyword>oointerface</keyword>
|
||||
<keyword>optional</keyword>
|
||||
<keyword>orgdiv</keyword>
|
||||
<keyword>otheraddr</keyword>
|
||||
<keyword>othercredit</keyword>
|
||||
<keyword>othername</keyword>
|
||||
<keyword>pagenums</keyword>
|
||||
<keyword>paramdef</keyword>
|
||||
<keyword>parameter</keyword>
|
||||
<keyword>partinfo</keyword>
|
||||
<keyword>partintro</keyword>
|
||||
<keyword>part</keyword>
|
||||
<keyword>personblurb</keyword>
|
||||
<keyword>personname</keyword>
|
||||
<keyword>phone</keyword>
|
||||
<keyword>pob</keyword>
|
||||
<keyword>postcode</keyword>
|
||||
<keyword>prefaceinfo</keyword>
|
||||
<keyword>preface</keyword>
|
||||
<keyword>primaryie</keyword>
|
||||
<keyword>printhistory</keyword>
|
||||
<keyword>procedure</keyword>
|
||||
<keyword>productionrecap</keyword>
|
||||
<keyword>productionset</keyword>
|
||||
<keyword>production</keyword>
|
||||
<keyword>productname</keyword>
|
||||
<keyword>productnumber</keyword>
|
||||
<keyword>programlistingco</keyword>
|
||||
<keyword>prompt</keyword>
|
||||
<keyword>property</keyword>
|
||||
<keyword>qandadiv</keyword>
|
||||
<keyword>qandaentry</keyword>
|
||||
<keyword>qandaset</keyword>
|
||||
<keyword>question</keyword>
|
||||
<keyword>quote</keyword>
|
||||
<keyword>refclass</keyword>
|
||||
<keyword>refdescriptor</keyword>
|
||||
<keyword>refentryinfo</keyword>
|
||||
<keyword>refentrytitle</keyword>
|
||||
<keyword>refentry</keyword>
|
||||
<keyword>referenceinfo</keyword>
|
||||
<keyword>reference</keyword>
|
||||
<keyword>refmeta</keyword>
|
||||
<keyword>refmiscinfo</keyword>
|
||||
<keyword>refname</keyword>
|
||||
<keyword>refnamediv</keyword>
|
||||
<keyword>refpurpose</keyword>
|
||||
<keyword>refsect1</keyword>
|
||||
<keyword>refsect1info</keyword>
|
||||
<keyword>refsect2</keyword>
|
||||
<keyword>refsect2info</keyword>
|
||||
<keyword>refsect3</keyword>
|
||||
<keyword>refsect3info</keyword>
|
||||
<keyword>refsection</keyword>
|
||||
<keyword>refsectioninfo</keyword>
|
||||
<keyword>refsynopsisdivinfo</keyword>
|
||||
<keyword>refsynopsisdiv</keyword>
|
||||
<keyword>returnvalue</keyword>
|
||||
<keyword>revremark</keyword>
|
||||
<keyword>rhs</keyword>
|
||||
<keyword>sbr</keyword>
|
||||
<keyword>screenco</keyword>
|
||||
<keyword>screeninfo</keyword>
|
||||
<keyword>secondaryie</keyword>
|
||||
<keyword>sect1info</keyword>
|
||||
<keyword>sect2info</keyword>
|
||||
<keyword>sect3info</keyword>
|
||||
<keyword>sect4info</keyword>
|
||||
<keyword>sect5info</keyword>
|
||||
<keyword>sect5</keyword>
|
||||
<keyword>sectioninfo</keyword>
|
||||
<keyword>seealsoie</keyword>
|
||||
<keyword>seealso</keyword>
|
||||
<keyword>seeie</keyword>
|
||||
<keyword>seglistitem</keyword>
|
||||
<keyword>segmentedlist</keyword>
|
||||
<keyword>segtitle</keyword>
|
||||
<keyword>seg</keyword>
|
||||
<keyword>seriesvolnums</keyword>
|
||||
<keyword>setindexinfo</keyword>
|
||||
<keyword>setindex</keyword>
|
||||
<keyword>setinfo</keyword>
|
||||
<keyword>set</keyword>
|
||||
<keyword>sgmltag</keyword>
|
||||
<keyword>shortaffil</keyword>
|
||||
<keyword>sidebar</keyword>
|
||||
<keyword>sidebarinfo</keyword>
|
||||
<keyword>simpara</keyword>
|
||||
<keyword>simplelist</keyword>
|
||||
<keyword>simplemsgentry</keyword>
|
||||
<keyword>simplesect</keyword>
|
||||
<keyword>spanspec</keyword>
|
||||
<keyword>state</keyword>
|
||||
<keyword>stepalternatives</keyword>
|
||||
<keyword>step</keyword>
|
||||
<keyword>street</keyword>
|
||||
<keyword>structfield</keyword>
|
||||
<keyword>structname</keyword>
|
||||
<keyword>subject</keyword>
|
||||
<keyword>subjectset</keyword>
|
||||
<keyword>subjectterm</keyword>
|
||||
<keyword>subscript</keyword>
|
||||
<keyword>substeps</keyword>
|
||||
<keyword>subtitle</keyword>
|
||||
<keyword>superscript</keyword>
|
||||
<keyword>symbol</keyword>
|
||||
<keyword>synopfragment</keyword>
|
||||
<keyword>synopfragmentref</keyword>
|
||||
<keyword>synopsis</keyword>
|
||||
<keyword>systemitem</keyword>
|
||||
<keyword>taskprerequisites</keyword>
|
||||
<keyword>taskrelated</keyword>
|
||||
<keyword>tasksummary</keyword>
|
||||
<keyword>task</keyword>
|
||||
<keyword>td</keyword>
|
||||
<keyword>tertiaryie</keyword>
|
||||
<keyword>textdata</keyword>
|
||||
<keyword>tfoot</keyword>
|
||||
<keyword>tocback</keyword>
|
||||
<keyword>tocchap</keyword>
|
||||
<keyword>tocentry</keyword>
|
||||
<keyword>tocfront</keyword>
|
||||
<keyword>toclevel</keyword>
|
||||
<keyword>tocpart</keyword>
|
||||
<keyword>toc</keyword>
|
||||
<keyword>token</keyword>
|
||||
<keyword>trademark</keyword>
|
||||
<keyword>type</keyword>
|
||||
<keyword>varargs</keyword>
|
||||
<keyword>varname</keyword>
|
||||
<keyword>videodata</keyword>
|
||||
<keyword>videoobject</keyword>
|
||||
<keyword>void</keyword>
|
||||
<keyword>volumenum</keyword>
|
||||
<keyword>wordasword</keyword>
|
||||
</context>
|
||||
|
||||
<context id="dockbook-tags">
|
||||
<include>
|
||||
<context ref="header-elements"/>
|
||||
<context ref="formatting-elements"/>
|
||||
<context ref="gui-elements"/>
|
||||
<context ref="structural-elements"/>
|
||||
<context ref="xml:element-name" original="true"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<replace id="xml:element-name" ref="dockbook-tags"/>
|
||||
|
||||
<context id="docbook">
|
||||
<include>
|
||||
<context ref="xml:xml"/>
|
||||
</include>
|
||||
</context>
|
||||
</definitions>
|
||||
|
||||
</language>
|
||||
|
|
|
@ -0,0 +1,248 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Author: Paolo Borelli <pborelli@gnome.org>
|
||||
Copyright (C) 2007 Paolo Borelli
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
|
||||
-->
|
||||
<language id="erlang" _name="Erlang" version="2.0" _section="Sources">
|
||||
<metadata>
|
||||
<property name="mimetypes">text/x-erlang</property>
|
||||
<property name="globs">*.erl</property>
|
||||
<property name="line-comment-start">%</property>
|
||||
</metadata>
|
||||
|
||||
<styles>
|
||||
<style id="comment" _name="Comment" map-to="def:comment"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="operator" _name="Operator" map-to="def:operator"/>
|
||||
<style id="atom" _name="Atom" map-to="def:type"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="floating-point" _name="Floating point number" map-to="def:floating-point"/>
|
||||
<style id="decimal" _name="Decimal number" map-to="def:decimal"/>
|
||||
<style id="base-n-integer" _name="Base-N Integer" map-to="def:base-n-integer"/>
|
||||
<style id="builtin" _name="Builtin" map-to="def:builtin"/>
|
||||
<style id="compiler-directive" _name="Compiler Directive" map-to="def:preprocessor"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
||||
<context id="line-comment" style-ref="comment" end-at-line-end="true">
|
||||
<start>%</start>
|
||||
<include>
|
||||
<context ref="def:in-line-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="keywords" style-ref="keyword">
|
||||
<keyword>after</keyword>
|
||||
<keyword>begin</keyword>
|
||||
<keyword>case</keyword>
|
||||
<keyword>catch</keyword>
|
||||
<keyword>cond</keyword>
|
||||
<keyword>end</keyword>
|
||||
<keyword>fun</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>let</keyword>
|
||||
<keyword>of</keyword>
|
||||
<keyword>query</keyword>
|
||||
<keyword>receive</keyword>
|
||||
<keyword>when</keyword>
|
||||
</context>
|
||||
|
||||
<context id="operators" style-ref="operator">
|
||||
<keyword>and</keyword>
|
||||
<keyword>band</keyword>
|
||||
<keyword>bnot</keyword>
|
||||
<keyword>bor</keyword>
|
||||
<keyword>bsl</keyword>
|
||||
<keyword>bsr</keyword>
|
||||
<keyword>bxor</keyword>
|
||||
<keyword>div</keyword>
|
||||
<keyword>not</keyword>
|
||||
<keyword>or</keyword>
|
||||
<keyword>rem</keyword>
|
||||
<keyword>xor</keyword>
|
||||
</context>
|
||||
|
||||
<context id="atom" style-ref="atom">
|
||||
<start>'</start>
|
||||
<end>'</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="string" style-ref="string">
|
||||
<start>"</start>
|
||||
<end>"</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="float" style-ref="floating-point">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
[0-9]+\.[0-9]+([Ee][+-]?[0-9]+)?
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="base-n-number" style-ref="base-n-integer">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
[1-9]([0-9])?#[0-9a-fA-F]+
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="decimal-number" style-ref="decimal">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
[0-9]+
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="builtins" style-ref="builtin">
|
||||
<keyword>abs</keyword>
|
||||
<keyword>alive</keyword>
|
||||
<keyword>apply</keyword>
|
||||
<keyword>atom_to_list</keyword>
|
||||
<keyword>atom</keyword>
|
||||
<keyword>binary_to_list</keyword>
|
||||
<keyword>binary_to_ter</keyword>
|
||||
<keyword>binary</keyword>
|
||||
<keyword>check_process_code</keyword>
|
||||
<keyword>concat_binary</keyword>
|
||||
<keyword>constant</keyword>
|
||||
<keyword>date</keyword>
|
||||
<keyword>delete_module</keyword>
|
||||
<keyword>disconnect_node</keyword>
|
||||
<keyword>element</keyword>
|
||||
<keyword>erase</keyword>
|
||||
<keyword>exit</keyword>
|
||||
<keyword>float</keyword>
|
||||
<keyword>float_to_list</keyword>
|
||||
<keyword>function</keyword>
|
||||
<keyword>get_cookie</keyword>
|
||||
<keyword>get_keys</keyword>
|
||||
<keyword>get</keyword>
|
||||
<keyword>group_leader</keyword>
|
||||
<keyword>halt</keyword>
|
||||
<keyword>hash</keyword>
|
||||
<keyword>hd</keyword>
|
||||
<keyword>integer_to_list</keyword>
|
||||
<keyword>integer</keyword>
|
||||
<keyword>is_alive</keyword>
|
||||
<keyword>length</keyword>
|
||||
<keyword>link</keyword>
|
||||
<keyword>list_to_atom</keyword>
|
||||
<keyword>list_to_binary</keyword>
|
||||
<keyword>list_to_float</keyword>
|
||||
<keyword>list_to_integer</keyword>
|
||||
<keyword>list_to_pid</keyword>
|
||||
<keyword>list_to_tuple</keyword>
|
||||
<keyword>list</keyword>
|
||||
<keyword>load_module</keyword>
|
||||
<keyword>make_ref</keyword>
|
||||
<keyword>math</keyword>
|
||||
<keyword>module_loaded</keyword>
|
||||
<keyword>monitor_node</keyword>
|
||||
<keyword>node</keyword>
|
||||
<keyword>nodes</keyword>
|
||||
<keyword>now</keyword>
|
||||
<keyword>number</keyword>
|
||||
<keyword>open_port</keyword>
|
||||
<keyword>pid_to_list</keyword>
|
||||
<keyword>pid</keyword>
|
||||
<keyword>ports</keyword>
|
||||
<keyword>port_close</keyword>
|
||||
<keyword>port_info</keyword>
|
||||
<keyword>preloaded</keyword>
|
||||
<keyword>processes</keyword>
|
||||
<keyword>process_flag</keyword>
|
||||
<keyword>process_info</keyword>
|
||||
<keyword>process</keyword>
|
||||
<keyword>purge_module</keyword>
|
||||
<keyword>put</keyword>
|
||||
<keyword>record</keyword>
|
||||
<keyword>reference</keyword>
|
||||
<keyword>registered</keyword>
|
||||
<keyword>register</keyword>
|
||||
<keyword>round</keyword>
|
||||
<keyword>self</keyword>
|
||||
<keyword>setelement</keyword>
|
||||
<keyword>set_cookie</keyword>
|
||||
<keyword>set_node</keyword>
|
||||
<keyword>size</keyword>
|
||||
<keyword>spawn_link</keyword>
|
||||
<keyword>spawn</keyword>
|
||||
<keyword>split_binary</keyword>
|
||||
<keyword>statistics</keyword>
|
||||
<keyword>term_to_binary</keyword>
|
||||
<keyword>throw</keyword>
|
||||
<keyword>time</keyword>
|
||||
<keyword>tl</keyword>
|
||||
<keyword>trunc</keyword>
|
||||
<keyword>tuple_to_list</keyword>
|
||||
<keyword>unlink</keyword>
|
||||
<keyword>unregister</keyword>
|
||||
<keyword>whereis</keyword>
|
||||
</context>
|
||||
|
||||
<context id="compiler-directives" style-ref="compiler-directive">
|
||||
<prefix>-</prefix>
|
||||
<keyword>author</keyword>
|
||||
<keyword>compile</keyword>
|
||||
<keyword>copyright</keyword>
|
||||
<keyword>define</keyword>
|
||||
<keyword>doc</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>endif</keyword>
|
||||
<keyword>export</keyword>
|
||||
<keyword>file</keyword>
|
||||
<keyword>ifdef</keyword>
|
||||
<keyword>ifndef</keyword>
|
||||
<keyword>import</keyword>
|
||||
<keyword>include_lib</keyword>
|
||||
<keyword>include</keyword>
|
||||
<keyword>module</keyword>
|
||||
<keyword>record</keyword>
|
||||
<keyword>undef</keyword>
|
||||
</context>
|
||||
|
||||
<context id="erlang">
|
||||
<include>
|
||||
<context ref="line-comment"/>
|
||||
<context ref="keywords"/>
|
||||
<context ref="operators"/>
|
||||
<context ref="atom"/>
|
||||
<context ref="string"/>
|
||||
<context ref="float"/>
|
||||
<context ref="base-n-number"/>
|
||||
<context ref="decimal-number"/>
|
||||
<context ref="builtins"/>
|
||||
<context ref="compiler-directives"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
</definitions>
|
||||
|
||||
</language>
|
|
@ -33,7 +33,7 @@
|
|||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="base-n-integer" _name="Base-N Integer" map-to="def:base-n-integer"/>
|
||||
<style id="decimal" _name="Decimal" map-to="def:decimal"/>
|
||||
<style id="data-type" _name="Data Type" map-to="def:data-type"/>
|
||||
<style id="type" _name="Data Type" map-to="def:type"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
@ -358,7 +358,7 @@
|
|||
<keyword>zsqrt</keyword>
|
||||
</context>
|
||||
|
||||
<context id="types" style-ref="data-type">
|
||||
<context id="types" style-ref="type">
|
||||
<keyword>REAL</keyword>
|
||||
<keyword>INTEGER</keyword>
|
||||
<keyword>CHARACTER</keyword>
|
||||
|
|
|
@ -32,10 +32,10 @@
|
|||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="decimal" _name="Decimal" map-to="def:decimal"/>
|
||||
<style id="data-type" _name="Data Type" map-to="def:data-type"/>
|
||||
<style id="state" _name="Widget State" map-to="def:special-value"/>
|
||||
<style id="variable" _name="Data Type" map-to="def:type"/>
|
||||
<style id="state" _name="Widget State" map-to="def:special-constant"/>
|
||||
<style id="include-directive" _name="Include directive" map-to="def:preprocessor"/>
|
||||
<style id="boolean-value" _name="Boolean value" map-to="def:special-value"/>
|
||||
<style id="boolean-value" _name="Boolean value" map-to="def:boolean"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
@ -75,7 +75,7 @@
|
|||
<keyword>class</keyword>
|
||||
<keyword>widget</keyword>
|
||||
</context>
|
||||
<context id="variable" style-ref="data-type">
|
||||
<context id="variable" style-ref="variable">
|
||||
<keyword>fg</keyword>
|
||||
<keyword>bg</keyword>
|
||||
<keyword>bg_pixmap</keyword>
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2006-2007 GtkSourceView team
|
||||
Author: Yevgen Muntyan <muntyan@tamu.edu>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
|
||||
-->
|
||||
<style-scheme id="gvim" _name="GVim" version="1.0">
|
||||
<author>GtkSourceView team</author>
|
||||
<_description>Color scheme used in GVim</_description>
|
||||
|
||||
<style name="bracket-match" foreground="#white" background="#grey" bold="true"/>
|
||||
<style name="bracket-mismatch" foreground="#white" background="#red" bold="true"/>
|
||||
|
||||
<!-- legacy styles for old lang files -->
|
||||
<style name="Others" foreground="#2E8B57" bold="true"/>
|
||||
<style name="Others 2" foreground="#008B8B"/>
|
||||
<style name="Others 3" foreground="#6A5ACD"/>
|
||||
|
||||
<style name="def:base-n-integer" foreground="#FF00FF"/>
|
||||
<style name="def:character" foreground="#FF00FF"/>
|
||||
<style name="def:comment" foreground="#0000FF"/>
|
||||
<style name="def:data-type" foreground="#2E8B57" bold="true"/>
|
||||
<style name="def:function" foreground="#008A8C"/>
|
||||
<style name="def:decimal" foreground="#FF00FF"/>
|
||||
<style name="def:floating-point" foreground="#FF00FF"/>
|
||||
<style name="def:keyword" foreground="#A52A2A" bold="true"/>
|
||||
<style name="def:string" foreground="#FF00FF"/>
|
||||
<style name="def:net-address-in-comment" foreground="#0000FF" italic="true" underline="true"/>
|
||||
<style name="def:note" foreground="#0000FF" background="#FFFF00" bold="true"/>
|
||||
<style name="def:error" background="#FF0000" bold="true"/>
|
||||
<style name="def:escape" foreground="#9010D0"/>
|
||||
<style name="def:shebang" foreground="#0000FF" bold="true"/>
|
||||
<style name="def:doc-comment-element" italic="true"/>
|
||||
|
||||
<style name="def:preprocessor" foreground="#A020F0"/>
|
||||
|
||||
<style name="diff:added-line" use-style="Others 2"/>
|
||||
<style name="diff:removed-line" use-style="Others 3"/>
|
||||
<style name="diff:changed-line" use-style="def:preprocessor"/>
|
||||
<style name="diff:special-case" use-style="def:string"/>
|
||||
<style name="diff:location" use-style="def:keyword"/>
|
||||
<style name="diff:diff-file" use-style="def:data-type"/>
|
||||
|
||||
<style name="xml:attribute-name" foreground="#6A5ACD"/>
|
||||
<style name="xml:tags" foreground="#008B8B"/>
|
||||
<style name="xml:namespace" foreground="#2E8B57" bold="true"/>
|
||||
<style name="xml:doctype" use-style="def:preprocessor"/>
|
||||
<style name="xml:cdata-delim" use-style="def:preprocessor"/>
|
||||
<style name="xml:processing-instruction" use-style="def:preprocessor"/>
|
||||
|
||||
<style name="js:object" foreground="#2E8B57" bold="true"/>
|
||||
<style name="js:constructors" foreground="#008B8B"/>
|
||||
|
||||
<style name="latex:display-math" use-style="Others 3"/>
|
||||
<style name="latex:command" foreground="#2E8B57" bold="true"/>
|
||||
<style name="latex:include" use-style="def:preprocessor"/>
|
||||
|
||||
<style name="sh:variable1" use-style="Others 3"/>
|
||||
<style name="sh:variable2" use-style="Others 2"/>
|
||||
|
||||
<style name="python:builtins" use-style="Others"/>
|
||||
<style name="changelog:email" use-style="def:comment"/>
|
||||
</style-scheme>
|
|
@ -27,7 +27,7 @@
|
|||
<style id="directive" _name="Haddock Directive" map-to="def:doc-comment-element"/>
|
||||
<style id="identifier" _name="Hyperlinked Identifier" map-to="def:doc-comment-element"/>
|
||||
<style id="module" _name="Hyperlinked Module Name" map-to="def:doc-comment-element"/>
|
||||
<style id="escape" _name="Escape" map-to="def:escape"/>
|
||||
<style id="escape" _name="Escape" map-to="def:special-char"/>
|
||||
<style id="emphasis" _name="Emphasis" map-to="def:doc-comment-element"/>
|
||||
<style id="monospace" _name="Monospace" />
|
||||
<style id="codeblock" _name="Code Block" />
|
||||
|
@ -35,7 +35,7 @@
|
|||
<style id="itemized" _name="Itemized list" map-to="def:doc-comment-element"/>
|
||||
<style id="enumerated" _name="Enumerated list" map-to="def:doc-comment-element"/>
|
||||
<style id="definition" _name="Definition list" map-to="def:doc-comment-element"/>
|
||||
<style id="url" _name="URL" map-to="def:net-address-in-comment"/>
|
||||
<style id="url" _name="URL" map-to="def:underlined"/>
|
||||
<style id="anchor" _name="Anchor" map-to="def:doc-comment-element"/>
|
||||
</styles>
|
||||
|
||||
|
|
|
@ -33,10 +33,10 @@
|
|||
<style id="variable" _name="Variable" />
|
||||
<style id="symbol" _name="Symbol" />
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="data-type" _name="Data Type" map-to="def:data-type"/>
|
||||
<style id="type" _name="Data Type" map-to="def:type"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="character" _name="Character" map-to="def:character"/>
|
||||
<style id="char-escape" _name="Escaped Character" map-to="def:escape"/>
|
||||
<style id="char-escape" _name="Escaped Character" map-to="def:special-char"/>
|
||||
<style id="float" _name="Float" map-to="def:floating-point"/>
|
||||
<style id="decimal" _name="Decimal" map-to="def:decimal"/>
|
||||
<style id="octal" _name="Octal" map-to="def:base-n-integer"/>
|
||||
|
@ -76,7 +76,7 @@
|
|||
<match>\b[a-z_][0-9a-zA-Z_'#]*</match>
|
||||
</context>
|
||||
|
||||
<context id="type-or-constructor" style-ref="data-type">
|
||||
<context id="type-or-constructor" style-ref="type">
|
||||
<match>\b[A-Z][0-9a-zA-Z._'#]*</match>
|
||||
</context>
|
||||
|
||||
|
|
|
@ -30,25 +30,19 @@
|
|||
</metadata>
|
||||
|
||||
<styles>
|
||||
<style id="comment" _name="Comment"
|
||||
map-to="xml:comment"/>
|
||||
<style id="tag" _name="Tag"
|
||||
map-to="xml:tags"/>
|
||||
<style id="attrib-name" _name="Attribute Name"
|
||||
map-to="xml:attribute-name"/>
|
||||
<style id="attrib-value" _name="Attribute Value"
|
||||
map-to="xml:attribute-value"/>
|
||||
<style id="dtd" _name="DTD"
|
||||
map-to="xml:doctype"/>
|
||||
<style id="error" _name="Error"
|
||||
map-to="xml:error"/>
|
||||
<style id="comment" _name="Comment" map-to="xml:comment"/>
|
||||
<style id="tag" _name="Tag" map-to="xml:element-name"/>
|
||||
<style id="attrib-name" _name="Attribute Name" map-to="xml:attribute-name"/>
|
||||
<style id="attrib-value" _name="Attribute Value" map-to="xml:attribute-value"/>
|
||||
<style id="dtd" _name="DTD" map-to="xml:doctype"/>
|
||||
<style id="error" _name="Error" map-to="xml:error"/>
|
||||
</styles>
|
||||
|
||||
<default-regex-options case-sensitive="false"/>
|
||||
|
||||
<definitions>
|
||||
<!-- Html comments are more permissive than xml comments -->
|
||||
<context id="comment" style-ref="xml:comment">
|
||||
<context id="comment" style-ref="comment">
|
||||
<start><!--</start>
|
||||
<end>--\s*></end>
|
||||
<include>
|
||||
|
@ -61,6 +55,15 @@
|
|||
<end>></end>
|
||||
</context>
|
||||
|
||||
<!-- This is a placeholder context intended to be <replace>d
|
||||
in languages like php that need to embedd contexts inside
|
||||
html tags and attributes.
|
||||
-->
|
||||
<context id="embedded-lang-hook">
|
||||
<start>\%{def:never-match}</start>
|
||||
<end></end>
|
||||
</context>
|
||||
|
||||
<context id="generic-tag">
|
||||
<include>
|
||||
|
||||
|
@ -80,6 +83,7 @@
|
|||
<include>
|
||||
<context ref="xml:entity"/>
|
||||
<context ref="xml:character-reference"/>
|
||||
<context ref="embedded-lang-hook"/>
|
||||
</include>
|
||||
</context>
|
||||
</include>
|
||||
|
@ -106,6 +110,8 @@
|
|||
</match>
|
||||
</context>
|
||||
|
||||
<context ref="embedded-lang-hook"/>
|
||||
|
||||
</include>
|
||||
</context>
|
||||
|
||||
|
@ -142,6 +148,7 @@
|
|||
<context ref="xml:doctype"/>
|
||||
<context ref="xml:entity"/>
|
||||
<context ref="xml:character-reference"/>
|
||||
<context ref="xml:cdata"/>
|
||||
<context ref="comment"/>
|
||||
<context ref="dtd"/>
|
||||
<context ref="script"/>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
<styles>
|
||||
<style id="comment" _name="Comment" map-to="def:comment"/>
|
||||
<style id="data-type" _name="Data Type" map-to="def:data-type"/>
|
||||
<style id="type" _name="Data Type" map-to="def:type"/>
|
||||
<style id="preprocessor" _name="Preprocessor" map-to="def:preprocessor"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
|
@ -107,7 +107,7 @@
|
|||
<keyword>union</keyword>
|
||||
<keyword>valuetype</keyword>
|
||||
</context>
|
||||
<context id="types" style-ref="data-type">
|
||||
<context id="types" style-ref="type">
|
||||
<keyword>any</keyword>
|
||||
<keyword>boolean</keyword>
|
||||
<keyword>char</keyword>
|
||||
|
|
|
@ -32,8 +32,9 @@
|
|||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="decimal" _name="Decimal" map-to="def:decimal"/>
|
||||
<style id="data-type" _name="Data Type" map-to="def:data-type"/>
|
||||
<style id="boolean-value" _name="Boolean value" map-to="def:special-value"/>
|
||||
<style id="variable" _name="Variable" map-to="def:type"/>
|
||||
<style id="non-standard-key" _name="Data Type" map-to="def:type"/>
|
||||
<style id="boolean-value" _name="Boolean value" map-to="def:boolean"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
@ -44,13 +45,13 @@
|
|||
<start>^\[</start>
|
||||
<end>\]$</end>
|
||||
</context>
|
||||
<context id="non-standard-key" style-ref="data-type">
|
||||
<context id="non-standard-key" style-ref="non-standard-key">
|
||||
<match>^_?X\-[a-zA-Z\-]+</match>
|
||||
</context>
|
||||
<context id="language" style-ref="decimal">
|
||||
<match>\[[a-zA-Z_]+\]</match>
|
||||
</context>
|
||||
<context id="variable" style-ref="data-type">
|
||||
<context id="variable" style-ref="variable">
|
||||
<match>^[a-zA-Z_][a-zA-Z0-9_.]*</match>
|
||||
</context>
|
||||
<context id="boolean-value" style-ref="boolean-value">
|
||||
|
|
|
@ -34,12 +34,16 @@
|
|||
<style id="comment" _name="Comment" map-to="def:comment"/>
|
||||
<style id="error" _name="Error" map-to="def:error"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<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-value"/>
|
||||
<style id="boolean" _name="Boolean" map-to="def:special-value"/>
|
||||
<style id="decimal" _name="Decimal" map-to="def:decimal"/>
|
||||
<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:error"/>
|
||||
<style id="data-type" _name="Data Type" map-to="def:data-type"/>
|
||||
<style id="type" _name="Data Type" map-to="def:type"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
@ -73,21 +77,23 @@
|
|||
<match>\*/(?!\*)</match>
|
||||
</context>
|
||||
|
||||
<context id="declarations" style-ref="keyword">
|
||||
<context id="externals" style-ref="external">
|
||||
<keyword>import</keyword>
|
||||
<keyword>package</keyword>
|
||||
</context>
|
||||
|
||||
<context id="declarations" style-ref="declaration">
|
||||
<keyword>class</keyword>
|
||||
<keyword>enum</keyword>
|
||||
<keyword>extends</keyword>
|
||||
<keyword>implements</keyword>
|
||||
<keyword>import</keyword>
|
||||
<keyword>instanceof</keyword>
|
||||
<keyword>interface</keyword>
|
||||
<keyword>native</keyword>
|
||||
<keyword>package</keyword>
|
||||
<keyword>volatile</keyword>
|
||||
<keyword>throws</keyword>
|
||||
</context>
|
||||
|
||||
<context id="primitive-types" style-ref="data-type">
|
||||
<context id="primitive-types" style-ref="type">
|
||||
<keyword>boolean</keyword>
|
||||
<keyword>byte</keyword>
|
||||
<keyword>char</keyword>
|
||||
|
@ -99,6 +105,22 @@
|
|||
<keyword>void</keyword>
|
||||
</context>
|
||||
|
||||
<context id="storage-class" style-ref="storage-class">
|
||||
<keyword>abstract</keyword>
|
||||
<keyword>final</keyword>
|
||||
<keyword>static</keyword>
|
||||
<keyword>strictfp</keyword>
|
||||
<keyword>synchronized</keyword>
|
||||
<keyword>transient</keyword>
|
||||
<keyword>volatile</keyword>
|
||||
</context>
|
||||
|
||||
<context id="scope-declarations" style-ref="scope-declaration">
|
||||
<keyword>private</keyword>
|
||||
<keyword>protected</keyword>
|
||||
<keyword>public</keyword>
|
||||
</context>
|
||||
|
||||
<context id="flow" style-ref="keyword">
|
||||
<keyword>assert</keyword>
|
||||
<keyword>break</keyword>
|
||||
|
@ -112,24 +134,12 @@
|
|||
<keyword>for</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>synchronized</keyword>
|
||||
<keyword>throw</keyword>
|
||||
<keyword>switch</keyword>
|
||||
<keyword>try</keyword>
|
||||
<keyword>while</keyword>
|
||||
</context>
|
||||
|
||||
<context id="modifiers" style-ref="keyword">
|
||||
<keyword>abstract</keyword>
|
||||
<keyword>final</keyword>
|
||||
<keyword>private</keyword>
|
||||
<keyword>protected</keyword>
|
||||
<keyword>public</keyword>
|
||||
<keyword>static</keyword>
|
||||
<keyword>strictfp</keyword>
|
||||
<keyword>transient</keyword>
|
||||
</context>
|
||||
|
||||
<context id="memory" style-ref="keyword">
|
||||
<keyword>new</keyword>
|
||||
<keyword>super</keyword>
|
||||
|
@ -150,8 +160,13 @@
|
|||
<keyword>true</keyword>
|
||||
</context>
|
||||
|
||||
<context id="numeric" style-ref="decimal">
|
||||
<match>(\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 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="java">
|
||||
|
@ -161,10 +176,12 @@
|
|||
<context ref="line-comment"/>
|
||||
<context ref="block-comment"/>
|
||||
<context ref="close-comment-outside-comment"/>
|
||||
<context ref="externals"/>
|
||||
<context ref="declarations"/>
|
||||
<context ref="primitive-types"/>
|
||||
<context ref="storage-class"/>
|
||||
<context ref="scope-declarations"/>
|
||||
<context ref="flow"/>
|
||||
<context ref="modifiers"/>
|
||||
<context ref="memory"/>
|
||||
<context ref="future-reserved-words"/>
|
||||
<context ref="null-value"/>
|
||||
|
|
|
@ -23,36 +23,28 @@
|
|||
Boston, MA 02111-1307, USA.
|
||||
|
||||
-->
|
||||
<!--
|
||||
Based on the syntax file for the old engine written by
|
||||
-->
|
||||
<language id="js" _name="Javascript" version="2.0" _section="Scripts">
|
||||
<metadata>
|
||||
<property name="mimetypes">application/x-javascript;text/x-javascript;text/javascript;text/x-js</property>
|
||||
<property name="globs">*.js</property>
|
||||
<property name="mimetypes">application/x-javascript;text/x-javascript;text/javascript;text/x-js</property>
|
||||
<property name="globs">*.js</property>
|
||||
<property name="line-comment-start">//</property>
|
||||
<property name="block-comment-start">/*</property>
|
||||
<property name="block-comment-end">*/</property>
|
||||
</metadata>
|
||||
|
||||
<styles>
|
||||
<style id="comment" _name="Comment"
|
||||
map-to="def:comment"/>
|
||||
<style id="comment-multiline" _name="Multiline Comment"
|
||||
map-to="def:comment"/>
|
||||
<style id="error" _name="Error"
|
||||
map-to="def:error"/>
|
||||
<style id="string" _name="String"
|
||||
map-to="def:string"/>
|
||||
<style id="keyword" _name="Keyword"
|
||||
map-to="def:keyword"/>
|
||||
<style id="object" _name="Object"/> <!--map-to="def:others"-->
|
||||
<style id="data-type" _name="Data Type"
|
||||
map-to="def:data-type"/>
|
||||
<style id="function" _name="Function"
|
||||
map-to="def:function"/>
|
||||
<style id="properties" _name="Properties"
|
||||
map-to="def:data-type"/>
|
||||
<style id="constructors" _name="Constructors"/> <!--map-to="def:others2"-->
|
||||
<style id="future-words" _name="Future Reserved Keywords"
|
||||
map-to="def:error"/>
|
||||
<style id="comment" _name="Comment" map-to="def:comment"/>
|
||||
<style id="error" _name="Error" map-to="def:error"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="null-value" _name="Null Value" map-to="def:special-constant"/>
|
||||
<style id="boolean" _name="Boolean value" map-to="def:boolean"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="object" _name="Object"/> <!--map-to="def:others"-->
|
||||
<style id="type" _name="Data Type" map-to="def:type"/>
|
||||
<style id="function" _name="Function" map-to="def:function"/>
|
||||
<style id="properties" _name="Properties" map-to="def:statement"/>
|
||||
<style id="constructors" _name="Constructors" map-to="def:type"/>
|
||||
<style id="future-words" _name="Future Reserved Keywords" map-to="def:error"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
@ -60,7 +52,7 @@
|
|||
<include>
|
||||
|
||||
<!-- Comments -->
|
||||
<context id="comment" style-ref="comment">
|
||||
<context id="line-comment" style-ref="comment">
|
||||
<start>//</start>
|
||||
<end>$</end>
|
||||
<include>
|
||||
|
@ -69,7 +61,7 @@
|
|||
</include>
|
||||
</context>
|
||||
|
||||
<context id="comment-multiline" style-ref="comment-multiline">
|
||||
<context id="block-comment" style-ref="comment">
|
||||
<start>/\*</start>
|
||||
<end>\*/</end>
|
||||
<include>
|
||||
|
@ -77,6 +69,10 @@
|
|||
</include>
|
||||
</context>
|
||||
|
||||
<context id="close-comment-outside-comment" style-ref="error">
|
||||
<match>\*/(?!\*)</match>
|
||||
</context>
|
||||
|
||||
<!-- Strings -->
|
||||
<context id="string-double" end-at-line-end="true" style-ref="string">
|
||||
<start>"</start>
|
||||
|
@ -102,6 +98,15 @@
|
|||
<context ref="def:octal"/>
|
||||
<context ref="def:hexadecimal"/>
|
||||
|
||||
<!-- Constants -->
|
||||
<context id="null-value" style-ref="null-value">
|
||||
<keyword>null</keyword>
|
||||
</context>
|
||||
<context id="boolean" style-ref="boolean">
|
||||
<keyword>false</keyword>
|
||||
<keyword>true</keyword>
|
||||
</context>
|
||||
|
||||
<!-- Keywords -->
|
||||
<context id="keywords" style-ref="keyword">
|
||||
<keyword>const</keyword>
|
||||
|
@ -124,9 +129,6 @@
|
|||
<keyword>try</keyword>
|
||||
<keyword>catch</keyword>
|
||||
<keyword>finally</keyword>
|
||||
<keyword>null</keyword>
|
||||
<keyword>true</keyword>
|
||||
<keyword>false</keyword>
|
||||
<keyword>delete</keyword>
|
||||
<keyword>instanceof</keyword>
|
||||
<keyword>new</keyword>
|
||||
|
@ -140,7 +142,7 @@
|
|||
<keyword>prototype</keyword>
|
||||
</context>
|
||||
|
||||
<context id="types" style-ref="data-type">
|
||||
<context id="types" style-ref="type">
|
||||
<keyword>Infinity</keyword>
|
||||
<keyword>NaN</keyword>
|
||||
<keyword>Math</keyword>
|
||||
|
|
|
@ -26,9 +26,11 @@
|
|||
|
||||
<color name="red" value="#FF0000"/>
|
||||
<color name="blue" value="#0000FF"/>
|
||||
<color name="dark-blue" value="#000080"/>
|
||||
<color name="dark-red" value="#800000"/>
|
||||
<color name="dark-green" value="#008000"/>
|
||||
<color name="grey" value="#808080"/>
|
||||
<color name="yellow" value="#FFFF00"/>
|
||||
<color name="white" value="#FFFFFF"/>
|
||||
|
||||
<style name="current-line" background="#EEF6FF"/>
|
||||
|
@ -36,45 +38,60 @@
|
|||
<style name="bracket-match" background="#FFFF99" bold="true"/>
|
||||
<style name="bracket-mismatch" background="red" bold="true"/>
|
||||
|
||||
<!-- Search Matching -->
|
||||
<style name="search-match" background="yellow"/>
|
||||
|
||||
<!-- legacy styles for old lang files -->
|
||||
<style name="Others" foreground="dark-red"/>
|
||||
<style name="Others 2" bold="true"/>
|
||||
<style name="Others 3" foreground="dark-green"/>
|
||||
|
||||
<style name="def:string" foreground="#DD0000"/>
|
||||
<!-- Comments -->
|
||||
<style name="def:comment" foreground="grey" italic="true" bold="false"/>
|
||||
<style name="def:base-n-integer" foreground="#008080"/>
|
||||
<style name="def:complex" use-style="def:base-n-integer"/>
|
||||
<style name="def:keyword" bold="true"/>
|
||||
<style name="def:data-type" foreground="dark-red"/>
|
||||
<style name="def:decimal" foreground="blue"/>
|
||||
<style name="def:floating-point" foreground="#800080"/>
|
||||
<style name="def:character" foreground="#FF00FF"/>
|
||||
<style name="def:note" foreground="white" background="#FFCCCC" bold="true" italic="false"/>
|
||||
<style name="def:function" foreground="#000080"/>
|
||||
<style name="def:error" foreground="red" underline="true"/>
|
||||
<style name="def:shebang" foreground="grey" bold="true"/>
|
||||
<style name="def:doc-comment" foreground="blue"/>
|
||||
<style name="def:doc-comment-element" bold="true"/>
|
||||
|
||||
<style name="def:net-address-in-comment" underline="true"/>
|
||||
<style name="def:escape" foreground="#FF00FF"/>
|
||||
<!-- Constants -->
|
||||
<style name="def:constant" foreground="#800080"/>
|
||||
<style name="def:decimal" foreground="blue"/>
|
||||
<style name="def:base-n-integer" foreground="#008080"/>
|
||||
<style name="def:floating-point" foreground="#800080"/>
|
||||
<style name="def:complex" use-style="def:base-n-integer"/>
|
||||
<style name="def:character" foreground="#FF00FF"/>
|
||||
<style name="def:string" foreground="#DD0000"/>
|
||||
<style name="def:special-char" foreground="#FF00FF"/>
|
||||
|
||||
<style name="def:special-value" bold="true"/>
|
||||
<!-- Identifiers -->
|
||||
<style name="def:identifier" foreground="dark-blue"/>
|
||||
<style name="def:function" use-style="def:identifier"/>
|
||||
|
||||
<!-- Statements -->
|
||||
<style name="def:statement" bold="true"/>
|
||||
|
||||
<!-- Types -->
|
||||
<style name="def:type" foreground="dark-red"/>
|
||||
|
||||
<!-- Others -->
|
||||
<style name="def:preprocessor" bold="true"/>
|
||||
<style name="def:note" foreground="white" background="#FFCCCC" bold="true" italic="false"/>
|
||||
<style name="def:error" foreground="red" underline="true"/>
|
||||
<style name="def:underlined" underline="true"/>
|
||||
|
||||
<!-- Language specific styles -->
|
||||
<style name="c:preprocessor" foreground="dark-green"/>
|
||||
<style name="c:included-file" use-style="c:preprocessor"/>
|
||||
<style name="c:common-defines" foreground="#0095FF" bold="true"/>
|
||||
|
||||
<style name="diff:diff-file" use-style="def:keyword"/>
|
||||
<style name="diff:diff-file" use-style="def:statement"/>
|
||||
<style name="diff:added-line" use-style="def:decimal"/>
|
||||
<style name="diff:removed-line" use-style="def:string"/>
|
||||
<style name="diff:changed-line" use-style="c:preprocessor"/>
|
||||
<style name="diff:special-case"/>
|
||||
<style name="diff:location" use-style="def:data-type"/>
|
||||
<style name="diff:location" use-style="def:type"/>
|
||||
|
||||
<style name="xml:attribute-name" foreground="dark-green"/>
|
||||
<style name="xml:tags" bold="true"/>
|
||||
<style name="xml:namespace" foreground="dark-green"/>
|
||||
<style name="xml:element-name" bold="true"/>
|
||||
<style name="xml:entity" foreground="blue"/>
|
||||
<style name="xml:cdata-delim" foreground="#008080" bold="true"/>
|
||||
<style name="xml:processing-instruction" bold="true"/>
|
||||
|
@ -93,15 +110,24 @@
|
|||
<style name="latex:structure" bold="true"/>
|
||||
<style name="latex:section" foreground="#7000DF" bold="true"/>
|
||||
|
||||
<style name="changelog:date" use-style="def:type"/>
|
||||
<style name="changelog:email" use-style="c:preprocessor"/>
|
||||
<style name="changelog:file" use-style="def:function"/>
|
||||
<style name="changelog:bullet" use-style="changelog:file"/>
|
||||
<style name="changelog:release" foreground="#0095FF" bold="true"/>
|
||||
|
||||
<style name="perl:pod" foreground="grey"/>
|
||||
|
||||
<style name="python:string-conversion" background="#BEBEBE"/>
|
||||
<style name="python:module-handler" use-style="def:character"/>
|
||||
<style name="python:special-variable" use-style="def:type"/>
|
||||
<style name="python:builtin-constant" use-style="def:type"/>
|
||||
<style name="python:builtin-object" use-style="def:type"/>
|
||||
<style name="python:builtin-function" use-style="def:type"/>
|
||||
<style name="python:boolean" use-style="def:type"/>
|
||||
|
||||
<style name="changelog:email" use-style="c:preprocessor"/>
|
||||
|
||||
<style name="scheme:parens" use-style="def:keyword"/>
|
||||
<style name="scheme:any-function" use-style="def:keyword"/>
|
||||
<style name="scheme:parens" use-style="def:statement"/>
|
||||
<style name="scheme:any-function" use-style="def:statement"/>
|
||||
|
||||
<style name="sh:dollar" foreground="dark-green" bold="true"/>
|
||||
|
||||
|
|
|
@ -54,6 +54,14 @@
|
|||
<attribute name="translation-domain"/>
|
||||
</optional>
|
||||
|
||||
<optional>
|
||||
<oneOrMore>
|
||||
<element name="author">
|
||||
<text/>
|
||||
</element>
|
||||
</oneOrMore>
|
||||
</optional>
|
||||
|
||||
<optional>
|
||||
<ref name="metadata"/>
|
||||
</optional>
|
||||
|
@ -82,12 +90,22 @@
|
|||
|
||||
<define name="id-type">
|
||||
<data type="string">
|
||||
<!-- FIXME: Why it doesn't work?
|
||||
It seems that [a-z-] is unsupported -->
|
||||
<!--
|
||||
<param name="pattern">([a-zA-Z0-9_-]+:)?[a-zA-Z0-9_-]+</param>
|
||||
-->
|
||||
<param name="pattern">(([a-zA-Z0-9_]|-)+:)?([a-zA-Z0-9_]|-)+</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name="ref-type">
|
||||
<data type="string">
|
||||
<!-- FIXME: Why it doesn't work?
|
||||
It seems that [a-z-] is unsupported -->
|
||||
<!--
|
||||
<param name="pattern">([a-zA-Z0-9_-]+:)?[a-zA-Z0-9_-]+(:\*)?</param>
|
||||
-->
|
||||
<param name="pattern">(([a-zA-Z0-9_]|-)+:)?([a-zA-Z0-9_]|-)+(:\*)?</param>
|
||||
</data>
|
||||
</define>
|
||||
|
|
|
@ -28,7 +28,8 @@
|
|||
</metadata>
|
||||
|
||||
<styles>
|
||||
<style id="boolean" _name="Boolean" map-to="def:decimal"/>
|
||||
<style id="constant" _name="Constant" map-to="def:constant"/>
|
||||
<style id="boolean" _name="Boolean" map-to="libtool:constant"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
@ -41,7 +42,7 @@
|
|||
<context ref="def:single-quoted-string"/>
|
||||
<context ref="def:string"/>
|
||||
<context ref="def:shell-like-comment"/>
|
||||
<context ref="def:decimal"/>
|
||||
<context ref="def:decimal" style-ref="constant"/>
|
||||
<context style-ref="boolean">
|
||||
<keyword>yes</keyword>
|
||||
<keyword>no</keyword>
|
||||
|
|
|
@ -32,15 +32,18 @@
|
|||
<style id="comment" _name="Comment" map-to="def:comment"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="escape" _name="Character Escape" map-to="def:escape"/>
|
||||
<style id="escape" _name="Escaped Character" map-to="def:special-char"/>
|
||||
<style id="reserved" _name="Reserved Identifier" map-to="def:keyword"/>
|
||||
<style id="function" _name="Function" map-to="def:keyword"/>
|
||||
<style id="function" _name="Function" map-to="def:function"/>
|
||||
<style id="nil-value" _name="Nil Constant" map-to="def:special-constant"/>
|
||||
<style id="boolean" _name="Boolean value" map-to="def:boolean"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
<context id="lua-escape" style-ref="escape">
|
||||
<match>\\([abfnrtv\"'0]|(\d\d\d))</match>
|
||||
</context>
|
||||
|
||||
<context id="string" style-ref="string" end-at-line-end="true">
|
||||
<start>"</start>
|
||||
<end>"</end>
|
||||
|
@ -49,6 +52,7 @@
|
|||
<context ref="def:line-continue"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="string-2" style-ref="string" end-at-line-end="true">
|
||||
<start>'</start>
|
||||
<end>'</end>
|
||||
|
@ -57,6 +61,7 @@
|
|||
<context ref="def:line-continue"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="multi-line-string" style-ref="string">
|
||||
<start>\[(=*)\[</start>
|
||||
<end>]\%{1@start}]</end>
|
||||
|
@ -64,6 +69,7 @@
|
|||
<context ref="lua-escape"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="block-comment" style-ref="comment">
|
||||
<start>--\[(=*)\[</start>
|
||||
<end>]\%{1@start}]</end>
|
||||
|
@ -71,12 +77,14 @@
|
|||
<context ref="def:in-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="line-comment" style-ref="comment" end-at-line-end="true">
|
||||
<start>--</start>
|
||||
<include>
|
||||
<context ref="def:in-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="keywords" style-ref="keyword">
|
||||
<keyword>and</keyword>
|
||||
<keyword>break</keyword>
|
||||
|
@ -84,22 +92,20 @@
|
|||
<keyword>else</keyword>
|
||||
<keyword>elseif</keyword>
|
||||
<keyword>end</keyword>
|
||||
<keyword>false</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>function</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>in</keyword>
|
||||
<keyword>local</keyword>
|
||||
<keyword>nil</keyword>
|
||||
<keyword>not</keyword>
|
||||
<keyword>or</keyword>
|
||||
<keyword>repeat</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>then</keyword>
|
||||
<keyword>true</keyword>
|
||||
<keyword>until</keyword>
|
||||
<keyword>while</keyword>
|
||||
</context>
|
||||
|
||||
<context id="functions" style-ref="function">
|
||||
<keyword>assert</keyword>
|
||||
<keyword>collectgarbage</keyword>
|
||||
|
@ -128,9 +134,20 @@
|
|||
<keyword>unpack</keyword>
|
||||
<keyword>xpcall</keyword>
|
||||
</context>
|
||||
|
||||
<context id="lua-reserved" style-ref="reserved">
|
||||
<match>_[A-Z]+</match>
|
||||
</context>
|
||||
|
||||
<context id="nil-value" style-ref="nil-value">
|
||||
<keyword>nil</keyword>
|
||||
</context>
|
||||
|
||||
<context id="boolean" style-ref="boolean">
|
||||
<keyword>false</keyword>
|
||||
<keyword>true</keyword>
|
||||
</context>
|
||||
|
||||
<context id="lua">
|
||||
<include>
|
||||
<context ref="def:shebang"/>
|
||||
|
@ -142,7 +159,10 @@
|
|||
<context ref="keywords"/>
|
||||
<context ref="functions"/>
|
||||
<context ref="lua-reserved"/>
|
||||
<context ref="nil-value"/>
|
||||
<context ref="boolean"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
</definitions>
|
||||
</language>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
</metadata>
|
||||
|
||||
<styles>
|
||||
<style id="variable" name="Variable" map-to="def:data-type"/>
|
||||
<style id="variable" name="Variable" map-to="def:type"/>
|
||||
<style id="assignment-rhs" name="assignment-rhs"/>
|
||||
<style id="assignment-lhs" name="assignment-lhs"/>
|
||||
<style id="targets" name="targets" map-to="def:function"/>
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<language id="mooscript" name="MooScript" version="2.0" _section="Scripts">
|
||||
<metadata>
|
||||
<property name="mimetypes">text/x-mooscript;application/x-mooscript</property>
|
||||
<property name="line-comment-start">#</property>
|
||||
</metadata>
|
||||
|
||||
<styles>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="special-vars" _name="Special Variables"/>
|
||||
<style id="function" _name="Function" map-to="def:function"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
<context id="keyword" style-ref="keyword">
|
||||
<keyword>and</keyword>
|
||||
<keyword>break</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>elif</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>fi</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>in</keyword>
|
||||
<keyword>not</keyword>
|
||||
<keyword>od</keyword>
|
||||
<keyword>or</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>then</keyword>
|
||||
<keyword>while</keyword>
|
||||
</context>
|
||||
|
||||
<context id="special-vars" style-ref="special-vars">
|
||||
<keyword>false</keyword>
|
||||
<keyword>none</keyword>
|
||||
<keyword>true</keyword>
|
||||
</context>
|
||||
|
||||
<context id="mooscript">
|
||||
<include>
|
||||
<context ref="python:double-quoted-string"/>
|
||||
<context ref="python:single-quoted-string"/>
|
||||
<context ref="def:shell-like-comment"/>
|
||||
<context ref="keyword"/>
|
||||
<context ref="special-vars"/>
|
||||
<context style-ref="function">
|
||||
<match>\b[_\w][_\w\d]*(?=[\s]*[(])</match>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
</definitions>
|
||||
</language>
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
<!--
|
||||
|
||||
Author: Paweł W. Olszta <pawel.olszta@nemerle.org>
|
||||
|
@ -20,135 +19,243 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
-->
|
||||
<language _name="Nemerle" version="1.0" _section="Sources" mimetypes="text/x-nemerle">
|
||||
|
||||
<escape-char>\</escape-char>
|
||||
<language id="nemerle" _name="Nemerle" version="2.0" _section="Sources">
|
||||
<metadata>
|
||||
<property name="mimetypes">text/x-nemerle</property>
|
||||
<property name="globs">*.n</property>
|
||||
<property name="line-comment-start">//</property>
|
||||
<property name="block-comment-start">/*</property>
|
||||
<property name="block-comment-end">*/</property>
|
||||
</metadata>
|
||||
|
||||
<pattern-item _name = "Character Constant" style = "String">
|
||||
<regex>'(\\)?.'</regex>
|
||||
</pattern-item>
|
||||
|
||||
<string _name = "String" style = "String" end-at-line-end = "TRUE">
|
||||
<start-regex>"</start-regex>
|
||||
<end-regex>"</end-regex>
|
||||
</string>
|
||||
<styles>
|
||||
<style id="comment" _name="Comment" map-to="def:comment"/>
|
||||
<style id="error" _name="Error" map-to="def:error"/>
|
||||
<style id="preprocessor" _name="Preprocessor" map-to="def:preprocessor"/>
|
||||
<style id="character" _name="Character" map-to="def:character"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="type" _name="Data Type" map-to="def:type"/>
|
||||
<style id="null-value" _name="Null Value" map-to="def:special-constant"/>
|
||||
<style id="boolean" _name="Boolean value" map-to="def:boolean"/>
|
||||
<style id="floating-point" _name="Floating point number" map-to="def:floating-point"/>
|
||||
<style id="decimal" _name="Decimal number" map-to="def:decimal"/>
|
||||
<style id="binary" _name="Binary number" map-to="def:base-n-integer"/>
|
||||
<style id="octal" _name="Octal number" map-to="def:base-n-integer"/>
|
||||
<style id="hexadecimal" _name="Hexadecimal number" map-to="def:base-n-integer"/>
|
||||
</styles>
|
||||
|
||||
<line-comment _name = "Line Comment" style= "Comment">
|
||||
<start-regex>//</start-regex>
|
||||
</line-comment>
|
||||
<definitions>
|
||||
|
||||
<block-comment _name = "Block Comment" style = "Comment">
|
||||
<start-regex>/\*</start-regex>
|
||||
<end-regex>\*/</end-regex>
|
||||
</block-comment>
|
||||
|
||||
<keyword-list _name = "Core Keywords" style = "Keyword" case-sensitive="TRUE">
|
||||
<keyword>_</keyword>
|
||||
<keyword>abstract</keyword>
|
||||
<keyword>and</keyword>
|
||||
<keyword>array</keyword>
|
||||
<keyword>as</keyword>
|
||||
<keyword>base</keyword>
|
||||
<keyword>catch</keyword>
|
||||
<keyword>class</keyword>
|
||||
<keyword>def</keyword>
|
||||
<keyword>extends</keyword>
|
||||
<keyword>extern</keyword>
|
||||
<keyword>false</keyword>
|
||||
<keyword>finally</keyword>
|
||||
<keyword>fun</keyword>
|
||||
<keyword>implements</keyword>
|
||||
<keyword>interface</keyword>
|
||||
<keyword>internal</keyword>
|
||||
<keyword>macro</keyword>
|
||||
<keyword>match</keyword>
|
||||
<keyword>module</keyword>
|
||||
<keyword>mutable</keyword>
|
||||
<keyword>namespace</keyword>
|
||||
<keyword>new</keyword>
|
||||
<keyword>null</keyword>
|
||||
<keyword>out</keyword>
|
||||
<keyword>override</keyword>
|
||||
<keyword>params</keyword>
|
||||
<keyword>private</keyword>
|
||||
<keyword>protected</keyword>
|
||||
<keyword>public</keyword>
|
||||
<keyword>ref</keyword>
|
||||
<keyword>sealed</keyword>
|
||||
<keyword>static</keyword>
|
||||
<keyword>struct</keyword>
|
||||
<keyword>syntax</keyword>
|
||||
<keyword>this</keyword>
|
||||
<keyword>throw</keyword>
|
||||
<keyword>true</keyword>
|
||||
<keyword>try</keyword>
|
||||
<keyword>type</keyword>
|
||||
<keyword>typeof</keyword>
|
||||
<keyword>using</keyword>
|
||||
<keyword>variant</keyword>
|
||||
<keyword>virtual</keyword>
|
||||
<keyword>when</keyword>
|
||||
<keyword>where</keyword>
|
||||
</keyword-list>
|
||||
|
||||
<keyword-list _name = "Keywords Defined by Macros" style = "Keyword" case-sensitive="TRUE">
|
||||
<keyword>do</keyword>
|
||||
<keyword>while</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>foreach</keyword>
|
||||
<keyword>in</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>lock</keyword>
|
||||
<keyword>repeat</keyword>
|
||||
<keyword>until</keyword>
|
||||
<keyword>unless</keyword>
|
||||
<keyword>using</keyword>
|
||||
<keyword>when</keyword>
|
||||
<keyword>while</keyword>
|
||||
</keyword-list>
|
||||
<context id="line-comment" style-ref="comment" end-at-line-end="true">
|
||||
<start>//</start>
|
||||
<include>
|
||||
<context ref="def:in-line-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<pattern-item _name = "Floating Point Number" style = "Floating Point">
|
||||
<regex>[0-9]*\.[0-9]+([eE][-+]?[0-9]+)?\b</regex>
|
||||
</pattern-item>
|
||||
|
||||
<pattern-item _name = "Decimal" style = "Decimal">
|
||||
<regex>\b[0-9]+[Uu]?([Ll]|[Ss]|[Bb])?\b</regex>
|
||||
</pattern-item>
|
||||
<context id="block-comment" style-ref="comment">
|
||||
<start>/\*</start>
|
||||
<end>\*/</end>
|
||||
<include>
|
||||
<context ref="def:in-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<pattern-item _name = "Binary Number" style = "Base-N Integer">
|
||||
<regex>\b0[bB][01]+[Uu]?([Ll]|[Ss]|[Bb])?\b</regex>
|
||||
</pattern-item>
|
||||
<context id="close-comment-outside-comment" style-ref="error">
|
||||
<match>\*/(?!\*)</match>
|
||||
</context>
|
||||
|
||||
<pattern-item _name = "Octal Number" style = "Base-N Integer">
|
||||
<regex>\b0[oO][0-7]+[Uu]?([Ll]|[Ss]|[Bb])?\b</regex>
|
||||
</pattern-item>
|
||||
<define-regex id="preproc-start">^\s*#\s*</define-regex>
|
||||
|
||||
<pattern-item _name = "Hex Number" style = "Base-N Integer">
|
||||
<regex>\b0[xX][0-9a-fA-F]+[Uu]?([Ll]|[Ss]|[Bb])?\b</regex>
|
||||
</pattern-item>
|
||||
<context id="if-false-comment" style-ref="comment">
|
||||
<start>\%{preproc-start}if\s*false\b</start>
|
||||
<end>\%{preproc-start}(endif|else|elif)\b</end>
|
||||
<include>
|
||||
<context id="if-in-if-false">
|
||||
<start>\%{preproc-start}if(n?def)?\b</start>
|
||||
<end>\%{preproc-start}endif\b</end>
|
||||
<include>
|
||||
<context ref="if-in-if-false"/>
|
||||
<context ref="def:in-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
<context ref="def:in-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<keyword-list _name = "Primitives" style = "Data Type" case-sensitive="TRUE">
|
||||
<keyword>bool</keyword>
|
||||
<keyword>byte</keyword>
|
||||
<keyword>char</keyword>
|
||||
<keyword>decimal</keyword>
|
||||
<keyword>double</keyword>
|
||||
<keyword>float</keyword>
|
||||
<keyword>int</keyword>
|
||||
<keyword>long</keyword>
|
||||
<keyword>object</keyword>
|
||||
<keyword>sbyte</keyword>
|
||||
<keyword>short</keyword>
|
||||
<keyword>string</keyword>
|
||||
<keyword>uint</keyword>
|
||||
<keyword>ulong</keyword>
|
||||
<keyword>ushort</keyword>
|
||||
<keyword>void</keyword>
|
||||
</keyword-list>
|
||||
|
||||
<keyword-list _name = "Core Types" style = "Data Type" case-sensitive="TRUE">
|
||||
<keyword>list</keyword>
|
||||
</keyword-list>
|
||||
<context id="preprocessor" style-ref="preprocessor" end-at-line-end="true">
|
||||
<start extended="true">
|
||||
\%{preproc-start}
|
||||
(define|undef|if(n?def)?|else|elif|endif|line|error|warning|region|endregion)
|
||||
\b
|
||||
</start>
|
||||
<include>
|
||||
<context ref="line-comment"/>
|
||||
<context ref="block-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="character" style-ref="character">
|
||||
<match>'(\\)?.'</match>
|
||||
</context>
|
||||
|
||||
<context id="string" style-ref="string" end-at-line-end="true">
|
||||
<start>'</start>
|
||||
<end>'</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="keywords" style-ref="keyword">
|
||||
<keyword>_</keyword>
|
||||
<keyword>abstract</keyword>
|
||||
<keyword>and</keyword>
|
||||
<keyword>array</keyword>
|
||||
<keyword>as</keyword>
|
||||
<keyword>base</keyword>
|
||||
<keyword>catch</keyword>
|
||||
<keyword>class</keyword>
|
||||
<keyword>def</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>extends</keyword>
|
||||
<keyword>extern</keyword>
|
||||
<keyword>finally</keyword>
|
||||
<keyword>foreach</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>fun</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>implements</keyword>
|
||||
<keyword>in</keyword>
|
||||
<keyword>interface</keyword>
|
||||
<keyword>internal</keyword>
|
||||
<keyword>lock</keyword>
|
||||
<keyword>macro</keyword>
|
||||
<keyword>match</keyword>
|
||||
<keyword>module</keyword>
|
||||
<keyword>mutable</keyword>
|
||||
<keyword>namespace</keyword>
|
||||
<keyword>new</keyword>
|
||||
<keyword>out</keyword>
|
||||
<keyword>override</keyword>
|
||||
<keyword>params</keyword>
|
||||
<keyword>private</keyword>
|
||||
<keyword>protected</keyword>
|
||||
<keyword>public</keyword>
|
||||
<keyword>ref</keyword>
|
||||
<keyword>repeat</keyword>
|
||||
<keyword>sealed</keyword>
|
||||
<keyword>static</keyword>
|
||||
<keyword>struct</keyword>
|
||||
<keyword>syntax</keyword>
|
||||
<keyword>this</keyword>
|
||||
<keyword>throw</keyword>
|
||||
<keyword>try</keyword>
|
||||
<keyword>type</keyword>
|
||||
<keyword>typeof</keyword>
|
||||
<keyword>unless</keyword>
|
||||
<keyword>until</keyword>
|
||||
<keyword>using</keyword>
|
||||
<keyword>variant</keyword>
|
||||
<keyword>virtual</keyword>
|
||||
<keyword>when</keyword>
|
||||
<keyword>where</keyword>
|
||||
<keyword>while</keyword>
|
||||
</context>
|
||||
|
||||
<context id="types" style-ref="type">
|
||||
<keyword>bool</keyword>
|
||||
<keyword>byte</keyword>
|
||||
<keyword>char</keyword>
|
||||
<keyword>decimal</keyword>
|
||||
<keyword>double</keyword>
|
||||
<keyword>float</keyword>
|
||||
<keyword>int</keyword>
|
||||
<keyword>list</keyword>
|
||||
<keyword>long</keyword>
|
||||
<keyword>object</keyword>
|
||||
<keyword>sbyte</keyword>
|
||||
<keyword>short</keyword>
|
||||
<keyword>string</keyword>
|
||||
<keyword>uint</keyword>
|
||||
<keyword>ulong</keyword>
|
||||
<keyword>ushort</keyword>
|
||||
<keyword>void</keyword>
|
||||
</context>
|
||||
|
||||
<context id="null-value" style-ref="null-value">
|
||||
<keyword>null</keyword>
|
||||
</context>
|
||||
|
||||
<context id="boolean" style-ref="boolean">
|
||||
<keyword>false</keyword>
|
||||
<keyword>true</keyword>
|
||||
</context>
|
||||
|
||||
<context id="float" style-ref="floating-point">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
[0-9]*\.[0-9]+([eE][-+]?[0-9]+)?
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="decimal" style-ref="decimal">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
[0-9]+[Uu]?([Ll]|[Ss]|[Bb])?
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="binary" style-ref="binary">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
0[bB][01]+[Uu]?([Ll]|[Ss]|[Bb])?
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="octal" style-ref="octal">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
0[oO][0-7]+[Uu]?([Ll]|[Ss]|[Bb])?
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="hexadecimal" style-ref="hexadecimal">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
0[xX][0-9a-fA-F]+[Uu]?([Ll]|[Ss]|[Bb])?
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="nemerle">
|
||||
<include>
|
||||
<context ref="line-comment"/>
|
||||
<context ref="block-comment"/>
|
||||
<context ref="close-comment-outside-comment"/>
|
||||
<context ref="if-false-comment"/>
|
||||
<context ref="preprocessor"/>
|
||||
<context ref="character"/>
|
||||
<context ref="string"/>
|
||||
<context ref="keywords"/>
|
||||
<context ref="types"/>
|
||||
<context ref="null-value"/>
|
||||
<context ref="boolean"/>
|
||||
<context ref="float"/>
|
||||
<context ref="decimal"/>
|
||||
<context ref="binary"/>
|
||||
<context ref="octal"/>
|
||||
<context ref="hexadecimal"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
</definitions>
|
||||
|
||||
</language>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
<styles>
|
||||
<style id="keyword" _name="Keyword" map-to="c:keyword"/>
|
||||
<style id="data-type" _name="Data Type" map-to="c:data-type"/>
|
||||
<style id="type" _name="Data Type" map-to="c:type"/>
|
||||
<style id="common-defines" _name="Common Defines" map-to="c:common-defines"/>
|
||||
<style id="string" _name="String" map-to="c:string"/>
|
||||
</styles>
|
||||
|
@ -60,7 +60,7 @@
|
|||
<keyword>finally</keyword>
|
||||
</context>
|
||||
|
||||
<context id="types" style-ref="data-type">
|
||||
<context id="types" style-ref="type">
|
||||
<keyword>BOOL</keyword>
|
||||
</context>
|
||||
|
||||
|
@ -83,7 +83,7 @@
|
|||
<keyword>Nil</keyword>
|
||||
</context>
|
||||
|
||||
<context id="objc-types" style-ref="data-type">
|
||||
<context id="objc-types" style-ref="type">
|
||||
<keyword>apply_t</keyword>
|
||||
<keyword>Class</keyword>
|
||||
<keyword>id</keyword>
|
||||
|
|
|
@ -0,0 +1,111 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (C) 2007 GtkSourceView team
|
||||
Author: Paolo Borelli <pborelli@gnome.org>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
|
||||
-->
|
||||
|
||||
<style-scheme id="oblivion" _name="Oblivion" version="1.0">
|
||||
|
||||
<author>Paolo Borelli</author>
|
||||
<_description>Dark color scheme using the Tango color palette</_description>
|
||||
|
||||
<!-- Tango Palette -->
|
||||
<color name="butter1" value="#fce94f"/>
|
||||
<color name="butter2" value="#edd400"/>
|
||||
<color name="butter3" value="#c4a000"/>
|
||||
<color name="chameleon1" value="#8ae234"/>
|
||||
<color name="chameleon2" value="#73d216"/>
|
||||
<color name="chameleon3" value="#4e9a06"/>
|
||||
<color name="orange1" value="#fcaf3e"/>
|
||||
<color name="orange2" value="#f57900"/>
|
||||
<color name="orange3" value="#ce5c00"/>
|
||||
<color name="skyblue1" value="#729fcf"/>
|
||||
<color name="skyblue2" value="#3465a4"/>
|
||||
<color name="skyblue3" value="#204a87"/>
|
||||
<color name="plum1" value="#ad7fa8"/>
|
||||
<color name="plum2" value="#75507b"/>
|
||||
<color name="plum3" value="#5c3566"/>
|
||||
<color name="chocolate1" value="#e9b96e"/>
|
||||
<color name="chocolate2" value="#c17d11"/>
|
||||
<color name="chocolate3" value="#8f5902"/>
|
||||
<color name="scarletred1" value="#ef2929"/>
|
||||
<color name="scarletred2" value="#cc0000"/>
|
||||
<color name="scarletred3" value="#a40000"/>
|
||||
<color name="aluminium1" value="#eeeeec"/>
|
||||
<color name="aluminium2" value="#d3d7cf"/>
|
||||
<color name="aluminium3" value="#babdb6"/>
|
||||
<color name="aluminium4" value="#888a85"/>
|
||||
<color name="aluminium5" value="#555753"/>
|
||||
<color name="aluminium6" value="#2e3436"/>
|
||||
|
||||
<!-- Global Settings -->
|
||||
<style name="text" foreground="aluminium2" background="aluminium6"/>
|
||||
<style name="selection" foreground="aluminium1" background="aluminium4"/>
|
||||
<style name="cursor" foreground="aluminium2"/>
|
||||
<style name="current-line" background="aluminium5"/>
|
||||
<style name="line-numbers" foreground="aluminium5" background="#black"/>
|
||||
|
||||
<!-- Bracket Matching -->
|
||||
<style name="bracket-match" foreground="aluminium1" background="aluminium3" bold="true"/>
|
||||
<style name="bracket-mismatch" foreground="aluminium1" background="scarletred2" bold="true"/>
|
||||
|
||||
<!-- Right Margin -->
|
||||
<style name="right-margin" foreground="aluminium1" background="aluminium4"/>
|
||||
|
||||
<!-- Search Matching -->
|
||||
<style name="search-match" foreground="aluminium1" background="chameleon3"/>
|
||||
|
||||
<!-- Comments -->
|
||||
<style name="def:comment" foreground="aluminium4"/>
|
||||
<style name="def:sheband" foreground="aluminium4" bold="true"/>
|
||||
<style name="def:doc-comment-element" italic="true"/>
|
||||
|
||||
<!-- Constants -->
|
||||
<style name="def:constant" foreground="butter2"/>
|
||||
<style name="def:string" foreground="butter2"/>
|
||||
<style name="def:special-char" foreground="orange3"/>
|
||||
<style name="def:special-constant" foreground="orange3"/>
|
||||
<style name="def:floating-point" foreground="orange3"/>
|
||||
|
||||
<!-- Identifiers -->
|
||||
<style name="def:identifier" foreground="skyblue1"/>
|
||||
|
||||
<!-- Statements -->
|
||||
<style name="def:statement" foreground="#white" bold="true"/>
|
||||
|
||||
<!-- Types -->
|
||||
<style name="def:type" foreground="chameleon1" bold="true"/>
|
||||
|
||||
<!-- Others -->
|
||||
<style name="def:preprocessor" foreground="plum1"/>
|
||||
<style name="def:error" foreground="aluminium1" background="scarletred2" bold="true"/>
|
||||
<style name="def:note" background="butter1" foreground="aluminium4" bold="true"/>
|
||||
<style name="def:underlined" italic="true" underline="true"/>
|
||||
|
||||
<!-- Language specific -->
|
||||
<style name="diff:added-line" foreground="butter2"/>
|
||||
<style name="diff:removed-line" foreground="skyblue1"/>
|
||||
<style name="diff:changed-line" foreground="plum1"/>
|
||||
<style name="diff:diff-file" foreground="chameleon1" bold="true"/>
|
||||
<style name="diff:location" foreground="chameleon1"/>
|
||||
<style name="diff:special-case" foreground="#white" bold="true"/>
|
||||
|
||||
</style-scheme>
|
||||
|
|
@ -34,20 +34,20 @@
|
|||
<style id="comment" _name="Comment" map-to="def:comment"/>
|
||||
<style id="ocamldoc" _name="Ocamldoc Comments" map-to="def:note"/>
|
||||
<style id="base-n-integer" _name="Base-N Integer" map-to="def:base-n-integer"/>
|
||||
<style id="floating-point" _name="Floating Point" map-to="def:floating-point"/>
|
||||
<style id="decimal" _name="Decimal" map-to="def:decimal"/>
|
||||
<style id="floating-point" _name="Floating Point number" map-to="def:floating-point"/>
|
||||
<style id="decimal" _name="Decimal number" map-to="def:decimal"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="meta-keyword" _name="Type, module or object keyword" map-to="def:keyword"/>
|
||||
<style id="fun-keyword" _name="Builtin-function keyword" map-to="def:keyword"/>
|
||||
<style id="data-type" _name="Data Type" map-to="def:data-type"/>
|
||||
<style id="label" _name="Labeled argument" map-to="def:data-type"/>
|
||||
<style id="poly-variant" _name="Polymorphic Variant" map-to="def:data-type"/>
|
||||
<style id="variant" _name="Variant Constructor" map-to="def:data-type"/>
|
||||
<style id="type-var" _name="Type Variable" map-to="def:data-type"/>
|
||||
<style id="module" _name="Module Path" map-to="def:data-type"/>
|
||||
<style id="escape" _name="String/Char escape" map-to="def:escape"/>
|
||||
<style id="boolean" _name="Boolean constant" map-to="def:string"/>
|
||||
<style id="type" _name="Data Type" map-to="def:type"/>
|
||||
<style id="label" _name="Labeled argument" map-to="def:type"/>
|
||||
<style id="poly-variant" _name="Polymorphic Variant" map-to="def:type"/>
|
||||
<style id="variant" _name="Variant Constructor" map-to="def:type"/>
|
||||
<style id="type-var" _name="Type Variable" map-to="def:type"/>
|
||||
<style id="module" _name="Module Path" map-to="def:type"/>
|
||||
<style id="escape" _name="Escaped Character" map-to="def:special-char"/>
|
||||
<style id="boolean" _name="Boolean value" map-to="def:boolean"/>
|
||||
<style id="error" _name="Error" map-to="def:error"/>
|
||||
</styles>
|
||||
|
||||
|
@ -216,7 +216,7 @@
|
|||
<!-- from pervasives, but same as others -->
|
||||
<keyword>lnot</keyword>
|
||||
</context>
|
||||
<context id="types" style-ref="data-type">
|
||||
<context id="types" style-ref="type">
|
||||
<!-- pervasives types -->
|
||||
<keyword>option</keyword>
|
||||
<keyword>ignore</keyword>
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="operators" _name="Type Operators" map-to="def:keyword"/>
|
||||
<style id="data-type" _name="Data Type" map-to="def:data-type"/>
|
||||
<style id="type" _name="Data Type" map-to="def:type"/>
|
||||
<style id="operation" _name="Operation operator" map-to="def:keyword"/>
|
||||
</styles>
|
||||
|
||||
|
@ -119,7 +119,7 @@
|
|||
</context>
|
||||
|
||||
<!-- Default data types -->
|
||||
<context id="types" style-ref="data-type">
|
||||
<context id="types" style-ref="type">
|
||||
<keyword>Boolean</keyword>
|
||||
<keyword>boolean</keyword>
|
||||
<keyword>Integer</keyword>
|
||||
|
|
|
@ -36,57 +36,57 @@
|
|||
<style id="base-n-integer" _name="Base-N Integer" map-to="def:base-n-integer"/>
|
||||
<style id="function" _name="Function" map-to="def:function"/>
|
||||
<style id="decimal" _name="Decimal" map-to="def:decimal"/>
|
||||
<style id="reserved-constant" _name="Reserved constant" map-to="def:special-value"/>
|
||||
<style id="boolean" _name="Boolean" map-to="def:boolean"/>
|
||||
<style id="reserved-constant" _name="Reserved Constant" map-to="def:special-constant"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
||||
<context id="line-comment" style-ref="comment" end-at-line-end="true">
|
||||
<start>#|%</start>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
</include>
|
||||
</context>
|
||||
<context id="multiline-double-quoted-string" style-ref="string">
|
||||
<start>[uUrR]?"""</start>
|
||||
<end>"""</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
</include>
|
||||
</context>
|
||||
<context id="multiline-single-quoted-string" style-ref="string">
|
||||
<start>[uUrR]?'''</start>
|
||||
<end>'''</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
<context ref="def:in-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="double-quoted-string" style-ref="string" end-at-line-end="true">
|
||||
<start>[uUrR]?"</start>
|
||||
<start>"</start>
|
||||
<end>"</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="single-quoted-string" style-ref="string" end-at-line-end="true">
|
||||
<start>[uUrR]?'</start>
|
||||
<!--
|
||||
To do not misdetect the transpose operator ' as the start of a string
|
||||
we assert to not follow a variable name (letters, digits and underscores)
|
||||
or a closing bracket (round, square or curly) or a dot (to form the
|
||||
array transpose operator ".'" ). -->
|
||||
<start>(?<![0-9a-zA-Z_)\]}\.])'</start>
|
||||
<end>'</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context style-ref="escape">
|
||||
<match>''</match>
|
||||
</context>
|
||||
<context ref="def:line-continue"/>
|
||||
</include>
|
||||
</context>
|
||||
<context id="reserved-constant" style-ref="reserved-constant">
|
||||
|
||||
<context id="boolean" style-ref="boolean">
|
||||
<keyword>false</keyword>
|
||||
<keyword>true</keyword>
|
||||
<keyword>Inf</keyword>
|
||||
<keyword>inf</keyword>
|
||||
<keyword>NaN</keyword>
|
||||
<keyword>NA</keyword>
|
||||
</context>
|
||||
|
||||
<context id="reserved-constant" style-ref="reserved-constant">
|
||||
<keyword>pi</keyword>
|
||||
<keyword>eps</keyword>
|
||||
<keyword>inf</keyword>
|
||||
<keyword>nan</keyword>
|
||||
<keyword>NaN</keyword>
|
||||
</context>
|
||||
|
||||
<context id="keyword" style-ref="keyword">
|
||||
<keyword>function</keyword>
|
||||
<keyword>endfunction</keyword>
|
||||
|
@ -119,18 +119,23 @@
|
|||
<keyword>nargout</keyword>
|
||||
<keyword>assert</keyword>
|
||||
</context>
|
||||
|
||||
<context id="decimal" style-ref="decimal">
|
||||
<match>\b([1-9][0-9]*|0)([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</match>
|
||||
</context>
|
||||
|
||||
<context id="floating-point-number" style-ref="floating-point">
|
||||
<match>\b([0-9]+[Ee][-]?[0-9]+|([0-9]*\.[0-9]+|[0-9]+\.)([Ee][-]?[0-9]+)?)[fFlL]?</match>
|
||||
</context>
|
||||
|
||||
<context id="octal-number" style-ref="base-n-integer">
|
||||
<match>\b0[0-7]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</match>
|
||||
</context>
|
||||
|
||||
<context id="hex-number" style-ref="base-n-integer">
|
||||
<match>\b0[xX][0-9a-fA-F]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</match>
|
||||
</context>
|
||||
|
||||
<context id="function" style-ref="function">
|
||||
<keyword>size</keyword>
|
||||
<keyword>zeros</keyword>
|
||||
|
@ -192,13 +197,13 @@
|
|||
<keyword>error</keyword>
|
||||
<keyword>warning</keyword>
|
||||
</context>
|
||||
|
||||
<context id="octave">
|
||||
<include>
|
||||
<context ref="line-comment"/>
|
||||
<context ref="multiline-double-quoted-string"/>
|
||||
<context ref="multiline-single-quoted-string"/>
|
||||
<context ref="double-quoted-string"/>
|
||||
<context ref="single-quoted-string"/>
|
||||
<context ref="boolean"/>
|
||||
<context ref="reserved-constant"/>
|
||||
<context ref="keyword"/>
|
||||
<context ref="decimal"/>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="decimal" _name="Decimal" map-to="def:decimal"/>
|
||||
<style id="data-type" _name="Data Type" map-to="def:data-type"/>
|
||||
<style id="type" _name="Data Type" map-to="def:type"/>
|
||||
<style id="preprocessor" _name="Preprocessor" map-to="def:preprocessor"/>
|
||||
</styles>
|
||||
|
||||
|
@ -154,7 +154,7 @@
|
|||
<keyword>Inherited</keyword>
|
||||
</context>
|
||||
|
||||
<context id="builtin-types" style-ref="data-type">
|
||||
<context id="builtin-types" style-ref="type">
|
||||
<keyword>Char</keyword>
|
||||
<keyword>String</keyword>
|
||||
<keyword>Integer</keyword>
|
||||
|
|
|
@ -35,17 +35,18 @@ FIXME: =pod should require an empty line before/after, as written in perlpod
|
|||
<style id="include-statement" _name="Include Statement" map-to="def:preprocessor"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="builtin-function" _name="Function" map-to="def:function"/>
|
||||
<style id="builtin" _name="Builtin Function" map-to="def:builtin"/>
|
||||
<style id="here-doc" _name="Heredoc" map-to="def:string" />
|
||||
<style id="here-doc-bound" _name="Heredoc Bound" map-to="def:string"/>
|
||||
<style id="system-command" _name="System Command" map-to="def:string"/>
|
||||
<style id="operator" _name="Operator" map-to="def:keyword"/>
|
||||
<style id="variable" _name="Variable" map-to="def:data-type"/>
|
||||
<style id="file-descriptor" _name="File Descriptor" map-to="perl:variable"/>
|
||||
<style id="variable" _name="Variable" map-to="def:type"/>
|
||||
<style id="file-descriptor" _name="File Descriptor" map-to="def:special-constant"/>
|
||||
<style id="control" _name="Control" map-to="def:preprocessor"/>
|
||||
<style id="regex" _name="Regular Expression" map-to="def:string"/>
|
||||
<style id="error" _name="Error" map-to="def:error"/>
|
||||
<style id="pod-escape" _name="POD Escape" map-to="def:escape"/>
|
||||
<style id="pod" _name="POD" map-to="def:comment"/>
|
||||
<style id="pod-escape" _name="POD Escape" map-to="def:special-char"/>
|
||||
<style id="pod-keyword" _name="POD keyword" map-to="def:keyword"/>
|
||||
<style id="pod-heading" _name="POD heading" map-to="def:doc-comment-element"/>
|
||||
</styles>
|
||||
|
@ -80,7 +81,7 @@ FIXME: =pod should require an empty line before/after, as written in perlpod
|
|||
<context ref="keyword"/>
|
||||
<context ref="control"/>
|
||||
<context ref="file-descriptor"/>
|
||||
<context ref="builtin-function"/>
|
||||
<context ref="builtin"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
|
@ -296,7 +297,7 @@ FIXME: =pod should require an empty line before/after, as written in perlpod
|
|||
<!-- '' doesn't usually have var expansion. -->
|
||||
<start>'</start><end>'</end>
|
||||
<include>
|
||||
<context style-ref="def:escape">
|
||||
<context style-ref="def:special-char">
|
||||
<match>\\\\|\\'</match>
|
||||
</context>
|
||||
</include>
|
||||
|
@ -412,7 +413,7 @@ FIXME: =pod should require an empty line before/after, as written in perlpod
|
|||
<context style-ref="string">
|
||||
<start>'</start><end>'</end>
|
||||
<include>
|
||||
<context style-ref="def:escape">
|
||||
<context style-ref="def:special-char">
|
||||
<match>\\\\|\\'</match>
|
||||
</context>
|
||||
</include>
|
||||
|
@ -519,7 +520,7 @@ FIXME: =pod should require an empty line before/after, as written in perlpod
|
|||
<start>(^|[^$@%&])(split|while|if)\s+(/)</start>
|
||||
<end>/[cgimosx]*</end>
|
||||
<include>
|
||||
<context sub-pattern="2" where="start" style-ref="builtin-function"/>
|
||||
<context sub-pattern="2" where="start" style-ref="builtin"/>
|
||||
<context sub-pattern="3" where="start" style-ref="regex"/>
|
||||
<context sub-pattern="0" where="end" style-ref="regex"/>
|
||||
<context ref="in-pattern"/>
|
||||
|
@ -692,7 +693,7 @@ FIXME: =pod should require an empty line before/after, as written in perlpod
|
|||
<keyword>__PACKAGE__</keyword>
|
||||
</context>
|
||||
|
||||
<context id="builtin-function" style-ref="builtin-function">
|
||||
<context id="builtin" style-ref="builtin">
|
||||
<!-- see `man perlfunc` -->
|
||||
<keyword>abs</keyword>
|
||||
<keyword>accept</keyword>
|
||||
|
@ -980,7 +981,7 @@ FIXME: =pod should require an empty line before/after, as written in perlpod
|
|||
</include>
|
||||
</context>
|
||||
|
||||
<context id="pod" style-ref="comment">
|
||||
<context id="pod" style-ref="pod">
|
||||
<start>^(?=(=[a-z]))</start>
|
||||
<end>^=(cut)$</end>
|
||||
<include>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
Copyright (C) 2005 Rowan Lewis <rowanjl@gmail.com>
|
||||
Copyright (C) 2006 Steve Frécinaux <steve@istique.net>
|
||||
Copyright (C) 2007 Patryk Zawadzki <patrys@pld-linux.org>
|
||||
Copyright (C) 2007 Eric Norige <thelema@swbell.net>
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -26,85 +27,134 @@
|
|||
<language id="php" _name="PHP" version="2.0" _section="Scripts">
|
||||
<metadata>
|
||||
<property name="mimetypes">text/x-php;application/x-php;text/x-php-source;application/x-php-source</property>
|
||||
<property name="globs">*.php;*.php3;*.php4</property>
|
||||
<property name="globs">*.php;*.php3;*.php4;*.phtml</property>
|
||||
<property name="line-comment-start">#</property>
|
||||
<property name="block-comment-start">/*</property>
|
||||
<property name="block-comment-end">*/</property>
|
||||
</metadata>
|
||||
|
||||
<styles>
|
||||
<style id="comment" _name="Comment" map-to="def:comment"/>
|
||||
<style id="data-type" _name="Data Type" map-to="def:data-type"/>
|
||||
<style id="error" _name="Error" map-to="def:error"/>
|
||||
<style id="variable" _name="Variable" map-to="def:identifier"/>
|
||||
<style id="escape" _name="Escaped Character" map-to="def:special-char"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="here-doc" _name="Heredoc" map-to="def:string"/>
|
||||
<style id="here-doc-bound" _name="Heredoc Bound" map-to="def:keyword"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="others" _name="Others"/>
|
||||
<style id="operator" _name="Operator" map-to="def:operator"/>
|
||||
<style id="type" _name="Data Type" map-to="def:type"/>
|
||||
<style id="null-value" _name="Null Value" map-to="def:special-constant"/>
|
||||
<style id="boolean" _name="Boolean value" map-to="def:boolean"/>
|
||||
<style id="floating-point" _name="Floating point number" map-to="def:floating-point"/>
|
||||
<style id="decimal" _name="Decimal number" map-to="def:decimal"/>
|
||||
<style id="octal" _name="Octal number" map-to="def:base-n-integer"/>
|
||||
<style id="hexadecimal" _name="Hexadecimal number" map-to="def:base-n-integer"/>
|
||||
</styles>
|
||||
|
||||
<!-- FIXME: keywords before a '(' is hightlined as a function call instead of a keyword -->
|
||||
|
||||
<definitions>
|
||||
<context id="cpp-line-comment" style-ref="comment" end-at-line-end="true">
|
||||
<start>//</start>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
</include>
|
||||
</context>
|
||||
<context id="bash-line-comment" style-ref="comment" end-at-line-end="true">
|
||||
|
||||
<context id="bash-line-comment" style-ref="comment" end-at-line-end="true" extend-parent="false">
|
||||
<start>#</start>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
<context ref="def:in-line-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="cpp-line-comment" style-ref="comment" end-at-line-end="true" extend-parent="false">
|
||||
<start>//</start>
|
||||
<include>
|
||||
<context ref="def:in-line-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="c-block-comment" style-ref="comment">
|
||||
<start>/\*</start>
|
||||
<end>\*/</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
<context ref="def:in-line-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
<context id="first-open-php-tag" style-ref="others">
|
||||
<match><(%|[?](php)?)</match>
|
||||
|
||||
<context id="close-comment-outside-comment" style-ref="error">
|
||||
<match>\*/(?!\*)</match>
|
||||
</context>
|
||||
<context id="html-block" style-ref="others">
|
||||
<start>[%?]></start>
|
||||
<end><(%|[?](php)?)</end>
|
||||
|
||||
<context id="escape" style-ref="escape">
|
||||
<match>\\((\\|"|n|t|\$|r)|[0-7]{1,3}|x[0-9a-fA-F]{1,2})</match>
|
||||
</context>
|
||||
|
||||
<context id="variable" style-ref="variable">
|
||||
<match>[$]+[a-zA-Z_][a-zA-Z0-9_]*</match>
|
||||
</context>
|
||||
|
||||
<context id="array-operators" style-ref="variable">
|
||||
<match>(\[|\])</match>
|
||||
</context>
|
||||
|
||||
<context id="string-var">
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
<context ref="variable"/>
|
||||
<context id="curly-var" style-ref="variable" >
|
||||
<start>{(?=\$)</start>
|
||||
<end>}</end>
|
||||
<include>
|
||||
<context ref="string-var"/>
|
||||
</include>
|
||||
</context>
|
||||
<context id="backwards-curly-var" style-ref="variable">
|
||||
<start>\${</start>
|
||||
<end>}</end>
|
||||
<include>
|
||||
<context ref="string-var"/>
|
||||
</include>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
<context id="double-quoted-string" style-ref="string">
|
||||
|
||||
<context id="double-quoted-string" style-ref="string" extend-parent="false">
|
||||
<start>"</start>
|
||||
<end>"</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="escape"/>
|
||||
<context ref="string-var"/>
|
||||
<context ref="def:line-continue"/>
|
||||
</include>
|
||||
</context>
|
||||
<context id="single-quoted-string" style-ref="string">
|
||||
|
||||
<context id="single-quoted-string" style-ref="string" extend-parent="false">
|
||||
<start>'</start>
|
||||
<end>'</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context style-ref="def:special-char">
|
||||
<match>\\['\\]</match>
|
||||
</context>
|
||||
<context ref="def:line-continue"/>
|
||||
</include>
|
||||
</context>
|
||||
<context id="backtick-string" style-ref="string">
|
||||
|
||||
<context id="backtick-string" style-ref="string" extend-parent="false">
|
||||
<start>`</start>
|
||||
<end>`</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
</include>
|
||||
</context>
|
||||
<context id="variable" style-ref="data-type">
|
||||
<match>[$]+[a-zA-Z_][a-zA-Z0-9_]*</match>
|
||||
|
||||
<context id="here-doc-string" style-ref="here-doc" extend-parent="true">
|
||||
<start>(<<<)\s?([a-zA-Z_][a-zA-Z0-9_]*)</start>
|
||||
<end>^(\%{2@start});?$</end>
|
||||
<include>
|
||||
<context sub-pattern="0" where="start" style-ref="here-doc-bound"/>
|
||||
<context sub-pattern="1" where="end" style-ref="here-doc-bound"/>
|
||||
<context ref="escape"/>
|
||||
<context ref="string-var"/>
|
||||
<context ref="def:line-continue"/>
|
||||
</include>
|
||||
</context>
|
||||
<context id="array-operators" style-ref="data-type">
|
||||
<match>(\[|\])</match>
|
||||
</context>
|
||||
<context id="case-sensitive-keyword" style-ref="keyword">
|
||||
|
||||
<context id="keywords" style-ref="keyword">
|
||||
<keyword>abstract</keyword>
|
||||
<keyword>and</keyword>
|
||||
<keyword>as</keyword>
|
||||
|
@ -156,15 +206,12 @@
|
|||
<keyword>while</keyword>
|
||||
<keyword>xor</keyword>
|
||||
</context>
|
||||
<context id="case-insensitive-keyword" style-ref="keyword">
|
||||
<keyword>true</keyword>
|
||||
<keyword>false</keyword>
|
||||
<keyword>null</keyword>
|
||||
</context>
|
||||
<context id="operators" style-ref="keyword">
|
||||
|
||||
<context id="operators" style-ref="operator" extend-parent="false">
|
||||
<match>[-.~^@;:/%|\=\+\*\!\?&<>]</match>
|
||||
</context>
|
||||
<context id="data-type" style-ref="data-type">
|
||||
|
||||
<context id="type" style-ref="type">
|
||||
<keyword>array</keyword>
|
||||
<keyword>bool</keyword>
|
||||
<keyword>boolean</keyword>
|
||||
|
@ -177,23 +224,86 @@
|
|||
<keyword>string</keyword>
|
||||
<keyword>unset</keyword>
|
||||
</context>
|
||||
<context id="php">
|
||||
|
||||
<context id="null-value" style-ref="null-value">
|
||||
<prefix>(?i)</prefix> <!-- case insensitive -->
|
||||
<keyword>null</keyword>
|
||||
</context>
|
||||
|
||||
<context id="boolean" style-ref="boolean">
|
||||
<prefix>(?i)</prefix> <!-- case insensitive -->
|
||||
<keyword>false</keyword>
|
||||
<keyword>true</keyword>
|
||||
</context>
|
||||
|
||||
<context id="float" style-ref="floating-point">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
([0-9]+[Ee][+-]?[0-9]+ |
|
||||
([0-9]*\.[0-9]+ | [0-9]+\.[0-9]*)([Ee][+-]?[0-9]+)?)
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="decimal-number" style-ref="decimal">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
[+-]?([1-9][0-9]*|0)
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="octal-number" style-ref="octal">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
[+-]?0[0-7]+
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="hexadecimal-number" style-ref="hexadecimal">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
[+-]?0x[0-9a-fA-F]+
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="php-block">
|
||||
<start><([?](php)?)</start>
|
||||
<end>[?]></end>
|
||||
<include>
|
||||
<context sub-pattern="0" where="start" style-ref="keyword"/>
|
||||
<context sub-pattern="0" where="end" style-ref="keyword"/>
|
||||
<context ref="cpp-line-comment"/>
|
||||
<context ref="bash-line-comment"/>
|
||||
<context ref="c-block-comment"/>
|
||||
<context ref="first-open-php-tag"/>
|
||||
<context ref="html-block"/>
|
||||
<context ref="double-quoted-string"/>
|
||||
<context ref="single-quoted-string"/>
|
||||
<context ref="backtick-string"/>
|
||||
<context ref="here-doc-string"/>
|
||||
<context ref="variable"/>
|
||||
<context ref="array-operators"/>
|
||||
<context ref="case-sensitive-keyword"/>
|
||||
<context ref="case-insensitive-keyword"/>
|
||||
<context ref="keywords"/>
|
||||
<context ref="operators"/>
|
||||
<context ref="data-type"/>
|
||||
<context ref="type"/>
|
||||
<context ref="null-value"/>
|
||||
<context ref="boolean"/>
|
||||
<context ref="float"/>
|
||||
<context ref="decimal-number"/>
|
||||
<context ref="octal-number"/>
|
||||
<context ref="hexadecimal-number"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<replace id="html:embedded-lang-hook" ref="php-block"/>
|
||||
|
||||
<context id="php">
|
||||
<include>
|
||||
<context ref="php-block"/>
|
||||
<context ref="html:html"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
</definitions>
|
||||
</language>
|
||||
|
|
|
@ -29,20 +29,22 @@
|
|||
</metadata>
|
||||
|
||||
<styles>
|
||||
<style id="special-variables" _name="Special variables" map-to="def:data-type"/>
|
||||
<style id="module-handler" _name="Module handler" map-to="def:preprocessor"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="function" _name="Function" map-to="def:keyword"/>
|
||||
<style id="builtins" _name="Builtins" map-to="def:data-type"/>
|
||||
<style id="multiline-string" _name="Multiline string" map-to="def:string"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="escaped-char" _name="Escaped character" map-to="def:escape"/>
|
||||
<style id="format" _name="format" map-to="def:character"/>
|
||||
<style id="module-handler" _name="Module Handler" map-to="def:preprocessor"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="multiline-string" _name="Multiline string" map-to="def:string"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="escaped-char" _name="Escaped Character" map-to="def:special-char"/>
|
||||
<style id="format" _name="Format" map-to="def:character"/>
|
||||
<style id="string-conversion" _name="string-conversion"/>
|
||||
<style id="floating-point" _name="Floating point" map-to="def:floating-point"/>
|
||||
<style id="decimal" _name="Decimal" map-to="def:decimal"/>
|
||||
<style id="base-n-integer" _name="Base-N integer" map-to="def:base-n-integer"/>
|
||||
<style id="complex" _name="Complex number" map-to="def:complex"/>
|
||||
<style id="special-variable" _name="Special Variable" map-to="def:identifier"/>
|
||||
<style id="boolean" _name="Boolean" map-to="def:boolean"/>
|
||||
<style id="floating-point" _name="Floating point number" map-to="def:floating-point"/>
|
||||
<style id="decimal" _name="Decimal number" map-to="def:decimal"/>
|
||||
<style id="base-n-integer" _name="Base-N number" map-to="def:base-n-integer"/>
|
||||
<style id="complex" _name="Complex number" map-to="def:complex"/>
|
||||
<style id="builtin-constant" _name="Builtin Constant" map-to="def:special-constant"/>
|
||||
<style id="builtin-object" _name="Builtin Object" map-to="def:type"/>
|
||||
<style id="builtin-function" _name="Builtin Function" map-to="def:builtin"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
@ -135,15 +137,18 @@
|
|||
</include>
|
||||
</context>
|
||||
|
||||
<context id="special-variables" style-ref="special-variables">
|
||||
<context id="special-variables" style-ref="special-variable">
|
||||
<prefix>(?<![\w\.])</prefix>
|
||||
<keyword>self</keyword>
|
||||
<keyword>False</keyword>
|
||||
<keyword>None</keyword>
|
||||
<keyword>True</keyword>
|
||||
<keyword>__name__</keyword>
|
||||
<keyword>__debug__</keyword>
|
||||
</context>
|
||||
</context>
|
||||
|
||||
<context id="boolean" style-ref="boolean">
|
||||
<prefix>(?<![\w\.])</prefix>
|
||||
<keyword>False</keyword>
|
||||
<keyword>True</keyword>
|
||||
</context>
|
||||
|
||||
<define-regex id="float" extended="true">
|
||||
( (\d+)?\.\d+ | \d+\. ) |
|
||||
|
@ -156,7 +161,7 @@
|
|||
|
||||
<context id="float" style-ref="floating-point">
|
||||
<match>(?<![\w\.])\%{float}(?![\w\.])</match>
|
||||
</context>
|
||||
</context>
|
||||
|
||||
<context id="decimal" style-ref="decimal">
|
||||
<match>(?<![\w\.])([1-9][0-9]*|0)[lL]?(?![\w\.])</match>
|
||||
|
@ -176,17 +181,13 @@
|
|||
<keyword>as</keyword>
|
||||
</context>
|
||||
|
||||
<context id="function" style-ref="function">
|
||||
<keyword>def</keyword>
|
||||
<keyword>class</keyword>
|
||||
<keyword>return</keyword>
|
||||
</context>
|
||||
|
||||
<context id="keyword" style-ref="keyword">
|
||||
<keyword>and</keyword>
|
||||
<keyword>assert</keyword>
|
||||
<keyword>break</keyword>
|
||||
<keyword>class</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>def</keyword>
|
||||
<keyword>del</keyword>
|
||||
<keyword>elif</keyword>
|
||||
<keyword>else</keyword>
|
||||
|
@ -204,12 +205,20 @@
|
|||
<keyword>pass</keyword>
|
||||
<keyword>print</keyword>
|
||||
<keyword>raise</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>try</keyword>
|
||||
<keyword>while</keyword>
|
||||
<keyword>yield</keyword>
|
||||
</context>
|
||||
|
||||
<context id="builtins" style-ref="builtins">
|
||||
<context id="builtin-constants" style-ref="builtin-constant">
|
||||
<prefix>(?<![\w\.])</prefix>
|
||||
<keyword>Ellipsis</keyword>
|
||||
<keyword>None</keyword>
|
||||
<keyword>NotImplemented</keyword>
|
||||
</context>
|
||||
|
||||
<context id="builtin-objects" style-ref="builtin-object">
|
||||
<prefix>(?<![\w\.])</prefix>
|
||||
<keyword>ArithmeticError</keyword>
|
||||
<keyword>AssertionError</keyword>
|
||||
|
@ -256,9 +265,14 @@
|
|||
<keyword>OverflowWarning</keyword>
|
||||
<keyword>RuntimeWarning</keyword>
|
||||
<keyword>FutureWarning</keyword>
|
||||
</context>
|
||||
|
||||
<context id="builtin-function" style-ref="builtin-function">
|
||||
<prefix>(?<![\w\.])</prefix>
|
||||
<keyword>__import__</keyword>
|
||||
<keyword>abs</keyword>
|
||||
<keyword>all</keyword>
|
||||
<keyword>any</keyword>
|
||||
<keyword>apply</keyword>
|
||||
<keyword>basestring</keyword>
|
||||
<keyword>bool</keyword>
|
||||
|
@ -280,6 +294,7 @@
|
|||
<keyword>file</keyword>
|
||||
<keyword>filter</keyword>
|
||||
<keyword>float</keyword>
|
||||
<keyword>frozenset</keyword>
|
||||
<keyword>getattr</keyword>
|
||||
<keyword>globals</keyword>
|
||||
<keyword>hasattr</keyword>
|
||||
|
@ -310,9 +325,12 @@
|
|||
<keyword>reduce</keyword>
|
||||
<keyword>reload</keyword>
|
||||
<keyword>repr</keyword>
|
||||
<keyword>reversed</keyword>
|
||||
<keyword>round</keyword>
|
||||
<keyword>setattr</keyword>
|
||||
<keyword>set</keyword>
|
||||
<keyword>slice</keyword>
|
||||
<keyword>sorted</keyword>
|
||||
<keyword>staticmethod</keyword>
|
||||
<keyword>str</keyword>
|
||||
<keyword>sum</keyword>
|
||||
|
|
|
@ -0,0 +1,202 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Author: Konstantin Ryabitsev <icon@fedoraproject.org>
|
||||
Copyright (C) 2007 Konstantin Ryabitsev <icon@fedoraproject.org>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
|
||||
-->
|
||||
<language id="rpmspec" _name="RPM spec" version="2.0" _section="Others">
|
||||
<metadata>
|
||||
<property name="mimetypes">text/x-rpm-spec</property>
|
||||
<property name="globs">*.spec</property>
|
||||
<property name="line-comment-start">#</property>
|
||||
</metadata>
|
||||
|
||||
<styles>
|
||||
<style id="define" _name="Define" map-to="def:preprocessor"/>
|
||||
<style id="header" _name="Header" map-to="def:keyword"/>
|
||||
<style id="section" _name="Section" map-to="def:type"/>
|
||||
<style id="spec-macro" _name="Spec Macro" map-to="def:preprocessor"/>
|
||||
<style id="directory-macro" _name="Directory Macro" map-to="def:identifier"/>
|
||||
<style id="command-macro" _name="Command Macro" map-to="def:identifier"/>
|
||||
<style id="conditional-macro" _name="Conditional Macro" map-to="def:preprocessor"/>
|
||||
<style id="other-macro" _name="Other Macro" map-to="def:identifier"/>
|
||||
<style id="flow-conditional" _name="Flow Conditional" map-to="def:preprocessor"/>
|
||||
<style id="rpm-var" _name="RPM Variable" map-to="def:identifier"/>
|
||||
<style id="switch" _name="Switch" map-to="def:operator"/>
|
||||
<style id="changelog-date" _name="Date" map-to="changelog:date"/>
|
||||
<style id="changelog-email" _name="Email" map-to="changelog:email"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
||||
<context id="define" style-ref="define" end-at-line-end="true">
|
||||
<start>%define</start>
|
||||
<include>
|
||||
<context ref="def:line-continue" ignore-style="true"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="conditional-define" style-ref="define" end-at-line-end="true">
|
||||
<start>%\{\!\?.*%define</start>
|
||||
<end>\}</end>
|
||||
<include>
|
||||
<context ref="def:line-continue" ignore-style="true"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="header" style-ref="header">
|
||||
<prefix>^</prefix>
|
||||
<suffix>:</suffix>
|
||||
<keyword>Name</keyword>
|
||||
<keyword>Version</keyword>
|
||||
<keyword>Release</keyword>
|
||||
<keyword>Epoch</keyword>
|
||||
<keyword>Summary</keyword>
|
||||
<keyword>Group</keyword>
|
||||
<keyword>License</keyword>
|
||||
<keyword>Packager</keyword>
|
||||
<keyword>Vendor</keyword>
|
||||
<keyword>Icon</keyword>
|
||||
<keyword>URL</keyword>
|
||||
<keyword>Patch[0-9]*</keyword>
|
||||
<keyword>Source[0-9]*</keyword>
|
||||
<keyword>Requires\(?[a-z]*\)?</keyword>
|
||||
<keyword>[A-Za-z]+Req</keyword>
|
||||
<keyword>Obsoletes</keyword>
|
||||
<keyword>Provides</keyword>
|
||||
<keyword>Conflicts</keyword>
|
||||
<keyword>Build[A-Za-z]+</keyword>
|
||||
<keyword>[A-Za-z]+Arch</keyword>
|
||||
<keyword>Auto[A-Za-z]+</keyword>
|
||||
</context>
|
||||
|
||||
<context id="section" style-ref="section">
|
||||
<prefix>^%</prefix>
|
||||
<keyword>description</keyword>
|
||||
<keyword>package</keyword>
|
||||
<keyword>prep</keyword>
|
||||
<keyword>build</keyword>
|
||||
<keyword>install</keyword>
|
||||
<keyword>clean</keyword>
|
||||
<keyword>check</keyword>
|
||||
<keyword>pre[a-z]*</keyword>
|
||||
<keyword>post[a-z]*</keyword>
|
||||
<keyword>trigger[a-z]*</keyword>
|
||||
<keyword>files</keyword>
|
||||
<!-- the "changelog" section is handled as a special
|
||||
case below.
|
||||
TODO: In the future it would be nice to do the
|
||||
same for other sections to enforce that some of the
|
||||
things are highlighted only when in the correct
|
||||
section.
|
||||
-->
|
||||
</context>
|
||||
|
||||
<context id="spec-macro" style-ref="spec-macro">
|
||||
<prefix>%</prefix>
|
||||
<keyword>defattr</keyword>
|
||||
<keyword>doc</keyword>
|
||||
<keyword>setup</keyword>
|
||||
<keyword>config</keyword>
|
||||
<keyword>configure</keyword>
|
||||
<keyword>make</keyword>
|
||||
<keyword>makeinstall</keyword>
|
||||
<keyword>dir</keyword>
|
||||
<keyword>ghost</keyword>
|
||||
<keyword>patch[0-9]+</keyword>
|
||||
<keyword>find_lang</keyword>
|
||||
<keyword>exclude</keyword>
|
||||
</context>
|
||||
|
||||
<context id="directory-macro" style-ref="directory-macro">
|
||||
<match>%\{?_([a-z_]+dir|[a-z_]+path|prefix)\}?</match>
|
||||
</context>
|
||||
|
||||
<context id="command-macro" style-ref="command-macro">
|
||||
<match>%\{?__[a-z_]+\}?</match>
|
||||
</context>
|
||||
|
||||
<context id="conditional-macro" style-ref="conditional-macro">
|
||||
<match>%\{\?[A-Za-z0-9_]+\}</match>
|
||||
</context>
|
||||
|
||||
<context id="other-macro" style-ref="other-macro">
|
||||
<match>%\{[a-zA-Z][a-zA-Z0-9_]+\}</match>
|
||||
</context>
|
||||
|
||||
<context id="flow" style-ref="flow-conditional">
|
||||
<prefix>%</prefix>
|
||||
<keyword>ifarch</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>elif</keyword>
|
||||
<keyword>endif</keyword>
|
||||
</context>
|
||||
|
||||
<context id="rpm-var" style-ref="rpm-var">
|
||||
<match>\$\{?RPM_[A-Z0-9_]+\}?</match>
|
||||
</context>
|
||||
|
||||
<!-- TODO: this is one of the context which would be nice
|
||||
to restrict to the proper sections -->
|
||||
<context id="command-switch" style-ref="switch">
|
||||
<match>\s(-\w+|--\w[a-zA-Z_-]+)</match>
|
||||
</context>
|
||||
|
||||
<define-regex id="weekday">Mon|Tue|Wed|Thu|Fri|Sat|Sun</define-regex>
|
||||
<define-regex id="month">Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec</define-regex>
|
||||
<define-regex id="date" extended="true">
|
||||
\%{weekday}\s+\%{month}\s+\d{1,2}\s+(\d{1,2}:\d{1,2}:\d{1,2}\s+)?\d{4} | # Wed Jun 27 13:27:21 2007
|
||||
\d{4}-\d{2}-\d{2} # 2007-06-28
|
||||
</define-regex>
|
||||
|
||||
<context id="changelog-section">
|
||||
<start>%changelog</start>
|
||||
<end>^(?=%)</end>
|
||||
<include>
|
||||
<context sub-pattern="0" where="start" style-ref="section"/>
|
||||
<context id="date" style-ref="changelog-date">
|
||||
<match>\%{date}</match>
|
||||
</context>
|
||||
<context id="email" style-ref="changelog-email">
|
||||
<match><[A-Za-z0-9._+-]+@[A-Za-z0-9._+-]+\.[A-Za-z0-9]{2,4}></match>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="rpmspec">
|
||||
<include>
|
||||
<context ref="def:shell-like-comment"/>
|
||||
<context ref="define"/>
|
||||
<context ref="header"/>
|
||||
<context ref="section"/>
|
||||
<context ref="spec-macro"/>
|
||||
<context ref="directory-macro"/>
|
||||
<context ref="command-macro"/>
|
||||
<context ref="conditional-macro"/>
|
||||
<context ref="other-macro"/>
|
||||
<context ref="flow"/>
|
||||
<context ref="rpm-var"/>
|
||||
<context ref="command-switch"/>
|
||||
<context ref="changelog-section"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
</definitions>
|
||||
|
||||
</language>
|
|
@ -29,28 +29,40 @@
|
|||
</metadata>
|
||||
|
||||
<styles>
|
||||
<style id="comment" _name="Comment" map-to="def:comment"/>
|
||||
<style id="attribute-definition" _name="Attribute Definition" map-to="def:data-type"/>
|
||||
<style id="module-handler" _name="Module handler" map-to="def:preprocessor"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="floating-point" _name="Floating point" map-to="def:floating-point"/>
|
||||
<style id="decimal" _name="Decimal" map-to="def:decimal"/>
|
||||
<style id="base-n-integer" _name="Base-N integer" map-to="def:base-n-integer"/>
|
||||
<style id="numeric-literal" _name="Numeric literal" map-to="def:base-n-integer"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="builtin" _name="Builtin" map-to="def:data-type"/>
|
||||
<style id="constant" _name="Constant" map-to="def:data-type"/>
|
||||
<style id="variable" _name="Variable" map-to="def:function"/>
|
||||
<style id="escape" _name="Escaped Character" map-to="def:special-char"/>
|
||||
<style id="comment" _name="Comment" map-to="def:comment"/>
|
||||
<style id="attribute-definition" _name="Attribute Definition" map-to="def:statement"/>
|
||||
<style id="module-handler" _name="Module handler" map-to="def:preprocessor"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="nil-value" _name="Nil Constant" map-to="def:special-constant"/>
|
||||
<style id="boolean" _name="Boolean value" map-to="def:boolean"/>
|
||||
<style id="floating-point" _name="Floating point number" map-to="def:floating-point"/>
|
||||
<style id="decimal" _name="Decimal number" map-to="def:decimal"/>
|
||||
<style id="base-n-integer" _name="Base-N number" map-to="def:base-n-integer"/>
|
||||
<style id="numeric-literal" _name="Numeric literal" map-to="def:base-n-integer"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="builtin" _name="Builtin" map-to="def:type"/>
|
||||
<style id="constant" _name="Constant" map-to="def:type"/>
|
||||
<style id="symbol" _name="Symbol" map-to="def:string"/>
|
||||
<style id="special-variable" _name="Special Variable" map-to="def:identifier"/>
|
||||
<style id="predefined-variable" _name="Predefined Variable" map-to="def:identifier"/>
|
||||
<style id="variable" _name="Variable" map-to="def:identifier"/>
|
||||
<style id="here-doc" _name="Heredoc" map-to="def:string" />
|
||||
<style id="here-doc-bound" _name="Heredoc Bound" map-to="def:string"/>
|
||||
<style id="regex" _name="Regular Expression" map-to="def:identifier"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
||||
<context id="escape" style-ref="escape">
|
||||
<match>\\((0-7){3}|(x[a-fA-F0-9]{2})|(c\S)|([CM]-\S)|(M-C-\S)|.)</match>
|
||||
</context>
|
||||
|
||||
<context id="multiline-comment" style-ref="comment">
|
||||
<start>^=begin</start>
|
||||
<end>^=end</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
<context ref="escape"/>
|
||||
<context ref="def:in-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
@ -63,6 +75,8 @@
|
|||
</context>
|
||||
|
||||
<context id="definitions" style-ref="keyword">
|
||||
<!-- do not highlight the .class method -->
|
||||
<prefix>(?<![\w\.])</prefix>
|
||||
<keyword>alias</keyword>
|
||||
<keyword>class</keyword>
|
||||
<keyword>module</keyword>
|
||||
|
@ -70,16 +84,6 @@
|
|||
<keyword>undef</keyword>
|
||||
</context>
|
||||
|
||||
<context id="pseudo-variables" style-ref="variable">
|
||||
<keyword>self</keyword>
|
||||
<keyword>super</keyword>
|
||||
<keyword>nil</keyword>
|
||||
<keyword>false</keyword>
|
||||
<keyword>true</keyword>
|
||||
<keyword>__FILE__</keyword>
|
||||
<keyword>__LINE__</keyword>
|
||||
</context>
|
||||
|
||||
<context id="module-handlers" style-ref="module-handler">
|
||||
<keyword>require</keyword>
|
||||
<keyword>include</keyword>
|
||||
|
@ -158,6 +162,27 @@
|
|||
<keyword>TrueClass</keyword>
|
||||
</context>
|
||||
|
||||
<context id="special-variables" style-ref="special-variable">
|
||||
<keyword>self</keyword>
|
||||
<keyword>super</keyword>
|
||||
<keyword>__FILE__</keyword>
|
||||
<keyword>__LINE__</keyword>
|
||||
</context>
|
||||
|
||||
<context id="predefined-variables" style-ref="predefined-variable">
|
||||
<match extended="true">
|
||||
\$([!$&"'*+,./0:;<=>?@\`~1-9]|
|
||||
-[0FIKadilpvw]|
|
||||
deferr|defout|stderr|stdin|stdout|
|
||||
DEBUG|FILENAME|KCODE|LOADED_FEATURES|LOAD_PATH|
|
||||
PROGRAM_NAME|SAFE|VERBOSE)\b
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="global-variables" style-ref="variable">
|
||||
<match>\$[a-zA-Z_][a-zA-Z0-9_]*</match>
|
||||
</context>
|
||||
|
||||
<context id="class-variables" style-ref="variable">
|
||||
<match>@@[a-zA-Z_][a-zA-Z0-9_]*</match>
|
||||
</context>
|
||||
|
@ -166,19 +191,11 @@
|
|||
<match>@[a-zA-Z_][a-zA-Z0-9_]*</match>
|
||||
</context>
|
||||
|
||||
<context id="global-variables" style-ref="variable">
|
||||
<match>\$[a-zA-Z_][a-zA-Z0-9_]*</match>
|
||||
</context>
|
||||
|
||||
<context id="predefined-variables" style-ref="variable">
|
||||
<match>\$(-[a-zA-Z]|\pP)</match>
|
||||
</context>
|
||||
|
||||
<context id="symbols" style-ref="string">
|
||||
<context id="symbols" style-ref="symbol">
|
||||
<match>(?<!:):[a-zA-Z0-9_]+</match>
|
||||
</context>
|
||||
|
||||
<context id="regexp-variables" style-ref="variable">
|
||||
<context id="regexp-variables" style-ref="regex">
|
||||
<match>\$[1-9][0-9]*</match>
|
||||
</context>
|
||||
|
||||
|
@ -186,9 +203,20 @@
|
|||
<match>(::)?\b[A-Z][A-Za-z0-9_]*\b</match>
|
||||
</context>
|
||||
|
||||
<context id="nil-value" style-ref="nil-value">
|
||||
<keyword>nil</keyword>
|
||||
</context>
|
||||
|
||||
<context id="boolean" style-ref="boolean">
|
||||
<keyword>false</keyword>
|
||||
<keyword>true</keyword>
|
||||
</context>
|
||||
|
||||
<define-regex id="underscore_num">\d(_?\d)*</define-regex>
|
||||
|
||||
<define-regex id="float" extended="true">
|
||||
( (\d+)?\.\d+ | \d+\. ) |
|
||||
( (\d+|(\d+)?\.\d+|\d+\.)[eE][+-]?\d+ )
|
||||
( (\%{underscore_num})?\.\%{underscore_num} | \%{underscore_num}\. ) |
|
||||
( (\%{underscore_num}|(\%{underscore_num})?\.\%{underscore_num}|\%{underscore_num}\.)[eE][+-]?\%{underscore_num} )
|
||||
</define-regex>
|
||||
|
||||
<context id="float" style-ref="floating-point">
|
||||
|
@ -196,30 +224,33 @@
|
|||
</context>
|
||||
|
||||
<context id="decimal" style-ref="decimal">
|
||||
<match>(?<![\w\.])([1-9][0-9]*|0)[lL]?(?![\w\.])</match>
|
||||
</context>
|
||||
|
||||
<context id="octal" style-ref="base-n-integer">
|
||||
<match>(?<![\w\.])0[0-7]+[lL]?(?![\w\.])</match>
|
||||
<match>(?<![\w\.])([1-9](_?[0-9])*|0)(?![\w\.])</match>
|
||||
</context>
|
||||
|
||||
<context id="hex" style-ref="base-n-integer">
|
||||
<match>(?<![\w\.])0[xX][0-9A-Fa-f]+[lL]?(?![\w\.])</match>
|
||||
<match>(?<![\w\.])0[xX][0-9A-Fa-f](_?[0-9A-Fa-f])*(?![\w\.])</match>
|
||||
</context>
|
||||
|
||||
<context id="octal" style-ref="base-n-integer">
|
||||
<match>(?<![\w\.])0[0-7](_?[0-7])*(?![\w\.])</match>
|
||||
</context>
|
||||
|
||||
<context id="binary" style-ref="base-n-integer">
|
||||
<match>(?<![\w\.])0[bB][01](_?[01])*(?![\w\.])</match>
|
||||
</context>
|
||||
|
||||
<context id="numeric-literal" style-ref="numeric-literal">
|
||||
<match>\?((\\[MC]-){1,2}|\\?)\S</match>
|
||||
<match>(?<![\w\.])\?((\\[MC]-){1,2}|\\?)\S</match>
|
||||
</context>
|
||||
|
||||
<!-- in double quotes and backticks -->
|
||||
<context id="simple-interpolation">
|
||||
<start>#</start>
|
||||
<start>#(?=[@$])</start> <!-- need assertion to not highlight single # -->
|
||||
<end></end>
|
||||
<include>
|
||||
<context ref="class-variables"/>
|
||||
<context ref="instance-variables"/>
|
||||
<context ref="global-variables"/>
|
||||
<context ref="predefined-variables"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
|
@ -230,7 +261,7 @@
|
|||
<start>#{</start>
|
||||
<end>}</end>
|
||||
<include>
|
||||
<context ref="ruby"/>
|
||||
<context ref="ruby:*"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
|
@ -241,7 +272,7 @@
|
|||
<start>"</start>
|
||||
<end>"</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
<context ref="complex-interpolation"/>
|
||||
<context ref="simple-interpolation"/>
|
||||
|
@ -252,8 +283,9 @@
|
|||
<start>'</start>
|
||||
<end>'</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
<context style-ref="escape">
|
||||
<match>\\['\\]</match>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
|
@ -261,75 +293,134 @@
|
|||
<start>`</start>
|
||||
<end>`</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
<context ref="complex-interpolation"/>
|
||||
<context ref="simple-interpolation"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="heredoc-string" style-ref="string" style-inside="true">
|
||||
<context id="here-doc-string" style-ref="here-doc" style-inside="true">
|
||||
<start><<(\w+)</start>
|
||||
<end>\%{1@start}</end>
|
||||
<end>^\%{1@start}</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
<context ref="complex-interpolation"/>
|
||||
<context ref="simple-interpolation"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="heredoc-single-quoted-string" style-ref="string" style-inside="true">
|
||||
<context id="here-doc-indented-string" style-ref="here-doc" style-inside="true">
|
||||
<start><<-(\w+)</start>
|
||||
<end>^\s*\%{1@start}</end>
|
||||
<include>
|
||||
<context ref="escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
<context ref="complex-interpolation"/>
|
||||
<context ref="simple-interpolation"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="here-doc-single-quoted-string" style-ref="here-doc" style-inside="true">
|
||||
<start><<'(\w+)'</start>
|
||||
<end>\%{1@start}</end>
|
||||
<end>^\%{1@start}</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
<context sub-pattern="0" where="start" style-ref="here-doc-bound"/>
|
||||
<context sub-pattern="0" where="end" style-ref="here-doc-bound"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="heredoc-double-quoted-string" style-ref="string" style-inside="true">
|
||||
<context id="here-doc-double-quoted-string" style-ref="here-doc" style-inside="true">
|
||||
<start><<"(\w+)"</start>
|
||||
<end>\%{1@start}</end>
|
||||
<end>^\%{1@start}</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context sub-pattern="0" where="start" style-ref="here-doc-bound"/>
|
||||
<context sub-pattern="0" where="end" style-ref="here-doc-bound"/>
|
||||
<context ref="escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
<context ref="complex-interpolation"/>
|
||||
<context ref="simple-interpolation"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<define-regex id="regex-opts">[iomx]*[neus]?[iomx]*</define-regex>
|
||||
|
||||
<context id="regex-bracketed" style-ref="escape" style-inside="true">
|
||||
<start>(?<!\\)[[]</start>
|
||||
<end>(?<!\\)]</end>
|
||||
</context>
|
||||
|
||||
<context id="regex-alt-form" style-ref="regex">
|
||||
<start>\%r\|</start>
|
||||
<end>\|\%{regex-opts}</end>
|
||||
<include>
|
||||
<context ref="escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
<context ref="complex-interpolation"/>
|
||||
<context ref="simple-interpolation"/>
|
||||
<context ref="regex-bracketed"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="regex-simple" style-ref="regex">
|
||||
<start extended="true">
|
||||
((?<=([(]|\s))|^)
|
||||
\/
|
||||
(?=
|
||||
([^/\\]*(\\.))*
|
||||
[^/]*
|
||||
\/
|
||||
\%{regex-opts}
|
||||
([),;.]|\s|$)
|
||||
)</start>
|
||||
<end>\/\%{regex-opts}</end>
|
||||
<include>
|
||||
<context ref="escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
<context ref="complex-interpolation"/>
|
||||
<context ref="simple-interpolation"/>
|
||||
<context ref="regex-bracketed"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="ruby">
|
||||
<include>
|
||||
<context ref="def:shebang"/>
|
||||
<context ref="def:shell-like-comment"/>
|
||||
<context ref="multiline-comment"/>
|
||||
<context ref="heredoc-string"/>
|
||||
<context ref="heredoc-single-quoted-string"/>
|
||||
<context ref="heredoc-double-quoted-string"/>
|
||||
<context ref="here-doc-single-quoted-string"/>
|
||||
<context ref="here-doc-double-quoted-string"/>
|
||||
<context ref="here-doc-string"/>
|
||||
<context ref="here-doc-indented-string"/>
|
||||
<context ref="double-quoted-string"/>
|
||||
<context ref="single-quoted-string"/>
|
||||
<context ref="backtick-quoted-string"/>
|
||||
<context ref="attribute-definitions"/>
|
||||
<context ref="definitions"/>
|
||||
<context ref="pseudo-variables"/>
|
||||
<context ref="module-handlers"/>
|
||||
<context ref="keywords"/>
|
||||
<context ref="builtins"/>
|
||||
<context ref="special-variables"/>
|
||||
<context ref="predefined-variables"/>
|
||||
<context ref="global-variables"/>
|
||||
<context ref="class-variables"/>
|
||||
<context ref="instance-variables"/>
|
||||
<context ref="global-variables"/>
|
||||
<context ref="predefined-variables"/>
|
||||
<context ref="symbols"/>
|
||||
<context ref="regexp-variables"/>
|
||||
<context ref="constants"/>
|
||||
<context ref="nil-value"/>
|
||||
<context ref="boolean"/>
|
||||
<context ref="float"/>
|
||||
<context ref="decimal"/>
|
||||
<context ref="octal"/>
|
||||
<context ref="hex"/>
|
||||
<context ref="octal"/>
|
||||
<context ref="binary"/>
|
||||
<context ref="numeric-literal"/>
|
||||
|
||||
<context ref="regex-alt-form"/>
|
||||
<context ref="regex-simple"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
</definitions>
|
||||
</language>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
<styles>
|
||||
<style id="comment" _name="Comment" map-to="def:comment"/>
|
||||
<style id="boolean" _name="Boolean" map-to="def:special-value"/>
|
||||
<style id="boolean" _name="Boolean" map-to="def:boolean"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="function" _name="Function" map-to="def:function"/>
|
||||
|
|
|
@ -26,19 +26,31 @@
|
|||
<property name="globs">*.sh</property>
|
||||
<property name="line-comment-start">#</property>
|
||||
</metadata>
|
||||
|
||||
<styles>
|
||||
<style id="comment" _name="Comment" map-to="def:comment"/>
|
||||
<style id="shebang" _name="Shebang" map-to="def:shebang"/>
|
||||
<style id="function" name="Function" map-to="def:function"/>
|
||||
<style id="comment" name="Comment" map-to="def:comment"/>
|
||||
<style id="string" name="String" map-to="def:string"/>
|
||||
<style id="keyword" name="Keyword" map-to="def:keyword"/>
|
||||
<style id="variable1" name="Variable 1" map-to="def:data-type"/>
|
||||
<style id="variable2" name="Variable 2" map-to="def:data-type"/>
|
||||
<style id="data-type" name="Data Type" map-to="def:data-type"/>
|
||||
<style id="variable1" name="Variable 1" map-to="def:type"/> <!-- FIXME: need to sort out proper styles for variables -->
|
||||
<style id="variable2" name="Variable 2" map-to="def:type"/>
|
||||
<style id="others" name="Others" map-to="def:keyword"/>
|
||||
<style id="common-command" name="Common Commands" map-to="def:keyword"/>
|
||||
<style id="here-doc-bound" name="here-doc" map-to="def:keyword"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
||||
<!-- we cannot use def:shell-like-comment, because
|
||||
m4.lang needs to replace this context -->
|
||||
<context id="line-comment" style-ref="comment" end-at-line-end="true">
|
||||
<start>#</start>
|
||||
<include>
|
||||
<context ref="def:in-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="string" style-ref="string">
|
||||
<start>"</start>
|
||||
<end>"</end>
|
||||
|
@ -47,6 +59,7 @@
|
|||
<context ref="def:line-continue"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="string-2" style-ref="string">
|
||||
<start>'</start>
|
||||
<end>'</end>
|
||||
|
@ -55,6 +68,7 @@
|
|||
<context ref="def:line-continue"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="subshell">
|
||||
<start>\(</start>
|
||||
<end>\)</end>
|
||||
|
@ -64,6 +78,7 @@
|
|||
<context ref="sh"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="backtick-string" style-ref="function">
|
||||
<start>`</start>
|
||||
<end>`</end>
|
||||
|
@ -72,20 +87,15 @@
|
|||
<context ref="def:line-continue"/>
|
||||
</include>
|
||||
</context>
|
||||
<context id="line-comment" style-ref="comment" end-at-line-end="true">
|
||||
<start>(?<!\S)#</start>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
<context ref="def:in-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="punctuator" style-ref="others">
|
||||
<match>[;\|&/]</match>
|
||||
</context>
|
||||
|
||||
<context id="function" style-ref="function">
|
||||
<match>\b[a-zA-Z_][a-zA-Z0-9_]+[ \t]*\(\)</match>
|
||||
</context>
|
||||
|
||||
<context id="redirection" style-ref="others">
|
||||
<keyword>>&+[0-9]</keyword>
|
||||
<keyword>\b[0-9]+>&</keyword>
|
||||
|
@ -100,6 +110,7 @@
|
|||
<keyword><<+[0-9]</keyword>
|
||||
<keyword>\b[0-9]+<<</keyword>
|
||||
</context>
|
||||
|
||||
<context id="here-doc">
|
||||
<start extended="true" dupnames="true">
|
||||
<<-?\s*\\?(
|
||||
|
@ -114,6 +125,7 @@
|
|||
<context sub-pattern="0" where="end" style-ref="here-doc-bound"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="operator" style-ref="function">
|
||||
<keyword>\-a\b</keyword>
|
||||
<keyword>\-b\b</keyword>
|
||||
|
@ -152,12 +164,15 @@
|
|||
<keyword>\-gt\b</keyword>
|
||||
<keyword>\-ge\b</keyword>
|
||||
</context>
|
||||
|
||||
<context id="variable1" style-ref="variable1">
|
||||
<match>\$+[@?*#\${a-zA-Z0-9_][}a-zA-Z0-9_]*</match>
|
||||
</context>
|
||||
|
||||
<context id="variable2" style-ref="variable2">
|
||||
<match>[a-zA-Z_][a-zA-Z0-9_]*\=</match>
|
||||
</context>
|
||||
|
||||
<context id="built-in-command-1" style-ref="keyword">
|
||||
<prefix></prefix>
|
||||
<suffix></suffix>
|
||||
|
@ -167,6 +182,7 @@
|
|||
<keyword>\:</keyword>
|
||||
<keyword>(?<=\s)\.(?=\s)</keyword>
|
||||
</context>
|
||||
|
||||
<context id="built-in-command-2" style-ref="keyword">
|
||||
<keyword>do</keyword>
|
||||
<keyword>done</keyword>
|
||||
|
@ -236,12 +252,14 @@
|
|||
<keyword>unset</keyword>
|
||||
<keyword>wait</keyword>
|
||||
</context>
|
||||
|
||||
<context id="built-in-command">
|
||||
<include>
|
||||
<context ref="built-in-command-1"/>
|
||||
<context ref="built-in-command-2"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="common-command" style-ref="common-command">
|
||||
<prefix>(?<![\w\-\.])</prefix>
|
||||
<suffix>(?![\w\-\.])</suffix>
|
||||
|
@ -319,6 +337,7 @@
|
|||
<keyword>xdialog</keyword>
|
||||
<keyword>zenity</keyword>
|
||||
</context>
|
||||
|
||||
<context id="case">
|
||||
<start>\bcase\b</start>
|
||||
<end>\besac\b</end>
|
||||
|
@ -331,15 +350,16 @@
|
|||
<context ref="sh"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="sh">
|
||||
<include>
|
||||
<context ref="def:shebang"/>
|
||||
<context ref="def:shebang" style-ref="shebang"/>
|
||||
<context ref="line-comment"/>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="string"/>
|
||||
<context ref="string-2"/>
|
||||
<context ref="subshell"/>
|
||||
<context ref="backtick-string"/>
|
||||
<context ref="line-comment"/>
|
||||
<context ref="case"/>
|
||||
<context ref="punctuator"/>
|
||||
<context ref="function"/>
|
||||
|
@ -352,5 +372,6 @@
|
|||
<context ref="common-command"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
</definitions>
|
||||
</language>
|
||||
|
|
|
@ -1,167 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
<!--
|
||||
|
||||
Author: Konstantin Ryabitsev <icon@fedoraproject.org>
|
||||
Copyright (C) 2007 Konstantin Ryabitsev <icon@fedoraproject.org>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
|
||||
-->
|
||||
<language _name="RPM spec" version="1.0" _section="Others" mimetypes="text/x-rpm-spec">
|
||||
|
||||
<escape-char>\</escape-char>
|
||||
|
||||
<line-comment _name="Line Comment" style="Comment">
|
||||
<start-regex>#</start-regex>
|
||||
</line-comment>
|
||||
|
||||
<string _name="Define" style="Preprocessor" end-at-line-end="TRUE">
|
||||
<start-regex>%define</start-regex>
|
||||
<end-regex>$</end-regex>
|
||||
</string>
|
||||
|
||||
<string _name="Conditional Define" style="Preprocessor" end-at-line-end="TRUE">
|
||||
<start-regex>%\{\!\?.*%define</start-regex>
|
||||
<end-regex>\}$</end-regex>
|
||||
</string>
|
||||
|
||||
<keyword-list _name="Header" style="Keyword"
|
||||
case-sensitive="TRUE"
|
||||
match-empty-string-at-beginning="FALSE"
|
||||
match-empty-string-at-end="FALSE"
|
||||
beginning-regex="^" end-regex=":">
|
||||
<keyword>Name</keyword>
|
||||
<keyword>Version</keyword>
|
||||
<keyword>Release</keyword>
|
||||
<keyword>Epoch</keyword>
|
||||
<keyword>Summary</keyword>
|
||||
<keyword>Group</keyword>
|
||||
<keyword>License</keyword>
|
||||
<keyword>Packager</keyword>
|
||||
<keyword>Vendor</keyword>
|
||||
<keyword>Icon</keyword>
|
||||
<keyword>URL</keyword>
|
||||
<keyword>Patch[0-9]*</keyword>
|
||||
<keyword>Source[0-9]*</keyword>
|
||||
<keyword>Requires\(?[a-z]*\)?</keyword>
|
||||
<keyword>[A-Za-z]+Req</keyword>
|
||||
<keyword>Obsoletes</keyword>
|
||||
<keyword>Provides</keyword>
|
||||
<keyword>Conflicts</keyword>
|
||||
<keyword>Build[A-Za-z]+</keyword>
|
||||
<keyword>[A-Za-z]+Arch</keyword>
|
||||
<keyword>Auto[A-Za-z]+</keyword>
|
||||
</keyword-list>
|
||||
|
||||
<keyword-list _name="Section" style="Others"
|
||||
case-sensitive="TRUE"
|
||||
match-empty-string-at-beginning="FALSE"
|
||||
beginning-regex="^%">
|
||||
<keyword>description</keyword>
|
||||
<keyword>package</keyword>
|
||||
<keyword>prep</keyword>
|
||||
<keyword>build</keyword>
|
||||
<keyword>install</keyword>
|
||||
<keyword>clean</keyword>
|
||||
<keyword>check</keyword>
|
||||
<keyword>pre[a-z]*</keyword>
|
||||
<keyword>post[a-z]*</keyword>
|
||||
<keyword>trigger[a-z]*</keyword>
|
||||
<keyword>files</keyword>
|
||||
<keyword>changelog</keyword>
|
||||
</keyword-list>
|
||||
|
||||
<keyword-list _name="Spec Macro" style="Keyword"
|
||||
match-empty-string-at-beginning="FALSE"
|
||||
match-empty-string-at-end="FALSE"
|
||||
beginning-regex="%">
|
||||
<keyword>defattr</keyword>
|
||||
<keyword>doc</keyword>
|
||||
<keyword>setup</keyword>
|
||||
<keyword>config</keyword>
|
||||
<keyword>configure</keyword>
|
||||
<keyword>make</keyword>
|
||||
<keyword>makeinstall</keyword>
|
||||
<keyword>dir</keyword>
|
||||
<keyword>ghost</keyword>
|
||||
<keyword>patch[0-9]+</keyword>
|
||||
<keyword>find_lang</keyword>
|
||||
<keyword>exclude</keyword>
|
||||
</keyword-list>
|
||||
|
||||
<pattern-item _name="Directory Macro" style="Others 2">
|
||||
<regex>%\{?_([a-z_]+dir|[a-z_]+path|prefix)\}?</regex>
|
||||
</pattern-item>
|
||||
|
||||
<pattern-item _name="Command Macro" style="Others 3">
|
||||
<regex>%\{?__[a-z_]+\}?</regex>
|
||||
</pattern-item>
|
||||
|
||||
<pattern-item _name="Conditional Macro" style="Preprocessor">
|
||||
<regex>%\{\?[A-Za-z0-9_]+\}</regex>
|
||||
</pattern-item>
|
||||
|
||||
<string _name="Other Macro" style="String">
|
||||
<start-regex>%\{[a-zA-Z][a-zA-Z0-9_]+</start-regex>
|
||||
<end-regex>\}</end-regex>
|
||||
</string>
|
||||
|
||||
<pattern-item _name="Switch" style="String">
|
||||
<regex>[ \t]+-?-[A-Za-z0-9_-]+</regex>
|
||||
</pattern-item>
|
||||
|
||||
<pattern-item _name="RPM Variable" style="Preprocessor">
|
||||
<regex>\$\{?RPM_[A-Z0-9_]+\}?</regex>
|
||||
</pattern-item>
|
||||
|
||||
<keyword-list _name="Flow Conditional" style="Preprocessor"
|
||||
match-empty-string-at-beginning="FALSE"
|
||||
match-empty-string-at-end="FALSE"
|
||||
beginning-regex="%">
|
||||
<keyword>if</keyword>
|
||||
<keyword>elif</keyword>
|
||||
<keyword>endif</keyword>
|
||||
</keyword-list>
|
||||
|
||||
<keyword-list _name="Date" style="String" case-sensitive="FALSE">
|
||||
<keyword>[0-9]{1,2} +[0-9]{4}</keyword>
|
||||
<keyword>jan</keyword>
|
||||
<keyword>feb</keyword>
|
||||
<keyword>mar</keyword>
|
||||
<keyword>apr</keyword>
|
||||
<keyword>may</keyword>
|
||||
<keyword>jun</keyword>
|
||||
<keyword>jul</keyword>
|
||||
<keyword>aug</keyword>
|
||||
<keyword>sep</keyword>
|
||||
<keyword>oct</keyword>
|
||||
<keyword>nov</keyword>
|
||||
<keyword>dec</keyword>
|
||||
<keyword>mon</keyword>
|
||||
<keyword>tue</keyword>
|
||||
<keyword>wed</keyword>
|
||||
<keyword>thu</keyword>
|
||||
<keyword>fri</keyword>
|
||||
<keyword>sat</keyword>
|
||||
<keyword>sun</keyword>
|
||||
</keyword-list>
|
||||
|
||||
<pattern-item _name="Email" style="Comment">
|
||||
<regex><[A-Za-z0-9._:+-]+@[A-Za-z0-9._:+-]+\.[A-Za-z0-9]{2,4}></regex>
|
||||
</pattern-item>
|
||||
|
||||
</language>
|
|
@ -34,12 +34,15 @@
|
|||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="function" _name="Function" map-to="def:function"/>
|
||||
<style id="decimal" _name="Decimal" map-to="def:decimal"/>
|
||||
<style id="data-type" _name="Data Type" map-to="def:data-type"/>
|
||||
<style id="type" _name="Data Type" map-to="def:type"/>
|
||||
<style id="some-thing" _name="No idea what it is" map-to="def:preprocessor"/>
|
||||
</styles>
|
||||
|
||||
<default-regex-options case-sensitive="false"/>
|
||||
|
||||
<definitions>
|
||||
<context id="oracle-built-in-datatypes" style-ref="data-type">
|
||||
|
||||
<context id="oracle-built-in-datatypes" style-ref="type">
|
||||
<keyword>N?VARCHAR2</keyword>
|
||||
<keyword>NUMBER</keyword>
|
||||
<keyword>LONG</keyword>
|
||||
|
@ -54,7 +57,8 @@
|
|||
<keyword>BFILE</keyword>
|
||||
<keyword>BINARY_(FLOAT|DOUBLE)</keyword>
|
||||
</context>
|
||||
<context id="ansi-datatypes" style-ref="data-type">
|
||||
|
||||
<context id="ansi-datatypes" style-ref="type">
|
||||
<!-- FIXME no \n in patterns! -->
|
||||
<keyword>(NATIONAL[ \t\n]+)?CHAR(ACTER)?([ \t\n]+VARYING)?</keyword>
|
||||
<!-- FIXME no \n in patterns! -->
|
||||
|
@ -64,7 +68,8 @@
|
|||
<!-- FIXME no \n in patterns! -->
|
||||
<keyword>FLOAT|DOUBLE[ \t\n]+PRECISION|REAL</keyword>
|
||||
</context>
|
||||
<context id="sql-ds-and-db2-datatypes" style-ref="data-type">
|
||||
|
||||
<context id="sql-ds-and-db2-datatypes" style-ref="type">
|
||||
<keyword>CHARACTER</keyword>
|
||||
<!-- FIXME no \n in patterns! -->
|
||||
<keyword>(LONG[ \t\n]+)?VARCHAR</keyword>
|
||||
|
@ -72,7 +77,8 @@
|
|||
<keyword>INTEGER|SMALLINT</keyword>
|
||||
<keyword>FLOAT</keyword>
|
||||
</context>
|
||||
<context id="oracle-supplied-types" style-ref="data-type">
|
||||
|
||||
<context id="oracle-supplied-types" style-ref="type">
|
||||
<keyword>SYS\.ANY(TYPE|DATA(SET)?)</keyword>
|
||||
<keyword>XMLType</keyword>
|
||||
<keyword>(HTTP|XDB|DB)?URIType</keyword>
|
||||
|
@ -80,6 +86,7 @@
|
|||
<keyword>ORDSYS\.ORD(Audio|Doc|Image(Signature)?|Video)</keyword>
|
||||
<keyword>SI_(StillImage|(Average|Positional)?Color|ColorHistogram|Texture|FeatureList)</keyword>
|
||||
</context>
|
||||
|
||||
<context id="text-literals" style-ref="string">
|
||||
<start>([Nn]?[Qq]?|[Uu]?)'</start>
|
||||
<end>'</end>
|
||||
|
@ -88,36 +95,42 @@
|
|||
<context ref="def:line-continue"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="integer-literals" style-ref="decimal">
|
||||
<match>\b[0-9]+\b</match>
|
||||
</context>
|
||||
|
||||
<context id="number-literals" style-ref="floating-point">
|
||||
<match>(\b[0-9]+(\.[0-9]+)?|\.[0-9]+)([Ee][\+-]?[0-9]+)?\b</match>
|
||||
</context>
|
||||
|
||||
<context id="size-clause" style-ref="decimal">
|
||||
<match>\b[0-9]+[ \t]*([Kk]|[Mm]|[Gg]|[Tt])\b</match>
|
||||
</context>
|
||||
|
||||
<context id="unlimited" style-ref="decimal">
|
||||
<keyword>UNLIMITED</keyword>
|
||||
</context>
|
||||
|
||||
<context id="null" style-ref="decimal">
|
||||
<keyword>NULL</keyword>
|
||||
</context>
|
||||
|
||||
<context id="block-comment" style-ref="comment">
|
||||
<start>/\*</start>
|
||||
<end>\*/</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
<context ref="def:in-line-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="line-comment" style-ref="comment" end-at-line-end="true">
|
||||
<start>--</start>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
<context ref="def:in-line-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="numeric-functions" style-ref="function">
|
||||
<keyword>ABS</keyword>
|
||||
<keyword>A(COS|SIN|TAN2?)</keyword>
|
||||
|
@ -138,6 +151,7 @@
|
|||
<keyword>TRUNC</keyword>
|
||||
<keyword>WIDTH_BUCKET</keyword>
|
||||
</context>
|
||||
|
||||
<context id="character-functions-returning-character-values" style-ref="function">
|
||||
<keyword>N?CHR</keyword>
|
||||
<keyword>CONCAT</keyword>
|
||||
|
@ -152,16 +166,19 @@
|
|||
<keyword>TRANSLATE</keyword>
|
||||
<keyword>TREAT</keyword>
|
||||
</context>
|
||||
|
||||
<context id="nls-character-functions" style-ref="function">
|
||||
<keyword>NLS_CHARSET_DECL_LEN</keyword>
|
||||
<keyword>NLS_CHARSET_(ID|NAME)</keyword>
|
||||
</context>
|
||||
|
||||
<context id="character-functions-returning-number-values" style-ref="function">
|
||||
<keyword>ASCII</keyword>
|
||||
<keyword>INSTR</keyword>
|
||||
<keyword>LENGTH</keyword>
|
||||
<keyword>REGEXP_INSTR</keyword>
|
||||
</context>
|
||||
|
||||
<context id="datetime-functions" style-ref="function">
|
||||
<keyword>ADD_MONTHS</keyword>
|
||||
<keyword>CURRENT_(DATE|TIMESTAMP)</keyword>
|
||||
|
@ -183,10 +200,12 @@
|
|||
<keyword>TRUNC</keyword>
|
||||
<keyword>TZ_OFFSET</keyword>
|
||||
</context>
|
||||
|
||||
<context id="general-comparison-functions" style-ref="function">
|
||||
<keyword>GREATEST</keyword>
|
||||
<keyword>LEAST</keyword>
|
||||
</context>
|
||||
|
||||
<context id="conversion-functions" style-ref="function">
|
||||
<keyword>ASCIISTR</keyword>
|
||||
<keyword>BIN_TO_NUM</keyword>
|
||||
|
@ -210,24 +229,29 @@
|
|||
<keyword>TRANSLATE</keyword>
|
||||
<keyword>UNISTR</keyword>
|
||||
</context>
|
||||
|
||||
<context id="large-object-functions" style-ref="function">
|
||||
<keyword>BFILENAME</keyword>
|
||||
<keyword>EMPTY_(B|C)LOB</keyword>
|
||||
</context>
|
||||
|
||||
<context id="collection-functions" style-ref="function">
|
||||
<keyword>CARDINALITY</keyword>
|
||||
<keyword>COLLECT</keyword>
|
||||
<keyword>POWERMULTISET(_BY_CARDINALITY)?</keyword>
|
||||
</context>
|
||||
|
||||
<context id="hierarchical-function" style-ref="function">
|
||||
<keyword>SYS_CONNECT_BY_PATH</keyword>
|
||||
</context>
|
||||
|
||||
<context id="data-mining-functions" style-ref="function">
|
||||
<keyword>CLUSTER_(ID|PROBABILITY|SET)</keyword>
|
||||
<keyword>FEATURE_(ID|SET|VALUE)</keyword>
|
||||
<keyword>PREDICTION</keyword>
|
||||
<keyword>PREDICTION_(COST|DETAILS|PROBABILITY|SET)</keyword>
|
||||
</context>
|
||||
|
||||
<context id="xml-functions" style-ref="function">
|
||||
<keyword>(APPEND|INSERT)CHILDXML</keyword>
|
||||
<keyword>(DELETE|UPDATE)XML</keyword>
|
||||
|
@ -240,18 +264,21 @@
|
|||
<keyword>SYS_XML(AGG|GEN)</keyword>
|
||||
<keyword>XML(AGG|CDATA|COLATTVAL|COMMENT|CONCAT|ELEMENT|FOREST|PARSE|PI|QUERY|ROOT|SEQUENCE|SERIALIZE|TABLE|TRANSFORM)</keyword>
|
||||
</context>
|
||||
|
||||
<context id="encoding-and-decoding-functions" style-ref="function">
|
||||
<keyword>DECODE</keyword>
|
||||
<keyword>DUMP</keyword>
|
||||
<keyword>ORA_HASH</keyword>
|
||||
<keyword>VSIZE</keyword>
|
||||
</context>
|
||||
|
||||
<context id="null-related-functions" style-ref="function">
|
||||
<keyword>COALESCE</keyword>
|
||||
<keyword>LNNVL</keyword>
|
||||
<keyword>NULLIF</keyword>
|
||||
<keyword>NVL2?</keyword>
|
||||
</context>
|
||||
|
||||
<context id="environment-and-identifier-functions" style-ref="function">
|
||||
<keyword>SYS_CONTEXT</keyword>
|
||||
<keyword>SYS_GUID</keyword>
|
||||
|
@ -260,6 +287,7 @@
|
|||
<keyword>USER</keyword>
|
||||
<keyword>USERENV</keyword>
|
||||
</context>
|
||||
|
||||
<context id="aggregate-functions" style-ref="function">
|
||||
<keyword>AVG</keyword>
|
||||
<keyword>CORR(_(S|K))?</keyword>
|
||||
|
@ -280,6 +308,7 @@
|
|||
<keyword>(STDDEV|VAR)_(POP|SAMP)</keyword>
|
||||
<keyword>SUM</keyword>
|
||||
</context>
|
||||
|
||||
<context id="analytic-functions" style-ref="function">
|
||||
<keyword>AVG</keyword>
|
||||
<keyword>CORR</keyword>
|
||||
|
@ -301,6 +330,7 @@
|
|||
<keyword>(STDDEV|VAR)_(POP|SAMP)</keyword>
|
||||
<keyword>SUM</keyword>
|
||||
</context>
|
||||
|
||||
<context id="object-reference-functions" style-ref="function">
|
||||
<keyword>DEREF</keyword>
|
||||
<keyword>MAKE_REF</keyword>
|
||||
|
@ -308,12 +338,14 @@
|
|||
<keyword>REFTOHEX</keyword>
|
||||
<keyword>VALUE</keyword>
|
||||
</context>
|
||||
|
||||
<context id="model-functions" style-ref="function">
|
||||
<keyword>CV</keyword>
|
||||
<keyword>ITERATION_NUMBER</keyword>
|
||||
<keyword>PRESENT(NN)?V</keyword>
|
||||
<keyword>PREVIOUS</keyword>
|
||||
</context>
|
||||
|
||||
<context id="ansi-reserved-words" style-ref="keyword">
|
||||
<keyword>ADD</keyword>
|
||||
<keyword>ALL</keyword>
|
||||
|
@ -324,8 +356,10 @@
|
|||
<keyword>ASC</keyword>
|
||||
<keyword>BETWEEN</keyword>
|
||||
<keyword>BY</keyword>
|
||||
<keyword>CASE</keyword>
|
||||
<keyword>CHECK</keyword>
|
||||
<keyword>CREATE</keyword>
|
||||
<keyword>CROSS</keyword>
|
||||
<keyword>CURRENT</keyword>
|
||||
<keyword>DECIMAL</keyword>
|
||||
<keyword>DEFAULT</keyword>
|
||||
|
@ -333,31 +367,39 @@
|
|||
<keyword>DISTINCT</keyword>
|
||||
<keyword>DROP</keyword>
|
||||
<keyword>ELSE</keyword>
|
||||
<keyword>END</keyword>
|
||||
<keyword>FLOAT</keyword>
|
||||
<keyword>FOR</keyword>
|
||||
<keyword>FROM</keyword>
|
||||
<keyword>FULL</keyword>
|
||||
<keyword>GRANT</keyword>
|
||||
<keyword>GROUP</keyword>
|
||||
<keyword>HAVING</keyword>
|
||||
<keyword>IMMEDIATE</keyword>
|
||||
<keyword>IN</keyword>
|
||||
<keyword>INNER</keyword>
|
||||
<keyword>INSERT</keyword>
|
||||
<keyword>INTEGER</keyword>
|
||||
<keyword>INTERSECT</keyword>
|
||||
<keyword>INTO</keyword>
|
||||
<keyword>IN</keyword>
|
||||
<keyword>IS</keyword>
|
||||
<keyword>JOIN</keyword>
|
||||
<keyword>LEFT</keyword>
|
||||
<keyword>LEVEL</keyword>
|
||||
<keyword>LIKE</keyword>
|
||||
<keyword>NATURAL</keyword>
|
||||
<keyword>NOT</keyword>
|
||||
<keyword>OF</keyword>
|
||||
<keyword>ON</keyword>
|
||||
<keyword>OPTION</keyword>
|
||||
<keyword>OR</keyword>
|
||||
<keyword>ORDER</keyword>
|
||||
<keyword>OR</keyword>
|
||||
<keyword>OUTER</keyword>
|
||||
<keyword>PRIOR</keyword>
|
||||
<keyword>PRIVILEGES</keyword>
|
||||
<keyword>PUBLIC</keyword>
|
||||
<keyword>REVOKE</keyword>
|
||||
<keyword>RIGHT</keyword>
|
||||
<keyword>ROWS</keyword>
|
||||
<keyword>SELECT</keyword>
|
||||
<keyword>SESSION</keyword>
|
||||
|
@ -370,19 +412,25 @@
|
|||
<keyword>UNION</keyword>
|
||||
<keyword>UNIQUE</keyword>
|
||||
<keyword>UPDATE</keyword>
|
||||
<keyword>USING</keyword>
|
||||
<keyword>VALUES</keyword>
|
||||
<keyword>VIEW</keyword>
|
||||
<keyword>WHEN</keyword>
|
||||
<keyword>WITH</keyword>
|
||||
</context>
|
||||
|
||||
<context id="oracle-reserved-words" style-ref="keyword">
|
||||
<keyword>ACCESS</keyword>
|
||||
<keyword>AUDIT</keyword>
|
||||
<keyword>CLUSTER</keyword>
|
||||
<keyword>COMMENT</keyword>
|
||||
<keyword>COMPRESS</keyword>
|
||||
<keyword>CONNECT[ \t]+BY</keyword>
|
||||
<keyword>CUBE</keyword>
|
||||
<keyword>EXCLUSIVE</keyword>
|
||||
<keyword>EXISTS</keyword>
|
||||
<keyword>FILE</keyword>
|
||||
<keyword>GROUPING[ \t]+SETS</keyword>
|
||||
<keyword>IDENTIFIED</keyword>
|
||||
<keyword>INCREMENT</keyword>
|
||||
<keyword>INDEX</keyword>
|
||||
|
@ -395,21 +443,26 @@
|
|||
<keyword>MODIFY</keyword>
|
||||
<keyword>NOAUDIT</keyword>
|
||||
<keyword>NOCOMPRESS</keyword>
|
||||
<keyword>NOCYCLE</keyword>
|
||||
<keyword>NOWAIT</keyword>
|
||||
<keyword>OFFLINE</keyword>
|
||||
<keyword>ONLINE</keyword>
|
||||
<keyword>PCTFREE</keyword>
|
||||
<keyword>RENAME</keyword>
|
||||
<keyword>RESOURCE</keyword>
|
||||
<keyword>ROLLUP</keyword>
|
||||
<keyword>ROW</keyword>
|
||||
<keyword>ROWNUM</keyword>
|
||||
<keyword>SHARE</keyword>
|
||||
<keyword>SIBLINGS</keyword>
|
||||
<keyword>START[ \t]+WITH</keyword>
|
||||
<keyword>SUCCESSFUL</keyword>
|
||||
<keyword>SYNONYM</keyword>
|
||||
<keyword>TRIGGER</keyword>
|
||||
<keyword>VALIDATE</keyword>
|
||||
<keyword>WHERE</keyword>
|
||||
</context>
|
||||
|
||||
<context id="sql-statements" style-ref="keyword">
|
||||
<prefix>^[ \t]*</prefix>
|
||||
<keyword>ALTER[ \t]+(CLUSTER|DATABASE|DIMENSION|DISKGROUP|FUNCTION|INDEX(TYPE)?|JAVA|MATERIALIZED[ \t]+VIEW([ \t]+LOG)?|OPERATOR|OUTLINE|PACKAGE|PROCEDURE|PROFILE|RESOURCE[ \t]+COST|ROLE|ROLLBACK[ \t]+SEGMENT|SEQUENCE|SESSION|SYSTEM|TABLE(SPACE)?|TRIGGER|TYPE|USER|VIEW)</keyword>
|
||||
|
@ -431,10 +484,12 @@
|
|||
<keyword>SET[ \t]+TRANSACTION</keyword>
|
||||
<keyword>TRUNCATE</keyword>
|
||||
</context>
|
||||
|
||||
<context id="operators" style-ref="keyword">
|
||||
<keyword>CONNECT_BY_ROOT</keyword>
|
||||
<keyword>MULTISET[ \t]+(EXCEPT|INTERSECT|UNION)</keyword>
|
||||
</context>
|
||||
|
||||
<context id="conditions" style-ref="keyword">
|
||||
<keyword>SOME</keyword>
|
||||
<keyword>IS[ \t]+(NOT[ \t]+)?(NAN|INFINITE)</keyword>
|
||||
|
@ -450,15 +505,19 @@
|
|||
<keyword>REGEXP_LIKE</keyword>
|
||||
<keyword>(NOT[ \t]+)?SUBMULTISET([ \t]+OF)?</keyword>
|
||||
</context>
|
||||
|
||||
<context id="sql-plus-at-sign" style-ref="some-thing">
|
||||
<match>^[ \t]*@</match>
|
||||
</context>
|
||||
|
||||
<context id="sql-plus-double-at-sign" style-ref="some-thing">
|
||||
<match>^[ \t]*@@</match>
|
||||
</context>
|
||||
|
||||
<context id="sql-plus-slash" style-ref="some-thing">
|
||||
<match>^[ \t]*/</match>
|
||||
</context>
|
||||
|
||||
<context id="sql-plus-commands" style-ref="some-thing">
|
||||
<prefix>^[ \t]*</prefix>
|
||||
<keyword>ACC(EPT)?</keyword>
|
||||
|
@ -508,6 +567,7 @@
|
|||
<keyword>VAR(IABLE)?</keyword>
|
||||
<keyword>WHENEVER[ \t]+(OS|SQL)ERROR</keyword>
|
||||
</context>
|
||||
|
||||
<context id="sql">
|
||||
<include>
|
||||
<context ref="oracle-built-in-datatypes"/>
|
||||
|
@ -552,5 +612,6 @@
|
|||
<context ref="sql-plus-commands"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
</definitions>
|
||||
</language>
|
||||
|
|
|
@ -44,9 +44,11 @@
|
|||
</attribute>
|
||||
|
||||
<optional>
|
||||
<element name="author">
|
||||
<text/>
|
||||
</element>
|
||||
<oneOrMore>
|
||||
<element name="author">
|
||||
<text/>
|
||||
</element>
|
||||
</oneOrMore>
|
||||
</optional>
|
||||
|
||||
<optional>
|
||||
|
@ -108,6 +110,9 @@
|
|||
<optional>
|
||||
<attribute name="background"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="line-background"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="bold">
|
||||
<ref name="boolean-value"/>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<author>Michael Monreal</author>
|
||||
<_description>Color scheme using Tango color palette</_description>
|
||||
|
||||
<!-- Tango colors -->
|
||||
<!-- Tango Palette -->
|
||||
<color name="butter1" value="#fce94f"/>
|
||||
<color name="butter2" value="#edd400"/>
|
||||
<color name="butter3" value="#c4a000"/>
|
||||
|
@ -58,41 +58,50 @@
|
|||
<style name="Others 2" foreground="chameleon3"/>
|
||||
<style name="Others 3" foreground="plum3"/>
|
||||
|
||||
<!-- global defines -->
|
||||
<!-- Bracket Matching -->
|
||||
<style name="bracket-match" foreground="aluminium1" background="aluminium3" bold="true"/>
|
||||
<style name="bracket-mismatch" foreground="aluminium1" background="scarletred3" bold="true"/>
|
||||
|
||||
<style name="def:base-n-integer" foreground="plum1"/>
|
||||
<style name="def:decimal" foreground="plum1"/>
|
||||
<style name="def:character" foreground="plum1"/>
|
||||
<style name="def:floating-point" foreground="plum1"/>
|
||||
<style name="def:string" foreground="plum1"/>
|
||||
<!-- Right Margin -->
|
||||
<style name="right-margin" foreground="aluminium5" background="aluminium4"/>
|
||||
|
||||
<!-- Search Matching -->
|
||||
<style name="search-match" background="butter1"/>
|
||||
|
||||
<style name="def:data-type" foreground="chameleon3" bold="true"/>
|
||||
<style name="def:function" foreground="chameleon3"/>
|
||||
<style name="def:keyword" foreground="scarletred3" bold="true"/>
|
||||
|
||||
<style name="def:comment" foreground="skyblue2"/>
|
||||
<style name="def:net-address-in-comment" foreground="skyblue2" italic="true" underline="true"/>
|
||||
<style name="def:note" foreground="skyblue2" background="butter1" bold="true"/>
|
||||
<style name="def:shebang" foreground="skyblue2" bold="true"/>
|
||||
<!-- Comments -->
|
||||
<style name="def:comment" foreground="skyblue3"/>
|
||||
<style name="def:shebang" foreground="skyblue3" bold="true"/>
|
||||
<style name="def:doc-comment-element" italic="true"/>
|
||||
|
||||
<style name="def:error" background="scarletred1" bold="true"/>
|
||||
<style name="def:escape" foreground="orange2"/>
|
||||
<!-- Constants -->
|
||||
<style name="def:constant" foreground="plum1"/>
|
||||
<style name="def:special-char" foreground="plum3"/>
|
||||
|
||||
<style name="def:preprocessor" foreground="chocolate2"/>
|
||||
<!-- Identifiers -->
|
||||
<style name="def:identifier" foreground="skyblue1"/>
|
||||
|
||||
<!-- Statements -->
|
||||
<style name="def:statement" foreground="scarletred3" bold="true"/>
|
||||
|
||||
<!-- Types -->
|
||||
<style name="def:type" foreground="chameleon3" bold="true"/>
|
||||
|
||||
<!-- Others -->
|
||||
<style name="def:preprocessor" foreground="chocolate3"/>
|
||||
<style name="def:error" background="scarletred2" bold="true"/>
|
||||
<style name="def:note" background="orange1" bold="true"/>
|
||||
<style name="def:underlined" italic="true" underline="true"/>
|
||||
|
||||
<!-- Language specific -->
|
||||
<style name="changelog:email" use-style="def:net-address-in-comment"/>
|
||||
|
||||
<style name="diff:added-line" foreground="chameleon3"/>
|
||||
<style name="diff:removed-line" foreground="plum3"/>
|
||||
<style name="diff:changed-line" use-style="def:preprocessor"/>
|
||||
<style name="diff:diff-file" use-style="def:data-type"/>
|
||||
<style name="diff:location" use-style="def:keyword"/>
|
||||
<style name="diff:diff-file" use-style="def:type"/>
|
||||
<style name="diff:location" use-style="def:statement"/>
|
||||
<style name="diff:special-case" use-style="def:constant"/>
|
||||
|
||||
<style name="diff:special-case" use-style="def:string"/>
|
||||
<style name="xml:tags" foreground="chameleon3"/>
|
||||
<style name="xml:namespace" bold="true"/>
|
||||
|
||||
<style name="js:object" foreground="chameleon3" bold="true"/>
|
||||
<style name="js:constructors" foreground="chameleon3"/>
|
||||
|
@ -101,15 +110,7 @@
|
|||
<style name="latex:command" foreground="chameleon3" bold="true"/>
|
||||
<style name="latex:include" use-style="def:preprocessor"/>
|
||||
|
||||
<style name="python:builtins" foreground="chameleon3" bold="true"/>
|
||||
|
||||
<style name="sh:variable1" foreground="plum3"/>
|
||||
<style name="sh:variable2" foreground="chameleon3"/>
|
||||
|
||||
<style name="xml:attribute-name" foreground="plum3"/>
|
||||
<style name="xml:tags" foreground="chameleon3"/>
|
||||
<style name="xml:namespace" foreground="chameleon3" bold="true"/>
|
||||
<style name="xml:doctype" use-style="def:preprocessor"/>
|
||||
<style name="xml:cdata-delim" use-style="def:preprocessor"/>
|
||||
<style name="xml:processing-instruction" use-style="def:preprocessor"/>
|
||||
</style-scheme>
|
||||
|
|
|
@ -28,13 +28,13 @@
|
|||
</metadata>
|
||||
|
||||
<styles>
|
||||
<style id="data-type" _name="Data Type" map-to="def:data-type"/>
|
||||
<style id="variable" _name="Variable" map-to="def:type"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
||||
<context id="variable" style-ref="data-type">
|
||||
<context id="variable" style-ref="variable">
|
||||
<match>[$@%][$]?[a-zA-Z_][a-zA-Z0-9_]*</match>
|
||||
</context>
|
||||
|
||||
|
|
|
@ -16,18 +16,27 @@ mkdir -p $dir/
|
|||
|
||||
cat > $dir/file.cc <<EOFEOF
|
||||
#include <iostream>
|
||||
int main ()
|
||||
{
|
||||
std::cout << "Hi there!" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
class A : B {
|
||||
public:
|
||||
A();
|
||||
private:
|
||||
foobar() const;
|
||||
};
|
||||
EOFEOF
|
||||
|
||||
cat > $dir/file.c <<EOFEOF
|
||||
// Comment
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
int main (void)
|
||||
{
|
||||
printf ("Hi there!\n");
|
||||
int a = 0x89;
|
||||
int b = 089;
|
||||
int c = 89.;
|
||||
int d = 'a';
|
||||
printf ("Hello %s!\n", "world");
|
||||
return 0;
|
||||
}
|
||||
EOFEOF
|
||||
|
@ -71,6 +80,8 @@ class Boo {
|
|||
EOFEOF
|
||||
|
||||
cat > $dir/ChangeLog <<EOFEOF
|
||||
= Release =
|
||||
|
||||
2006-12-10 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_focus_out_event):
|
||||
|
@ -90,21 +101,19 @@ EOFEOF
|
|||
|
||||
cat > $dir/file.html <<EOFEOF
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
|
||||
<!-- Comment -->
|
||||
<html>
|
||||
<head>
|
||||
<title>Hi there!</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
<style type="text/css"><!--
|
||||
<style type="text/css">
|
||||
a.summary-letter {text-decoration: none}
|
||||
pre.display {font-family: serif}
|
||||
pre.format {font-family: serif}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
pre.smalldisplay {font-family: serif; font-size: smaller}
|
||||
ul.toc {list-style: none}
|
||||
--></style>
|
||||
</style>
|
||||
</head>
|
||||
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
|
||||
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF"
|
||||
vlink="#800080" alink="#FF0000">
|
||||
Hi there!
|
||||
</body>
|
||||
</html>
|
||||
|
@ -120,6 +129,7 @@ EOFEOF
|
|||
cat > $dir/file.m4 <<EOFEOF
|
||||
dnl an m4 file
|
||||
AC_DEFINE([foo],[echo "Hi there!"])
|
||||
AC_CHECK_FUNC([foo],[yes=yes],[yes=no])
|
||||
foo()
|
||||
EOFEOF
|
||||
|
||||
|
@ -135,22 +145,15 @@ bar:
|
|||
echo "Hello world!"
|
||||
EOFEOF
|
||||
|
||||
cat > $dir/file.ms <<EOFEOF
|
||||
# -*- mooscript -*-
|
||||
a = 1;
|
||||
for i in [1, 2, 3] do
|
||||
a *= i;
|
||||
a += 18;
|
||||
od;
|
||||
EOFEOF
|
||||
|
||||
cat > $dir/file.py <<EOFEOF
|
||||
import sys
|
||||
from sys import *
|
||||
class Hello(object):
|
||||
def __init__(self):
|
||||
object.__init__(self)
|
||||
def hello(self):
|
||||
print >> sys.stderr, "Hi there!"
|
||||
None, True, False
|
||||
Hello().hello()
|
||||
EOFEOF
|
||||
|
||||
|
@ -530,22 +533,126 @@ relink_command="(cd /home/muntyan/projects/gtk/build/moo/moo; /bin/sh ../libtool
|
|||
EOFEOF
|
||||
|
||||
cat > $dir/file.pc <<EOFEOF
|
||||
prefix=/usr/local/gtk
|
||||
# A comment
|
||||
prefix=/usr
|
||||
exec_prefix=${prefix}
|
||||
includedir=${prefix}/include
|
||||
datarootdir=${prefix}/share
|
||||
datadir=${datarootdir}
|
||||
libdir=${exec_prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
langfilesdir=${datarootdir}/moo/language-specs
|
||||
pluginsdir=${exec_prefix}/lib/moo/plugins
|
||||
moolibdir=${exec_prefix}/lib/moo
|
||||
moodatadir=${datarootdir}/moo
|
||||
Name: cairo
|
||||
Description: Multi-platform 2D graphics library
|
||||
Version: 1.4.10
|
||||
|
||||
Name: moo
|
||||
Description: A text editor and terminal emulator library
|
||||
Requires: gtk+-2.0 libxml-2.0
|
||||
Version:
|
||||
Cflags: -I${prefix}/include/moo
|
||||
Libs: -L${libdir} -lmoo -L/usr/lib/python2.4 -lpython2.4 -lpthread -ldl -lutil
|
||||
Requires.private: freetype2 >= 8.0.2 fontconfig libpng12 xrender >= 0.6 x11
|
||||
Libs: -L${libdir} -lcairo
|
||||
Libs.private: -lz -lm
|
||||
Cflags: -I${includedir}/cairo
|
||||
EOFEOF
|
||||
|
||||
cat > $dir/file.spec <<EOFEOF
|
||||
#
|
||||
# gtksourceview.spec
|
||||
#
|
||||
|
||||
%define api_version 1.0
|
||||
%define lib_major 0
|
||||
%define lib_name %mklibname %{name}- %{api_version} %{lib_major}
|
||||
|
||||
Summary: Source code viewing library
|
||||
Name: gtksourceview
|
||||
Version: 1.7.2
|
||||
Release: %mkrel 1
|
||||
License: GPL
|
||||
Group: Editors
|
||||
URL: http://people.ecsc.co.uk/~matt/downloads/rpms/gtksourceview/
|
||||
Source0: ftp://ftp.gnome.org/pub/GNOME/sources/%{name}/%{name}-%{version}.tar.bz2
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}
|
||||
BuildRequires: libgtk+2-devel >= 2.3.0
|
||||
BuildRequires: libgnome-vfs2-devel >= 2.2.0
|
||||
BuildRequires: libgnomeprintui-devel >= 2.7.0
|
||||
BuildRequires: perl-XML-Parser
|
||||
Conflicts: gtksourceview-sharp <= 0.5-3mdk
|
||||
|
||||
%description
|
||||
GtkSourceview is a library that adds syntax highlighting,
|
||||
line numbers, and other programming-editor features.
|
||||
GtkSourceView specializes these features for a code editor.
|
||||
|
||||
%package -n %{lib_name}
|
||||
Summary: Source code viewing library
|
||||
Group: Editors
|
||||
Requires: %{name} >= %{version}-%{release}
|
||||
Provides: lib%{name} = %{version}-%{release}
|
||||
Provides: libgtksourceview0 = %{version}-%{release}
|
||||
Obsoletes: libgtksourceview0
|
||||
Provides: libgtksourceview1.0 = %{version}-%{release}
|
||||
Obsoletes: libgtksourceview1.0
|
||||
|
||||
%description -n %{lib_name}
|
||||
GtkSourceview is a library that adds syntax highlighting,
|
||||
line numbers, and other programming-editor features.
|
||||
GtkSourceView specializes these features for a code editor.
|
||||
|
||||
%package -n %{lib_name}-devel
|
||||
Summary: Libraries and include files for GtkSourceView
|
||||
Group: Development/GNOME and GTK+
|
||||
Requires: %{lib_name} = %{version}
|
||||
Provides: %{name}-devel = %{version}-%{release}
|
||||
Provides: lib%{name}-devel = %{version}-%{release}
|
||||
Provides: lib%{name}-%{api_version}-devel = %{version}-%{release}
|
||||
Provides: libgtksourceview0-devel = %{version}-%{release}
|
||||
Obsoletes: libgtksourceview0-devel
|
||||
Provides: libgtksourceview1.0-devel = %{version}-%{release}
|
||||
Obsoletes: libgtksourceview1.0-devel
|
||||
|
||||
%description -n %{lib_name}-devel
|
||||
GtkSourceView development files
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
|
||||
%configure2_5x
|
||||
|
||||
%make
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%makeinstall_std
|
||||
|
||||
%{find_lang} %{name}-%{api_version}
|
||||
|
||||
%post -n %{lib_name} -p /sbin/ldconfig
|
||||
|
||||
%postun -n %{lib_name} -p /sbin/ldconfig
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%files -f %{name}-%{api_version}.lang
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS ChangeLog NEWS README TODO
|
||||
%{_datadir}/gtksourceview-%{api_version}
|
||||
|
||||
%files -n %{lib_name}
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/*.so.*
|
||||
|
||||
%files -n %{lib_name}-devel
|
||||
%defattr(-,root,root)
|
||||
%doc %{_datadir}/gtk-doc/html/gtksourceview
|
||||
%{_libdir}/*.so
|
||||
%attr(644,root,root) %{_libdir}/*.la
|
||||
%{_includedir}/*
|
||||
%{_libdir}/pkgconfig/*
|
||||
|
||||
%changelog
|
||||
* Tue Aug 08 2006 Götz Waschk <waschk@mandriva.org> 1.7.2-1mdv2007.0
|
||||
- New release 1.7.2
|
||||
|
||||
* Tue Jul 25 2006 Götz Waschk <waschk@mandriva.org> 1.7.1-1mdk
|
||||
- New release 1.7.1
|
||||
EOFEOF
|
||||
|
|
|
@ -55,8 +55,8 @@
|
|||
</include>
|
||||
</context>
|
||||
<context id="block-comment" style-ref="comment">
|
||||
<start>^@ignore$</start>
|
||||
<end>^@end ignore$</end>
|
||||
<start>^@ignore\s*$</start>
|
||||
<end>^@end ignore\s*$</end>
|
||||
<include>
|
||||
<context ref="generated-escape"/>
|
||||
<context ref="generated-line-escape"/>
|
||||
|
@ -70,37 +70,49 @@
|
|||
<context ref="generated-line-escape"/>
|
||||
</include>
|
||||
</context>
|
||||
<context id="macros" style-ref="macros">
|
||||
|
||||
<context id="macros-b" style-ref="macros">
|
||||
<prefix>^@</prefix>
|
||||
<suffix></suffix>
|
||||
<keyword>alias\b</keyword>
|
||||
<keyword>bye$</keyword>
|
||||
<keyword>clear\b</keyword>
|
||||
<keyword>defcodeindex\b</keyword>
|
||||
<keyword>defindex\b</keyword>
|
||||
<keyword>definfoenclose\b</keyword>
|
||||
<keyword>(end )?docbook$</keyword>
|
||||
<keyword>(end )?html$</keyword>
|
||||
<keyword>ifclear\b</keyword>
|
||||
<keyword>end ifclear$</keyword>
|
||||
<keyword>(end )?if(not)?docbook$</keyword>
|
||||
<keyword>(end )?if(not)?html$</keyword>
|
||||
<keyword>(end )?if(not)?info$</keyword>
|
||||
<keyword>(end )?if(not)?plaintext$</keyword>
|
||||
<keyword>(end )?if(not)?tex$</keyword>
|
||||
<keyword>(end )?if(not)?xml$</keyword>
|
||||
<keyword>ifset\b</keyword>
|
||||
<keyword>end ifset$</keyword>
|
||||
<keyword>lowersections$</keyword>
|
||||
<keyword>macro\b</keyword>
|
||||
<keyword>end macro$</keyword>
|
||||
<keyword>raisesections$</keyword>
|
||||
<keyword>set\b</keyword>
|
||||
<keyword>syncodeindex\b</keyword>
|
||||
<keyword>synindex\b</keyword>
|
||||
<keyword>(end )?tex$</keyword>
|
||||
<keyword>(end )?xml$</keyword>
|
||||
<suffix>\b</suffix>
|
||||
<keyword>alias</keyword>
|
||||
<keyword>clear</keyword>
|
||||
<keyword>defcodeindex</keyword>
|
||||
<keyword>defindex</keyword>
|
||||
<keyword>definfoenclose</keyword>
|
||||
<keyword>ifclear</keyword>
|
||||
<keyword>ifset</keyword>
|
||||
<keyword>macro</keyword>
|
||||
<keyword>set</keyword>
|
||||
<keyword>syncodeindex</keyword>
|
||||
<keyword>synindex</keyword>
|
||||
</context>
|
||||
<context id="macros-dollar" style-ref="macros">
|
||||
<prefix>^@</prefix>
|
||||
<suffix>\s*$</suffix>
|
||||
<keyword>bye</keyword>
|
||||
<keyword>(end )?docbook</keyword>
|
||||
<keyword>(end )?html</keyword>
|
||||
<keyword>end ifclear</keyword>
|
||||
<keyword>(end )?if(not)?docbook</keyword>
|
||||
<keyword>(end )?if(not)?html</keyword>
|
||||
<keyword>(end )?if(not)?info</keyword>
|
||||
<keyword>(end )?if(not)?plaintext</keyword>
|
||||
<keyword>(end )?if(not)?tex</keyword>
|
||||
<keyword>(end )?if(not)?xml</keyword>
|
||||
<keyword>end ifset</keyword>
|
||||
<keyword>lowersections</keyword>
|
||||
<keyword>end macro</keyword>
|
||||
<keyword>raisesections</keyword>
|
||||
<keyword>(end )?tex</keyword>
|
||||
<keyword>(end )?xml</keyword>
|
||||
</context>
|
||||
<context id="macros">
|
||||
<include>
|
||||
<context ref="macros-b"/>
|
||||
<context ref="macros-dollar"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="indexing" style-ref="keyword">
|
||||
<prefix>^@</prefix>
|
||||
<keyword>cindex</keyword>
|
||||
|
@ -110,49 +122,61 @@
|
|||
<keyword>tindex</keyword>
|
||||
<keyword>vindex</keyword>
|
||||
</context>
|
||||
<context id="file-attributes" style-ref="file-attributes">
|
||||
|
||||
<context id="file-attributes-b" style-ref="file-attributes">
|
||||
<prefix>^@</prefix>
|
||||
<suffix></suffix>
|
||||
<keyword>afivepaper$</keyword>
|
||||
<keyword>afourlatex$</keyword>
|
||||
<keyword>afourpaper$</keyword>
|
||||
<keyword>afourwide$</keyword>
|
||||
<keyword>dircategory\b</keyword>
|
||||
<keyword>(end )?direntry$</keyword>
|
||||
<keyword>(end )?documentdescription$</keyword>
|
||||
<keyword>documentencoding\b</keyword>
|
||||
<keyword>documentlanguage\b</keyword>
|
||||
<keyword>evenfooting\b</keyword>
|
||||
<keyword>evenheading\b</keyword>
|
||||
<keyword>everyfooting\b</keyword>
|
||||
<keyword>everyheading\b</keyword>
|
||||
<keyword>finalout$</keyword>
|
||||
<keyword>footnotestyle\b</keyword>
|
||||
<keyword>headings\b</keyword>
|
||||
<keyword>kbdinputstyle\b</keyword>
|
||||
<keyword>novalidate$</keyword>
|
||||
<keyword>oddfooting\b</keyword>
|
||||
<keyword>oddheading\b</keyword>
|
||||
<keyword>pagesizes\b</keyword>
|
||||
<keyword>paragraphindent\b</keyword>
|
||||
<keyword>setchapternewpage\b</keyword>
|
||||
<keyword>setcontentsaftertitlepage$</keyword>
|
||||
<keyword>setfilename\b</keyword>
|
||||
<keyword>setshortcontentsaftertitlepage$</keyword>
|
||||
<keyword>settitle\b</keyword>
|
||||
<keyword>smallbook$</keyword>
|
||||
<keyword>titlefont\b</keyword>
|
||||
<suffix>\b</suffix>
|
||||
<keyword>dircategory</keyword>
|
||||
<keyword>documentencoding</keyword>
|
||||
<keyword>documentlanguage</keyword>
|
||||
<keyword>evenfooting</keyword>
|
||||
<keyword>evenheading</keyword>
|
||||
<keyword>everyfooting</keyword>
|
||||
<keyword>everyheading</keyword>
|
||||
<keyword>footnotestyle</keyword>
|
||||
<keyword>headings</keyword>
|
||||
<keyword>kbdinputstyle</keyword>
|
||||
<keyword>oddfooting</keyword>
|
||||
<keyword>oddheading</keyword>
|
||||
<keyword>pagesizes</keyword>
|
||||
<keyword>paragraphindent</keyword>
|
||||
<keyword>setchapternewpage</keyword>
|
||||
<keyword>setfilename</keyword>
|
||||
<keyword>settitle</keyword>
|
||||
<keyword>titlefont</keyword>
|
||||
</context>
|
||||
<context id="file-attributes-dollar" style-ref="file-attributes">
|
||||
<prefix>^@</prefix>
|
||||
<suffix>\s*$</suffix>
|
||||
<keyword>afivepaper</keyword>
|
||||
<keyword>afourlatex</keyword>
|
||||
<keyword>afourpaper</keyword>
|
||||
<keyword>afourwide</keyword>
|
||||
<keyword>(end )?direntry</keyword>
|
||||
<keyword>(end )?documentdescription</keyword>
|
||||
<keyword>finalout</keyword>
|
||||
<keyword>novalidate</keyword>
|
||||
<keyword>setcontentsaftertitlepage</keyword>
|
||||
<keyword>setshortcontentsaftertitlepage</keyword>
|
||||
<keyword>smallbook</keyword>
|
||||
</context>
|
||||
<context id="file-attributes">
|
||||
<include>
|
||||
<context ref="file-attributes-b"/>
|
||||
<context ref="file-attributes-dollar"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="generated-content" style-ref="generated-content">
|
||||
<prefix></prefix>
|
||||
<suffix></suffix>
|
||||
<keyword>^@contents$</keyword>
|
||||
<keyword>^@insertcopying$</keyword>
|
||||
<keyword>^@listoffloats$</keyword>
|
||||
<keyword>^@printindex$</keyword>
|
||||
<keyword>^@shortcontents$</keyword>
|
||||
<keyword>^@shorttitlepage$</keyword>
|
||||
<keyword>^@summarycontents$</keyword>
|
||||
<keyword>^@contents\s*$</keyword>
|
||||
<keyword>^@insertcopying\s*$</keyword>
|
||||
<keyword>^@listoffloats\s*$</keyword>
|
||||
<keyword>^@printindex\s*$</keyword>
|
||||
<keyword>^@shortcontents\s*$</keyword>
|
||||
<keyword>^@shorttitlepage\s*$</keyword>
|
||||
<keyword>^@summarycontents\s*$</keyword>
|
||||
<keyword>@thischapter\b</keyword>
|
||||
<keyword>@thischaptername\b</keyword>
|
||||
<keyword>@thisfile\b</keyword>
|
||||
|
@ -161,7 +185,7 @@
|
|||
<keyword>@today\b</keyword>
|
||||
<keyword>@value\b</keyword>
|
||||
<keyword>@verb\b</keyword>
|
||||
<keyword>^@(end )?verbatim$</keyword>
|
||||
<keyword>^@(end )?verbatim\s*$</keyword>
|
||||
<keyword>^@verbatiminclude\b</keyword>
|
||||
</context>
|
||||
<context id="include" style-ref="include">
|
||||
|
@ -200,73 +224,85 @@
|
|||
<keyword>var</keyword>
|
||||
<keyword>xref</keyword>
|
||||
</context>
|
||||
<context id="markup-block" style-ref="keyword">
|
||||
|
||||
<context id="markup-block-b" style-ref="keyword">
|
||||
<prefix>^@</prefix>
|
||||
<suffix></suffix>
|
||||
<keyword>author\b</keyword>
|
||||
<keyword>(end )?copying$</keyword>
|
||||
<keyword>defcv(x)?\b</keyword>
|
||||
<keyword>end defcv$</keyword>
|
||||
<keyword>deff(u)?n(x)?\b</keyword>
|
||||
<keyword>end def(u)?n$</keyword>
|
||||
<keyword>defivar(x)?\b</keyword>
|
||||
<keyword>end defivar$</keyword>
|
||||
<keyword>defmac(x)?\b</keyword>
|
||||
<keyword>end defmac$</keyword>
|
||||
<keyword>defmethod(x)?\b</keyword>
|
||||
<keyword>end defmethod$</keyword>
|
||||
<keyword>defop(x)?\b</keyword>
|
||||
<keyword>end defop$</keyword>
|
||||
<keyword>defopt(x)?\b</keyword>
|
||||
<keyword>end defopt$</keyword>
|
||||
<keyword>defspec(x)?\b</keyword>
|
||||
<keyword>end defspec$</keyword>
|
||||
<keyword>deftp(x)?\b</keyword>
|
||||
<keyword>end deftp$</keyword>
|
||||
<keyword>deftypecv(x)?\b</keyword>
|
||||
<keyword>end deftypecv$</keyword>
|
||||
<keyword>deftypef(u)?n(x)?\b</keyword>
|
||||
<keyword>end deftypef(u)?n$</keyword>
|
||||
<keyword>deftypeivar(x)?\b</keyword>
|
||||
<keyword>end deftypevar$</keyword>
|
||||
<keyword>deftypemethod(x)?\b</keyword>
|
||||
<keyword>end deftypemethod$</keyword>
|
||||
<keyword>deftypeop(x)?\b</keyword>
|
||||
<keyword>end deftypeop$</keyword>
|
||||
<keyword>deftypevar(x)?\b</keyword>
|
||||
<keyword>end deftypevar$</keyword>
|
||||
<keyword>deftypevr(x)?\b</keyword>
|
||||
<keyword>end deftypevr$</keyword>
|
||||
<keyword>defv(a)?r(x)?\b</keyword>
|
||||
<keyword>end defv(a)?r$</keyword>
|
||||
<keyword>(end )?display$</keyword>
|
||||
<keyword>enumerate\b</keyword>
|
||||
<keyword>end enumerate$</keyword>
|
||||
<keyword>(end )?example$</keyword>
|
||||
<keyword>(end )?exampleindent$</keyword>
|
||||
<keyword>(end )?format$</keyword>
|
||||
<keyword>ftable\b</keyword>
|
||||
<keyword>end ftable$</keyword>
|
||||
<keyword>item$</keyword>
|
||||
<keyword>itemize\b</keyword>
|
||||
<keyword>end itemize$</keyword>
|
||||
<keyword>itemx$</keyword>
|
||||
<keyword>(end )?lisp$</keyword>
|
||||
<keyword>multitable\b</keyword>
|
||||
<keyword>end multitable$</keyword>
|
||||
<keyword>(end )?quotation$</keyword>
|
||||
<keyword>(end )?smalldisplay$</keyword>
|
||||
<keyword>(end )?smallexample$</keyword>
|
||||
<keyword>(end )?smallformat$</keyword>
|
||||
<keyword>(end )?smalllisp$</keyword>
|
||||
<keyword>subtitle\b</keyword>
|
||||
<keyword>tab\b</keyword>
|
||||
<keyword>table\b</keyword>
|
||||
<keyword>end table$</keyword>
|
||||
<keyword>title\b</keyword>
|
||||
<keyword>vtable\b</keyword>
|
||||
<keyword>end vtable$</keyword>
|
||||
<suffix>\b</suffix>
|
||||
<keyword>author</keyword>
|
||||
<keyword>defcv(x)?</keyword>
|
||||
<keyword>deff(u)?n(x)?</keyword>
|
||||
<keyword>defivar(x)?</keyword>
|
||||
<keyword>defmac(x)?</keyword>
|
||||
<keyword>defmethod(x)?</keyword>
|
||||
<keyword>defop(x)?</keyword>
|
||||
<keyword>defopt(x)?</keyword>
|
||||
<keyword>defspec(x)?</keyword>
|
||||
<keyword>deftp(x)?</keyword>
|
||||
<keyword>deftypecv(x)?</keyword>
|
||||
<keyword>deftypef(u)?n(x)?</keyword>
|
||||
<keyword>deftypeivar(x)?</keyword>
|
||||
<keyword>deftypemethod(x)?</keyword>
|
||||
<keyword>deftypeop(x)?</keyword>
|
||||
<keyword>deftypevar(x)?</keyword>
|
||||
<keyword>deftypevr(x)?</keyword>
|
||||
<keyword>defv(a)?r(x)?</keyword>
|
||||
<keyword>enumerate</keyword>
|
||||
<keyword>ftable</keyword>
|
||||
<keyword>itemize</keyword>
|
||||
<keyword>multitable</keyword>
|
||||
<keyword>subtitle</keyword>
|
||||
<keyword>tab</keyword>
|
||||
<keyword>table</keyword>
|
||||
<keyword>title</keyword>
|
||||
<keyword>vtable</keyword>
|
||||
</context>
|
||||
<context id="markup-block-dollar" style-ref="keyword">
|
||||
<prefix>^@</prefix>
|
||||
<suffix>\s*$</suffix>
|
||||
<keyword>(end )?copying</keyword>
|
||||
<keyword>end defcv</keyword>
|
||||
<keyword>end def(u)?n</keyword>
|
||||
<keyword>end defivar</keyword>
|
||||
<keyword>end defmac</keyword>
|
||||
<keyword>end defmethod</keyword>
|
||||
<keyword>end defop</keyword>
|
||||
<keyword>end defopt</keyword>
|
||||
<keyword>end defspec</keyword>
|
||||
<keyword>end deftp</keyword>
|
||||
<keyword>end deftypecv</keyword>
|
||||
<keyword>end deftypef(u)?n</keyword>
|
||||
<keyword>end deftypevar</keyword>
|
||||
<keyword>end deftypemethod</keyword>
|
||||
<keyword>end deftypeop</keyword>
|
||||
<keyword>end deftypevar</keyword>
|
||||
<keyword>end deftypevr</keyword>
|
||||
<keyword>end defv(a)?r</keyword>
|
||||
<keyword>(end )?display</keyword>
|
||||
<keyword>end enumerate</keyword>
|
||||
<keyword>(end )?example</keyword>
|
||||
<keyword>(end )?exampleindent</keyword>
|
||||
<keyword>(end )?format</keyword>
|
||||
<keyword>end ftable</keyword>
|
||||
<keyword>item</keyword>
|
||||
<keyword>end itemize</keyword>
|
||||
<keyword>itemx</keyword>
|
||||
<keyword>(end )?lisp</keyword>
|
||||
<keyword>end multitable</keyword>
|
||||
<keyword>(end )?quotation</keyword>
|
||||
<keyword>(end )?smalldisplay</keyword>
|
||||
<keyword>(end )?smallexample</keyword>
|
||||
<keyword>(end )?smallformat</keyword>
|
||||
<keyword>(end )?smalllisp</keyword>
|
||||
<keyword>end table</keyword>
|
||||
<keyword>end vtable</keyword>
|
||||
</context>
|
||||
<context id="markup-block">
|
||||
<include>
|
||||
<context ref="markup-block-b"/>
|
||||
<context ref="markup-block-dollar"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="sectioning" style-ref="keyword">
|
||||
<prefix>^@</prefix>
|
||||
<suffix></suffix>
|
||||
|
@ -276,16 +312,16 @@
|
|||
<keyword>centerchap\b</keyword>
|
||||
<keyword>chapter\b</keyword>
|
||||
<keyword>chapheading\b</keyword>
|
||||
<keyword>(end )?detailmenu$</keyword>
|
||||
<keyword>(end )?group$</keyword>
|
||||
<keyword>(end )?detailmenu\s*$</keyword>
|
||||
<keyword>(end )?group\s*$</keyword>
|
||||
<keyword>heading\b</keyword>
|
||||
<keyword>majorheading\b</keyword>
|
||||
<keyword>(end )?menu$</keyword>
|
||||
<keyword>(end )?menu\s*$</keyword>
|
||||
<keyword>node\b</keyword>
|
||||
<keyword>section\b</keyword>
|
||||
<keyword>sub(sub)?heading\b</keyword>
|
||||
<keyword>sub(sub)?section\b</keyword>
|
||||
<keyword>(end )?titlepage$</keyword>
|
||||
<keyword>(end )?titlepage\s*$</keyword>
|
||||
<keyword>top\b</keyword>
|
||||
<keyword>unnumbered\b</keyword>
|
||||
<keyword>unnumberedsec\b</keyword>
|
||||
|
@ -299,21 +335,21 @@
|
|||
<keyword>@\-</keyword>
|
||||
<keyword>@/</keyword>
|
||||
<keyword>@\:</keyword>
|
||||
<keyword>^@asis$</keyword>
|
||||
<keyword>^@asis\s*$</keyword>
|
||||
<keyword>@b</keyword>
|
||||
<keyword>^@(end )?cartouche$</keyword>
|
||||
<keyword>^@(end )?cartouche\s*$</keyword>
|
||||
<keyword>^@center\b</keyword>
|
||||
<keyword>^@exdent\b</keyword>
|
||||
<keyword>^@(end )?float$</keyword>
|
||||
<keyword>^@(end )?flushleft$</keyword>
|
||||
<keyword>^@(end )?flushright$</keyword>
|
||||
<keyword>^@(end )?float\s*$</keyword>
|
||||
<keyword>^@(end )?flushleft\s*$</keyword>
|
||||
<keyword>^@(end )?flushright\s*$</keyword>
|
||||
<keyword>@hyphenation\b</keyword>
|
||||
<keyword>@i\b</keyword>
|
||||
<keyword>^@need\b</keyword>
|
||||
<keyword>^@noindent$</keyword>
|
||||
<keyword>^@page$</keyword>
|
||||
<keyword>^@noindent\s*$</keyword>
|
||||
<keyword>^@page\s*$</keyword>
|
||||
<keyword>@r\b</keyword>
|
||||
<keyword>^@refill$</keyword>
|
||||
<keyword>^@refill\s*$</keyword>
|
||||
<keyword>@sc\b</keyword>
|
||||
<keyword>^@sp\b</keyword>
|
||||
<keyword>@t\b</keyword>
|
||||
|
|
|
@ -0,0 +1,209 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Author: John Luke <jluke@cfl.rr.com>
|
||||
Copyright (C) 2003 John Luke <jluke@cfl.rr.com>
|
||||
Copyright (C) 2004 Jeroen Zwartepoorte <jeroen@xs4all.nl>
|
||||
Copyright (C) 2004 Alessio Frusciante <algol@firenze.linux.it>
|
||||
Copyright (C) 2005 Brion Vibber <brion@pobox.com>
|
||||
Copyright (C) 2007 Jürg Billeter <j@bitron.ch>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
|
||||
-->
|
||||
<language id="vala" name="Vala" version="2.0" _section="Sources">
|
||||
<metadata>
|
||||
<property name="mimetypes">text/x-vala</property>
|
||||
<property name="globs">*.vala</property>
|
||||
<property name="line-comment-start">//</property>
|
||||
<property name="block-comment-start">/*</property>
|
||||
<property name="block-comment-end">*/</property>
|
||||
</metadata>
|
||||
|
||||
<styles>
|
||||
<style id="comment" _name="Comment" map-to="def:comment"/>
|
||||
<style id="error" _name="Error" map-to="def:error"/>
|
||||
<style id="type" _name="Data Type" map-to="def:type"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<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="decimal" _name="Decimal number" map-to="def:decimal"/>
|
||||
<style id="hexadecimal" _name="Hexadecimal number" map-to="def:base-n-integer"/>
|
||||
<style id="real" _name="Real number" map-to="def:floating-point"/>
|
||||
</styles>
|
||||
|
||||
<definitions>
|
||||
|
||||
<context id="line-comment" style-ref="comment" end-at-line-end="true">
|
||||
<start>//</start>
|
||||
<include>
|
||||
<context ref="def:in-line-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="multiline-comment" style-ref="comment">
|
||||
<start>/\*</start>
|
||||
<end>\*/</end>
|
||||
<include>
|
||||
<context ref="def:in-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="close-comment-outside-comment" style-ref="error">
|
||||
<match>\*/(?!\*)</match>
|
||||
</context>
|
||||
|
||||
<context id="multiline-string" style-ref="string">
|
||||
<start>@"([^"]|"")*</start>
|
||||
<end>"</end>
|
||||
<include>
|
||||
<context ref="def:escape"/>
|
||||
<context ref="def:line-continue"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="keywords" style-ref="keyword">
|
||||
<keyword>class</keyword>
|
||||
<keyword>delegate</keyword>
|
||||
<keyword>enum</keyword>
|
||||
<keyword>interface</keyword>
|
||||
<keyword>namespace</keyword>
|
||||
<keyword>signal</keyword>
|
||||
<keyword>struct</keyword>
|
||||
<keyword>using</keyword>
|
||||
<!-- modifiers -->
|
||||
<keyword>abstract</keyword>
|
||||
<keyword>const</keyword>
|
||||
<keyword>lock</keyword>
|
||||
<keyword>out</keyword>
|
||||
<keyword>override</keyword>
|
||||
<keyword>private</keyword>
|
||||
<keyword>protected</keyword>
|
||||
<keyword>public</keyword>
|
||||
<keyword>ref</keyword>
|
||||
<keyword>static</keyword>
|
||||
<keyword>virtual</keyword>
|
||||
<keyword>weak</keyword>
|
||||
<!-- others -->
|
||||
<keyword>as</keyword>
|
||||
<keyword>base</keyword>
|
||||
<keyword>break</keyword>
|
||||
<keyword>case</keyword>
|
||||
<keyword>catch</keyword>
|
||||
<keyword>construct</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>default</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>finally</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>foreach</keyword>
|
||||
<keyword>get</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>in</keyword>
|
||||
<keyword>is</keyword>
|
||||
<keyword>new</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>set</keyword>
|
||||
<keyword>sizeof</keyword>
|
||||
<keyword>switch</keyword>
|
||||
<keyword>this</keyword>
|
||||
<keyword>throw</keyword>
|
||||
<keyword>throws</keyword>
|
||||
<keyword>try</keyword>
|
||||
<keyword>typeof</keyword>
|
||||
<keyword>value</keyword>
|
||||
<keyword>var</keyword>
|
||||
<keyword>void</keyword>
|
||||
<keyword>while</keyword>
|
||||
</context>
|
||||
|
||||
<context id="primitives" style-ref="type">
|
||||
<keyword>bool</keyword>
|
||||
<keyword>char</keyword>
|
||||
<keyword>double</keyword>
|
||||
<keyword>float</keyword>
|
||||
<keyword>int</keyword>
|
||||
<keyword>int16</keyword>
|
||||
<keyword>int32</keyword>
|
||||
<keyword>int64</keyword>
|
||||
<keyword>long</keyword>
|
||||
<keyword>short</keyword>
|
||||
<keyword>string</keyword>
|
||||
<keyword>uchar</keyword>
|
||||
<keyword>uint</keyword>
|
||||
<keyword>uint16</keyword>
|
||||
<keyword>uint32</keyword>
|
||||
<keyword>uint64</keyword>
|
||||
<keyword>ulong</keyword>
|
||||
<keyword>ushort</keyword>
|
||||
</context>
|
||||
|
||||
<context id="null-value" style-ref="null-value">
|
||||
<keyword>null</keyword>
|
||||
</context>
|
||||
|
||||
<context id="boolean" style-ref="boolean">
|
||||
<keyword>false</keyword>
|
||||
<keyword>true</keyword>
|
||||
</context>
|
||||
|
||||
<context id="decimal" style-ref="decimal">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
[0-9]+[uUlL]*
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="hexadecimal" style-ref="hexadecimal">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
0[xX][a-fA-F0-9]+[uUlL]*
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="real" style-ref="real">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
((\.[0-9]+|[0-9]+\.[0-9]*)([Ee][+-]?[0-9]*)?[FfDdMm]?|
|
||||
([0-9]+[Ee][+-]?[0-9]*)[FfDdMm]? |
|
||||
([0-9]+)[FfDdMm])
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="vala">
|
||||
<include>
|
||||
<context ref="def:string"/>
|
||||
<context ref="def:single-quoted-string"/>
|
||||
<context ref="line-comment"/>
|
||||
<context ref="multiline-comment"/>
|
||||
<context ref="close-comment-outside-comment"/>
|
||||
<context ref="multiline-string"/>
|
||||
<context ref="keywords"/>
|
||||
<context ref="primitives"/>
|
||||
<context ref="null-value"/>
|
||||
<context ref="boolean"/>
|
||||
<context ref="decimal"/>
|
||||
<context ref="hexadecimal"/>
|
||||
<context ref="real"/>
|
||||
</include>
|
||||
</context>
|
||||
</definitions>
|
||||
</language>
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
<!--
|
||||
|
||||
Author: John Luke <jluke@cfl.rr.com>
|
||||
|
@ -21,188 +20,225 @@
|
|||
Boston, MA 02111-1307, USA.
|
||||
|
||||
-->
|
||||
<language _name="VB.NET" version="1.0" _section="Sources" mimetypes="text/x-vbnet;text/x-vb">
|
||||
|
||||
<string _name = "String" style = "String" end-at-line-end = "TRUE">
|
||||
<start-regex>"</start-regex>
|
||||
<end-regex>"</end-regex>
|
||||
</string>
|
||||
<language id="vbnet" _name="VB.NET" version="2.0" _section="Sources">
|
||||
<metadata>
|
||||
<property name="mimetypes">text/x-vbnet;text/x-vb</property>
|
||||
<property name="globs">*.vb</property>
|
||||
<property name="line-comment-start">'</property>
|
||||
</metadata>
|
||||
|
||||
<!--<string _name = "String 2" style = "String" end-at-line-end = "TRUE">
|
||||
<start-regex>'</start-regex>
|
||||
<end-regex>'</end-regex>
|
||||
</string>-->
|
||||
<styles>
|
||||
<style id="comment" _name="Comment" map-to="def:comment"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="preprocessor" _name="Preprocessor" map-to="def:preprocessor"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="type" _name="Data Type" map-to="def:type"/>
|
||||
<style id="special-constant" _name="Special constant" map-to="def:special-constant"/>
|
||||
<style id="boolean" _name="Boolean value" map-to="def:boolean"/>
|
||||
</styles>
|
||||
|
||||
<line-comment _name = "Line Comment" style= "Comment">
|
||||
<start-regex>'</start-regex>
|
||||
</line-comment>
|
||||
|
||||
<line-comment _name = "Old Style Comment" style= "Comment">
|
||||
<start-regex>^[rR][eE][mM]</start-regex>
|
||||
</line-comment>
|
||||
<default-regex-options case-sensitive="false"/>
|
||||
|
||||
<keyword-list _name = "Keywords" style = "Keyword" case-sensitive="FALSE">
|
||||
<keyword>ADDHANDLER</keyword>
|
||||
<keyword>ADDRESSOF</keyword>
|
||||
<keyword>ALIAS</keyword>
|
||||
<keyword>AND</keyword>
|
||||
<keyword>ANDALSO</keyword>
|
||||
<keyword>ANSI</keyword>
|
||||
<keyword>AS</keyword>
|
||||
<keyword>ASSEMBLY</keyword>
|
||||
<keyword>AUTO</keyword>
|
||||
<keyword>BINARY</keyword>
|
||||
<keyword>BYREF</keyword>
|
||||
<keyword>BYVAL</keyword>
|
||||
<keyword>CALL</keyword>
|
||||
<keyword>CASE</keyword>
|
||||
<keyword>CATCH</keyword>
|
||||
<keyword>CBOOL</keyword>
|
||||
<keyword>CBYTE</keyword>
|
||||
<keyword>CCHAR</keyword>
|
||||
<keyword>CDATE</keyword>
|
||||
<keyword>CDEC</keyword>
|
||||
<keyword>CDBL</keyword>
|
||||
<keyword>CINT</keyword>
|
||||
<keyword>CLASS</keyword>
|
||||
<keyword>CLNG</keyword>
|
||||
<keyword>COBJ</keyword>
|
||||
<keyword>COMPARE</keyword>
|
||||
<keyword>CONST</keyword>
|
||||
<keyword>CSHORT</keyword>
|
||||
<keyword>CSNG</keyword>
|
||||
<keyword>CSTR</keyword>
|
||||
<keyword>CTYPE</keyword>
|
||||
<keyword>DECLARE</keyword>
|
||||
<keyword>DEFAULT</keyword>
|
||||
<keyword>DELEGATE</keyword>
|
||||
<keyword>DIM</keyword>
|
||||
<keyword>DO</keyword>
|
||||
<keyword>EACH</keyword>
|
||||
<keyword>ELSE</keyword>
|
||||
<keyword>ELSEIF</keyword>
|
||||
<keyword>END</keyword>
|
||||
<keyword>ENUM</keyword>
|
||||
<keyword>ERASE</keyword>
|
||||
<keyword>ERROR</keyword>
|
||||
<keyword>EVENT</keyword>
|
||||
<keyword>EXIT</keyword>
|
||||
<keyword>EXPLICIT</keyword>
|
||||
<keyword>FALSE</keyword>
|
||||
<keyword>FINALLY</keyword>
|
||||
<keyword>FOR</keyword>
|
||||
<keyword>FRIEND</keyword>
|
||||
<keyword>FUNCTION</keyword>
|
||||
<keyword>GET</keyword>
|
||||
<keyword>GOTO</keyword>
|
||||
<keyword>HANDLES</keyword>
|
||||
<keyword>IF</keyword>
|
||||
<keyword>IMPLEMENTS</keyword>
|
||||
<keyword>IMPORTS</keyword>
|
||||
<keyword>IN</keyword>
|
||||
<keyword>INHERITS</keyword>
|
||||
<keyword>INTEGER</keyword>
|
||||
<keyword>INTERFACE</keyword>
|
||||
<keyword>IS</keyword>
|
||||
<keyword>LET</keyword>
|
||||
<keyword>LIB</keyword>
|
||||
<keyword>LIKE</keyword>
|
||||
<keyword>LOOP</keyword>
|
||||
<keyword>ME</keyword>
|
||||
<keyword>MOD</keyword>
|
||||
<keyword>MODULE</keyword>
|
||||
<keyword>MUSTINHERIT</keyword>
|
||||
<keyword>MUSTOVERRIDE</keyword>
|
||||
<keyword>MYBASE</keyword>
|
||||
<keyword>MYCLASS</keyword>
|
||||
<keyword>NAMESPACE</keyword>
|
||||
<keyword>NEW</keyword>
|
||||
<keyword>NEXT</keyword>
|
||||
<keyword>NOT</keyword>
|
||||
<keyword>NOTHING</keyword>
|
||||
<keyword>NOTINHERITABLE</keyword>
|
||||
<keyword>NOTOVERRIDABLE</keyword>
|
||||
<keyword>OFF</keyword>
|
||||
<keyword>ON</keyword>
|
||||
<keyword>OPTION</keyword>
|
||||
<keyword>OPTIONAL</keyword>
|
||||
<keyword>OR</keyword>
|
||||
<keyword>ORELSE</keyword>
|
||||
<keyword>OVERLOADS</keyword>
|
||||
<keyword>OVERRIDABLE</keyword>
|
||||
<keyword>OVERRIDES</keyword>
|
||||
<keyword>PARAM_ARRAY</keyword>
|
||||
<keyword>PRESERVE</keyword>
|
||||
<keyword>PRIVATE</keyword>
|
||||
<keyword>PROPERTY</keyword>
|
||||
<keyword>PROTECTED</keyword>
|
||||
<keyword>PUBLIC</keyword>
|
||||
<keyword>RAISEEVENT</keyword>
|
||||
<keyword>READONLY</keyword>
|
||||
<keyword>REDIM</keyword>
|
||||
<keyword>REM</keyword>
|
||||
<keyword>REMOVEHANDLER</keyword>
|
||||
<keyword>RESUME</keyword>
|
||||
<keyword>RETURN</keyword>
|
||||
<keyword>SELECT</keyword>
|
||||
<keyword>SET</keyword>
|
||||
<keyword>SHADOWS</keyword>
|
||||
<keyword>SHARED</keyword>
|
||||
<keyword>SIZEOF</keyword>
|
||||
<keyword>STATIC</keyword>
|
||||
<keyword>STEP</keyword>
|
||||
<keyword>STOP</keyword>
|
||||
<keyword>STRICT</keyword>
|
||||
<keyword>STRUCTURE</keyword>
|
||||
<keyword>SUB</keyword>
|
||||
<keyword>SYNCLOCK</keyword>
|
||||
<keyword>TEXT</keyword>
|
||||
<keyword>THEN</keyword>
|
||||
<keyword>THROW</keyword>
|
||||
<keyword>TO</keyword>
|
||||
<keyword>TRUE</keyword>
|
||||
<keyword>TRY</keyword>
|
||||
<keyword>TYPEOF</keyword>
|
||||
<keyword>UNICODE</keyword>
|
||||
<keyword>UNTIL</keyword>
|
||||
<keyword>VARIANT</keyword>
|
||||
<keyword>WHEN</keyword>
|
||||
<keyword>WHILE</keyword>
|
||||
<keyword>WITH</keyword>
|
||||
<keyword>WITHEVENTS</keyword>
|
||||
<keyword>WRITEONLY</keyword>
|
||||
<keyword>XOR</keyword>
|
||||
<keyword>YIELD</keyword> <!--MonoBASIC extension-->
|
||||
</keyword-list>
|
||||
<definitions>
|
||||
|
||||
<context id="line-comment" style-ref="comment" end-at-line-end="true">
|
||||
<start>'</start>
|
||||
<include>
|
||||
<context ref="def:in-line-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="old-style-comment" style-ref="comment" end-at-line-end="true">
|
||||
<start>^rem</start>
|
||||
<include>
|
||||
<context ref="def:in-line-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="string" style-ref="string" end-at-line-end="true">
|
||||
<start>"</start>
|
||||
<end>"</end>
|
||||
</context>
|
||||
|
||||
<context id="preprocessor" style-ref="preprocessor" end-at-line-end="true">
|
||||
<start extended="true">
|
||||
^\s*#\s*
|
||||
(define|undef|if(n?def)?|else|elif|end if|line|error|region|end region)
|
||||
\b
|
||||
</start>
|
||||
<include>
|
||||
<context ref="line-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="keywords" style-ref="keyword">
|
||||
<keyword>addhandler</keyword>
|
||||
<keyword>addressof</keyword>
|
||||
<keyword>alias</keyword>
|
||||
<keyword>and</keyword>
|
||||
<keyword>andalso</keyword>
|
||||
<keyword>ansi</keyword>
|
||||
<keyword>as</keyword>
|
||||
<keyword>assembly</keyword>
|
||||
<keyword>auto</keyword>
|
||||
<keyword>binary</keyword>
|
||||
<keyword>byref</keyword>
|
||||
<keyword>byval</keyword>
|
||||
<keyword>call</keyword>
|
||||
<keyword>case</keyword>
|
||||
<keyword>catch</keyword>
|
||||
<keyword>cbool</keyword>
|
||||
<keyword>cbyte</keyword>
|
||||
<keyword>cchar</keyword>
|
||||
<keyword>cdate</keyword>
|
||||
<keyword>cdec</keyword>
|
||||
<keyword>cdbl</keyword>
|
||||
<keyword>cint</keyword>
|
||||
<keyword>class</keyword>
|
||||
<keyword>clng</keyword>
|
||||
<keyword>cobj</keyword>
|
||||
<keyword>compare</keyword>
|
||||
<keyword>const</keyword>
|
||||
<keyword>cshort</keyword>
|
||||
<keyword>csng</keyword>
|
||||
<keyword>cstr</keyword>
|
||||
<keyword>ctype</keyword>
|
||||
<keyword>declare</keyword>
|
||||
<keyword>default</keyword>
|
||||
<keyword>delegate</keyword>
|
||||
<keyword>dim</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>each</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>elseif</keyword>
|
||||
<keyword>end</keyword>
|
||||
<keyword>enum</keyword>
|
||||
<keyword>erase</keyword>
|
||||
<keyword>error</keyword>
|
||||
<keyword>event</keyword>
|
||||
<keyword>exit</keyword>
|
||||
<keyword>explicit</keyword>
|
||||
<keyword>finally</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>friend</keyword>
|
||||
<keyword>function</keyword>
|
||||
<keyword>get</keyword>
|
||||
<keyword>goto</keyword>
|
||||
<keyword>handles</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>implements</keyword>
|
||||
<keyword>imports</keyword>
|
||||
<keyword>in</keyword>
|
||||
<keyword>inherits</keyword>
|
||||
<keyword>integer</keyword>
|
||||
<keyword>interface</keyword>
|
||||
<keyword>is</keyword>
|
||||
<keyword>let</keyword>
|
||||
<keyword>lib</keyword>
|
||||
<keyword>like</keyword>
|
||||
<keyword>loop</keyword>
|
||||
<keyword>me</keyword>
|
||||
<keyword>mod</keyword>
|
||||
<keyword>module</keyword>
|
||||
<keyword>mustinherit</keyword>
|
||||
<keyword>mustoverride</keyword>
|
||||
<keyword>mybase</keyword>
|
||||
<keyword>myclass</keyword>
|
||||
<keyword>namespace</keyword>
|
||||
<keyword>new</keyword>
|
||||
<keyword>next</keyword>
|
||||
<keyword>not</keyword>
|
||||
<keyword>notinheritable</keyword>
|
||||
<keyword>notoverridable</keyword>
|
||||
<keyword>off</keyword>
|
||||
<keyword>on</keyword>
|
||||
<keyword>option</keyword>
|
||||
<keyword>optional</keyword>
|
||||
<keyword>or</keyword>
|
||||
<keyword>orelse</keyword>
|
||||
<keyword>overloads</keyword>
|
||||
<keyword>overridable</keyword>
|
||||
<keyword>overrides</keyword>
|
||||
<keyword>param_array</keyword>
|
||||
<keyword>preserve</keyword>
|
||||
<keyword>private</keyword>
|
||||
<keyword>property</keyword>
|
||||
<keyword>protected</keyword>
|
||||
<keyword>public</keyword>
|
||||
<keyword>raiseevent</keyword>
|
||||
<keyword>readonly</keyword>
|
||||
<keyword>redim</keyword>
|
||||
<keyword>rem</keyword>
|
||||
<keyword>removehandler</keyword>
|
||||
<keyword>resume</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>select</keyword>
|
||||
<keyword>set</keyword>
|
||||
<keyword>shadows</keyword>
|
||||
<keyword>shared</keyword>
|
||||
<keyword>sizeof</keyword>
|
||||
<keyword>static</keyword>
|
||||
<keyword>step</keyword>
|
||||
<keyword>stop</keyword>
|
||||
<keyword>strict</keyword>
|
||||
<keyword>structure</keyword>
|
||||
<keyword>sub</keyword>
|
||||
<keyword>synclock</keyword>
|
||||
<keyword>text</keyword>
|
||||
<keyword>then</keyword>
|
||||
<keyword>throw</keyword>
|
||||
<keyword>to</keyword>
|
||||
<keyword>try</keyword>
|
||||
<keyword>typeof</keyword>
|
||||
<keyword>unicode</keyword>
|
||||
<keyword>until</keyword>
|
||||
<keyword>variant</keyword>
|
||||
<keyword>when</keyword>
|
||||
<keyword>while</keyword>
|
||||
<keyword>with</keyword>
|
||||
<keyword>withevents</keyword>
|
||||
<keyword>writeonly</keyword>
|
||||
<keyword>xor</keyword>
|
||||
<keyword>yield</keyword> <!--MonoBASIC extension-->
|
||||
</context>
|
||||
|
||||
<context id="types" style-ref="type">
|
||||
<keyword>boolean</keyword>
|
||||
<keyword>byte</keyword>
|
||||
<keyword>char</keyword>
|
||||
<keyword>date</keyword>
|
||||
<keyword>decimal</keyword>
|
||||
<keyword>double</keyword>
|
||||
<keyword>long</keyword>
|
||||
<keyword>object</keyword>
|
||||
<keyword>short</keyword>
|
||||
<keyword>single</keyword>
|
||||
<keyword>string</keyword>
|
||||
</context>
|
||||
|
||||
<context id="special-constants" style-ref="special-constant">
|
||||
<keyword>nothing</keyword>
|
||||
<keyword>null</keyword>
|
||||
</context>
|
||||
|
||||
<context id="boolean" style-ref="boolean">
|
||||
<keyword>false</keyword>
|
||||
<keyword>true</keyword>
|
||||
</context>
|
||||
|
||||
<context id="vbnet">
|
||||
<include>
|
||||
<context ref="line-comment"/>
|
||||
<context ref="old-style-comment"/>
|
||||
<context ref="string"/>
|
||||
<context ref="preprocessor"/>
|
||||
<context ref="keywords"/>
|
||||
<context ref="types"/>
|
||||
<context ref="special-constants"/>
|
||||
<context ref="boolean"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
</definitions>
|
||||
|
||||
<keyword-list _name = "Primitives" style = "Data Type" case-sensitive="FALSE">
|
||||
<keyword>BOOLEAN</keyword>
|
||||
<keyword>BYTE</keyword>
|
||||
<keyword>CHAR</keyword>
|
||||
<keyword>DATE</keyword>
|
||||
<keyword>DECIMAL</keyword>
|
||||
<keyword>DOUBLE</keyword>
|
||||
<keyword>LONG</keyword>
|
||||
<keyword>OBJECT</keyword>
|
||||
<keyword>SHORT</keyword>
|
||||
<keyword>SINGLE</keyword>
|
||||
<keyword>STRING</keyword>
|
||||
</keyword-list>
|
||||
|
||||
<keyword-list _name = "Preprocessor Definitions" style ="Preprocessor" case-sensitive="FALSE"
|
||||
match-empty-string-at-beginning = "TRUE" match-empty-string-at-end = "TRUE"
|
||||
beginning-regex = "^[ \t]*#[ \t]*">
|
||||
<keyword>if</keyword>
|
||||
<keyword>ifdef</keyword>
|
||||
<keyword>ifndef</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>elif</keyword>
|
||||
<keyword>define</keyword>
|
||||
<keyword>end if</keyword>
|
||||
<keyword>undef</keyword>
|
||||
<keyword>error</keyword>
|
||||
<keyword>region</keyword>
|
||||
<keyword>end region</keyword>
|
||||
</keyword-list>
|
||||
|
||||
</language>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<style id="compiler-directive" _name="Compiler Directive" map-to="def:preprocessor"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="gate" _name="Gate" map-to="def:keyword"/>
|
||||
<style id="type" _name="Type" map-to="def:data-type"/>
|
||||
<style id="type" _name="Type" map-to="def:type"/>
|
||||
<style id="base-n-integer" _name="Base-N Integer" map-to="def:base-n-integer"/>
|
||||
</styles>
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
<!--
|
||||
|
||||
Author: Jürg Billeter <j@bitron.ch>
|
||||
|
@ -21,165 +20,228 @@
|
|||
Boston, MA 02111-1307, USA.
|
||||
|
||||
-->
|
||||
<language _name="VHDL" version="1.0" _section="Sources" mimetypes="text/x-vhdl">
|
||||
|
||||
<line-comment _name = "Line Comment" style= "Comment">
|
||||
<start-regex>--</start-regex>
|
||||
</line-comment>
|
||||
<language id="vhdl" _name="VHDL" version="2.0" _section="Sources">
|
||||
<metadata>
|
||||
<property name="mimetypes">text/x-vhdl</property>
|
||||
<property name="globs">*.vhd</property>
|
||||
<property name="line-comment-start">--</property>
|
||||
</metadata>
|
||||
|
||||
<string _name = "String" style = "String" end-at-line-end = "TRUE">
|
||||
<start-regex>"</start-regex>
|
||||
<end-regex>"</end-regex>
|
||||
</string>
|
||||
<styles>
|
||||
<style id="comment" _name="Comment" map-to="def:comment"/>
|
||||
<style id="string" _name="String" map-to="def:string"/>
|
||||
<style id="character" _name="Character" map-to="def:character"/>
|
||||
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
||||
<style id="type" _name="Type" map-to="def:type"/>
|
||||
<style id="boolean" _name="Boolean value" map-to="def:boolean"/>
|
||||
<style id="base-n-number" _name="Base-N Integer" map-to="def:base-n-integer"/>
|
||||
<style id="real" _name="Real number" map-to="def:floating-point"/>
|
||||
<style id="number" _name="Number" map-to="def:number"/>
|
||||
</styles>
|
||||
|
||||
<pattern-item _name = "Character Constant" style = "String">
|
||||
<regex>'.'</regex>
|
||||
</pattern-item>
|
||||
<default-regex-options case-sensitive="false"/>
|
||||
|
||||
<keyword-list _name = "Keyword" style = "Keyword" case-sensitive="FALSE">
|
||||
<keyword>access</keyword>
|
||||
<keyword>after</keyword>
|
||||
<keyword>alias</keyword>
|
||||
<keyword>all</keyword>
|
||||
<keyword>architecture</keyword>
|
||||
<keyword>array</keyword>
|
||||
<keyword>assert</keyword>
|
||||
<keyword>attribute</keyword>
|
||||
<keyword>begin</keyword>
|
||||
<keyword>block</keyword>
|
||||
<keyword>body</keyword>
|
||||
<keyword>buffer</keyword>
|
||||
<keyword>bus</keyword>
|
||||
<keyword>case</keyword>
|
||||
<keyword>component</keyword>
|
||||
<keyword>configuration</keyword>
|
||||
<keyword>constant</keyword>
|
||||
<keyword>disconnect</keyword>
|
||||
<keyword>downto</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>elsif</keyword>
|
||||
<keyword>end</keyword>
|
||||
<keyword>entity</keyword>
|
||||
<keyword>exit</keyword>
|
||||
<keyword>file</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>function</keyword>
|
||||
<keyword>generate</keyword>
|
||||
<keyword>generic</keyword>
|
||||
<keyword>group</keyword>
|
||||
<keyword>guarded</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>impure</keyword>
|
||||
<keyword>in</keyword>
|
||||
<keyword>inertial</keyword>
|
||||
<keyword>inout</keyword>
|
||||
<keyword>is</keyword>
|
||||
<keyword>label</keyword>
|
||||
<keyword>library</keyword>
|
||||
<keyword>linkage</keyword>
|
||||
<keyword>literal</keyword>
|
||||
<keyword>loop</keyword>
|
||||
<keyword>map</keyword>
|
||||
<keyword>new</keyword>
|
||||
<keyword>next</keyword>
|
||||
<keyword>null</keyword>
|
||||
<keyword>of</keyword>
|
||||
<keyword>on</keyword>
|
||||
<keyword>open</keyword>
|
||||
<keyword>others</keyword>
|
||||
<keyword>out</keyword>
|
||||
<keyword>package</keyword>
|
||||
<keyword>port</keyword>
|
||||
<keyword>postponed</keyword>
|
||||
<keyword>procedure</keyword>
|
||||
<keyword>process</keyword>
|
||||
<keyword>pure</keyword>
|
||||
<keyword>range</keyword>
|
||||
<keyword>record</keyword>
|
||||
<keyword>register</keyword>
|
||||
<keyword>reject</keyword>
|
||||
<keyword>report</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>select</keyword>
|
||||
<keyword>severity</keyword>
|
||||
<keyword>signal</keyword>
|
||||
<keyword>shared</keyword>
|
||||
<keyword>subtype</keyword>
|
||||
<keyword>then</keyword>
|
||||
<keyword>to</keyword>
|
||||
<keyword>transport</keyword>
|
||||
<keyword>type</keyword>
|
||||
<keyword>unaffected</keyword>
|
||||
<keyword>units</keyword>
|
||||
<keyword>until</keyword>
|
||||
<keyword>use</keyword>
|
||||
<keyword>variable</keyword>
|
||||
<keyword>wait</keyword>
|
||||
<keyword>when</keyword>
|
||||
<keyword>while</keyword>
|
||||
<keyword>with</keyword>
|
||||
<keyword>note</keyword>
|
||||
<keyword>warning</keyword>
|
||||
<keyword>error</keyword>
|
||||
<keyword>failure</keyword>
|
||||
<keyword>and</keyword>
|
||||
<keyword>nand</keyword>
|
||||
<keyword>or</keyword>
|
||||
<keyword>nor</keyword>
|
||||
<keyword>xor</keyword>
|
||||
<keyword>xnor</keyword>
|
||||
<keyword>rol</keyword>
|
||||
<keyword>ror</keyword>
|
||||
<keyword>sla</keyword>
|
||||
<keyword>sll</keyword>
|
||||
<keyword>sra</keyword>
|
||||
<keyword>srl</keyword>
|
||||
<keyword>mod</keyword>
|
||||
<keyword>rem</keyword>
|
||||
<keyword>abs</keyword>
|
||||
<keyword>not</keyword>
|
||||
</keyword-list>
|
||||
<definitions>
|
||||
|
||||
<keyword-list _name = "Type" style = "Data Type" case-sensitive="FALSE">
|
||||
<keyword>bit</keyword>
|
||||
<keyword>bit_vector</keyword>
|
||||
<keyword>character</keyword>
|
||||
<keyword>boolean</keyword>
|
||||
<keyword>integer</keyword>
|
||||
<keyword>real</keyword>
|
||||
<keyword>time</keyword>
|
||||
<keyword>string</keyword>
|
||||
<keyword>severity_level</keyword>
|
||||
<keyword>positive</keyword>
|
||||
<keyword>natural</keyword>
|
||||
<keyword>signed</keyword>
|
||||
<keyword>unsigned</keyword>
|
||||
<keyword>line</keyword>
|
||||
<keyword>text</keyword>
|
||||
<keyword>std_logic</keyword>
|
||||
<keyword>std_logic_vector</keyword>
|
||||
<keyword>std_ulogic</keyword>
|
||||
<keyword>std_ulogic_vector</keyword>
|
||||
<keyword>qsim_state</keyword>
|
||||
<keyword>qsim_state_vector</keyword>
|
||||
<keyword>qsim_12state</keyword>
|
||||
<keyword>qsim_12state_vector</keyword>
|
||||
<keyword>qsim_strength</keyword>
|
||||
<keyword>mux_bit</keyword>
|
||||
<keyword>mux_vectory</keyword>
|
||||
<keyword>reg_bit</keyword>
|
||||
<keyword>reg_vector</keyword>
|
||||
<keyword>wor_bit</keyword>
|
||||
<keyword>wor_vector</keyword>
|
||||
</keyword-list>
|
||||
<context id="line-comment" style-ref="comment" end-at-line-end="true">
|
||||
<start>--</start>
|
||||
<include>
|
||||
<context ref="def:in-line-comment"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<pattern-item _name = "Number" style = "Decimal">
|
||||
<regex>\b[0-9]+(\b|\.|\.[0-9]*\b)</regex>
|
||||
</pattern-item>
|
||||
<context id="string" style-ref="string" end-at-line-end="true">
|
||||
<start>"</start>
|
||||
<end>"</end>
|
||||
</context>
|
||||
|
||||
<keyword-list _name = "True and False" style = "Specials" case-sensitive="FALSE">
|
||||
<keyword>true</keyword>
|
||||
<keyword>false</keyword>
|
||||
</keyword-list>
|
||||
<context id="character" style-ref="string">
|
||||
<match>'.'</match>
|
||||
</context>
|
||||
|
||||
<context id="keywords" style-ref="keyword">
|
||||
<keyword>access</keyword>
|
||||
<keyword>after</keyword>
|
||||
<keyword>alias</keyword>
|
||||
<keyword>all</keyword>
|
||||
<keyword>architecture</keyword>
|
||||
<keyword>array</keyword>
|
||||
<keyword>assert</keyword>
|
||||
<keyword>attribute</keyword>
|
||||
<keyword>begin</keyword>
|
||||
<keyword>block</keyword>
|
||||
<keyword>body</keyword>
|
||||
<keyword>buffer</keyword>
|
||||
<keyword>bus</keyword>
|
||||
<keyword>case</keyword>
|
||||
<keyword>component</keyword>
|
||||
<keyword>configuration</keyword>
|
||||
<keyword>constant</keyword>
|
||||
<keyword>disconnect</keyword>
|
||||
<keyword>downto</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>elsif</keyword>
|
||||
<keyword>end</keyword>
|
||||
<keyword>entity</keyword>
|
||||
<keyword>exit</keyword>
|
||||
<keyword>file</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>function</keyword>
|
||||
<keyword>generate</keyword>
|
||||
<keyword>generic</keyword>
|
||||
<keyword>group</keyword>
|
||||
<keyword>guarded</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>impure</keyword>
|
||||
<keyword>in</keyword>
|
||||
<keyword>inertial</keyword>
|
||||
<keyword>inout</keyword>
|
||||
<keyword>is</keyword>
|
||||
<keyword>label</keyword>
|
||||
<keyword>library</keyword>
|
||||
<keyword>linkage</keyword>
|
||||
<keyword>literal</keyword>
|
||||
<keyword>loop</keyword>
|
||||
<keyword>map</keyword>
|
||||
<keyword>new</keyword>
|
||||
<keyword>next</keyword>
|
||||
<keyword>null</keyword>
|
||||
<keyword>of</keyword>
|
||||
<keyword>on</keyword>
|
||||
<keyword>open</keyword>
|
||||
<keyword>others</keyword>
|
||||
<keyword>out</keyword>
|
||||
<keyword>package</keyword>
|
||||
<keyword>port</keyword>
|
||||
<keyword>postponed</keyword>
|
||||
<keyword>procedure</keyword>
|
||||
<keyword>process</keyword>
|
||||
<keyword>pure</keyword>
|
||||
<keyword>range</keyword>
|
||||
<keyword>record</keyword>
|
||||
<keyword>register</keyword>
|
||||
<keyword>reject</keyword>
|
||||
<keyword>report</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>select</keyword>
|
||||
<keyword>severity</keyword>
|
||||
<keyword>signal</keyword>
|
||||
<keyword>shared</keyword>
|
||||
<keyword>subtype</keyword>
|
||||
<keyword>then</keyword>
|
||||
<keyword>to</keyword>
|
||||
<keyword>transport</keyword>
|
||||
<keyword>type</keyword>
|
||||
<keyword>unaffected</keyword>
|
||||
<keyword>units</keyword>
|
||||
<keyword>until</keyword>
|
||||
<keyword>use</keyword>
|
||||
<keyword>variable</keyword>
|
||||
<keyword>wait</keyword>
|
||||
<keyword>when</keyword>
|
||||
<keyword>while</keyword>
|
||||
<keyword>with</keyword>
|
||||
<keyword>note</keyword>
|
||||
<keyword>warning</keyword>
|
||||
<keyword>error</keyword>
|
||||
<keyword>failure</keyword>
|
||||
<keyword>and</keyword>
|
||||
<keyword>nand</keyword>
|
||||
<keyword>or</keyword>
|
||||
<keyword>nor</keyword>
|
||||
<keyword>xor</keyword>
|
||||
<keyword>xnor</keyword>
|
||||
<keyword>rol</keyword>
|
||||
<keyword>ror</keyword>
|
||||
<keyword>sla</keyword>
|
||||
<keyword>sll</keyword>
|
||||
<keyword>sra</keyword>
|
||||
<keyword>srl</keyword>
|
||||
<keyword>mod</keyword>
|
||||
<keyword>rem</keyword>
|
||||
<keyword>abs</keyword>
|
||||
<keyword>not</keyword>
|
||||
</context>
|
||||
|
||||
<context id="types" style-ref="type">
|
||||
<keyword>bit</keyword>
|
||||
<keyword>bit_vector</keyword>
|
||||
<keyword>character</keyword>
|
||||
<keyword>boolean</keyword>
|
||||
<keyword>integer</keyword>
|
||||
<keyword>real</keyword>
|
||||
<keyword>time</keyword>
|
||||
<keyword>string</keyword>
|
||||
<keyword>severity_level</keyword>
|
||||
<keyword>positive</keyword>
|
||||
<keyword>natural</keyword>
|
||||
<keyword>signed</keyword>
|
||||
<keyword>unsigned</keyword>
|
||||
<keyword>line</keyword>
|
||||
<keyword>text</keyword>
|
||||
<keyword>std_logic</keyword>
|
||||
<keyword>std_logic_vector</keyword>
|
||||
<keyword>std_ulogic</keyword>
|
||||
<keyword>std_ulogic_vector</keyword>
|
||||
<keyword>qsim_state</keyword>
|
||||
<keyword>qsim_state_vector</keyword>
|
||||
<keyword>qsim_12state</keyword>
|
||||
<keyword>qsim_12state_vector</keyword>
|
||||
<keyword>qsim_strength</keyword>
|
||||
<keyword>mux_bit</keyword>
|
||||
<keyword>mux_vectory</keyword>
|
||||
<keyword>reg_bit</keyword>
|
||||
<keyword>reg_vector</keyword>
|
||||
<keyword>wor_bit</keyword>
|
||||
<keyword>wor_vector</keyword>
|
||||
</context>
|
||||
|
||||
<context id="boolean" style-ref="boolean">
|
||||
<keyword>false</keyword>
|
||||
<keyword>true</keyword>
|
||||
</context>
|
||||
|
||||
<define-regex id="hexnum">[0-9a-f][0-9a-f_]*</define-regex>
|
||||
<define-regex id="exponent">[Ee][+-]?[0-9][0-9_]*</define-regex>
|
||||
|
||||
<context id="base-n-number" style-ref="base-n-number">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
[0-9][0-9_]*\#\%{hexnum}(\.\%{hexnum})?\#\%{exponent}?
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="real" style-ref="real">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
[0-9][0-9_]*\.[0-9][0-9_]*\%{exponent}?
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="number" style-ref="number">
|
||||
<match extended="true">
|
||||
(?<![\w\.])
|
||||
[0-9][0-9_]*(E[+]?[0-9][0-9_]*)?
|
||||
(?![\w\.])
|
||||
</match>
|
||||
</context>
|
||||
|
||||
<context id="vhdl">
|
||||
<include>
|
||||
<context ref="line-comment"/>
|
||||
<context ref="string"/>
|
||||
<context ref="character"/>
|
||||
<context ref="keywords"/>
|
||||
<context ref="types"/>
|
||||
<context ref="boolean"/>
|
||||
<context ref="base-n-number"/>
|
||||
<context ref="real"/>
|
||||
<context ref="number"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
</definitions>
|
||||
|
||||
</language>
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Authors: Marco Barisione, Emanuele Aina
|
||||
Authors: Marco Barisione, Emanuele Aina, Paolo Borelli
|
||||
Copyright (C) 2005-2007 Marco Barisione <barisione@gmail.com>
|
||||
Copyright (C) 2005-2007 Emanuele Aina
|
||||
Copyright (C) 2007 Paolo Borelli
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
|
@ -23,22 +24,23 @@
|
|||
-->
|
||||
<language id="xml" _name="XML" version="2.0" _section="Markup">
|
||||
<metadata>
|
||||
<property name="mimetypes">application/xml;text/xml</property>
|
||||
<property name="globs">*.xml;*.xspf;*.siv;*.smil;*.smi;*.sml;*.kino;*.xul;*.xbel;*.abw;*.zabw;*.glade;*.jnlp;*.xhtml;*.svg;*.docbook;*.mml;*.rdf;*.rss;*.wml;*.xmi;*.fo;*.xslfo;*.xslt;*.xsl</property>
|
||||
<property name="block-comment-start"><!--</property>
|
||||
<property name="block-comment-end">--></property>
|
||||
<property name="mimetypes">application/xml;text/xml</property>
|
||||
<property name="globs">*.xml;*.xspf;*.siv;*.smil;*.smi;*.sml;*.kino;*.xul;*.xbel;*.abw;*.zabw;*.glade;*.jnlp;*.xhtml;*.svg;*.mml;*.rdf;*.rss;*.wml;*.xmi;*.fo;*.xslfo;*.xslt;*.xsl</property>
|
||||
<property name="block-comment-start"><!--</property>
|
||||
<property name="block-comment-end">--></property>
|
||||
</metadata>
|
||||
|
||||
<styles>
|
||||
<style id="comment" _name="Comment" map-to="def:comment"/>
|
||||
<style id="doctype" _name="DOCTYPE"/>
|
||||
<style id="cdata-delim" _name="CDATA Delimiters"/>
|
||||
<style id="processing-instruction" _name="Processing Instruction"/>
|
||||
<style id="attribute-name" _name="Attribute Name"/> <!--map-to="def:others3"-->
|
||||
<style id="attribute-value" _name="Attribute Value" map-to="def:string"/>
|
||||
<style id="entity" _name="Entity" map-to="def:escape"/>
|
||||
<style id="tags" _name="Tag"/> <!--map-to="def:others2"-->
|
||||
<style id="namespace" _name="Namespace"/> <!--map-to="def:others"-->
|
||||
<style id="doctype" _name="DOCTYPE" map-to="def:preprocessor"/>
|
||||
<style id="cdata-delim" _name="CDATA delimiter" map-to="def:preprocessor"/>
|
||||
<style id="processing-instruction" _name="Processing instruction" map-to="def:preprocessor"/>
|
||||
<style id="element-name" _name="Element name" map-to="def:identifier"/>
|
||||
<style id="attribute-name" _name="Attribute name" map-to="def:type"/>
|
||||
<style id="attribute-value" _name="Attribute value" map-to="def:string"/>
|
||||
<style id="entity" _name="Entity" map-to="def:preprocessor"/>
|
||||
<style id="tag" _name="Tag"/>
|
||||
<style id="namespace" _name="Namespace" map-to="xml:element-name"/>
|
||||
<style id="error" _name="Error" map-to="def:error"/>
|
||||
</styles>
|
||||
|
||||
|
@ -59,18 +61,6 @@
|
|||
<match>[&<]</match>
|
||||
</context>
|
||||
|
||||
<context id="attribute" style-ref="attribute-value">
|
||||
<start>((\%{prefix}:)?\%{name}\s*=\s*)(["'])</start>
|
||||
<end>\%{3@start}</end>
|
||||
<include>
|
||||
<context sub-pattern="1" where="start" style-ref="attribute-name" />
|
||||
<context sub-pattern="2" where="start" style-ref="namespace" />
|
||||
<context ref="entity"/>
|
||||
<context ref="character-reference"/>
|
||||
<context ref="unallowed-chars"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="comment" style-ref="comment">
|
||||
<start><!--</start>
|
||||
<end>--></end>
|
||||
|
@ -125,66 +115,88 @@
|
|||
</include>
|
||||
</context>
|
||||
|
||||
<context id="processing-instruction" style-ref="processing-instruction">
|
||||
<start><\?</start>
|
||||
<end>\?></end>
|
||||
</context>
|
||||
|
||||
<!-- The following three contexts can be <replace>d in xml
|
||||
dialect lang files, to custommize highlighting, e.g.
|
||||
highlighting docbook tags as keywords -->
|
||||
|
||||
<context id="namespace" style-ref="namespace">
|
||||
<match>(?<!:)\%{prefix}:</match>
|
||||
</context>
|
||||
|
||||
<context id="element-name" once-only="true" style-ref="element-name">
|
||||
<match>\b\%{name}\b(?!\s*=)</match>
|
||||
</context>
|
||||
|
||||
<context id="attribute-name" style-ref="attribute-name">
|
||||
<match>\b\%{name}\s*=</match>
|
||||
</context>
|
||||
|
||||
<context id="attribute-value" style-ref="attribute-value">
|
||||
<start>["']</start>
|
||||
<end>\%{0@start}</end>
|
||||
<include>
|
||||
<context ref="entity"/>
|
||||
<context ref="character-reference"/>
|
||||
<context ref="unallowed-chars"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="prolog">
|
||||
<start><\?xml</start>
|
||||
<end>\?></end>
|
||||
<include>
|
||||
<context sub-pattern="0" where="start" style-ref="processing-instruction"/>
|
||||
<context sub-pattern="0" where="end" style-ref="processing-instruction"/>
|
||||
<context ref="attribute"/>
|
||||
<context ref="attribute-value"/>
|
||||
<context ref="attribute-name"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="processing-instruction" style-ref="processing-instruction">
|
||||
<start><\?</start>
|
||||
<end>\?></end>
|
||||
</context>
|
||||
|
||||
<!-- Tags are divided in two parts, one external and one internal
|
||||
- <tag attr="foo"> [...] <tag>
|
||||
- |____________________________| external
|
||||
- |_________| internal
|
||||
- |________| attributes
|
||||
-->
|
||||
<context id="tag">
|
||||
<!-- This matches the external portion
|
||||
- <tag [...] tag>
|
||||
-->
|
||||
<start><\s*(\%{prefix}:)?\%{name}</start>
|
||||
<end>/\s*((\%{prefix}:)?\%{name}\s*>)|/></end>
|
||||
<context id="start-tag" style-ref="tag">
|
||||
<start><(?!/)</start>
|
||||
<end>/?></end>
|
||||
<include>
|
||||
<context sub-pattern="1" where="start" style-ref="namespace" />
|
||||
<context sub-pattern="0" where="start" style-ref="tags" />
|
||||
<context sub-pattern="2" where="end" style-ref="namespace" />
|
||||
<context sub-pattern="0" where="end" style-ref="tags" />
|
||||
|
||||
<context ref="attribute"/>
|
||||
|
||||
<context id="tag-internal">
|
||||
<!-- This matches the internal portion
|
||||
- > [...] <
|
||||
-->
|
||||
<start>></start>
|
||||
<end><(?=/)</end>
|
||||
<include>
|
||||
<context sub-pattern="0" where="start" style-ref="tags" />
|
||||
<context sub-pattern="0" where="end" style-ref="tags" />
|
||||
<context ref="tag"/>
|
||||
<context ref="comment"/>
|
||||
<context ref="entity"/>
|
||||
<context ref="character-reference"/>
|
||||
<context ref="cdata"/>
|
||||
<context ref="processing-instruction"/>
|
||||
<context ref="unallowed-chars"/>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context sub-pattern="0" where="start" style-ref="element-name"/>
|
||||
<context sub-pattern="0" where="end" style-ref="element-name"/>
|
||||
<context ref="entity"/>
|
||||
<context ref="character-reference"/>
|
||||
<context ref="unallowed-chars"/>
|
||||
<context ref="namespace"/>
|
||||
<context ref="element-name"/>
|
||||
<context ref="attribute-name"/>
|
||||
<context ref="attribute-value"/>
|
||||
<context style-ref="error" extend-parent="false">
|
||||
<match>\S</match>
|
||||
<match>\S</match>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="end-tag" style-ref="tag">
|
||||
<start></</start>
|
||||
<end>></end>
|
||||
<include>
|
||||
<context sub-pattern="0" where="start" style-ref="element-name"/>
|
||||
<context sub-pattern="0" where="end" style-ref="element-name"/>
|
||||
<context ref="entity"/>
|
||||
<context ref="character-reference"/>
|
||||
<context ref="unallowed-chars"/>
|
||||
<context ref="namespace"/>
|
||||
<context ref="element-name"/>
|
||||
<context style-ref="error" extend-parent="false">
|
||||
<match>\S</match>
|
||||
</context>
|
||||
</include>
|
||||
</context>
|
||||
|
||||
<context id="close-tag-outside-tag" style-ref="error">
|
||||
<match>/></match>
|
||||
</context>
|
||||
|
||||
<context id="xml">
|
||||
<include>
|
||||
<context ref="comment"/>
|
||||
|
@ -192,12 +204,12 @@
|
|||
<context ref="cdata"/>
|
||||
<context ref="prolog"/>
|
||||
<context ref="processing-instruction"/>
|
||||
|
||||
<context ref="tag"/>
|
||||
|
||||
<context style-ref="error">
|
||||
<match>\S</match>
|
||||
</context>
|
||||
<context ref="start-tag"/>
|
||||
<context ref="end-tag"/>
|
||||
<context ref="entity"/>
|
||||
<context ref="character-reference"/>
|
||||
<context ref="unallowed-chars"/>
|
||||
<context ref="close-tag-outside-tag"/>
|
||||
</include>
|
||||
</context>
|
||||
</definitions>
|
||||
|
|
|
@ -34,7 +34,7 @@ typedef struct _MooLangMgrClass MooLangMgrClass;
|
|||
struct _MooLangMgr {
|
||||
GtkSourceLanguageManager base;
|
||||
|
||||
GtkSourceStyleManager *style_mgr;
|
||||
GtkSourceStyleSchemeManager *style_mgr;
|
||||
|
||||
GHashTable *langs;
|
||||
GHashTable *config;
|
||||
|
|
|
@ -75,8 +75,8 @@ moo_lang_mgr_init (MooLangMgr *mgr)
|
|||
|
||||
dirs = moo_get_data_subdirs (LANGUAGE_DIR, MOO_DATA_SHARE, &n_dirs);
|
||||
g_object_set (mgr, "search-path", dirs, NULL);
|
||||
mgr->style_mgr = gtk_source_style_manager_new ();
|
||||
gtk_source_style_manager_set_search_path (mgr->style_mgr, dirs);
|
||||
mgr->style_mgr = gtk_source_style_scheme_manager_new ();
|
||||
gtk_source_style_scheme_manager_set_search_path (mgr->style_mgr, dirs);
|
||||
|
||||
load_config (mgr);
|
||||
|
||||
|
@ -530,7 +530,7 @@ get_lang_for_mime_type (MooLangMgr *mgr,
|
|||
static void
|
||||
read_langs (MooLangMgr *mgr)
|
||||
{
|
||||
GSList *langs = NULL;
|
||||
const char * const *ids = NULL;
|
||||
|
||||
if (mgr->got_langs)
|
||||
return;
|
||||
|
@ -540,26 +540,29 @@ read_langs (MooLangMgr *mgr)
|
|||
mgr->got_langs = TRUE;
|
||||
|
||||
#ifdef MOO_USE_XML
|
||||
langs = gtk_source_language_manager_list_languages (GTK_SOURCE_LANGUAGE_MANAGER (mgr));
|
||||
ids = gtk_source_language_manager_get_language_ids (GTK_SOURCE_LANGUAGE_MANAGER (mgr));
|
||||
#endif
|
||||
|
||||
get_lang_info (mgr, MOO_LANG_NONE, TRUE);
|
||||
|
||||
while (langs)
|
||||
while (ids && *ids)
|
||||
{
|
||||
LangInfo *info;
|
||||
MooLang *lang = langs->data;
|
||||
const char *id = _moo_lang_id (lang);
|
||||
const char *id;
|
||||
GtkSourceLanguage *lang;
|
||||
|
||||
id = *ids;
|
||||
lang = gtk_source_language_manager_get_language (GTK_SOURCE_LANGUAGE_MANAGER (mgr), id);
|
||||
|
||||
info = get_lang_info (mgr, id, TRUE);
|
||||
info->lang = g_object_ref (lang);
|
||||
|
||||
if (!info->globs_modified)
|
||||
info->globs = _moo_lang_get_globs (lang);
|
||||
info->globs = _moo_lang_get_globs (info->lang);
|
||||
if (!info->mime_types_modified)
|
||||
info->mime_types = _moo_lang_get_mime_types (lang);
|
||||
info->mime_types = _moo_lang_get_mime_types (info->lang);
|
||||
|
||||
langs = g_slist_delete_link (langs, langs);
|
||||
ids++;
|
||||
}
|
||||
|
||||
g_signal_emit_by_name (mgr, "loaded");
|
||||
|
@ -736,13 +739,13 @@ read_schemes (MooLangMgr *mgr)
|
|||
|
||||
mgr->got_schemes = TRUE;
|
||||
|
||||
ids = gtk_source_style_manager_get_scheme_ids (mgr->style_mgr);
|
||||
ids = gtk_source_style_scheme_manager_get_scheme_ids (mgr->style_mgr);
|
||||
|
||||
while (ids && *ids)
|
||||
{
|
||||
MooTextStyleScheme *scheme;
|
||||
|
||||
scheme = MOO_TEXT_STYLE_SCHEME (gtk_source_style_manager_get_scheme (mgr->style_mgr, *ids));
|
||||
scheme = MOO_TEXT_STYLE_SCHEME (gtk_source_style_scheme_manager_get_scheme (mgr->style_mgr, *ids));
|
||||
|
||||
if (!scheme)
|
||||
{
|
||||
|
@ -764,22 +767,30 @@ GSList *
|
|||
moo_lang_mgr_get_sections (MooLangMgr *mgr)
|
||||
{
|
||||
GSList *sections = NULL;
|
||||
GSList *list = NULL;
|
||||
const char * const *ids = NULL;
|
||||
|
||||
g_return_val_if_fail (MOO_IS_LANG_MGR (mgr), NULL);
|
||||
|
||||
read_langs (mgr);
|
||||
|
||||
#ifdef MOO_USE_XML
|
||||
list = gtk_source_language_manager_list_languages (GTK_SOURCE_LANGUAGE_MANAGER (mgr));
|
||||
ids = gtk_source_language_manager_get_language_ids (GTK_SOURCE_LANGUAGE_MANAGER (mgr));
|
||||
#endif
|
||||
|
||||
while (list)
|
||||
while (ids && *ids)
|
||||
{
|
||||
const char *section = _moo_lang_get_section (list->data);
|
||||
GtkSourceLanguage *lang;
|
||||
const char *section;
|
||||
const char *id;
|
||||
|
||||
id = *ids;
|
||||
lang = gtk_source_language_manager_get_language (GTK_SOURCE_LANGUAGE_MANAGER (mgr), id);
|
||||
section = _moo_lang_get_section (MOO_LANG (lang));
|
||||
|
||||
if (section && !g_slist_find_custom (sections, section, (GCompareFunc) strcmp))
|
||||
sections = g_slist_prepend (sections, g_strdup (section));
|
||||
list = g_slist_delete_link (list, list);
|
||||
|
||||
ids++;
|
||||
}
|
||||
|
||||
return sections;
|
||||
|
@ -790,18 +801,26 @@ GSList *
|
|||
moo_lang_mgr_get_available_langs (MooLangMgr *mgr)
|
||||
{
|
||||
GSList *list = NULL;
|
||||
const char *const *ids = NULL;
|
||||
|
||||
g_return_val_if_fail (MOO_IS_LANG_MGR (mgr), NULL);
|
||||
|
||||
read_langs (mgr);
|
||||
|
||||
#ifdef MOO_USE_XML
|
||||
list = gtk_source_language_manager_list_languages (GTK_SOURCE_LANGUAGE_MANAGER (mgr));
|
||||
ids = gtk_source_language_manager_get_language_ids (GTK_SOURCE_LANGUAGE_MANAGER (mgr));
|
||||
#endif
|
||||
|
||||
g_slist_foreach (list, (GFunc) g_object_ref, NULL);
|
||||
while (ids && *ids)
|
||||
{
|
||||
GtkSourceLanguage *lang;
|
||||
lang = gtk_source_language_manager_get_language (GTK_SOURCE_LANGUAGE_MANAGER (mgr), *ids);
|
||||
if (lang)
|
||||
list = g_slist_prepend (list, g_object_ref (lang));
|
||||
ids++;
|
||||
}
|
||||
|
||||
return list;
|
||||
return g_slist_reverse (list);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -136,7 +136,7 @@ static guint signals[LAST_SIGNAL];
|
|||
|
||||
enum {
|
||||
PROP_0,
|
||||
PROP_HIGHLIGHT, /* mimic GtkSourceBuffer */
|
||||
PROP_HIGHLIGHT_SYNTAX, /* mimic GtkSourceBuffer */
|
||||
PROP_HIGHLIGHT_MATCHING_BRACKETS,
|
||||
PROP_HIGHLIGHT_MISMATCHING_BRACKETS,
|
||||
PROP_BRACKET_MATCH_STYLE,
|
||||
|
@ -175,10 +175,10 @@ moo_text_buffer_class_init (MooTextBufferClass *klass)
|
|||
g_type_class_add_private (klass, sizeof (MooTextBufferPrivate));
|
||||
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_HIGHLIGHT,
|
||||
g_param_spec_boolean ("highlight",
|
||||
"highlight",
|
||||
"highlight",
|
||||
PROP_HIGHLIGHT_SYNTAX,
|
||||
g_param_spec_boolean ("highlight-syntax",
|
||||
"highlight-syntax",
|
||||
"highlight-syntax",
|
||||
TRUE,
|
||||
G_PARAM_READWRITE));
|
||||
|
||||
|
@ -808,8 +808,8 @@ moo_text_buffer_get_lang (MooTextBuffer *buffer)
|
|||
|
||||
|
||||
void
|
||||
moo_text_buffer_set_highlight (MooTextBuffer *buffer,
|
||||
gboolean highlight)
|
||||
moo_text_buffer_set_highlight (MooTextBuffer *buffer,
|
||||
gboolean highlight)
|
||||
{
|
||||
g_return_if_fail (MOO_IS_TEXT_BUFFER (buffer));
|
||||
|
||||
|
@ -819,7 +819,7 @@ moo_text_buffer_set_highlight (MooTextBuffer *buffer,
|
|||
return;
|
||||
|
||||
buffer->priv->do_highlight = highlight;
|
||||
g_object_notify (G_OBJECT (buffer), "highlight");
|
||||
g_object_notify (G_OBJECT (buffer), "highlight-syntax");
|
||||
}
|
||||
|
||||
|
||||
|
@ -841,7 +841,7 @@ moo_text_buffer_set_property (GObject *object,
|
|||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_HIGHLIGHT:
|
||||
case PROP_HIGHLIGHT_SYNTAX:
|
||||
moo_text_buffer_set_highlight (buffer, g_value_get_boolean (value));
|
||||
break;
|
||||
|
||||
|
@ -884,7 +884,7 @@ moo_text_buffer_get_property (GObject *object,
|
|||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_HIGHLIGHT:
|
||||
case PROP_HIGHLIGHT_SYNTAX:
|
||||
g_value_set_boolean (value, buffer->priv->do_highlight);
|
||||
break;
|
||||
|
||||
|
|
|
@ -653,8 +653,6 @@ static void moo_text_view_class_init (MooTextViewClass *klass)
|
|||
static void
|
||||
moo_text_view_init (MooTextView *view)
|
||||
{
|
||||
char *name;
|
||||
|
||||
view->priv = G_TYPE_INSTANCE_GET_PRIVATE (view, MOO_TYPE_TEXT_VIEW, MooTextViewPrivate);
|
||||
|
||||
view->priv->colors[MOO_TEXT_VIEW_COLOR_CURRENT_LINE] = g_strdup (LIGHT_BLUE);
|
||||
|
@ -688,10 +686,6 @@ moo_text_view_init (MooTextView *view)
|
|||
view->priv->lm.show_folds = FALSE;
|
||||
view->priv->n_lines = 1;
|
||||
|
||||
name = g_strdup_printf ("moo-text-view-%p", (gpointer) view);
|
||||
gtk_widget_set_name (GTK_WIDGET (view), name);
|
||||
g_free (name);
|
||||
|
||||
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (view), 2);
|
||||
gtk_text_view_set_right_margin (GTK_TEXT_VIEW (view), 2);
|
||||
}
|
||||
|
@ -2523,57 +2517,6 @@ moo_text_view_lookup_tag (MooTextView *view,
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
moo_text_view_set_cursor_colors (MooTextView *view,
|
||||
const GdkColor *primary,
|
||||
const GdkColor *secondary)
|
||||
{
|
||||
#if !GTK_CHECK_VERSION(2,11,3)
|
||||
char *rc_string;
|
||||
GdkColor color = {0, 0, 0, 0};
|
||||
|
||||
g_return_if_fail (MOO_IS_TEXT_VIEW (view));
|
||||
|
||||
gtk_widget_ensure_style (GTK_WIDGET (view));
|
||||
|
||||
if (!primary)
|
||||
{
|
||||
g_return_if_fail (GTK_WIDGET (view)->style != NULL);
|
||||
primary = >K_WIDGET(view)->style->text[GTK_STATE_NORMAL];
|
||||
secondary = >K_WIDGET(view)->style->text_aa[GTK_STATE_NORMAL];
|
||||
}
|
||||
|
||||
if (!secondary)
|
||||
{
|
||||
GdkColor tmp = GTK_WIDGET(view)->style->base[GTK_STATE_NORMAL];
|
||||
color.red = ((gint) tmp.red + primary->red) / 2;
|
||||
color.green = ((gint) tmp.green + primary->green) / 2;
|
||||
color.blue = ((gint) tmp.blue + primary->blue) / 2;
|
||||
secondary = &color;
|
||||
}
|
||||
|
||||
rc_string = g_strdup_printf (
|
||||
"style \"%p\"\n"
|
||||
"{\n"
|
||||
" GtkWidget::cursor-color = \"#%02x%02x%02x\"\n"
|
||||
" GtkWidget::secondary-cursor-color = \"#%02x%02x%02x\"\n"
|
||||
"}\n"
|
||||
"widget \"*.%s\" style \"%p\"\n",
|
||||
(gpointer) view,
|
||||
primary->red >> 8, primary->green >> 8, primary->blue >> 8,
|
||||
secondary->red >> 8, secondary->green >> 8, secondary->blue >> 8,
|
||||
gtk_widget_get_name (GTK_WIDGET (view)), (gpointer) view
|
||||
);
|
||||
|
||||
gtk_rc_parse_string (rc_string);
|
||||
|
||||
g_free (rc_string);
|
||||
#else
|
||||
gtk_widget_modify_cursor (GTK_WIDGET (view), primary, secondary);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
moo_text_view_set_lang (MooTextView *view,
|
||||
MooLang *lang)
|
||||
|
|
|
@ -138,9 +138,6 @@ void moo_text_view_set_right_margin_color (MooTextView *view,
|
|||
const char *color);
|
||||
void moo_text_view_set_right_margin_offset (MooTextView *view,
|
||||
guint offset);
|
||||
void moo_text_view_set_cursor_colors (MooTextView *view,
|
||||
const GdkColor *prrimary,
|
||||
const GdkColor *secondary);
|
||||
void moo_text_view_set_style_scheme (MooTextView *view,
|
||||
MooTextStyleScheme *scheme);
|
||||
|
||||
|
|
|
@ -1170,16 +1170,6 @@
|
|||
)
|
||||
)
|
||||
|
||||
(define-method set_cursor_colors
|
||||
(of-object "MooTextView")
|
||||
(c-name "moo_text_view_set_cursor_colors")
|
||||
(return-type "none")
|
||||
(parameters
|
||||
'("const-GdkColor*" "primary" (null-ok))
|
||||
'("const-GdkColor*" "secondary" (null-ok) (default "NULL"))
|
||||
)
|
||||
)
|
||||
|
||||
(define-method set_style_scheme
|
||||
(of-object "MooTextView")
|
||||
(c-name "moo_text_view_set_style_scheme")
|
||||
|
|
|
@ -53,6 +53,7 @@ pt_BR
|
|||
ro
|
||||
ru
|
||||
rw
|
||||
si
|
||||
sk
|
||||
sl
|
||||
sq
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
moo/mooedit/gtksourceview/upstream/gtksourcecontextengine.c
|
||||
moo/mooedit/gtksourceview/upstream/gtksourcelanguage-parser-2.c
|
||||
moo/mooedit/gtksourceview/upstream/gtksourcelanguagemanager.c
|
||||
moo/mooedit/gtksourceview/upstream/gtksourcestylemanager.c
|
||||
moo/mooedit/gtksourceview/upstream/gtksourcestyleschememanager.c
|
||||
moo/mooedit/gtksourceview/upstream/gtksourcestylescheme.c
|
||||
moo/mooedit/gtksourceview/upstream/gtksourcelanguage.c
|
||||
|
||||
|
@ -21,6 +21,7 @@ moo/mooedit/language-specs/d.lang
|
|||
moo/mooedit/language-specs/docbook.lang
|
||||
moo/mooedit/language-specs/dpatch.lang
|
||||
moo/mooedit/language-specs/dtd.lang
|
||||
moo/mooedit/language-specs/erlang.lang
|
||||
moo/mooedit/language-specs/fortran.lang
|
||||
moo/mooedit/language-specs/gap.lang
|
||||
moo/mooedit/language-specs/gtk-doc.lang
|
||||
|
@ -38,8 +39,8 @@ moo/mooedit/language-specs/libtool.lang
|
|||
moo/mooedit/language-specs/lua.lang
|
||||
moo/mooedit/language-specs/m4.lang
|
||||
moo/mooedit/language-specs/makefile.lang
|
||||
moo/mooedit/language-specs/ms.lang
|
||||
moo/mooedit/language-specs/msil.lang
|
||||
moo/mooedit/language-specs/ms.lang
|
||||
moo/mooedit/language-specs/nemerle.lang
|
||||
moo/mooedit/language-specs/objc.lang
|
||||
moo/mooedit/language-specs/ocaml.lang
|
||||
|
@ -52,19 +53,21 @@ moo/mooedit/language-specs/pkgconfig.lang
|
|||
moo/mooedit/language-specs/po.lang
|
||||
moo/mooedit/language-specs/python.lang
|
||||
moo/mooedit/language-specs/R.lang
|
||||
moo/mooedit/language-specs/rpmspec.lang
|
||||
moo/mooedit/language-specs/ruby.lang
|
||||
moo/mooedit/language-specs/scheme.lang
|
||||
moo/mooedit/language-specs/sh.lang
|
||||
moo/mooedit/language-specs/spec.lang
|
||||
moo/mooedit/language-specs/sql.lang
|
||||
moo/mooedit/language-specs/tcl.lang
|
||||
moo/mooedit/language-specs/texinfo.lang
|
||||
moo/mooedit/language-specs/vala.lang
|
||||
moo/mooedit/language-specs/vbnet.lang
|
||||
moo/mooedit/language-specs/verilog.lang
|
||||
moo/mooedit/language-specs/vhdl.lang
|
||||
moo/mooedit/language-specs/xml.lang
|
||||
moo/mooedit/language-specs/yacc.lang
|
||||
|
||||
moo/mooedit/language-specs/gvim.xml
|
||||
moo/mooedit/language-specs/classic.xml
|
||||
moo/mooedit/language-specs/oblivion.xml
|
||||
moo/mooedit/language-specs/kate.xml
|
||||
moo/mooedit/language-specs/tango.xml
|
||||
|
|
|
@ -95,7 +95,7 @@ moo/mooedit/gtksourceview/gtksourcecontextengine-mangled.c
|
|||
moo/mooedit/gtksourceview/gtksourcelanguage-parser-2-mangled.c
|
||||
moo/mooedit/gtksourceview/gtksourcelanguagemanager-mangled.c
|
||||
moo/mooedit/gtksourceview/gtksourcestyle-mangled.c
|
||||
moo/mooedit/gtksourceview/gtksourcestylemanager-mangled.c
|
||||
moo/mooedit/gtksourceview/gtksourcestyleschememanager-mangled.c
|
||||
moo/mooedit/gtksourceview/gtksourcestylescheme-mangled.c
|
||||
moo/mooedit/gtksourceview/gtksourcestylescheme-noxml-mangled.c
|
||||
moo/mooedit/gtksourceview/gtksourcelanguage-mangled.c
|
||||
|
|
|
@ -12,7 +12,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: gtksourceview.HEAD.ar\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-07-15 02:59-0500\n"
|
||||
"POT-Creation-Date: 2007-09-09 12:00-0500\n"
|
||||
"PO-Revision-Date: 2007-02-16 11:53-0000\n"
|
||||
"Last-Translator: Djihed Afifi <djihed@gmail.com>\n"
|
||||
"Language-Team: Arabic <doc@arabeyes.org>\n"
|
||||
|
|
|
@ -7,7 +7,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: gtksourceview.HEAD.az\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-07-15 02:59-0500\n"
|
||||
"POT-Creation-Date: 2007-09-09 12:00-0500\n"
|
||||
"PO-Revision-Date: 2004-02-01 21:43+0200\n"
|
||||
"Last-Translator: Mətin Əmirov <metin@karegen.com>\n"
|
||||
"Language-Team: Azerbaijani Turkish <translation-team-az@lists.sourceforge.net>\n"
|
||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: gtksourceview HEAD\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-07-15 02:59-0500\n"
|
||||
"POT-Creation-Date: 2007-09-09 12:00-0500\n"
|
||||
"PO-Revision-Date: 2003-08-13 17:31+0300\n"
|
||||
"Last-Translator: Ales Nyakhaychyk <nab@mail.by>\n"
|
||||
"Language-Team: Belarusian <i18n@mova.org>\n"
|
||||
|
|
103
po-gsv/bg.po
103
po-gsv/bg.po
|
@ -6,10 +6,10 @@
|
|||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gtksourceview\n"
|
||||
"Project-Id-Version: gtksourceview trunk\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-07-15 02:59-0500\n"
|
||||
"PO-Revision-Date: 2007-02-17 11:32+0200\n"
|
||||
"POT-Creation-Date: 2007-09-09 12:00-0500\n"
|
||||
"PO-Revision-Date: 2007-08-17 06:54+0300\n"
|
||||
"Last-Translator: Alexander Shopov <ash@contact.bg>\n"
|
||||
"Language-Team: Bulgarian <dict@fsa-bg.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
@ -17,33 +17,130 @@ msgstr ""
|
|||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;"
|
||||
|
||||
msgid "C/C++/ObjC Header"
|
||||
msgstr "Заглавен файл на C/C++/ObjC"
|
||||
|
||||
msgid ""
|
||||
"Cannot create a regex for all the transitions, the syntax highlighting process will be slower than usual.\n"
|
||||
"The error was: %s"
|
||||
msgstr ""
|
||||
"Не могат да се композират регулярни изрази за всички преходи. Оцветяването на синтаксиса ще бъде по-бавно от обикновено.\n"
|
||||
"Грешката е: %s"
|
||||
|
||||
msgid "ChangeLog"
|
||||
msgstr "Дневник на промените"
|
||||
|
||||
msgid "Classic"
|
||||
msgstr "Класическа"
|
||||
|
||||
msgid "Classic color scheme"
|
||||
msgstr "Класическа цветова схема"
|
||||
|
||||
msgid "Color scheme used in the Kate text editor"
|
||||
msgstr "Цветова схема използвана в текстовия редактор Kate"
|
||||
|
||||
msgid "Color scheme using Tango color palette"
|
||||
msgstr "Цветова схема базирана на Tango"
|
||||
|
||||
msgid "Defaults"
|
||||
msgstr "Стандартни стойности"
|
||||
|
||||
msgid "Diff"
|
||||
msgstr "Разлики"
|
||||
|
||||
msgid "Docbook"
|
||||
msgstr "DocBook"
|
||||
|
||||
msgid "Hidden"
|
||||
msgstr "Скрит"
|
||||
|
||||
msgid "Javascript"
|
||||
msgstr "JavaScript"
|
||||
|
||||
msgid "Language id"
|
||||
msgstr "Идентификатор на език"
|
||||
|
||||
msgid "Language name"
|
||||
msgstr "Име на език"
|
||||
|
||||
msgid "Language section"
|
||||
msgstr "Раздел за език"
|
||||
|
||||
msgid "Language specification directories"
|
||||
msgstr "Папка с езиковите спецификации"
|
||||
|
||||
msgid "List of directories and files where the style schemes are located"
|
||||
msgstr "Списък с папки и файлове, в които се намират стиловите схеми"
|
||||
|
||||
msgid "List of directories where the language specification files (.lang) are located"
|
||||
msgstr "Списък с папки, където се пазят файловете за езикови спецификации (.lang)."
|
||||
|
||||
msgid "List of the ids of the available style schemes"
|
||||
msgstr "Списък с идентификатори на наличните стилови схеми"
|
||||
|
||||
msgid "Markup"
|
||||
msgstr "Маркиране"
|
||||
|
||||
msgid "Missing main language definition (id = \"%s\".)"
|
||||
msgstr "Основната дефиниция на език липсва (id = \"%s\")."
|
||||
|
||||
msgid "Others"
|
||||
msgstr "Други"
|
||||
|
||||
msgid "RPM spec"
|
||||
msgstr "Спецификация за RPM"
|
||||
|
||||
msgid "Scheme ids"
|
||||
msgstr "Идентификатори на схеми"
|
||||
|
||||
msgid "Scientific"
|
||||
msgstr "Научно"
|
||||
|
||||
msgid "Scripts"
|
||||
msgstr "Скриптове"
|
||||
|
||||
msgid "Sources"
|
||||
msgstr "Изходен код"
|
||||
|
||||
msgid "Style scheme filename"
|
||||
msgstr "Име файла на стилова схема"
|
||||
|
||||
msgid "Style scheme id"
|
||||
msgstr "Идентификатор на стилова схема"
|
||||
|
||||
msgid "Style scheme name"
|
||||
msgstr "Име на стилова схема"
|
||||
|
||||
msgid "Style scheme search path"
|
||||
msgstr "Път за търсене на стиловите схеми"
|
||||
|
||||
msgid "Unknown id '%s' in regex '%s'"
|
||||
msgstr "Непознат идентификатор „%s“ в контекста „%s“"
|
||||
|
||||
msgid "Whether the language should be hidden from the user"
|
||||
msgstr "Дали езикът да е скрит от потребителя"
|
||||
|
||||
msgid "context '%s' cannot contain a \\%%{...@start} command"
|
||||
msgstr "контекстът „%s“ не може да съдържа команда „\\%%{...@start}“"
|
||||
|
||||
msgid "duplicated context id '%s'"
|
||||
msgstr "идентификаторът на контекст „%s“ се повтаря"
|
||||
|
||||
msgid "gettext translation"
|
||||
msgstr "Превод на gettext"
|
||||
|
||||
msgid "in regex '%s': backreferences are not supported"
|
||||
msgstr "в регулярния израз „%s“: не се поддържат указатели към вече намерени групи знаци"
|
||||
|
||||
msgid "invalid reference '%s'"
|
||||
msgstr "неправилен указател „%s“"
|
||||
|
||||
msgid "style override used with wildcard context reference in language '%s' in ref '%s'"
|
||||
msgstr "налагане на стил, което е използвано с указател с маска към контексти в езика „%s“, указател „%s“ "
|
||||
|
||||
msgid "unknown context '%s'"
|
||||
msgstr "непознат контекст „%s“"
|
||||
|
||||
msgid "using \\C is not supported in language definitions"
|
||||
msgstr "използването на „\\C“ в дефинициите на езици не се поддържа"
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: GTKSourceView HEAD\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-07-15 02:59-0500\n"
|
||||
"POT-Creation-Date: 2007-09-09 12:00-0500\n"
|
||||
"PO-Revision-Date: 2005-10-01 00:37+0600\n"
|
||||
"Last-Translator: Mahay Alam Khan <makl10n@yahoo.com>\n"
|
||||
"Language-Team: Bengali <gnome-translation@bengalinux.org>\n"
|
||||
|
|
|
@ -10,7 +10,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: gtksourceview.HEAD\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-07-15 02:59-0500\n"
|
||||
"POT-Creation-Date: 2007-09-09 12:00-0500\n"
|
||||
"PO-Revision-Date: 2007-03-13 17:50+0530\n"
|
||||
"Last-Translator: Runa Bhattacharjee <runabh@gmail.com>\n"
|
||||
"Language-Team: Bengali India\n"
|
||||
|
|
|
@ -7,7 +7,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: gtksourceview.HEAD\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-07-15 02:59-0500\n"
|
||||
"POT-Creation-Date: 2007-09-09 12:00-0500\n"
|
||||
"PO-Revision-Date: 2004-08-21 13:59-0700\n"
|
||||
"Last-Translator: Ahmet Mulalic <am@lugzdk.ba>\n"
|
||||
"Language-Team: Bosnian <lokal@linux.org.ba>\n"
|
||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: gtksourceview\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-07-15 02:59-0500\n"
|
||||
"POT-Creation-Date: 2007-09-09 12:00-0500\n"
|
||||
"PO-Revision-Date: 2007-03-07 08:33+0100\n"
|
||||
"Last-Translator: Jordi Mallach <jordi@sindominio.net>\n"
|
||||
"Language-Team: Catalan <tradgnome@softcatala.org>\n"
|
||||
|
@ -37,7 +37,7 @@ msgstr "Seqüències"
|
|||
msgid "Sources"
|
||||
msgstr "Codis font"
|
||||
|
||||
msgid "Style scheme directories"
|
||||
msgid "Style scheme search path"
|
||||
msgstr "lang)"
|
||||
|
||||
msgid "gettext translation"
|
||||
|
|
|
@ -11,7 +11,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: gtksourceview VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-07-15 02:59-0500\n"
|
||||
"POT-Creation-Date: 2007-09-09 12:00-0500\n"
|
||||
"PO-Revision-Date: 2006-07-25 12:50+0200\n"
|
||||
"Last-Translator: Lukas Novotny <lukasnov@cvs.gnome.org>\n"
|
||||
"Language-Team: Czech <cs@li.org>\n"
|
||||
|
|
|
@ -10,7 +10,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: gtksourceview\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-07-15 02:59-0500\n"
|
||||
"POT-Creation-Date: 2007-09-09 12:00-0500\n"
|
||||
"PO-Revision-Date: 2006-02-22 22:22-0000\n"
|
||||
"Last-Translator: Rhys Jones <rhys@sucs.org>\n"
|
||||
"Language-Team: Cymraeg <gnome-cy@www.linux.org.uk>\n"
|
||||
|
|
113
po-gsv/da.po
113
po-gsv/da.po
|
@ -18,8 +18,8 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: gtksourceview\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-07-15 02:59-0500\n"
|
||||
"PO-Revision-Date: 2007-04-10 22:40+0200\n"
|
||||
"POT-Creation-Date: 2007-09-09 12:00-0500\n"
|
||||
"PO-Revision-Date: 2007-09-09 01:20+0200\n"
|
||||
"Last-Translator: Ask Hjorth Larsen <asklarsen@gmail.com>\n"
|
||||
"Language-Team: Danish <dansk@dansk-gruppen.dk>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
@ -27,27 +27,136 @@ msgstr ""
|
|||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);"
|
||||
|
||||
msgid "C/C++/ObjC Header"
|
||||
msgstr "C/C++/ObjC-header"
|
||||
|
||||
msgid ""
|
||||
"Cannot create a regex for all the transitions, the syntax highlighting process will be slower than usual.\n"
|
||||
"The error was: %s"
|
||||
msgstr ""
|
||||
"Kan ikke oprette et regulært udtryk for alle overgangene, syntaksmarkeringen vil derfor være langsommere end sædvanligt.\n"
|
||||
"Fejlen var: %s"
|
||||
|
||||
msgid "Classic"
|
||||
msgstr "Klassisk"
|
||||
|
||||
msgid "Classic color scheme"
|
||||
msgstr "Klassisk farveskema"
|
||||
|
||||
msgid "Color scheme used in the Kate text editor"
|
||||
msgstr "Farveskema som bruges i tekstredigeringsprogrammet Kate"
|
||||
|
||||
msgid "Color scheme using Tango color palette"
|
||||
msgstr "Farveskema der bruger Tango-farvepaletten"
|
||||
|
||||
msgid "Dark color scheme using the Tango color palette"
|
||||
msgstr "Mørkt farveskema der bruger Tango-farvepaletten"
|
||||
|
||||
msgid "Defaults"
|
||||
msgstr "Standard"
|
||||
|
||||
msgid "Hidden"
|
||||
msgstr "Skjult"
|
||||
|
||||
msgid "Javascript"
|
||||
msgstr "JavaScript"
|
||||
|
||||
msgid "Language id"
|
||||
msgstr "Sprog-id"
|
||||
|
||||
msgid "Language ids"
|
||||
msgstr "Sprog-id'er"
|
||||
|
||||
msgid "Language name"
|
||||
msgstr "Sprognavn"
|
||||
|
||||
msgid "Language section"
|
||||
msgstr "Sprogafsnit"
|
||||
|
||||
msgid "Language specification directories"
|
||||
msgstr "Sprogspecifikationsmapper"
|
||||
|
||||
msgid "List of directories and files where the style schemes are located"
|
||||
msgstr "Liste af mapper og filer hvori stilskemaerne er placeret"
|
||||
|
||||
msgid "List of directories where the language specification files (.lang) are located"
|
||||
msgstr "Liste af mapper hvor sprogspecifikationsfilerne (.lang) er placeret"
|
||||
|
||||
msgid "List of the ids of the available languages"
|
||||
msgstr "Liste af id'erne for de tilgængelige sprog"
|
||||
|
||||
msgid "List of the ids of the available style schemes"
|
||||
msgstr "Liste af id'erne for de tilgængelige stil-skemaer"
|
||||
|
||||
msgid "Literate Haskell"
|
||||
msgstr "Litterær Haskell"
|
||||
|
||||
msgid "Markup"
|
||||
msgstr "Opmærkning"
|
||||
|
||||
msgid "Missing main language definition (id = \"%s\".)"
|
||||
msgstr "Mangler hovedsprogsdefinition (id = \"%s\".)"
|
||||
|
||||
msgid "Others"
|
||||
msgstr "Andre"
|
||||
|
||||
msgid "RPM spec"
|
||||
msgstr "RPM-spec"
|
||||
|
||||
msgid "Scheme ids"
|
||||
msgstr "Skema-id'er"
|
||||
|
||||
msgid "Scientific"
|
||||
msgstr "Videnskabelig"
|
||||
|
||||
msgid "Scripts"
|
||||
msgstr "Skripter"
|
||||
|
||||
msgid "Sources"
|
||||
msgstr "Kildekode"
|
||||
|
||||
msgid "Style scheme description"
|
||||
msgstr "Stilskema-beskrivelse"
|
||||
|
||||
msgid "Style scheme filename"
|
||||
msgstr "Stilskema-filnavn"
|
||||
|
||||
msgid "Style scheme id"
|
||||
msgstr "Stilskema-id"
|
||||
|
||||
msgid "Style scheme name"
|
||||
msgstr "Stilskema-navn"
|
||||
|
||||
msgid "Style scheme search path"
|
||||
msgstr "Søgesti til stilskema"
|
||||
|
||||
msgid "Unknown id '%s' in regex '%s'"
|
||||
msgstr "Ukendt id \"%s\" i det regulære udtryk \"%s\""
|
||||
|
||||
msgid "Whether the language should be hidden from the user"
|
||||
msgstr "Om sproget skal skjules fra brugeren"
|
||||
|
||||
msgid "context '%s' cannot contain a \\%%{...@start} command"
|
||||
msgstr "konteksten \"%s\" kan ikke indeholder en \\%%{...@start}-kommando"
|
||||
|
||||
msgid "duplicated context id '%s'"
|
||||
msgstr "duplikeret kontekst-id \"%s\""
|
||||
|
||||
msgid "gettext translation"
|
||||
msgstr "gettext-oversættelse"
|
||||
|
||||
msgid "in regex '%s': backreferences are not supported"
|
||||
msgstr "i det regulære udtryk \"%s\": bagudreferencer understøttes ikke"
|
||||
|
||||
msgid "invalid reference '%s'"
|
||||
msgstr "ugyldig reference \"%s\""
|
||||
|
||||
msgid "style override used with wildcard context reference in language '%s' in ref '%s'"
|
||||
msgstr "stiltilsidesættelse benyttet i forbindelse med wildcard-kontekstreference i sproget \"%s\" i ref \"%s\""
|
||||
|
||||
msgid "unknown context '%s'"
|
||||
msgstr "ukendt kontekst \"%s\""
|
||||
|
||||
msgid "using \\C is not supported in language definitions"
|
||||
msgstr "brug af \\C er ikke understøttet i sprogdefinitionerne"
|
||||
|
||||
|
|
119
po-gsv/de.po
119
po-gsv/de.po
|
@ -11,44 +11,153 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: GtkSourceView HEAD\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-07-15 02:59-0500\n"
|
||||
"PO-Revision-Date: 2007-02-17 19:28+0100\n"
|
||||
"Last-Translator: Hendrik Brandt <heb@gnome-de.org>\n"
|
||||
"POT-Creation-Date: 2007-09-09 12:00-0500\n"
|
||||
"PO-Revision-Date: 2007-09-06 09:05+0200\n"
|
||||
"Last-Translator: Hendrik Richter <hendrikr@gnome.org>\n"
|
||||
"Language-Team: German <gnome-de@gnome.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit"
|
||||
|
||||
msgid "C/C++/ObjC Header"
|
||||
msgstr "C/C++/ObjC-Header"
|
||||
|
||||
msgid ""
|
||||
"Cannot create a regex for all the transitions, the syntax highlighting process will be slower than usual.\n"
|
||||
"The error was: %s"
|
||||
msgstr ""
|
||||
"Regulärer Ausdruck konnte nicht für alle Umwandlungen erstellt werden. Syntax-Hervorhebung wird langsamer als gewohnt sein.\n"
|
||||
"Der Fehler war: %s"
|
||||
|
||||
msgid "ChangeLog"
|
||||
msgstr "Änderungsprotokoll"
|
||||
|
||||
msgid "Classic"
|
||||
msgstr "Klassisch"
|
||||
|
||||
msgid "Classic color scheme"
|
||||
msgstr "Klassisches Farbschema"
|
||||
|
||||
msgid "Color scheme used in the Kate text editor"
|
||||
msgstr "Das im Kate-Texteditor verwendete Farbschema"
|
||||
|
||||
msgid "Color scheme using Tango color palette"
|
||||
msgstr "Farbschema, das die Tango-Farbpalette verwendet"
|
||||
|
||||
msgid "Dark color scheme using the Tango color palette"
|
||||
msgstr "Dunkles Farbschema, das die Tango-Farbpalette verwendet"
|
||||
|
||||
msgid "Defaults"
|
||||
msgstr "Vorgaben"
|
||||
|
||||
msgid "Docbook"
|
||||
msgstr "DocBook"
|
||||
|
||||
msgid "Hidden"
|
||||
msgstr "Versteckt"
|
||||
|
||||
msgid "Javascript"
|
||||
msgstr "JavaScript"
|
||||
|
||||
msgid "LaTeX"
|
||||
msgstr "LaTex"
|
||||
|
||||
msgid "Language id"
|
||||
msgstr "Sprach-ID"
|
||||
|
||||
msgid "Language ids"
|
||||
msgstr "Sprach-IDs"
|
||||
|
||||
msgid "Language name"
|
||||
msgstr "Sprache"
|
||||
|
||||
msgid "Language section"
|
||||
msgstr "Sprachsektion"
|
||||
|
||||
msgid "Language specification directories"
|
||||
msgstr "Sprachspezifikationsverzeichnisse"
|
||||
|
||||
msgid "List of directories and files where the style schemes are located"
|
||||
msgstr "Liste der Ordner und Dateien, in denen sich die Stilvorlagen befinden"
|
||||
|
||||
msgid "List of directories where the language specification files (.lang) are located"
|
||||
msgstr "Liste der Verzeichnisse, in denen sich die Sprachspezifikationdateien (.lang) befinden"
|
||||
|
||||
msgid "List of the ids of the available languages"
|
||||
msgstr "Liste mit IDs der verfügbaren Sprachen"
|
||||
|
||||
msgid "List of the ids of the available style schemes"
|
||||
msgstr "Liste mit IDs der verfügbaren Stilvorlagen"
|
||||
|
||||
msgid "Literate Haskell"
|
||||
msgstr "Haskell-Literat"
|
||||
|
||||
msgid "Markup"
|
||||
msgstr "Auszeichnung"
|
||||
|
||||
msgid "Missing main language definition (id = \"%s\".)"
|
||||
msgstr "Hauptsprachendefinition fehlt (id = »%s«)"
|
||||
|
||||
msgid "Others"
|
||||
msgstr "Sonstige"
|
||||
|
||||
msgid "RPM spec"
|
||||
msgstr "RPM-Spezifikation"
|
||||
|
||||
msgid "Scheme ids"
|
||||
msgstr "Schemen-IDs"
|
||||
|
||||
msgid "Scientific"
|
||||
msgstr "Wissenschaftlich"
|
||||
|
||||
msgid "Scripts"
|
||||
msgstr "Skripte"
|
||||
|
||||
msgid "Sources"
|
||||
msgstr "Quelltexte"
|
||||
|
||||
msgid "Style scheme directories"
|
||||
msgstr "lang) befinden"
|
||||
msgid "Style scheme description"
|
||||
msgstr "Stilvorlagen-Beschreibung"
|
||||
|
||||
msgid "Style scheme filename"
|
||||
msgstr "Stilvorlagen-Dateiname"
|
||||
|
||||
msgid "Style scheme id"
|
||||
msgstr "Stilvorlagen-ID"
|
||||
|
||||
msgid "Style scheme name"
|
||||
msgstr "Stilvorlagen-Name"
|
||||
|
||||
msgid "Style scheme search path"
|
||||
msgstr "Suchpfad für Stilvorlagen"
|
||||
|
||||
msgid "Unknown id '%s' in regex '%s'"
|
||||
msgstr "Unbekannte ID »%s« in regulärem Ausdruck »%s«"
|
||||
|
||||
msgid "Whether the language should be hidden from the user"
|
||||
msgstr "Legt fest, ob die Sprache für den Benutzer versteckt sein soll"
|
||||
|
||||
msgid "context '%s' cannot contain a \\%%{...@start} command"
|
||||
msgstr "Kontext »%s« kann keinen \\%%{...@start}-Befehl enthalten"
|
||||
|
||||
msgid "duplicated context id '%s'"
|
||||
msgstr "Mehrfache Kontext-ID »%s«"
|
||||
|
||||
msgid "gettext translation"
|
||||
msgstr "gettext-Übersetzung"
|
||||
|
||||
msgid "in regex '%s': backreferences are not supported"
|
||||
msgstr "in regulärem Ausdruck »%s«: Rückreferenzen werden nicht unterstützt"
|
||||
|
||||
msgid "invalid reference '%s'"
|
||||
msgstr "Ungültige Referenz »%s«"
|
||||
|
||||
msgid "style override used with wildcard context reference in language '%s' in ref '%s'"
|
||||
msgstr "Stilüberschreibung durch Platzhalter-Kontext-Referenz in Sprache »%s« in Referenz »%s«"
|
||||
|
||||
msgid "unknown context '%s'"
|
||||
msgstr "Unbekannter Kontext »%s«"
|
||||
|
||||
msgid "using \\C is not supported in language definitions"
|
||||
msgstr "Das Verwenden von \\C ist in Sprachdefinition nicht unterstützt"
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: gtksourceview.gnome-2-14 dz\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-07-16 15:36-0500\n"
|
||||
"POT-Creation-Date: 2007-09-09 12:00-0500\n"
|
||||
"PO-Revision-Date: 2007-03-20 16:55+0530\n"
|
||||
"Last-Translator: sonam pelden <sonaa_peldn@yahoo.com>\n"
|
||||
"Language-Team: DZONGKHA <pgeyleg@dit.gov.bt>\n"
|
||||
|
@ -51,9 +51,6 @@ msgstr "ཌི་ཊི་ཌི།"
|
|||
msgid "Diff"
|
||||
msgstr "ཌིཕ"
|
||||
|
||||
msgid "DocBook"
|
||||
msgstr "ཌོཀ་ཀི་དེབ་"
|
||||
|
||||
msgid "Fortran 95"
|
||||
msgstr "ཕོར་ཊཱེན་ ༩༥།"
|
||||
|
||||
|
@ -84,6 +81,9 @@ msgstr "སྐད་ཡིག་གསལ་བཤད་ཡིག་སྣོད
|
|||
msgid "Lua"
|
||||
msgstr "ལུ་འ།"
|
||||
|
||||
msgid "MSIL"
|
||||
msgstr "ཨེམ་ཨེསི་ཨའི་ཨེལ།"
|
||||
|
||||
msgid "Makefile"
|
||||
msgstr "ཡིག་སྣོད་བཟོ།"
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: el\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-07-15 02:59-0500\n"
|
||||
"POT-Creation-Date: 2007-09-09 12:00-0500\n"
|
||||
"PO-Revision-Date: 2006-09-02 12:25+0300\n"
|
||||
"Last-Translator: Kostas Papadimas <pkst@gnome.org>\n"
|
||||
"Language-Team: Greek <team@gnome.gr>\n"
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue