dotfiles

My dotfiles.
Log | Files | Refs | LICENSE

r.jsf (2807B)


      1 # JOE syntax highlight file for R
      2 
      3 =Idle
      4 =Ident
      5 =Bad
      6 =Comment
      7 =Constant
      8 =Number		+Constant
      9 =String		+Constant
     10 =StringEscape	+Escape
     11 =Character	+Constant
     12 =CharacterEscape +Escape
     13 =Boolean	+Constant
     14 =Escape
     15 =Keyword
     16 =Brace
     17 =Control
     18 
     19 :idle Idle
     20 	*		idle
     21 	"#"		line_comment	recolor=-1
     22 	"0"		first_digit	recolor=-1
     23 	"1-9"		decimal	recolor=-1
     24 	"."		maybe_float	buffer
     25 	"\""		string		recolor=-1
     26 	"'"		char		recolor=-1
     27 	"\p{L}\p{Nl}"	ident		buffer
     28 	"\\"		outside_escape	recolor=-1
     29 	"{}"		brace		recolor=-1
     30 	"/,:;=()><[]*&|!~+\-%^"	control		recolor=-1
     31 
     32 :outside_escape	Escape
     33 	*	idle
     34 
     35 :brace Brace
     36 	*	idle	noeat
     37 
     38 :control Control
     39 	*	idle	noeat
     40 
     41 :line_comment Comment comment
     42 	*		line_comment
     43 	"BFHNTX"	line_comment	noeat call=comment_todo.comment_todo()
     44 	"\n"		idle
     45 
     46 :first_digit Number
     47 	*		idle	noeat
     48 	"xX"		hex
     49 	"."		float
     50 	"eE"		epart
     51 	"0-9"		decimal
     52 	"L"		idle
     53 
     54 :hex Number
     55 	*		idle	noeat
     56 	"0-9A-Fa-f"	hex
     57 
     58 :decimal Number
     59 	*		idle	noeat
     60 	"0-9"		decimal
     61 	"eE"		epart
     62 	"."		float
     63 	"L"		idle
     64 
     65 :maybe_float Number
     66 	*		idle	recolor=-2	noeat
     67 	"\i."		ident	recolor=-2
     68 	"0-9"		float		recolor=-2
     69 
     70 :float Number
     71 	*		idle	noeat
     72 	"eE"		epart
     73 	"0-9"		float
     74 	"L"		idle
     75 
     76 :epart Number
     77 	*		idle	noeat
     78 	"0-9+\-"	enum
     79 
     80 :enum Number
     81 	*		idle	noeat
     82 	"0-9"		enum
     83 	"L"		idle
     84 
     85 :string	String string
     86 	*		string
     87 	"\""		idle
     88 	"\\"		string_escape	recolor=-1
     89 	"%"		string_control	recolor=-1
     90 
     91 :string_escape StringEscape string
     92 	*		string
     93 	"x"		string_hex
     94 	"0-7"		string_octal2
     95 	"\n"		string		recolor=-2
     96 
     97 # \x will consume all successive hex digits (ANSI C).
     98 :string_hex StringEscape string
     99 	*		string		noeat
    100 	"0-9a-fA-F"	string_hex
    101 
    102 :string_octal2 StringEscape string
    103 	*		string		noeat
    104 	"0-7"		string_octal3
    105 
    106 :string_octal3 StringEscape string
    107 	*		string		noeat
    108 	"0-7"		string
    109 
    110 :string_control StringEscape string
    111 	*		string
    112 	"\""		string noeat
    113 	"\n"		idle
    114 	"\\"		string_escape	recolor=-1
    115 	"0-9.\-+ #hjILtz$"	string_control
    116 
    117 :char Character string
    118 	*		char
    119 	"\n"		idle
    120 	"'"		idle
    121 	"\\"		char_escape	recolor=-1
    122 
    123 :char_escape	CharacterEscape string
    124 	*		char
    125 	"x"		char_hex
    126 	"0-7"		char_octal2
    127 	"\n"		char		recolor=-2
    128 
    129 # \x will consume all successive hex digits (ANSI C).
    130 :char_hex CharacterEscape string
    131 	*		char		noeat
    132 	"0-9a-fA-F"	char_hex
    133 
    134 :char_octal2 CharacterEscape string
    135 	*		char		noeat
    136 	"0-7"		char_octal3
    137 
    138 :char_octal3 CharacterEscape string
    139 	*		char		noeat
    140 	"0-7"		char
    141 
    142 # It feels to me like this could use some more work...
    143 
    144 :ident Ident
    145 	*		idle		noeat strings
    146 	"TRUE"		bool
    147 	"FALSE"		bool
    148 	"NULL"		val
    149 	"Inf"		val
    150 	"NaN"		val
    151 	"NA"		val
    152 	"NA_integer_"	val
    153 	"NA_real_"	val
    154 	"NA_complex_"	val
    155 	"NA_character_"	val
    156 	"if"		kw
    157 	"else"		kw
    158 	"repeat"	kw
    159 	"while"		kw
    160 	"function"	kw
    161 	"for"		kw
    162 	"in"		kw
    163 	"next"		kw
    164 	"break"		kw
    165 done
    166 	"\c."		ident
    167 
    168 :bool Boolean
    169 	*	idle	noeat
    170 
    171 :val Constant
    172 	*	idle	noeat
    173 
    174 :kw Keyword
    175 	*	idle	noeat