2362N/A * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 4378N/A * This source code is provided to illustrate the usage of a given feature 4378N/A * or technique and has been deliberately simplified. Additional steps 4378N/A * required for a production-quality application, such as security checks, 4378N/A * input validation and proper error handling, might not be present in 0N/A * This exception is thrown when parse errors are encountered. 0N/A * You can explicitly create objects of this exception type by 0N/A * calling the method generateParseException in the generated 0N/A * You can modify this class to customize your error reporting 0N/A * mechanisms so long as you retain the public fields. 0N/A * This constructor is used by the method "generateParseException" 0N/A * in the generated parser. Calling this constructor generates 0N/A * a new object of this type with the fields "currentToken", 0N/A * "expectedTokenSequences", and "tokenImage" set. The boolean 0N/A * flag "specialConstructor" is also set to true to indicate that 0N/A * this constructor was used to create this object. 0N/A * This constructor calls its super class with the empty string 0N/A * to force the "toString" method of parent class "Throwable" to 0N/A * print the error message in the form: 0N/A * ParseException: <result of getMessage> 0N/A * The following constructors are for use by you for whatever 0N/A * purpose you can think of. Constructing the exception in this 0N/A * manner makes the exception behave in the normal way - i.e., as 0N/A * documented in the class "Throwable". The fields "errorToken", 0N/A * "expectedTokenSequences", and "tokenImage" do not contain 0N/A * relevant information. The JavaCC generated code does not use 0N/A * these constructors. 0N/A * This variable determines which constructor was used to create 0N/A * this object and thereby affects the semantics of the 0N/A * "getMessage" method (see below). 0N/A * This is the last token that has been consumed successfully. If 0N/A * this object has been created due to a parse error, the token 0N/A * followng this token will (therefore) be the first error token. 0N/A * Each entry in this array is an array of integers. Each array 0N/A * of integers represents a sequence of tokens (by their ordinal 0N/A * values) that is expected at this point of the parse. 0N/A * This is a reference to the "tokenImage" array of the generated 0N/A * parser within which the parse error occurred. This array is 0N/A * defined in the generated ...Constants interface. 0N/A * This method has the standard behavior when this object has been 0N/A * created using the standard constructors. Otherwise, it uses 0N/A * "currentToken" and "expectedTokenSequences" to generate a parse 0N/A * error message and returns it. If this object has been created 0N/A * due to a parse error, and you do not catch it (it gets thrown 0N/A * from the parser), then this method is called during the printing 0N/A * of the final stack trace, and hence the correct error message 0N/A * The end of line string for this machine. 0N/A * Used to convert raw characters to their escaped version 0N/A * when these raw version cannot be used as part of an ASCII