blob: a48194e5b170e8c253e7e31e56a4610f774eb2f8 [file] [log] [blame]
david_williamse6088952006-04-17 01:10:40 +00001/*******************************************************************************
2 * Copyright (c) 2006 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11package org.eclipse.jst.jsp.css.core.internal.parser;
12
13import java.io.CharArrayReader;
14import java.io.IOException;
15import java.util.ArrayList;
16import java.util.List;
17
18import org.eclipse.jst.jsp.css.core.internal.parserz.JSPedCSSRegionContexts;
19import org.eclipse.wst.css.core.internal.parser.CSSRegionUtil;
20import org.eclipse.wst.css.core.internal.parser.ICSSTokenizer;
21import org.eclipse.wst.css.core.internal.parser.regions.CSSTextRegionFactory;
22import org.eclipse.wst.css.core.internal.parserz.CSSTextToken;
23import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
24
25%%
26
27%public
28%class JSPedCSSTokenizer
29%implements JSPedCSSRegionContexts, ICSSTokenizer
30%function primGetNextToken
31%type String
32%char
33%line
34%unicode
35%caseless
36%pack
37
38%{
39 private final static String UNDEFINED = "undefined";
40 private String fBufferedContext = null;
41 private int fBufferedStart;
42// private int fBufferedTextLength;
43 private int fBufferedLength;
44// private StringBuffer fBufferedText = null;
45 private CSSTextRegionFactory fRegionFactory = CSSTextRegionFactory.getInstance();
46 private int fInitialState = YYINITIAL;
47 public final static int BUFFER_SIZE_NORMAL = 16384;
48 public final static int BUFFER_SIZE_SMALL = 256;
49 private int fInitialBufferSize = BUFFER_SIZE_NORMAL;
50
51 public void setInitialState(int state) {
52 fInitialState = state;
53 }
54
55 public void setInitialBufferSize(int size) {
56 fInitialBufferSize = size;
57 }
58
59 /* user method */
60 public final ITextRegion getNextToken() throws IOException {
61 String context;
62 String nextTokenType;
63 boolean spaceFollows;
64// StringBuffer text;
65 int start;
66 int textLength;
67 int length;
68 if (fBufferedContext != null) {
69 context = fBufferedContext;
70// text = fBufferedText;
71 start = fBufferedStart;
72 textLength = length = fBufferedLength;
73
74 fBufferedContext = null;
75 } else {
76 context = primGetNextToken();
77// text = new StringBuffer(yytext());
78 start = yychar;
79 textLength = length = yylength();
80 }
81
82 if (context != null) {
83 if (context == CSS_JSP_SCRIPTLET || context == CSS_JSP_EL){
84 nextTokenType = primGetNextToken();
david_williamsb1ce6452006-05-03 07:28:59 +000085 while (nextTokenType != CSS_JSP_END && nextTokenType != CSS_EL_END && nextTokenType != CSS_JSP_COMMENT) {
david_williamse6088952006-04-17 01:10:40 +000086// text.append(yytext());
87 textLength += yylength();
88 length = textLength;
89 if (context.equals(CSS_JSP_SCRIPTLET) && (yystate() == ST_JSP_DIRECTIVE || yystate() == ST_JSP_EXP || yystate() == ST_JSP_DECLARATION)){
90 context = nextTokenType;
91 }
92 nextTokenType = primGetNextToken();
93 if (nextTokenType == null){
94 break;
95 }
96 }
david_williamsb1ce6452006-05-03 07:28:59 +000097 if (context == CSS_JSP_SCRIPTLET){
98 while (nextTokenType != CSS_JSP_COMMENT_END) {
99// text.append(yytext());
100 textLength += yylength();
101 length = textLength;
102 if (context.equals(CSS_JSP_SCRIPTLET) && yystate() == ST_JSP_COMMENT){
103 context = nextTokenType;
104 }
105
106 nextTokenType = primGetNextToken();
107 if (nextTokenType == null){
108 break;
109 }
110 }
111 if (context == CSS_JSP_COMMENT){
112 context = CSS_COMMENT;
113 }
114 }
david_williamse6088952006-04-17 01:10:40 +0000115 textLength += yylength();
116 length = textLength;
117
118 }
119 if (context == UNDEFINED) {
120 // undef -> concatenate undef's
121 nextTokenType = primGetNextToken();
122 while (nextTokenType == UNDEFINED) {
123// text.append(yytext());
124 textLength += yylength();
125 length = textLength;
126 nextTokenType = primGetNextToken();
127 }
128 fBufferedContext = nextTokenType;
129// fBufferedText = new StringBuffer(yytext());
130 fBufferedStart = yychar;
131 fBufferedLength = yylength();
132 } else {
133 nextTokenType = null;
134 spaceFollows = false;
135 if (CSSRegionUtil.isDeclarationValueType(context)) { // declaration value can contain VALUE_S
136 nextTokenType = primGetNextToken();
137 spaceFollows = (nextTokenType == CSS_DECLARATION_VALUE_S);
138 } else if (canContainSpace(context)) {
139 nextTokenType = primGetNextToken();
140 spaceFollows = (nextTokenType == CSS_S);
141 }
142 if (nextTokenType != null) { // nextToken is retrieved
143 if (spaceFollows) {
144 // next is space -> append
145// text.append(yytext());
146 length += yylength();
147 } else {
148 // next is NOT space -> push this for next time, return itself
149 fBufferedContext = nextTokenType;
150// fBufferedText = new StringBuffer(yytext());
151 fBufferedStart = yychar;
152 fBufferedLength = yylength();
153 }
154 }
155 }
156 }
157
158 if (context != null) {
159 if (context == UNDEFINED) {
160 context = CSS_UNKNOWN;
161 }
162 return fRegionFactory.createRegion(context, start, textLength, length);
163 } else {
164 return null;
165 }
166 }
167
168 /* user method */
169 /* for standalone use */
170 public final List parseText() throws IOException {
171 List tokens = new ArrayList();
172
173 CSSTextToken token;
174 for (String kind = primGetNextToken(); kind != null; kind = primGetNextToken()) {
175 token = new CSSTextToken();
176 token.kind = kind;
177 token.start = yychar;
178 token.length = yylength();
179 token.image = yytext();
180 tokens.add(token);
181 }
182
183 return tokens;
184 }
185
186 /* user method */
187 private boolean canContainSpace(String type) {
188 if (type == CSS_DELIMITER || type == CSS_RBRACE || type == CSS_DECLARATION_DELIMITER) {
189 return false;
190 } else {
191 return true;
192 }
193 }
194
195 /* user method */
196 public final int getOffset() {
197 return yychar;
198 }
199
200 /* user method */
201 public final boolean isEOF() {
202 return zzAtEOF;
203 }
204
205 /* user method */
206 public void reset(char[] charArray) {
207 reset(new CharArrayReader(charArray), 0);
208 }
209
210 /* user method */
211 public final void reset(java.io.Reader in, int newOffset) {
212 /** the input device */
213 zzReader = in;
214
215 /** the current state of the DFA */
216 zzState = 0;
217
218 /** the current lexical state */
219 zzLexicalState = fInitialState; //YYINITIAL;
220
221 /** this buffer contains the current text to be matched and is
222 the source of the yytext() string */
223 if (zzBuffer.length != fInitialBufferSize) {
224 zzBuffer = new char[fInitialBufferSize];
225 }
226 java.util.Arrays.fill(zzBuffer, (char)0);
227
228 /** the textposition at the last accepting state */
229 zzMarkedPos = 0;
230
231 /** the textposition at the last state to be included in yytext */
232 zzPushbackPos = 0;
233
234 /** the current text position in the buffer */
235 zzCurrentPos = 0;
236
237 /** startRead marks the beginning of the yytext() string in the buffer */
238 zzStartRead = 0;
239
240 /** endRead marks the last character in the buffer, that has been read
241 from input */
242 zzEndRead = 0;
243
244 /** number of newlines encountered up to the start of the matched text */
245 yyline = 0;
246
247 /** the number of characters up to the start of the matched text */
248 yychar = 0;
249
250 /**
251 * the number of characters from the last newline up to the start of the
252 * matched text
253 */
254 yycolumn = 0;
255
256 /**
257 * yy_atBOL == true <=> the scanner is currently at the beginning of a line
258 */
259 zzAtBOL = false;
260
261 /** yy_atEOF == true <=> the scanner has returned a value for EOF */
262 zzAtEOF = false;
263
264 /* user variables */
265 // fUndefined.delete(0, fUndefined.length());
266 }
267
268 /* user method */
269 public JSPedCSSTokenizer() {
270 super();
271 }
272
273 private int fJSPPreviousState = fInitialState;
274 private void yyJspBegin(int newstate){
275 fJSPPreviousState = yystate();
276 yybegin(newstate);
277 }
278 private void yyJspEnd(){
279 yybegin(fJSPPreviousState);
280 }
281%}
282
283%state ST_CHARSET_NAME
284%state ST_CHARSET_DELIMITER
285%state ST_IMPORT_URI
286%state ST_IMPORT_MEDIUM
287%state ST_IMPORT_DELIMITER
288%state ST_MEDIA_MEDIUM
289%state ST_MEDIA_DELIMITER
290%state ST_PAGE_PSEUDO_PAGE
291%state ST_PAGE_DELIMITER
292%state ST_FONT_FACE_DELIMITER
293%state ST_SELECTOR
294%state ST_SELECTOR_MODIFIER
295%state ST_SELECTOR_ATTRIBUTE_NAME
296%state ST_SELECTOR_ATTRIBUTE_OPERATOR
297%state ST_SELECTOR_ATTRIBUTE_VALUE
298%state ST_SELECTOR_ATTRIBUTE_END
299%state ST_DECLARATION
300%state ST_DECLARATION_SEPARATOR
301%state ST_DECLARATION_PRE_VALUE
302%state ST_DECLARATION_VALUE
303%state ST_JSP_SCRIPTLET
304%state ST_JSP_DIRECTIVE
305%state ST_JSP_DECLARATION
306%state ST_JSP_EXP
307%state ST_JSP_EL
david_williamsb1ce6452006-05-03 07:28:59 +0000308%state ST_JSP_COMMENT
david_williamse6088952006-04-17 01:10:40 +0000309
310
311h = [0-9a-f]
312nonascii = [\u0080-\uffff]
313unicode = \\{h}{1,6}[ \t\r\n\f]?
314escape = {unicode}|\\[ -~\u0080-\uffff]
315nmstart = [_a-zA-Z-]|{nonascii}|{escape}
316nmchar = [_a-zA-Z0-9-]|{nonascii}|{escape}
317string1 = \"([\t !#$%&(-~]|\\{nl}|\'|{nonascii}|{escape})*\"
318string2 = \'([\t !#$%&(-~]|\\{nl}|\"|{nonascii}|{escape})*\'
319
320ident = {nmstart}{nmchar}*
321name = {nmchar}+
322num = [+-]?([0-9]+|[0-9]*"."[0-9]+)
323string = {string1}|{string2}
324url = ([ !#$%&*-~]|{nonascii}|{escape})*
325s = [ \t\r\n\f]
326w = {s}*
327nl = \n|\r\n|\r|\f
328range = \?{1,6}|{h}(\?{0,5}|{h}(\?{0,4}|{h}(\?{0,3}|{h}(\?{0,2}|{h}(\??|{h})))))
329
330hash = "#"{name}
331uri = ("url("{w}{string}{w}")"|"url("{w}{url}{w}")")
332function = {ident}"("
333unicode_range = "U"\+[0-9a-fA-F?]{1,6}("-"[0-9a-fA-F?]{1,6})?
334
335SS = [\x20\x09\x0D\x0A]
336jspstart = "<"{SS}*"%"{SS}*
337jspend = "%"{SS}*">"
338elstart = "$"{SS}*"{"
339elend = "}"
340
341%%
342
343
david_williamse6088952006-04-17 01:10:40 +0000344
345<YYINITIAL> {
346 {jspstart} {yyJspBegin(ST_JSP_SCRIPTLET); return CSS_JSP_SCRIPTLET;}
347 {elstart} {yyJspBegin(ST_JSP_EL); return CSS_JSP_EL;}
348}
349
350<ST_JSP_SCRIPTLET> {
351 "@" {yybegin(ST_JSP_DIRECTIVE); return CSS_JSP_DIRECTIVE;}
352 "=" {yybegin(ST_JSP_EXP); return CSS_JSP_EXP;}
353 "!" {yybegin(ST_JSP_DECLARATION); return CSS_JSP_DECL;}
354 {jspend} {yyJspEnd(); return CSS_JSP_END;}
david_williamsb1ce6452006-05-03 07:28:59 +0000355 "--" { yybegin(ST_JSP_COMMENT); return CSS_JSP_COMMENT;}
david_williamse6088952006-04-17 01:10:40 +0000356}
357
358/* override global "}" */
359<ST_JSP_EL> {
360 {elend} {yyJspEnd(); return CSS_EL_END; }
361}
362
363<ST_JSP_DIRECTIVE, ST_JSP_EXP, ST_JSP_DECLARATION> {
364 {jspend} {yyJspEnd(); return CSS_JSP_END;}
365}
366
david_williamsb1ce6452006-05-03 07:28:59 +0000367<ST_JSP_COMMENT> {
368 -+-{jspend} { yyJspEnd(); return CSS_JSP_COMMENT_END; }
369 "}" { return UNDEFINED; }
370}
david_williamse6088952006-04-17 01:10:40 +0000371
372
373/*
374 * *** global ***
375 */
376
377{s}+ { return CSS_S; }
378"<!--" { return CSS_CDO; }
379"-->" { return CSS_CDC; }
380"}" { yybegin(YYINITIAL); return CSS_RBRACE; }
381\/\*[^*]*\*+([^/*][^*]*\*+)*\/ { return CSS_COMMENT; }
david_williamsb1ce6452006-05-03 07:28:59 +0000382//\<\%--[^-}]*[}]*[^}]*-+-\%\> { return CSS_COMMENT; }
david_williamse6088952006-04-17 01:10:40 +0000383
384
385//<YYINITIAL> {
386// "@import" { yybegin(ST_IMPORT_URI); return CSS_IMPORT; }
387//}
388
389/*
390 * *** charset rule ***
391 * CHARSET_SYM S* STRING S* ';'
392 */
393
394"@charset" { yybegin(ST_CHARSET_NAME); return CSS_CHARSET; }
395
396<ST_CHARSET_NAME> {
397 {string} { yybegin(ST_CHARSET_DELIMITER); return CSS_STRING; }
398}
399
400<ST_CHARSET_DELIMITER> {
401 ";" { yybegin(YYINITIAL); return CSS_DELIMITER; }
402}
403
404/*
405 * *** import rule ***
406 * IMPORT_SYM S* [STRING|URI] S* [ medium [ COMMA S* medium]* ]? ';' S*
407 */
408
409"@import" { yybegin(ST_IMPORT_URI); return CSS_IMPORT; }
410
411<ST_IMPORT_URI> {
412 {string} { yybegin(ST_IMPORT_MEDIUM); return CSS_STRING; }
413 // "url("{w}{string}{w}")" { yybegin(ST_IMPORT_MEDIUM); return CSS_URI; }
414 // "url("{w}{url}{w}")" { yybegin(ST_IMPORT_MEDIUM); return CSS_URI; }
415 {uri} { yybegin(ST_IMPORT_MEDIUM); return CSS_URI; }
416 ";" { yybegin(YYINITIAL); return CSS_DELIMITER; }
417}
418
419<ST_IMPORT_MEDIUM> {
420 {ident} { yybegin(ST_IMPORT_DELIMITER); return CSS_MEDIUM; }
421 ";" { yybegin(YYINITIAL); return CSS_DELIMITER; }
422}
423
424<ST_IMPORT_DELIMITER> {
425 ";" { yybegin(YYINITIAL); return CSS_DELIMITER; }
426 "," { yybegin(ST_IMPORT_MEDIUM); return CSS_MEDIA_SEPARATOR; }
427}
428
429/*
430 * *** media rule ***
431 * MEDIA_SYM S* medium [ COMMA S* medium ]* LBRACE S* ruleset* '}' S*
432 */
433
434"@media" { yybegin(ST_MEDIA_MEDIUM); return CSS_MEDIA; }
435
436/*
437 * medium
438 * IDENT S*
439 */
440<ST_MEDIA_MEDIUM> {
441 {ident} { yybegin(ST_MEDIA_DELIMITER); return CSS_MEDIUM; }
442}
443
444<ST_MEDIA_DELIMITER> {
445 "{" { yybegin(YYINITIAL); return CSS_LBRACE; }
446 "," { yybegin(ST_MEDIA_MEDIUM); return CSS_MEDIA_SEPARATOR; }
447}
448
449/*
450 * *** page rule **
451 * PAGE_SYM S* pseudo_page? S* LBRACE S* declaration [ ';' S* declaration ]* '}' S*
452 */
453
454"@page" { yybegin(ST_PAGE_PSEUDO_PAGE); return CSS_PAGE; }
455
456/*
457 * pseudo_page
458 * ':' IDENT
459 */
460
461<ST_PAGE_PSEUDO_PAGE> {
462 ":"?{ident} { yybegin(ST_PAGE_DELIMITER); return CSS_PAGE_SELECTOR; }
463 "{" { yybegin(ST_DECLARATION); return CSS_LBRACE; }
464}
465
466<ST_PAGE_DELIMITER> {
467 "{" { yybegin(ST_DECLARATION); return CSS_LBRACE; }
468}
469
470/*
471 * font-face
472 * FONT_FACE_SYM S* '{' S* declaration [ ';' S* declaration '* '}' S*
473 */
474
475"@font-face" { yybegin(ST_FONT_FACE_DELIMITER); return CSS_FONT_FACE; }
476
477<ST_FONT_FACE_DELIMITER> {
478 "{" { yybegin(ST_DECLARATION); return CSS_LBRACE; }
479}
480
481/*
482 * selector
483 * simple_selector [ combinator simple_selector ]*
484 */
485
486/*
487 * simple_selector
488 * element_name [ HASH | class | attrib | pseudo ]* | [ HASH | class | attrib | pseudo ]+
489 */
490
491<YYINITIAL, ST_SELECTOR_MODIFIER, ST_SELECTOR> {
492 "*" { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_UNIVERSAL; }
493 {hash} { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_ID; }
494// ":"{ident} { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_PSEUDO; }
495 ":"{ident}("("{s}*{ident}{s}*")")? { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_PSEUDO; }
496 "."{name} { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_CLASS; }
497 "[" { yybegin(ST_SELECTOR_ATTRIBUTE_NAME); return CSS_SELECTOR_ATTRIBUTE_START; }
498}
499
500<YYINITIAL, ST_SELECTOR> {
501 {ident} { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_ELEMENT_NAME; }
502}
503
504<ST_SELECTOR_MODIFIER> {
505 "," { yybegin(ST_SELECTOR); return CSS_SELECTOR_SEPARATOR; }
506 // using LOOKAHEAD
507 {s}+/[^+>\{] { yybegin(ST_SELECTOR); return CSS_SELECTOR_COMBINATOR; }
508 "+"|">" { yybegin(ST_SELECTOR); return CSS_SELECTOR_COMBINATOR; }
509 "{" { yybegin(ST_DECLARATION); return CSS_LBRACE; }
510}
511
512/*
513 * attrib
514 * '[' S* IDENT S* [ [ '=' | INCLUDES | DASHMATCH ] S* [ IDENT | STRING ] S* ]? ']'
515 */
516
517<ST_SELECTOR_ATTRIBUTE_NAME> {
518 {ident} { yybegin(ST_SELECTOR_ATTRIBUTE_OPERATOR); return CSS_SELECTOR_ATTRIBUTE_NAME; }
519}
520
521<ST_SELECTOR_ATTRIBUTE_OPERATOR> {
522 "="|"~="|"|=" { yybegin(ST_SELECTOR_ATTRIBUTE_VALUE); return CSS_SELECTOR_ATTRIBUTE_OPERATOR; }
523 "]" { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_ATTRIBUTE_END; }
524}
525
526<ST_SELECTOR_ATTRIBUTE_VALUE> {
527 {ident}|{string} { yybegin(ST_SELECTOR_ATTRIBUTE_END); return CSS_SELECTOR_ATTRIBUTE_VALUE; }
528}
529
530<ST_SELECTOR_ATTRIBUTE_END> {
531 "]" { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_ATTRIBUTE_END; }
532}
533
534/*
535 * declaration
536 * property ':' S* expr prio? | // empty //
537 */
538
539<ST_DECLARATION> {
540 {ident} { yybegin(ST_DECLARATION_SEPARATOR); return CSS_DECLARATION_PROPERTY; }
541 {jspstart} {yyJspBegin(ST_JSP_SCRIPTLET); return CSS_JSP_SCRIPTLET;}
542 {elstart} {yyJspBegin(ST_JSP_EL); return CSS_JSP_EL;}
543}
544
545<ST_DECLARATION_SEPARATOR> {
546 ":" { yybegin(ST_DECLARATION_PRE_VALUE); return CSS_DECLARATION_SEPARATOR; }
547 {jspstart} {yyJspBegin(ST_JSP_SCRIPTLET); return CSS_JSP_SCRIPTLET;}
548 {elstart} {yyJspBegin(ST_JSP_EL); return CSS_JSP_EL;}
549}
550
551<ST_DECLARATION_PRE_VALUE, ST_DECLARATION_VALUE> {
552 "!"{s}*"important" { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_IMPORTANT; }
553 {ident} { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_IDENT; }
554 ")" { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE; }
555 {num}{ident} { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_DIMENSION; }
556 {num}"%" { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_PERCENTAGE; }
557 {num} { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_NUMBER; }
558 {function} { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_FUNCTION; }
559 {string} { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_STRING; }
560 {uri} { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_URI; }
561 "#"{name} { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_HASH; }
562 {unicode_range} { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_UNICODE_RANGE; }
563 [,/] { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_OPERATOR; }
564 {jspstart} {yyJspBegin(ST_JSP_SCRIPTLET); return CSS_JSP_SCRIPTLET;}
565 {elstart} {yyJspBegin(ST_JSP_EL); return CSS_JSP_EL;}
566}
567
568<ST_DECLARATION_VALUE> {
569 {s}+/[^;}] { return CSS_DECLARATION_VALUE_S; }
570 {jspstart} {yyJspBegin(ST_JSP_SCRIPTLET); return CSS_JSP_SCRIPTLET;}
571 {elstart} {yyJspBegin(ST_JSP_EL); return CSS_JSP_EL;}
572}
573
574<ST_DECLARATION, ST_DECLARATION_SEPARATOR, ST_DECLARATION_PRE_VALUE, ST_DECLARATION_VALUE> {
575 ";" { yybegin(ST_DECLARATION); return CSS_DECLARATION_DELIMITER; }
576 // "}" { yybegin(YYINITIAL); return CSS_RBRACE; }
577}
578
579
580//<YYINITIAL, ST_IMPORT_URI, ST_IMPORT_MEDIUM, ST_IMPORT_DELIMITER> {
581// \/\*[^*]*\*+([^/*][^*]*\*+)*\/ { return CSS_COMMENT; }
582// {s}+ { return CSS_S; }
583// . { return UNDEFINED; }
584//}
585
586//<YYINITIAL, ST_IMPORT_URI, ST_IMPORT_MEDIUM, ST_IMPORT_DELIMITER> {
587// [^ \t\r\n\f]+ { return CSS_UNKNOWN; }
588//}
589
590
591
592
593
594. {
595 return UNDEFINED;
596}