dotfiles

My dotfiles.
git clone git://git.ryanmj.xyz/dotfiles.git
Log | Files | Refs | LICENSE

prolog.jsf (2343B)


      1 # JOE syntax highlight file for Prolog
      2 # by Christian Nicolai (http://mycrobase.de)
      3 
      4 =Idle
      5 =Comment	green
      6 =Constant	cyan
      7 =Escape		bold cyan
      8 =Keyword	bold
      9 =Bad		bold red
     10 
     11 =Brace		#magenta
     12 =Variable	#yellow
     13 =Predicate	red
     14 
     15 :idle Idle
     16 	*		idle
     17 	"\n"		idle
     18 	"%"		line_comment	recolor=-1
     19 	"/"		maybe_comment
     20 	"0-9"		first_digit	recolor=-1
     21 	"'"		string_sq_1	recolor=-1
     22 	"\""		string_dq_1	recolor=-1
     23 
     24 	# marking -> predicate hilite
     25 	# buffering -> keyword hilite
     26 	"a-z"		atom		mark buffer
     27 
     28 	"A-Z"		variable	recolor=-1
     29 	"_"		_variable
     30 	"[]"		brace		recolor=-1
     31 
     32 :line_comment Comment
     33 	*		line_comment
     34 	"\n"		idle
     35 
     36 :maybe_comment Idle
     37 	*		idle		noeat
     38 	"*"		comment		recolor=-2
     39 
     40 :comment Comment
     41 	*		comment
     42 	"*"		maybe_end_comment
     43 
     44 :maybe_end_comment Comment
     45 	*		comment
     46 	"/"		idle
     47 	"*"		maybe_end_comment
     48 
     49 :brace Brace
     50 	*		idle		noeat
     51 
     52 :string_sq_1 Constant
     53 	*		string_sq	noeat
     54 
     55 :string_sq Constant
     56 	*		string_sq
     57 	"\'"		idle
     58 	"\\"		string_sq_esc	recolor=-1
     59 
     60 :string_sq_esc Escape
     61 	*		string_sq
     62 	"\n"		string_sq	recolor=-2
     63 
     64 :string_dq_1 Constant
     65 	*		string_dq	noeat
     66 
     67 :string_dq Constant
     68 	*		string_dq
     69 	"\""		idle
     70 	"\\"		string_dq_esc	recolor=-1
     71 
     72 :string_dq_esc Escape
     73 	*		string_dq
     74 	"\n"		string_dq	recolor=-2
     75 
     76 :first_digit Constant
     77 	*		idle		noeat
     78 	# no float support
     79 #	"."		float
     80 	"0-9"		first_number
     81 
     82 :first_number Constant
     83 	*		idle		noeat
     84 	"0-9"		first_number
     85 	"."		float
     86 
     87 :float Constant
     88 	*		idle		noeat
     89 	"eE"		epart
     90 	"0-9"		float
     91 
     92 :epart Constant
     93 	*		idle		noeat
     94 	"0-9+\-"	enum
     95 
     96 :enum Constant
     97 	*		idle		noeat
     98 	"0-9"		enum
     99 
    100 # list of keywords includes some predicates...
    101 :atom Idle
    102 	*		atom_end	noeat markend strings
    103 	"append"	kw
    104 	"atom"		kw
    105 	"atomic"	kw
    106 	"call"		kw
    107 	"catch"		kw
    108 	"clause"	kw
    109 	"close"		kw
    110 	"fail"		kw
    111 	"findall"	kw
    112 	"float"		kw
    113 	"halt"		kw
    114 	"integer"	kw
    115 	"is"		kw
    116 	"member"	kw
    117 	"nl"		kw
    118 	"nonvar"	kw
    119 	"number"	kw
    120 	"once"		kw
    121 	"op"		kw
    122 	"open"		kw
    123 	"read"		kw
    124 	"repeat"	kw
    125 	"throw"		kw
    126 	"true"		kw
    127 	"var"		kw
    128 	"write"		kw
    129 done
    130 	"a-zA-Z0-9_"	atom
    131 	
    132 :kw Keyword
    133 	*		idle		noeat
    134 
    135 :atom_end Idle
    136 	*		idle		noeat
    137 	" "		atom_end
    138 	"("		pred_end	recolormark
    139 	":"		maybe_pred_end
    140 
    141 :pred_end Predicate
    142 	*		idle		noeat
    143 
    144 :maybe_pred_end Idle
    145 	*		idle		noeat
    146 	"-"		pred_end	recolormark
    147 
    148 :variable Variable
    149 	*		idle		noeat
    150 	"a-zA-Z0-9_"	variable
    151 
    152 :_variable Idle
    153 	*		idle		noeat
    154 	# if it's not only _, color it
    155 	"a-zA-Z0-9_"	variable	recolor=-2