css.jsf.in (2788B)
1 # JOE syntax highlight file for CSS 2 # by Eric Lin 3 4 # Define colors 5 6 =Idle 7 =Comment green 8 =Constant cyan 9 =Escape bold cyan 10 =Keyword bold 11 =Bad bold red 12 13 =Class yellow 14 =Id red 15 =Tag magenta 16 =HTML 17 18 # from html.jsf to support <?php?> 19 =TagEdge green 20 21 :begin Idle 22 * begin noeat call=.css() 23 24 # 25 # For <style> in html 26 # 27 28 .subr css 29 30 :reset HTML 31 * reset 32 "<" maybe_done recolor=-1 33 "/" slash 34 # prevent duplicate code 35 "#.a-zA-Z" selector noeat 36 "@" command recolor=-1 37 38 :maybe_done TagEdge 39 * reset_html noeat 40 "/" reset noeat return recolor=-2 41 .ifdef php 42 "?%" rtn_php call=php.php() 43 .endif 44 45 # fix needed to produce similar output without php 46 :reset_html HTML 47 * reset noeat recolor=-2 48 49 # this state allows php and perl to recolor the ?> %> or &> properly. 50 :rtn_php TagEdge 51 * reset noeat 52 53 :slash Idle 54 * reset noeat 55 "*" comment recolor=-2 56 57 :comment Comment 58 * comment 59 "*" maybe_end_comment 60 61 :maybe_end_comment Comment 62 * comment 63 "/" reset 64 "*" maybe_end_comment 65 66 :command Idle 67 * command 68 ";" reset 69 "{" command_block 70 71 :command_block Idle 72 * command_block 73 "}" reset 74 75 # CSS selectors 76 :selector Idle 77 * selector 78 "#" id_sel recolor=-1 79 "." class_sel recolor=-1 80 "a-zA-Z" tag_sel recolor=-1 81 ":" pseudo_class_sel recolor=-1 82 "{" style_block recolor=-1 83 84 :id_sel Id 85 * selector noeat 86 "a-zA-Z0-9_-" id_sel 87 88 :class_sel Class 89 * selector noeat 90 "a-zA-Z0-9_-" class_sel 91 92 :tag_sel Tag 93 * selector noeat 94 "a-zA-Z0-9_-" tag_sel 95 "[" tag_sel_attr recolor=-1 96 97 :tag_sel_attr Idle 98 * tag_sel_attr 99 "]" selector 100 101 :pseudo_class_sel Idle 102 * selector noeat 103 "a-zA-Z0-9_-" pseudo_class_sel 104 105 # everything inside "{ ... }", containing many "key: value;" pairs 106 :style_block Idle 107 * style_block 108 "}" reset 109 "/" maybe_style_comment 110 "a-zA-Z-" style_word recolor=-1 111 112 :maybe_style_comment Idle 113 * style_block recolor=-1 114 "*" style_comment recolor=-2 115 116 :style_comment Comment 117 * style_comment 118 "*" maybe_end_style_comment 119 120 :maybe_end_style_comment Comment 121 * comment 122 "/" style_block 123 "*" maybe_end_style_comment 124 125 # property-key 126 :style_word Keyword 127 * style_word 128 ":" style_value recolor=-1 129 130 # property-value 131 :style_value Idle 132 * style_value 133 ";" style_block 134 # treat } without previous ; like ;} 135 "}" style_block noeat 136 "#" color recolor=-1 137 "0-9" decimal recolor=-1 138 "." maybe_float 139 "a-zA-Z_" ident 140 141 :color Constant 142 * style_value noeat 143 "0-9a-fA-F" color 144 145 :decimal Constant 146 * style_value noeat 147 "0-9" decimal 148 "." float 149 "a-zA-Z%" decimal_unit 150 151 :maybe_float Constant 152 * style_value noeat recolor=-2 153 "0-9" float recolor=-2 154 155 :float Constant 156 * style_value noeat 157 "0-9" float 158 "a-zA-Z%" decimal_unit 159 160 :decimal_unit Constant 161 * style_value noeat 162 "a-zA-Z" decimal_unit 163 164 :ident Idle 165 * style_value noeat 166 "a-ZA-Z0-9_-" ident 167 168 .end