1*650b9f74SAndroid Build Coastguard Worker /* 2*650b9f74SAndroid Build Coastguard Worker * Copyright (C) 2010 Google Inc. 3*650b9f74SAndroid Build Coastguard Worker * 4*650b9f74SAndroid Build Coastguard Worker * Licensed under the Apache License, Version 2.0 (the "License"); 5*650b9f74SAndroid Build Coastguard Worker * you may not use this file except in compliance with the License. 6*650b9f74SAndroid Build Coastguard Worker * You may obtain a copy of the License at 7*650b9f74SAndroid Build Coastguard Worker * 8*650b9f74SAndroid Build Coastguard Worker * http://www.apache.org/licenses/LICENSE-2.0 9*650b9f74SAndroid Build Coastguard Worker * 10*650b9f74SAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software 11*650b9f74SAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS, 12*650b9f74SAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*650b9f74SAndroid Build Coastguard Worker * See the License for the specific language governing permissions and 14*650b9f74SAndroid Build Coastguard Worker * limitations under the License. 15*650b9f74SAndroid Build Coastguard Worker */ 16*650b9f74SAndroid Build Coastguard Worker 17*650b9f74SAndroid Build Coastguard Worker package com.google.streamhtmlparser; 18*650b9f74SAndroid Build Coastguard Worker 19*650b9f74SAndroid Build Coastguard Worker /** 20*650b9f74SAndroid Build Coastguard Worker * Methods exposed for Javascript parsing of text to facilitate implementation 21*650b9f74SAndroid Build Coastguard Worker * of Automatic context-aware escaping. This interface does not add 22*650b9f74SAndroid Build Coastguard Worker * additional methods on top of {@code Parser} for the time being, 23*650b9f74SAndroid Build Coastguard Worker * it simply exposes the states in which the Javascript parser may be in. 24*650b9f74SAndroid Build Coastguard Worker * 25*650b9f74SAndroid Build Coastguard Worker * <p>Note: These are the exact states exposed in the original C++ Parser. 26*650b9f74SAndroid Build Coastguard Worker */ 27*650b9f74SAndroid Build Coastguard Worker public interface JavascriptParser extends Parser { 28*650b9f74SAndroid Build Coastguard Worker 29*650b9f74SAndroid Build Coastguard Worker public static final ExternalState STATE_TEXT = 30*650b9f74SAndroid Build Coastguard Worker new ExternalState("STATE_TEXT"); 31*650b9f74SAndroid Build Coastguard Worker public static final ExternalState STATE_Q = 32*650b9f74SAndroid Build Coastguard Worker new ExternalState("STATE_Q"); 33*650b9f74SAndroid Build Coastguard Worker public static final ExternalState STATE_DQ = 34*650b9f74SAndroid Build Coastguard Worker new ExternalState("STATE_DQ"); 35*650b9f74SAndroid Build Coastguard Worker public static final ExternalState STATE_REGEXP = 36*650b9f74SAndroid Build Coastguard Worker new ExternalState("STATE_REGEXP"); 37*650b9f74SAndroid Build Coastguard Worker public static ExternalState STATE_COMMENT = 38*650b9f74SAndroid Build Coastguard Worker new ExternalState("STATE_COMMENT"); 39*650b9f74SAndroid Build Coastguard Worker } 40