1
# The contents of this file are subject to the terms of the Common Development
2
# and Distribution License (the License). You may not use this file except in
3
# compliance with the License.
5
# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
6
# or http://www.netbeans.org/cddl.txt.
8
# When distributing Covered Code, include this CDDL Header Notice in each file
9
# and include the License file at http://www.netbeans.org/cddl.txt.
10
# If applicable, add the following below the CDDL Header, with the fields
11
# enclosed by brackets [] replaced by your own identifying information:
12
# "Portions Copyrighted [year] [name of copyright owner]"
14
# The Original Software is NetBeans. The Initial Developer of the Original
15
# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
16
# Microsystems, Inc. All Rights Reserved.
19
#Inlined CSS grammar - used in inlined css code in html e.g. <div style="color:red"/>
21
########### tokens #############################################################
23
TOKEN:css_comment:( "/*" - "*/" )
24
TOKEN:css_comment:( "<!--" | "-->" )
25
TOKEN:css_whitespace: ([" " "\t" "\n" "\r"]+)
27
TOKEN:css_operator:( ["*" "#" "." "," ":" "-" "+" ">" "(" ")" "{" "}" ";" "[" "]" "!" "/"] )
28
TOKEN:css_identifier: (
29
"-"? ["a"-"z" "A"-"Z" "_"]
30
["a"-"z" "A"-"Z" "_" "0" - "9" "-"]*
34
"url" [" " "\t" "\n" "\r"]* ("(" - ")")
39
( "pt" | "pc" | "in" | "mm" | "cm" | "em" |
40
"ex" | "px" | "ms" | "s" | "%"
45
["0"-"9"]* "." ["0"-"9"]+
46
( "pt" | "pc" | "in" | "mm" | "cm" | "em" |
47
"ex" | "px" | "ms" | "s" | "%"
51
TOKEN:css_hash:( "#" ["a"-"z" "A"-"Z" "0"-"9" "-" "_"]+)
55
( [^ "\"" "\n" "\r"] |
56
("\\" ["r" "n" "t" "\\" "\'" "\""])
62
( [^ "\"" "\n" "\r"] |
63
("\\" ["r" "n" "t" "\\" "\'" "\""])
69
########### grammar ############################################################
75
declarations = declaration declarations1;
78
declarations1 = ";" declarations2;
79
declarations2 = declaration declarations1;
81
declaration = <GAP> | key ":" expr [prio];
82
key = <css_identifier>;
83
expr = gap | term (operator term)*;
84
gap = <GAP> ["pt" | "pc" | "in" | "mm" | "cm" | "em" |
85
"ex" | "px" | "ms" | "s"];
86
term = ["-" | "+"] (<css_number> | <css_string> | <css_url> | <css_hash> | function);
87
operator = "/" | "," |;
88
function = <css_identifier> ["(" expr ")"];
89
prio = "!" "important";
91
########### color ##############################################################
94
color_name: "css_selector";
95
default_coloring: "identifier";
96
foreground_color: "#007c00";
101
color_name: "css_key";
102
default_coloring: "keyword";
103
foreground_color:"blue";
106
########### code folding #######################################################
107
########### navigator ##########################################################
110
display_name: "@media $mediaName$";
111
icon: "/org/netbeans/modules/languages/resources/style_sheet_16.png";
115
display_name: "$selectors$";
116
tooltip: org.netbeans.modules.languages.css.CSS.navigatorTooltip;
117
icon: "/org/netbeans/modules/languages/resources/style_sheet_16.png";
120
TOOLTIP:selectors: org.netbeans.modules.languages.css.CSS.tooltip
122
HYPERLINK:string: org.netbeans.modules.languages.css.CSS.hyperlink
129
########### completion #########################################################
131
COMPLETION:css_identifier, css_operator, css_operator2, css_comment, css_whitespace:{
134
text2: "background-attachment";
135
text3: "background-color";
136
text4: "background-image";
137
text5: "background-position";
138
text6: "background-repeat";
140
text8: "border-collapse";
141
text9: "border-color";
142
text10: "border-spacing";
143
text11: "border-style";
144
text12: "border-top";
145
text13: "border-right";
146
text14: "border-bottom";
147
text15: "border-left";
148
text16: "border-top-color";
149
text17: "border-right-color";
150
text18: "border-bottom-color";
151
text19: "border-left-color";
152
text20: "border-top-style";
153
text21: "border-right-style";
154
text22: "border-bottom-style";
155
text23: "border-left-style";
156
text24: "border-top-width";
157
text25: "border-right-width";
158
text26: "border-bottom-width";
159
text27: "border-left-width";
160
text28: "border-width";
163
text31: "caption-side";
168
text36: "counter-increment";
169
text37: "counter-reset";
171
text39: "cue-before";
177
text45: "empty-cells";
179
text47: "font-family";
181
text49: "font-style";
182
text50: "font-variant";
183
text51: "font-weight";
187
text55: "letter-spacing";
188
text56: "line-height";
189
text57: "list-style-image";
190
text58: "list-style-position";
191
text59: "list-style-type";
192
text60: "list-style";
193
text61: "margin-right";
194
text62: "margin-left";
195
text63: "margin-top";
196
text64: "margin-bottom";
198
text66: "max-height";
200
text68: "min-height";
203
text71: "outline-color";
204
text72: "outline-style";
205
text73: "outline-width";
208
text76: "padding-top";
209
text77: "padding-right";
210
text78: "padding-bottom";
211
text79: "padding-left";
213
text81: "page-break-after";
214
text82: "page-break-before";
215
text83: "page-break-inside";
216
text84: "pause-after";
217
text85: "pause-before";
219
text87: "pitch-range";
221
text89: "play-during";
226
text94: "speak-header";
227
text95: "speak-numeral";
228
text96: "speak-punctuation";
230
text98: "speech-rate";
232
text100: "table-layout";
233
text101: "text-align";
234
text102: "text-decoration";
235
text103: "text-indent";
236
text104: "text-transform";
238
text106: "unicode-bidi";
239
text107: "vertical-align";
240
text108: "visibility";
241
text109: "voice-family";
243
text111: "white-space";
246
text114: "word-spacing";
252
message:"LBL_SYNTAX_ERROR";
255
BUNDLE "org.netbeans.modules.languages.css.Bundle"
258
#navigator_sort:"true";
b'\\ No newline at end of file'