After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 508061 - Language file for Cisco IOS routers and switches feature request
Language file for Cisco IOS routers and switches feature request
Status: RESOLVED WONTFIX
Product: gtksourceview
Classification: Platform
Component: Syntax files
unspecified
Other All
: Normal enhancement
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2008-01-08 14:12 UTC by Simon
Modified: 2009-12-29 14:49 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Simon 2008-01-08 14:12:40 UTC
This is a language file I created to help with editing Cisco switch and router configs. I have a different language file for Cisco PIX/ASA firewalls. I'll submit it after this one. Would be nice to have these included in future releases of GTKSourceView.


<?xml version="1.0" encoding="UTF-8"?>
<!--

 Author: Simon Raiford <sraiford@gmail.com>
 This is a GTKSourceView language template for Cisco
 ASA and PIX firewalls. Feel free to update or redistribute 
 as you deem fit.

-->
<language id="cisco-ios" _name="Cisco IOS" version="2.0" _section="Cisco">
  <metadata>
    <property name="mimetypes">text/plain</property>
    <property name="globs">*.cfg</property>
    <property name="comment-start">!</property>
  </metadata>
  <styles>
    <style id="comment" _name="Comment" map-to="def:comment"/>
    <style id="identifier" _name="Interface" map-to="def:identifier"/>
    <style id="list" _name="Access List" map-to="def:preprocessor"/>
    <style id="number" _name="Number" map-to="def:preprocessor"/>
  </styles>
  <definitions>
    <context id="comment" style-ref="comment" end-at-line-end="true">
      <start>!</start>
    </context>
    <context id="description" style-ref="comment" end-at-line-end="true">
      <start>description</start>
    </context>

    <context id="hostname" end-at-line-end="true" extend-parent="false" style-ref="identifier">
      <start>hostname</start>
    </context>
    <context id="interface" end-at-line-end="true" extend-parent="false" style-ref="identifier">
      <start>interface</start>
    </context>
    <context id="policy-map" end-at-line-end="true" extend-parent="false" style-ref="identifier">
      <start>policy-map</start>
    </context>
    <context id="class-map" end-at-line-end="true" extend-parent="false" style-ref="identifier">
      <start>class-map</start>
    </context>
    <context id="controller" end-at-line-end="true" extend-parent="false" style-ref="identifier">
      <start>controller</start>
    </context>
    <context id="linevty" end-at-line-end="true" extend-parent="false" style-ref="identifier">
      <start>line vty</start>
    </context>
    <context id="linecon" end-at-line-end="true" extend-parent="false" style-ref="identifier">
      <start>line con</start>
    </context>
    <context id="lineaux" end-at-line-end="true" extend-parent="false" style-ref="identifier">
      <start>line aux</start>
    </context>

    <context id="lists" style-ref="list">
      <keyword>access-list</keyword>
      <keyword>ip route</keyword>
      <keyword>ip nat</keyword>
    </context>

    <context id="routers" style-ref="identifier">
      <keyword>router rip</keyword>
      <keyword>router eigrp</keyword>
      <keyword>router igrp</keyword>
      <keyword>router ospf</keyword>
      <keyword>router bgp</keyword>
    </context>

    <context id="number" style-ref="number">
      <match>(\b[0-9]+(\.[0-9]+)?|\.[0-9]+)([Ee][\+-]?[0-9]+)?\b</match>
    </context>
    <context id="cisco-ios">
      <include>
        <context ref="comment"/>
        <context ref="description"/>
        <context ref="hostname"/>
        <context ref="interface"/>
        <context ref="controller"/>
        <context ref="linevty"/>
        <context ref="linecon"/>
        <context ref="lineaux"/>
        <context ref="policy-map"/>
        <context ref="class-map"/>
        <context ref="lists"/>
        <context ref="routers"/>
        <context ref="number"/>
       </include>
    </context>
  </definitions>
</language>
Comment 1 Paolo Borelli 2009-12-29 14:49:31 UTC
sorry for not replying it sooner and thanks for taking the time to create these files... However .cfg is a very common extension for config file and including this lang file will make result in bad highlighting of other config files for many users.

Given that they are very specic to a niche of usres, I think they are better suited to be distributed separately.