--- syntax/erlang.syntax.orig 1970-01-01 03:00:00 +0300 +++ syntax/erlang.syntax 2009-08-17 12:36:46 +0300 @@ -0,0 +1,166 @@ +# +# Erlang syntax highlighting +# +# Author: Sergey Shilov ( hsv@altlinux.org ) +# Version: 5 May, 2009 +# + +define Comments brown +define Keywords white +define Symbols yellow +define Variables gray blue +define Functions brightcyan +define Numbers green +define Strings brightred +define Preprocessor red +define Operators brightgreen +define Brackets brightcyan +define Terms brightmagenta + + +wholechars 0123456789@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz + +# Reserved Words + +context default + keyword whole apply Keywords + keyword whole afte Keywords + keyword whole and Keywords + keyword whole andalso Keywords + keyword whole band Keywords + keyword whole begin Keywords + keyword whole bnot Keywords + keyword whole bor Keywords + keyword whole bsl Keywords + keyword whole bsr Keywords + keyword whole bxor Keywords + keyword whole case Keywords + keyword whole catch Keywords + keyword whole cond Keywords + keyword whole div Keywords + keyword whole end Keywords + keyword whole fun Keywords + keyword whole if Keywords + keyword whole let Keywords + keyword whole not Keywords + keyword whole of Keywords + keyword whole or Keywords + keyword whole orelse Keywords + keyword whole query Keywords + keyword whole receive Keywords + keyword whole rem Keywords + keyword whole try Keywords + keyword whole when Keywords + keyword whole xor Keywords + +# Declarations + keyword whole -include Preprocessor + keyword whole -include_lib Preprocessor + keyword whole -define Preprocessor + keyword whole -behaviour Preprocessor + keyword whole -module Preprocessor + keyword whole -compile Preprocessor + keyword whole -export Preprocessor + keyword whole -record Preprocessor + keyword whole -author Preprocessor + +# Allmatch pattern symbol + keyword whole _ Keywords + + keyword whole -> Operators + keyword ; Operators + keyword , Operators + + +# "Functions" + keyword wholeleft \{:abcdefghijklmnopqrstuvwxyz\}+( Functions + keyword ) Functions + +# Terms + keyword whole \{abcdefghijklmnopqrstuvwxyz\}+ Terms + + +# "Brackets" for +# Expressions + keyword ( Brackets + keyword ) Brackets +# Tuples + keyword { Brackets + keyword } Brackets +# Lists + keyword [ Brackets + keyword ] Brackets +# Bit strings and binaries + keyword \<\< Brackets + keyword \>\> Brackets + + + +# "Symbols" + keyword whole \=\= Symbols + keyword whole \=\< Symbols + keyword whole \=\> Symbols + keyword whole \/\> Symbols + keyword whole \+\+ Symbols + keyword whole \-\- Symbols + keyword whole \|\| Symbols + keyword \| Symbols + keyword = Symbols + keyword \> Symbols + keyword \< Symbols + keyword ! Symbols + keyword : Symbols + keyword \/ Symbols + keyword \* Symbols + keyword \+ Symbols + keyword \- Symbols + + keyword . Symbols + +# "Variables" + + keyword whole \{ABCDEFGHIJKLMNOPQRSTUVWXYZ\}\{_@abcdefghijklmnopqrstuvwxyz\}+ Variables + keyword whole \{ABCDEFGHIJKLMNOPQRSTUVWXYZ\}+ Variables + keyword whole \{ABCDEFGHIJKLMNOPQRSTUVWXYZ\} Variables + +# "Numbers" +# "ASCII char" integer value ( $A ) '$\ '-? + keyword wholeright \$\{ABCDEFGHIJKLMNOPQRSTUVWXYZ_@abcdefghijklmnopqrstuvwxyz\} Numbers + +wholechars #-.0123456789abcdefABCDEF +# -42 + keyword whole \{\-\}\{0123456789\}+ Numbers + keyword whole \{0123456789\}+ Numbers +# -4.2333 + keyword whole \{0123456789\}+\{\.\}\{0123456789\}+ Numbers + keyword whole \{\-\}\{0123456789\}+\{\.\}\{0123456789\}+ Numbers +# 2.3e3. + keyword whole \{0123456789\}+\{\.\}\{0123456789\}+e\{0123456789\}+ Numbers + keyword whole \{\-\}\{0123456789\}+\{\.\}\{0123456789\}+e\{0123456789\}+ Numbers +# 2.3e-3 + keyword whole \{0123456789\}+\{\.\}\{0123456789\}+-e\{0123456789\}+ Numbers + keyword whole \{\-\}\{0123456789\}+\{\.\}\{0123456789\}+-e\{0123456789\}+ Numbers +# 2#101 16#1f + keyword whole \{23456789\}\#\{0123456789abcdefABCDEF\}+ Numbers + keyword whole \{-\}\{23456789\}\#\{0123456789abcdefABCDEF\}+ Numbers + keyword whole \{1\}\{0123456}\#\{0123456789abcdefABCDEF\}+ Numbers + keyword whole \{2\}\{0123456789}\#\{0123456789abcdefABCDEF\}+ Numbers + keyword whole \{3\}\{012}\#\{0123456789abcdefABCDEF\}+ Numbers + keyword whole \{-\}\{1\}\{0123456}\#\{0123456789abcdefABCDEF\}+ Numbers + keyword whole \{-\}\{2\}\{0123456789}\#\{0123456789abcdefABCDEF\}+ Numbers + keyword whole \{-\}\{3\}\{012}\#\{0123456789abcdefABCDEF\}+ Numbers + +# Comments +context % \n Comments + +# Strings + +context " " Strings + keyword \\" Strings + keyword \\\\ Strings + +# Terms with spaces @ and _ chars +context ' ' Terms + keyword \\' Terms + keyword \\\\ Terms + --- syntax/Makefile.am.orig 2009-08-17 12:34:27 +0300 +++ syntax/Makefile.am 2009-08-17 12:38:30 +0300 @@ -17,6 +17,7 @@ diff.syntax \ dos.syntax \ eiffel.syntax \ + erlang.syntax \ fortran.syntax \ html.syntax \ idl.syntax \ --- syntax/Syntax.orig 2009-08-17 12:34:27 +0300 +++ syntax/Syntax 2009-08-17 12:37:21 +0300 @@ -191,5 +191,8 @@ file \.procmailrc$ Procmail\sRC\sFile ^#/usr/bin/procmail include procmail.syntax +file ..\*\\.(erl|ERL|hrl|HRL|app|APP)$ Erlang\sSource +include erlang.syntax + file .\* unknown include unknown.syntax