Hello,

I was missing the Yacc/Bison syntax highlighting from MC, so I created a patch that includes it.

As I'm new to both git and MC-devel, that's why I'm sending a simple patch instead of the usual ticketing-branching-pushing excersises. I cloned tha master yesterday, committed today and created the patch with git format-patch.

If you happened to need Hungarian translations in MC, i might be able to help.

Best regards
Gergely

>From 0dbc43207e0bd8e44511acca24cae4574c580975 Mon Sep 17 00:00:00 2001
From: SZABO Gergely <sub.o.g...@gmail.com>
Date: Sat, 26 Sep 2009 20:40:12 +0200
Subject: [PATCH] Yacc/Bison syntax added

Syntax: file extensions y/ypp/yxx added as Yacc/Bison Parser.
yxx.syntax added based cxx.syntax.
---
 syntax/Syntax     |    3 +
 syntax/yxx.syntax |  140 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 143 insertions(+), 0 deletions(-)
 create mode 100644 syntax/yxx.syntax

diff --git a/syntax/Syntax b/syntax/Syntax
index 2b5b0d1..2586e93 100644
--- a/syntax/Syntax
+++ b/syntax/Syntax
@@ -220,5 +220,8 @@ include PKGBUILD.syntax
 file \\.install$ Arch\\spackage\\sinstall\\sscript
 include sh.syntax
 
+file ..\*\\.(y|yxx|ypp)$ Yacc/Bison\sParser
+include yxx.syntax
+
 file .\* unknown
 include unknown.syntax
diff --git a/syntax/yxx.syntax b/syntax/yxx.syntax
new file mode 100644
index 0000000..4cb8e39
--- /dev/null
+++ b/syntax/yxx.syntax
@@ -0,0 +1,140 @@
+context default
+    keyword whole auto yellow
+    keyword whole break yellow
+    keyword whole case yellow
+    keyword whole char yellow
+    keyword whole const yellow
+    keyword whole continue yellow
+    keyword whole default yellow
+    keyword whole do yellow
+    keyword whole double yellow
+    keyword whole else yellow
+    keyword whole enum yellow
+    keyword whole extern yellow
+    keyword whole float yellow
+    keyword whole for yellow
+    keyword whole goto yellow
+    keyword whole if yellow
+    keyword whole int yellow
+    keyword whole long yellow
+    keyword whole register yellow
+    keyword whole return yellow
+    keyword whole short yellow
+    keyword whole signed yellow
+    keyword whole sizeof yellow
+    keyword whole static yellow
+    keyword whole struct yellow
+    keyword whole switch yellow
+    keyword whole typedef yellow
+    keyword whole union yellow
+    keyword whole unsigned yellow
+    keyword whole void yellow
+    keyword whole volatile yellow
+    keyword whole while yellow
+    keyword whole asm yellow
+    keyword whole catch yellow
+    keyword whole class yellow
+    keyword whole friend yellow
+    keyword whole delete yellow
+    keyword whole inline yellow
+    keyword whole new yellow
+    keyword whole operator yellow
+    keyword whole private yellow
+    keyword whole protected yellow
+    keyword whole public yellow
+    keyword whole this yellow
+    keyword whole throw yellow
+    keyword whole template yellow
+    keyword whole try yellow
+    keyword whole virtual yellow
+    keyword whole bool yellow
+    keyword whole const_cast yellow
+    keyword whole dynamic_cast yellow
+    keyword whole explicit yellow
+    keyword whole false yellow
+    keyword whole mutable yellow
+    keyword whole namespace yellow
+    keyword whole reinterpret_cast yellow
+    keyword whole static_cast yellow
+    keyword whole true yellow
+    keyword whole typeid yellow
+    keyword whole typename yellow
+    keyword whole using yellow
+    keyword whole wchar_t yellow
+    keyword whole ... yellow
+    keyword whole linestart \{\s\t\}\[\s\t\]#*\n brightmagenta
+
+    keyword whole left yellow
+    keyword whole node yellow
+    keyword whole start yellow
+    keyword whole token yellow
+
+    keyword /\* brown
+    keyword \*/ brown
+    keyword // brown
+
+    keyword '\\\{"abtnvfr\}' brightgreen
+    keyword '\\\{0123\}\{01234567\}\{01234567\}' brightgreen
+    keyword '\\'' brightgreen
+    keyword '\\\\' brightgreen
+    keyword '\\0' brightgreen
+    keyword '\{\s!"#$%&()\*\+,-./0123456789:;<=>?...@abcdefghijklmnopqrstuvwxyz[]^_`abcdefghijklmnopqrstuvwxyz{|}~ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ\}' brightgreen
+
+    keyword > yellow
+    keyword < yellow
+    keyword \+ yellow
+    keyword - yellow
+    keyword \* yellow
+    keyword / yellow
+    keyword % yellow
+    keyword = yellow
+    keyword != yellow
+    keyword == yellow
+    keyword { brightcyan
+    keyword } brightcyan
+    keyword ( brightcyan
+    keyword ) brightcyan
+    keyword [ brightcyan
+    keyword ] brightcyan
+    keyword , brightcyan
+    keyword : brightcyan
+    keyword ? brightcyan
+    keyword ; brightmagenta
+
+    keyword wholeright %{ brightcyan
+    keyword wholeright %} brightcyan
+    keyword wholeright %% brightcyan
+    keyword % yellow
+    keyword $$ yellow
+    keyword $\[0123456789\] yellow
+
+context exclusive /\* \*/ brown
+    spellcheck
+
+context exclusive // \n brown
+    spellcheck
+
+context linestart # \n brightred
+    keyword \\\n yellow
+    keyword /\**\*/ brown
+    keyword //*\n brown
+    keyword "+" red
+    keyword <+> red
+
+context " " green
+    spellcheck
+    keyword \\" brightgreen
+    keyword %% brightgreen
+    keyword %\[#0\s-\+,\]\[0123456789\*\]\[.\]\[0123456789\*\]\[L\]\{eEfgGoxX\} brightgreen
+    keyword %\[0\s-\+,\]\[0123456789\*\]\[.\]\[0123456789\*\]\[hl\]\{diuxX\} brightgreen
+    keyword %\[hl\]n brightgreen
+    keyword %\[-\]\[0123456789\*\]\[.\]\[0123456789\*\]s brightgreen
+    keyword %[*] brightgreen
+    keyword %c brightgreen
+    keyword %p brightgreen
+    keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen
+    keyword \\\\ brightgreen
+    keyword \\' brightgreen
+    keyword \\\{abtnvfr\} brightgreen
+
+
-- 
1.6.0.4

_______________________________________________
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel

Reply via email to