Changeset 4582 for trunk/wenv

Show
Ignore:
Timestamp:
11/07/08 19:56:33 (2 months ago)
Author:
pmoura
Message:

Added syntax coloring support for the new conditional compilation directives to the supported text editors and syntax highlighters.

Location:
trunk/wenv
Files:
18 modified

Legend:

Unmodified
Added
Removed
  • trunk/wenv/emacs/logtalk.el

    r4252 r4582  
    55;; Author: Paulo Moura <pmoura@logtalk.org> 
    66;; Creation date: November 15, 2003 
    7 ;; Last modification date: May 5, 2008 
    8 ;; Version: 1.41 
     7;; Last modification date: November 8, 2008 
     8;; Version: 1.5 
    99 
    1010;; Installation: 
     
    2828;; setup  
    2929 
    30 (defvar logtalk-mode-version "1.41" 
     30(defvar logtalk-mode-version "1.5" 
    3131    "Logtalk mode version number") 
    3232 
     
    9898(setq logtalk-font-lock-directives 
    9999    '( 
    100         ("\\(:- \\)\\(\\(end_\\(?:category\\|object\\|protocol\\)\\)\\)\\([\.]\\)" 2 'logtalk-directive-face) 
     100        ("\\(:- \\)\\(\\(e\\(?:lse\\|nd\\(?:if\\|_\\(?:category\\|object\\|protocol\\)\\)\\)\\)\\)\\([\.]\\)" 2 'logtalk-directive-face) 
    101101        ("\\(:- \\)\\(category\\|object\\|protocol\\|module\\)\\([(]\\)" 2 'logtalk-directive-face) 
    102102        ("\\(:- \\)\\(p\\(?:r\\(?:ivate\\|otected\\)\\|ublic\\)\\)\\([(]\\)" 2 'logtalk-directive-face) 
    103         ("\\(:- \\)\\(alias\\|calls\\|d\\(?:iscontiguous\\|ynamic\\)\\|e\\(?:ncoding\\|xport\\)\\|in\\(?:fo\\|itialization\\)\\|m\\(?:\\(?:eta_predicat\\|od\\)e\\)\\|op\\|use\\(?:s\\|_module\\)\\|synchronized\\)\\([(]\\)" 2 'logtalk-directive-face) 
     103        ("\\(:- \\)\\(alias\\|calls\\|d\\(?:iscontiguous\\|ynamic\\)\\|e\\(?:lif\\|ncoding\\|xport\\)\\|i\\(?:f\\|n\\(?:fo\\|itialization\\)\\)\\|m\\(?:\\(?:eta_predicat\\|od\\)e\\)\\|op\\|use\\(?:s\\|_module\\)\\|synchronized\\)\\([(]\\)" 2 'logtalk-directive-face) 
    104104        ("\\(:- \\)\\(dynamic\\|synchronized\\|threaded\\)\\([\.]\\)" 2 'logtalk-directive-face) 
    105105        ("\\<\\(\\(?:complement\\|extend\\|i\\(?:mp\\(?:\\(?:lemen\\|or\\)t\\)\\|nstantiate\\)\\|specialize\\)s\\)\\([(]\\)" 1 'logtalk-directive-face) 
  • trunk/wenv/geshi/logtalk.php

    r4404 r4582  
    55 * ----------- 
    66 *  
    7  * Author: Clara Dimene <c_dimene@hotmail.com> 
    8  * 
    9  * Copyright: (c) 2008 Clara Dimene 
     7 * Authors: Clara Dimene <c_dimene@hotmail.com>, Paulo Moura <pmoura@logtalk.org> 
     8 * 
     9 * Copyright: (c) 2008 Clara Dimene, Paulo Moura 
    1010 * 
    1111 * Logtalk language file for GeSHi. 
     
    1313 * 
    1414 * Based on GeSHi release 1.0.7.21 
    15  * Last Change: July 18, 2008 
     15 * Last Change: November 8, 2008 
    1616 * 
    1717 ************************************************************************************* 
     
    440440            //Other directives 
    441441        36 => array( 
    442                     GESHI_SEARCH => '(\s*:-\s)(mode|alias|(e(ncoding|xport))|synchronized|alias|initialization|info|module|d(ynamic|iscontiguous)|op|(m(eta_predicate|ultifile))|calls|(use(s|_module)))(?=[(])', 
     442                    GESHI_SEARCH => '(\s*:-\s)(mode|alias|(e(lif|ncoding|xport))|synchronized|alias|i(f|n(itialization|fo))|module|d(ynamic|iscontiguous)|op|(m(eta_predicate|ultifile))|calls|(use(s|_module)))(?=[(])', 
    443443                    GESHI_REPLACE => '\\2', 
    444444                    GESHI_MODIFIERS => '', 
     
    449449            //Entity directives          
    450450        37 => array( 
    451                     GESHI_SEARCH => '(\s*:-\s)(end_(object|protocol|category)|threaded|synchronized|dynamic)(?=[.])', 
     451                    GESHI_SEARCH => '(\s*:-\s)(e(lse|nd(if|_(object|protocol|category)))|threaded|synchronized|dynamic)(?=[.])', 
    452452                    GESHI_REPLACE => '\\2', 
    453453                    GESHI_MODIFIERS => '', 
  • trunk/wenv/gtksourceview2/logtalk.lang

    r4260 r4582  
    33 
    44 Author: Paulo Moura <pmoura@logtalk.org> 
    5  Copyright (C) 2007 Paulo Moura <pmoura@logtalk.org> 
     5 Copyright (C) 2007-2008 Paulo Moura <pmoura@logtalk.org> 
    66 
    77 This library is free software; you can redistribute it and/or 
     
    9797            <keyword>(i(mp(orts|lements)|nstantiates))(?=[(])</keyword> 
    9898            <keyword>(specializes)(?=[(])</keyword> 
     99        </context> 
     100 
     101        <context id="conditional-compilation-directives" style-ref="directive"> 
     102            <prefix>^\s*:-\s</prefix> 
     103            <keyword>(e(lse|ndif))(?=[.])</keyword>          
     104            <keyword>((el)?if)(?=[(])</keyword>          
    99105        </context> 
    100106 
  • trunk/wenv/highlight/lgt.lang

    r4253 r4582  
    55#  Author: Paulo Moura 
    66#    Mail: pmoura@logtalk.org 
    7 #    Date: 05.05.08 
    8 # Version: 1.01 
     7#    Date: 08.11.08 
     8# Version: 1.1 
    99# ------------------------------------------ 
    1010# This file is a part of highlight, a free source code converter released under the GPL. 
     
    1717# variables 
    1818$KEYWORDS(kwb)=regex((?<!0')[A-Z_]\w*) 
     19 
     20# conditional compilation directives 
     21$KEYWORDS(kwa)=regex(^\s*:-\s((el)?if)(?=[(]), 1) 
     22$KEYWORDS(kwa)=regex(^\s*:-\s(e(lse|ndif))(?=\.), 1) 
    1923 
    2024# encapsulation directives 
  • trunk/wenv/jedit/logtalk.xml

    r4244 r4582  
    66 
    77    written by      Paulo Moura 
    8     version         1.5 
     8    version         1.6 
    99    created on      5 May 2002 
    10     last revised    30 April 2008 
     10    last revised    8 November 2008 
    1111 
    1212    To install, copy this file to the "modes" subdirectory in jEdit  
     
    4444        <!-- Predicate scope directives --> 
    4545        <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD1">^\s*:-\sp(ublic|r(otected|ivate))(?=[(])</SEQ_REGEXP> 
     46        <!-- Conditional compilation directives --> 
     47        <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD1">^\s*:-\s(el)?if(?=[(])</SEQ_REGEXP> 
     48        <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD1">^\s*:-\se(lse|ndif)(?=[.])</SEQ_REGEXP> 
    4649        <!-- Other directives --> 
    4750        <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD1">^\s*:-\se(ncoding|xport)(?=[(])</SEQ_REGEXP> 
  • trunk/wenv/kate/logtalk.xml

    r4246 r4582  
    22<!DOCTYPE language SYSTEM "language.dtd"> 
    33 
    4 <language name="Logtalk" version="2.1" kateversion="2.4" section="Sources" extensions="*.lgt;*.config" mimetype="text/x-logtalk" author="Paulo Moura (pmoura@logtalk.org)" license="Artistic License 2.0"> 
     4<language name="Logtalk" version="2.2" kateversion="2.4" section="Sources" extensions="*.lgt;*.config" mimetype="text/x-logtalk" author="Paulo Moura (pmoura@logtalk.org)" license="Artistic License 2.0"> 
    55 
    66    <highlighting> 
     
    151151 
    152152            <context name = "directive" attribute = "Directive" lineEndContext = "#stay" > 
     153                <!-- Conditional compilation directives --> 
     154                <RegExpr String = "\b(el)?if(?=[(])" attribute = "Directive" context = "entityrelations" beginRegion = "Entity"/> 
     155                <RegExpr String = "\be(lse|ndif)[.]" attribute = "Directive" context = "#pop" /> 
    153156                <!-- Entity directives --> 
    154157                <RegExpr String = "\b(category|object|protocol)(?=[(])" attribute = "Directive" context = "entityrelations" beginRegion = "Entity"/> 
  • trunk/wenv/nedit/logtalk.pats

    r4258 r4582  
    33! Author: Paulo Moura (pmoura at logtalk.org) 
    44! 
    5 ! Last changed in: May 8, 2008 
     5! Last changed in: November 8, 2008 
    66! 
    77! 
     
    2626    Closing Entity directives:"(?<=:\\-\\s)(end_object|end_protocol|end_category)(?=[.])":::Preprocessor::\n\ 
    2727    Entity relations:"<(complements|instantiates|specializes|extends|imports|implements)(?=[(])":::Preprocessor::\n\ 
    28     Directives:"(?<=:\\-\\s)(alias|synchronized|encoding|export|initialization|info|mode|dynamic|discontiguous|public|protected|private|meta_predicate|multifile|op|calls|uses|use_module)(?=[(])":::Preprocessor::\n\ 
    29     Directives:"(?<=:\\-\\s)(dynamic|synchronized|threaded)>":::Preprocessor::\n\ 
     28    Directives:"(?<=:\\-\\s)(alias|synchronized|elif|encoding|export|if|initialization|info|mode|dynamic|discontiguous|public|protected|private|meta_predicate|multifile|op|calls|uses|use_module)(?=[(])":::Preprocessor::\n\ 
     29    Directives:"(?<=:\\-\\s)(else|endif|dynamic|synchronized|threaded)>":::Preprocessor::\n\ 
    3030    Clause operators:":\\-|\\.|,":::Keyword::\n\ 
    3131    Term testing:"(?<![+?@-])(var|atom|integer|float|atomic|compound|nonvar|number)(?=[(])":::Subroutine::\n\ 
  • trunk/wenv/npp/logtalk.api

    r4233 r4582  
    5252discontiguous 
    5353dynamic 
     54elif 
     55else 
    5456encoding 
     57endif 
    5558end_category 
    5659end_object 
     
    7679goal_expansion 
    7780halt 
     81if 
    7882implements 
    7983implements_protocol 
  • trunk/wenv/pygments/logtalk.py

    r4400 r4582  
    159159 
    160160        'directive': [ 
     161            # Conditional compilation directives 
     162            (r'(el)?if(?=[(])', Keyword, 'root'),        
     163            (r'(e(lse|ndif))[.]', Keyword, 'root'), 
    161164            # Entity directives 
    162165            (r'(category|object|protocol)(?=[(])', Keyword, 'entityrelations'),      
  • trunk/wenv/smultron/logtalk.plist

    r4233 r4582  
    55    <key>autocompleteWords</key> 
    66        <array> 
     7            <string>if</string> 
     8            <string>elif</string> 
     9            <string>else</string> 
     10            <string>endif</string> 
    711            <string>encoding</string> 
    812            <string>calls</string> 
  • trunk/wenv/source-highlight/logtalk.lang

    r4259 r4582  
    22# 
    33#   written by Paulo Moura (pmoura@logtalk.org) 
    4 #   last revised on 10 May 2008 
     4#   last revised on 8 November 2008 
    55 
    66comment start "%" 
     
    6464cbracket =  "{|}" 
    6565 
    66 preproc =   '^[[:blank:]]*:-[[:blank:]](ca(lls|tegory)|p(ublic|r(ot(ocol|ected)|ivate))|e(ncoding|xports)|in(fo|itialization)|alias|d(ynamic|iscontiguous)|m(eta_predicate|od(e|ule)|ultifile)|synchronized|o(bject|p)|use(s|_module))(?=\()', 
    67             '^[[:blank:]]*:-[[:blank:]](end_(category|object|protocol)|dynamic|synchronized|threaded)\.' 
     66preproc =   '^[[:blank:]]*:-[[:blank:]](ca(lls|tegory)|p(ublic|r(ot(ocol|ected)|ivate))|e(l(if|se)|ncoding|xports)|i(f|n(fo|itialization))|alias|d(ynamic|iscontiguous)|m(eta_predicate|od(e|ule)|ultifile)|synchronized|o(bject|p)|use(s|_module))(?=\()', 
     67            '^[[:blank:]]*:-[[:blank:]](end(if|_(category|object|protocol))|dynamic|synchronized|threaded)\.' 
    6868 
    6969preproc =   '\<(complements|extends|i(nstantiates|mp(lements|orts))|specializes)(?=\()' 
  • trunk/wenv/subethaedit/logtalk.plist

    r3952 r4582  
    6565            <key>Regular Expressions</key> 
    6666            <array> 
     67                <string>\:\-[[:space:]](if)\(</string>           
     68                <string>\:\-[[:space:]](elif)\(</string>             
     69                <string>\:\-[[:space:]](else)\.</string>             
     70                <string>\:\-[[:space:]](endif)\.</string>            
    6771                <string>\:\-[[:space:]](object)\(</string>           
    6872                <string>\:\-[[:space:]](end_object)\.</string>           
  • trunk/wenv/subethaedit2/Logtalk.mode/Contents/Resources/AutocompleteAdditions.txt

    r4233 r4582  
     1if() 
     2elif() 
     3else 
     4endif 
    15object(, , , , ). 
    26object(, , , ). 
  • trunk/wenv/subethaedit2/Logtalk.mode/Contents/Resources/SyntaxDefinition.xml

    r4234 r4582  
    2020 
    2121            <keywords id="Directives" color="#881280" useforautocomplete="yes"> 
    22                 <regex>:-\s(object)\(</regex>            
    23                 <regex>:-\s(protocol)\(</regex>          
    24                 <regex>:-\s(category)\(</regex>          
    25                 <regex>:-\s(end_(object|protocol|category))\.</regex>            
    26                 <regex>:-\s(alias)\(</regex>             
    27                 <regex>:-\s(e(ncoding|xport))\(</regex>          
    28                 <regex>:-\s(initialization)\(</regex>            
    29                 <regex>:-\s(info)\(</regex>          
    30                 <regex>:-\s(mod(e|ule))\(</regex>            
    31                 <regex>:-\s(dynamic)\(</regex>           
     22                <regex>:-\s(object)\(</regex> 
     23                <regex>:-\s(protocol)\(</regex> 
     24                <regex>:-\s(category)\(</regex> 
     25                <regex>:-\s(end_(object|protocol|category))\.</regex> 
     26                <regex>:-\s(alias)\(</regex> 
     27                <regex>:-\s(e(ncoding|xport))\(</regex> 
     28                <regex>:-\s(initialization)\(</regex> 
     29                <regex>:-\s(info)\(</regex> 
     30                <regex>:-\s(mod(e|ule))\(</regex> 
     31                <regex>:-\s(dynamic)\(</regex>       
    3232                <regex>:-\s(dynamic)\.</regex>           
     33                <regex>:-\s((el)?if)\(</regex>       
     34                <regex>:-\s(e(lse|ndif))\.</regex>   
    3335                <regex>:-\s(discontiguous)\(</regex>             
    3436                <regex>:-\s(p(ublic|r(otected|ivate)))\(</regex>             
     
    3638                <regex>:-\s(op)\(</regex>            
    3739                <regex>:-\s(calls)\(</regex>             
    38                 <regex>:-\s(use(s|_module))\(</regex>            
    39                 <regex>:-\s(synchronized)\(</regex>          
    40                 <regex>:-\s(synchronized)\.</regex>          
    41                 <regex>:-\s(threaded)\.</regex>          
     40                <regex>:-\s(use(s|_module))\(</regex> 
     41                <regex>:-\s(synchronized)\(</regex> 
     42                <regex>:-\s(synchronized)\.</regex> 
     43                <regex>:-\s(threaded)\.</regex> 
    4244            </keywords> 
    4345 
  • trunk/wenv/textmate/Logtalk.tmbundle/Preferences/Completions.plist

    r4233 r4582  
    1111        <key>completions</key> 
    1212        <array> 
     13            <string>if</string> 
     14            <string>elif</string> 
     15            <string>else</string> 
     16            <string>endif</string> 
    1317            <string>encoding</string> 
    1418            <string>calls</string> 
  • trunk/wenv/textmate/Logtalk.tmbundle/Syntaxes/Logtalk.plist

    r4250 r4582  
    100100            </dict> 
    101101            <key>match</key> 
    102             <string>(:-)\s+(dynamic|synchronized|threaded)(?=[.])</string> 
     102            <string>(:-)\s+(e(lse|ndif)|dynamic|synchronized|threaded)(?=[.])</string> 
    103103            <key>name</key> 
    104104            <string>storage.modifier.others.logtalk</string> 
     
    114114            </dict> 
    115115            <key>match</key> 
    116             <string>(:-)\s+(calls|e(ncoding|xport)|in(itialization|fo)|uses)(?=[(])</string> 
     116            <string>(:-)\s+(calls|e(lif|ncoding|xport)|i(f|n(itialization|fo))|uses)(?=[(])</string> 
    117117            <key>name</key> 
    118118            <string>storage.modifier.others.logtalk</string> 
  • trunk/wenv/vim/completion/logtalk.dict

    r4233 r4582  
     1if 
     2elif 
     3else 
     4endif 
    15encoding 
    26calls 
  • trunk/wenv/vim/syntax/logtalk.vim

    r4568 r4582  
    33" Language: Logtalk 
    44" Maintainer:   Paulo Moura <pmoura@logtalk.org> 
    5 " Last Change:  October 31, 2008 
     5" Last Change:  November 8, 2008 
    66 
    77 
     
    7676" Logtalk directives 
    7777 
     78syn region  logtalkDir      matchgroup=logtalkDirTag    start=":- if("          matchgroup=logtalkDirTag    end=")\."   contains=ALL 
     79syn region  logtalkDir      matchgroup=logtalkDirTag    start=":- elif("        matchgroup=logtalkDirTag    end=")\."   contains=ALL 
     80syn match   logtalkDirTag       ":- else\." 
     81syn match   logtalkDirTag       ":- endif\." 
    7882syn region  logtalkDir      matchgroup=logtalkDirTag    start=":- alias("       matchgroup=logtalkDirTag    end=")\."   contains=ALL 
    7983syn region  logtalkDir      matchgroup=logtalkDirTag    start=":- calls("       matchgroup=logtalkDirTag    end=")\."   contains=ALL