modules/graphics/src/main/java/javafx/css/CssLexer.java

Print this page
rev 9240 : 8076423: JEP 253: Prepare JavaFX UI Controls & CSS APIs for Modularization

*** 21,49 **** * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ ! package com.sun.javafx.css.parser; import java.io.IOException; import java.io.Reader; import java.util.HashMap; import java.util.Map; - final class CSSLexer { - - /* Lazy instantiation */ - private static class InstanceHolder { - final static CSSLexer INSTANCE = new CSSLexer(); - } - - public static CSSLexer getInstance() { - return InstanceHolder.INSTANCE; - } final static int STRING = 10; final static int IDENT = 11; final static int FUNCTION = 12; final static int NUMBER = 13; final static int CM = 14; --- 21,43 ---- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ ! package javafx.css; import java.io.IOException; import java.io.Reader; import java.util.HashMap; import java.util.Map; + import com.sun.javafx.css.parser.LexerState; + import com.sun.javafx.css.parser.Recognizer; + import com.sun.javafx.css.parser.Token; + final class CssLexer { final static int STRING = 10; final static int IDENT = 11; final static int FUNCTION = 12; final static int NUMBER = 13; final static int CM = 14;
*** 352,368 **** ); return map; } ! CSSLexer() { this.stateMap = createStateMap(); this.text = new StringBuilder(64); this.currentState = initState; } ! public void setReader(Reader reader) { this.reader = reader; lastc = -1; pos = offset = 0; line = 1; this.currentState = initState; --- 346,362 ---- ); return map; } ! CssLexer() { this.stateMap = createStateMap(); this.text = new StringBuilder(64); this.currentState = initState; } ! void setReader(Reader reader) { this.reader = reader; lastc = -1; pos = offset = 0; line = 1; this.currentState = initState;
*** 750,760 **** lastc = c; return c; } ! public Token nextToken() { Token tok = null; if (token != null) { tok = token; if (token.getType() != Token.EOF) token = null; --- 744,754 ---- lastc = c; return c; } ! Token nextToken() { Token tok = null; if (token != null) { tok = token; if (token.getType() != Token.EOF) token = null;