/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* 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.
*/
/**
* This class is used for parsing URLs.
*
* @since 1.5
*/
class MLetParser {
/*
* ------------------------------------------
* PRIVATE VARIABLES
* ------------------------------------------
*/
/**
* The current character
*/
private int c;
/**
* Tag to parse.
*/
/*
* ------------------------------------------
* CONSTRUCTORS
* ------------------------------------------
*/
/**
* Create an MLet parser object
*/
public MLetParser() {
}
/*
* ------------------------------------------
* PUBLIC METHODS
* ------------------------------------------
*/
/**
* Scan spaces.
*/
while ((c >= 0) && ((c == ' ') || (c == '\t') || (c == '\n') || (c == '\r'))) {
}
}
/**
* Scan identifier
*/
while (true) {
if (((c >= 'a') && (c <= 'z')) ||
((c >= 'A') && (c <= 'Z')) ||
((c >= '0') && (c <= '9')) || (c == '_')) {
} else {
}
}
}
/**
* Scan tag
*/
while (c >= 0 && c != '>') {
if (c == '<')
throw new IOException("Missing '>' in tag");
if (c == '=') {
int quote = -1;
if ((c == '\'') || (c == '\"')) {
quote = c;
}
while ((c > 0) &&
(c != '\n') && (c != '\r') && (c != '>'))
}
if (c == quote) {
}
}
}
return atts;
}
/**
* Scan an html file for <mlet> tags
*/
// Warning Messages
"UTF-8"));
// The original URL may have been redirected - this
//
// debug("parse","*** Parsing " + url );
while(true) {
if (c == -1)
break;
if (c == '<') {
if (c == '/') {
if (c != '>')
throw new IOException("Missing '>' in tag");
}
}
} else {
MLetParser.class.getName(),
throw new IOException(requiresTypeWarning);
} else {
} else {
MLetParser.class.getName(),
throw new IOException(paramOutsideWarning);
}
}
MLetParser.class.getName(),
throw new IOException(requiresValueWarning);
} else {
} else {
MLetParser.class.getName(),
throw new IOException(paramOutsideWarning);
}
}
} else {
MLetParser.class.getName(),
throw new IOException(requiresCodeWarning);
}
MLetParser.class.getName(),
throw new IOException(requiresJarsWarning);
}
}
}
}
}
}
return mlets;
}
/**
* Parse the document pointed by the URL urlname
*/
// Parse the document
//
prot = "file:";
} else {
prot = "file:/";
}
url =
} else {
}
// Return list of parsed MLets
//
}
}