亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? parser.java

?? linux下編程用 編譯軟件
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/* Parser.java -- HTML parser.   Copyright (C) 2005 Free Software Foundation, Inc.This file is part of GNU Classpath.GNU Classpath is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2, or (at your option)any later version.GNU Classpath is distributed in the hope that it will be useful, butWITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNUGeneral Public License for more details.You should have received a copy of the GNU General Public Licensealong with GNU Classpath; see the file COPYING.  If not, write to theFree Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA02110-1301 USA.Linking this library statically or dynamically with other modules ismaking a combined work based on this library.  Thus, the terms andconditions of the GNU General Public License cover the wholecombination.As a special exception, the copyright holders of this library give youpermission to link this library with independent modules to produce anexecutable, regardless of the license terms of these independentmodules, and to copy and distribute the resulting executable underterms of your choice, provided that you also meet, for each linkedindependent module, the terms and conditions of the license of thatmodule.  An independent module is a module which is not derived fromor based on this library.  If you modify this library, you may extendthis exception to your version of the library, but you are notobligated to do so.  If you do not wish to do so, delete thisexception statement from your version. */package gnu.javax.swing.text.html.parser.support;import gnu.javax.swing.text.html.parser.htmlAttributeSet;import gnu.javax.swing.text.html.parser.htmlValidator;import gnu.javax.swing.text.html.parser.support.low.Constants;import gnu.javax.swing.text.html.parser.support.low.ParseException;import gnu.javax.swing.text.html.parser.support.low.ReaderTokenizer;import gnu.javax.swing.text.html.parser.support.low.Token;import gnu.javax.swing.text.html.parser.support.low.node;import gnu.javax.swing.text.html.parser.support.low.pattern;import java.io.IOException;import java.io.Reader;import java.util.Comparator;import java.util.Set;import java.util.TreeSet;import java.util.Vector;import javax.swing.text.ChangedCharSetException;import javax.swing.text.html.HTML;import javax.swing.text.html.parser.AttributeList;import javax.swing.text.html.parser.DTD;import javax.swing.text.html.parser.DTDConstants;import javax.swing.text.html.parser.Element;import javax.swing.text.html.parser.Entity;import javax.swing.text.html.parser.TagElement;/** * <p>A simple error-tolerant HTML parser that uses a DTD document * to access data on the possible tokens, arguments and syntax.</p> * <p> The parser reads an HTML content from a Reader and calls various * notifying methods (which should be overridden in a subclass) * when tags or data are encountered.</p> * <p>Some HTML elements need no opening or closing tags. The * task of this parser is to invoke the tag handling methods also when * the tags are not explicitly specified and must be supposed using * information, stored in the DTD. * For  example, parsing the document * <p>&lt;table&gt;&lt;tr&gt;&lt;td&gt;a&lt;td&gt;b&lt;td&gt;c&lt;/tr&gt; <br> * will invoke exactly the handling methods exactly in the same order * (and with the same parameters) as if parsing the document: <br> * <em>&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;table&gt;&lt; * tbody&gt;</em>&lt;tr&gt;&lt;td&gt;a<em>&lt;/td&gt;</em>&lt;td&gt;b<em> * &lt;/td&gt;</em>&lt;td&gt;c<em>&lt;/td&gt;&lt;/tr&gt;</em>&lt; * <em>/tbody&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</em></p> * (supposed tags are given in italics). The parser also supports * obsolete elements of HTML syntax.<p> * </p> * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) */public class Parser  extends ReaderTokenizer  implements DTDConstants{  /**   * The current html tag.   */  public Token hTag = new Token();  /**   * The document template description that will be used to parse the documents.   */  protected DTD dtd;  /**   * The value of this field determines whether or not the Parser will be   * strict in enforcing SGML compatibility. The default value is false,   * stating that the parser should do everything to parse and get at least   * some information even from the incorrectly written HTML input.   */  protected boolean strict;  /**   * This fields has positive values in preformatted tags.   */  protected int preformatted = 0;  /**   * The set of the document tags. This field is used for supporting   * markFirstTime().   */  private Set documentTags =    new TreeSet(new Comparator()      {        public int compare(Object a, Object b)        {          return ((String) a).compareToIgnoreCase((String) b);        }      }               );  /**  * The buffer to collect the incremental output like text or coment.  */  private StringBuffer buffer = new StringBuffer();  /**   * The buffer to store the document title.   */  private StringBuffer title = new StringBuffer();  /**   * The current token.   */  private Token t;  /**   * True means that the 'title' tag of this document has   * already been handled.   */  private boolean titleHandled;  /**   * True means that the 'title' tag is currently open and all   * text is also added to the title buffer.   */  private boolean titleOpen;  /**   * The attributes of the current HTML element.   * Package-private to avoid an accessor method.   */  htmlAttributeSet attributes =    htmlAttributeSet.EMPTY_HTML_ATTRIBUTE_SET;  /**   * The validator, controlling the forcible closing of the tags that   * (in accordance to dtd) are not allowed in the current context.   */  private htmlValidator validator;  /**   * Provides the default values for parameters in the case when these   * values are defined in the DTD.   */  private parameterDefaulter defaulter;  /**   * The text pre-processor for handling line ends and tabs.   */  private textPreProcessor textProcessor = new textPreProcessor();  /**   * Creates a new Parser that uses the given   * {@link javax.swing.text.html.parser.DTD }. The only standard way   * to get an instance of DTD is to construct it manually, filling in   * all required fields.   * @param a_dtd The DTD to use. The parser behaviour after passing null   * as an argument is not documented and may vary between implementations.   */  public Parser(DTD a_dtd)  {    if (a_dtd == null)      dtd = gnu.javax.swing.text.html.parser.HTML_401F.getInstance();    else      dtd = a_dtd;    defaulter = new parameterDefaulter(dtd);    validator =      new htmlValidator(dtd)        {          /**           * Handles the error message. This method must be overridden to pass           * the message where required.           * @param msg The message text.           */          protected void s_error(String msg)          {            error(msg);          }          /**           * The method is called when the tag validator decides to close the           * tag on its own initiative. After reaching the end of stream,           * The tag validator closes all unclosed elements that are required           * to have the end (closing) tag.           *           * @param element The tag being fictionally (forcibly) closed.           */          protected void handleSupposedEndTag(Element tElement)          {            // The tag is cloned as the original tElement is the            // element from the starting tag - may be accidently used            // somewhere else.            TagElement tag = makeTag(tElement, true);            _handleEndTag_remaining(tag);          }          /**           * The method is called when the the tag validator decides to open           * the new tag on its own initiative. The tags, opened in this           * way, are HTML, HEAD and BODY. The attribute set is temporary           * assigned to the empty one, the previous value is           * restored before return.           *           * @param element The tag being fictionally (forcibly) closed.           */          protected void handleSupposedStartTag(Element tElement)          {            TagElement tag = makeTag(tElement, true);            htmlAttributeSet were = attributes;            attributes = htmlAttributeSet.EMPTY_HTML_ATTRIBUTE_SET;            _handleStartTag(tag);            attributes = were;          }        };  }  /**   * Get the attributes of the current tag.   * @return The attribute set, representing the attributes of the current tag.   */  public htmlAttributeSet getAttributes()  {    return attributes;  }  /**   * Invokes the error handler. The default method in this implementation   * delegates the call to handleError, also providing the current line.   */  public void error(String msg)  {    error(msg, getTokenAhead());  }  public void error(String msg, Token atToken)  {    if (atToken != null)      handleError(atToken.where.beginLine,                  msg + ": line " + atToken.where.beginLine +                  ", absolute pos " + atToken.where.startPosition                 );    else      handleError(0, msg);  }  /**   * Invokes the error handler. The default method in this implementation   * delegates the call to error (parm1+": '"+parm2+"'").   */  public void error(String msg, String invalid)  {    error(msg + ": '" + invalid + "'");  }  /**   * Invokes the error handler. The default method in this implementation   * delegates the call to error (parm1+" "+ parm2+" "+ parm3).   */  public void error(String parm1, String parm2, String parm3)  {    error(parm1 + " " + parm2 + " " + parm3);  }  /**   * Invokes the error handler. The default method in this implementation   * delegates the call to error (parm1+" "+ parm2+" "+ parm3+" "+ parm4).   */  public void error(String parm1, String parm2, String parm3, String parm4)  {    error(parm1 + " " + parm2 + " " + parm3 + " " + parm4);  }  public void flushAttributes()  {  }  /**   * Parse the HTML text, calling various methods in response to the   * occurence of the corresponding HTML constructions.   * @param reader The reader to read the source HTML from.   * @throws IOException If the reader throws one.   */  public synchronized void parse(Reader reader)                          throws IOException  {    reset(reader);    restart();    try      {        parseDocument();        validator.closeAll();      }    catch (ParseException ex)      {        if (ex != null)          {            error("Unable to continue parsing the document", ex.getMessage());            Throwable cause = ex.getCause();            if (cause instanceof IOException)              throw (IOException) cause;          }      }  }  /**   * Parses DTD markup declaration. Currently returns null without action.   * @return null.   * @throws IOException   */  public String parseDTDMarkup()                        throws IOException  {    return null;  }  /**   * Parse SGML insertion ( &lt;! ... &gt; ). When the   * the SGML insertion is found, this method is called, passing   * SGML in the string buffer as a parameter. The default method   * returns false without action and can be overridden to   * implement user - defined SGML support.   * <p>   * If you need more information about SGML insertions in HTML documents,   * the author suggests to read SGML tutorial on   * {@link http://www.w3.org/TR/WD-html40-970708/intro/sgmltut.html}.   * We also recommend Goldfarb C.F (1991) <i>The SGML Handbook</i>,   * Oxford University Press, 688 p, ISBN: 0198537379.   * </p>   * @param strBuff   * @return true if this is a valid DTD markup declaration.   * @throws IOException   */  public boolean parseMarkupDeclarations(StringBuffer strBuff)                                  throws IOException  {    return false;  }  /**   * Get the first line of the last parsed token.   */  protected int getCurrentLine()  {    return hTag.where.beginLine;  }  /**   * Read parseable character data, add to buffer.   * @param clearBuffer If true, buffer if filled by CDATA section,   * otherwise the section is appended to the existing content of the   * buffer.   *   * @throws ParseException   */  protected void CDATA(boolean clearBuffer)                throws ParseException  {    Token start = hTag = getTokenAhead();    if (clearBuffer)      buffer.setLength(0);    // Handle expected EOF.    if (start.kind == EOF)      return;    read:     while (true)      {        t = getTokenAhead();        if (t.kind == EOF)          {            error("unexpected eof", t);            break read;          }        else if (t.kind == BEGIN)          break read;        else if (t.kind == Constants.ENTITY)          {            resolveAndAppendEntity(t);            getNextToken();          }        else          {            append(t);            getNextToken();          }      }    hTag = new Token(start, getTokenAhead(0));    if (buffer.length() != 0)      _handleText();  }  /**  * Process Comment. This method skips till --> without  * taking SGML constructs into consideration.  The supported SGML  * constructs are handled separately.  */  protected void Comment()                  throws ParseException  {    buffer.setLength(0);    Token start = hTag = mustBe(BEGIN);    optional(WS);    mustBe(EXCLAMATION);    optional(WS);    mustBe(DOUBLE_DASH);    Token t;    Token last;    comment:     while (true)      {        t = getTokenAhead();        if (t.kind == EOF)          {            handleEOFInComment();            last = t;            break comment;          }        else if (COMMENT_END.matches(this))          {            mustBe(DOUBLE_DASH);            optional(WS);            last = mustBe(END);            break comment;          }        else if (COMMENT_TRIPLEDASH_END.matches(this))          {            mustBe(DOUBLE_DASH);            t = mustBe(NUMTOKEN);            if (t.getImage().equals("-"))              {                append(t);                last = mustBe(END);                break comment;              }            else              {                buffer.append("--");                append(t);                t = getTokenAhead();              }          }        else        /* The lllll-- can match as NUMTOKEN */        if ((t.getImage().endsWith("--")) &&

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久综合九色欧美综合狠狠 | 亚洲va韩国va欧美va精品| 亚洲黄色av一区| 激情六月婷婷久久| 在线一区二区三区| 国产欧美一区二区精品仙草咪| 亚洲影院久久精品| 成人在线一区二区三区| 日韩一区二区在线看| 亚洲欧美在线视频| 国产乱码精品一区二区三区五月婷| 在线看国产一区| 国产清纯在线一区二区www| 亚洲第一福利一区| 色欧美片视频在线观看在线视频| 久久亚洲春色中文字幕久久久| 亚洲777理论| 一本到高清视频免费精品| 久久午夜羞羞影院免费观看| 日韩一区精品字幕| 欧美亚一区二区| 日韩一区有码在线| 成人免费视频免费观看| 2020国产精品自拍| 精品一区二区三区不卡| 日韩一区二区在线观看视频播放| 亚洲国产wwwccc36天堂| 欧美在线制服丝袜| 一区二区三区不卡在线观看| av电影在线不卡| 亚洲视频香蕉人妖| 91在线观看下载| 中文字幕亚洲在| 成人午夜私人影院| 国产精品精品国产色婷婷| 国产成人av影院| 国产婷婷一区二区| 国产成人精品亚洲午夜麻豆| 国产欧美久久久精品影院| 国内一区二区视频| 国产欧美综合在线| 成人国产精品免费观看视频| 日本一区二区三区四区| 成人app在线观看| 亚洲色图清纯唯美| 欧美色窝79yyyycom| 日韩精品一二三四| 欧美成人福利视频| 国产麻豆视频一区二区| 欧美国产禁国产网站cc| av在线不卡电影| 亚洲精品成人悠悠色影视| 欧洲精品在线观看| 天堂av在线一区| 欧美mv日韩mv国产网站app| 国产制服丝袜一区| 最新不卡av在线| 欧美日韩在线亚洲一区蜜芽| 五月天婷婷综合| 精品国产免费一区二区三区香蕉| 国产麻豆成人精品| 亚洲精品国产第一综合99久久| 777色狠狠一区二区三区| 狠狠色伊人亚洲综合成人| 国产精品美女久久久久aⅴ国产馆| 色av一区二区| 久久av中文字幕片| 综合自拍亚洲综合图不卡区| 884aa四虎影成人精品一区| 国产一区二区三区精品视频| 亚洲三级久久久| 欧美tickling网站挠脚心| heyzo一本久久综合| 日本中文字幕一区二区有限公司| 久久久一区二区三区捆绑**| 在线一区二区三区四区五区| 狠狠色狠狠色合久久伊人| 亚洲免费在线看| 欧美tk丨vk视频| 在线精品观看国产| 国产成人精品一区二| 日韩av网站免费在线| 国产精品久久久久久久浪潮网站| 欧美精品成人一区二区三区四区| 国产成人午夜视频| 日韩av成人高清| 1024精品合集| 国产亚洲午夜高清国产拍精品| 欧美在线免费播放| 白白色亚洲国产精品| 久久99最新地址| 午夜影院在线观看欧美| 国产精品青草久久| 精品福利一二区| 欧美一区二区三区在线观看| 色婷婷香蕉在线一区二区| 国产夫妻精品视频| 久久国产精品一区二区| 亚洲第一av色| 一区二区三区在线免费播放| 欧美激情一区二区三区全黄| 337p日本欧洲亚洲大胆精品| 欧美精品在线一区二区三区| 色久综合一二码| 不卡av免费在线观看| 国产精品综合一区二区| 麻豆精品新av中文字幕| 天天综合色天天| 亚洲成a人片在线不卡一二三区 | 精品夜夜嗨av一区二区三区| 亚洲成人黄色小说| 一区二区国产视频| 亚洲日本在线观看| 亚洲免费看黄网站| 亚洲欧洲99久久| 中文字幕佐山爱一区二区免费| 国产精品久久久久久久久搜平片 | 欧美一区二区三区在线看| 欧美日韩中文一区| 欧美三级视频在线播放| 精品视频在线看| 欧美乱熟臀69xxxxxx| 欧美精品123区| 欧美一区二区精品在线| 欧美一区二区在线看| 欧美一级免费观看| 精品电影一区二区| 久久精品日韩一区二区三区| 中文字幕av一区二区三区| 国产精品久久久久久久久免费丝袜| 国产精品视频一二三区| 1024国产精品| 午夜伊人狠狠久久| 美女在线观看视频一区二区| 狠狠色狠狠色综合| 99在线精品免费| 欧美色视频一区| 26uuu亚洲| 国产精品网友自拍| 亚洲最大成人网4388xx| 日韩高清一区在线| 国产一区二区网址| 91丝袜美腿高跟国产极品老师| 91网上在线视频| 欧美人与禽zozo性伦| 精品国产乱码久久久久久久久 | 91精品国产黑色紧身裤美女| 日韩免费高清电影| 欧美经典三级视频一区二区三区| 亚洲欧洲综合另类| 日韩精品高清不卡| 国产精品99久| 在线观看国产精品网站| 欧美一区二区国产| 国产精品乱人伦| 免费一区二区视频| 波多野结衣91| 欧美高清dvd| 国产精品免费看片| 欧美aaaaaa午夜精品| 91一区一区三区| 欧美v亚洲v综合ⅴ国产v| 一区在线播放视频| 久久精品国产亚洲5555| 色综合色综合色综合色综合色综合| 欧美日韩在线播放| 中文无字幕一区二区三区| 香蕉久久夜色精品国产使用方法| 国产在线看一区| 欧美日韩在线精品一区二区三区激情 | 久久久久久97三级| 又紧又大又爽精品一区二区| 久国产精品韩国三级视频| 91国偷自产一区二区三区成为亚洲经典| 欧美成人三级在线| 天天操天天干天天综合网| eeuss鲁片一区二区三区在线观看| 日韩一区二区三区四区五区六区| 亚洲欧美偷拍卡通变态| 激情都市一区二区| 欧美中文字幕不卡| 欧美激情中文字幕一区二区| 日韩中文字幕亚洲一区二区va在线 | 亚洲成人av免费| 国产不卡视频一区| 日韩一区二区三区电影在线观看| 亚洲三级视频在线观看| 成人午夜短视频| 国产亚洲欧美日韩在线一区| 麻豆精品一二三| 日韩一区二区三区视频| 婷婷成人综合网| 精品视频在线免费看| 一区二区三国产精华液| 99国产精品一区| 国产精品久久二区二区| 国产精品99久久久久久似苏梦涵 | 成人在线一区二区三区| 日韩欧美国产三级| 免费精品视频在线|