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

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

?? parser.java

?? 主要的怎么樣結合java 和 javascript!
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * The contents of this file are subject to the Netscape Public * License Version 1.1 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.mozilla.org/NPL/ * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * The Original Code is Rhino code, released * May 6, 1999. * * The Initial Developer of the Original Code is Netscape * Communications Corporation.  Portions created by Netscape are * Copyright (C) 1997-1999 Netscape Communications Corporation. All * Rights Reserved. * * Contributor(s): * Mike Ang * Igor Bukanov * Ethan Hugg * Terry Lucas * Mike McCabe * Milen Nankov * * Alternatively, the contents of this file may be used under the * terms of the GNU Public License (the "GPL"), in which case the * provisions of the GPL are applicable instead of those above. * If you wish to allow use of your version of this file only * under the terms of the GPL and not to allow others to use your * version of this file under the NPL, indicate your decision by * deleting the provisions above and replace them with the notice * and other provisions required by the GPL.  If you do not delete * the provisions above, a recipient may use your version of this * file under either the NPL or the GPL. */package org.mozilla.javascript;import java.io.Reader;import java.io.IOException;import java.util.Hashtable;/** * This class implements the JavaScript parser. * * It is based on the C source files jsparse.c and jsparse.h * in the jsref package. * * @see TokenStream * * @author Mike McCabe * @author Brendan Eich */public class Parser{    // TokenInformation flags : currentFlaggedToken stores them together    // with token type    final static int        CLEAR_TI_MASK  = 0xFFFF,   // mask to clear token information bits        TI_AFTER_EOL   = 1 << 16,  // first token of the source line        TI_CHECK_LABEL = 1 << 17;  // indicates to check for label    CompilerEnvirons compilerEnv;    private ErrorReporter errorReporter;    private String sourceURI;    boolean calledByCompileFunction;    private TokenStream ts;    private int currentFlaggedToken;    private int syntaxErrorCount;    private IRFactory nf;    private int nestingOfFunction;    private Decompiler decompiler;    private String encodedSource;// The following are per function variables and should be saved/restored// during function parsing.// XXX Move to separated class?    ScriptOrFnNode currentScriptOrFn;    private int nestingOfWith;    private Hashtable labelSet; // map of label names into nodes    private ObjArray loopSet;    private ObjArray loopAndSwitchSet;// end of per function variables    // Exception to unwind    private static class ParserException extends RuntimeException    {        static final long serialVersionUID = 5882582646773765630L;    }    public Parser(CompilerEnvirons compilerEnv, ErrorReporter errorReporter)    {        this.compilerEnv = compilerEnv;        this.errorReporter = errorReporter;    }    protected Decompiler createDecompiler(CompilerEnvirons compilerEnv)    {        return new Decompiler();    }    void addWarning(String messageId, String messageArg)    {        String message = ScriptRuntime.getMessage1(messageId, messageArg);        errorReporter.warning(message, sourceURI, ts.getLineno(),                              ts.getLine(), ts.getOffset());    }    void addError(String messageId)    {        ++syntaxErrorCount;        String message = ScriptRuntime.getMessage0(messageId);        errorReporter.error(message, sourceURI, ts.getLineno(),                            ts.getLine(), ts.getOffset());    }    RuntimeException reportError(String messageId)    {        addError(messageId);        // Throw a ParserException exception to unwind the recursive descent        // parse.        throw new ParserException();    }    private int peekToken()        throws IOException    {        int tt = currentFlaggedToken;        if (tt == Token.EOF) {            tt = ts.getToken();            if (tt == Token.EOL) {                do {                    tt = ts.getToken();                } while (tt == Token.EOL);                tt |= TI_AFTER_EOL;            }            currentFlaggedToken = tt;        }        return tt & CLEAR_TI_MASK;    }    private int peekFlaggedToken()        throws IOException    {        peekToken();        return currentFlaggedToken;    }    private void consumeToken()    {        currentFlaggedToken = Token.EOF;    }    private int nextToken()        throws IOException    {        int tt = peekToken();        consumeToken();        return tt;    }    private int nextFlaggedToken()        throws IOException    {        peekToken();        int ttFlagged = currentFlaggedToken;        consumeToken();        return ttFlagged;    }    private boolean matchToken(int toMatch)        throws IOException    {        int tt = peekToken();        if (tt != toMatch) {            return false;        }        consumeToken();        return true;    }    private int peekTokenOrEOL()        throws IOException    {        int tt = peekToken();        // Check for last peeked token flags        if ((currentFlaggedToken & TI_AFTER_EOL) != 0) {            tt = Token.EOL;        }        return tt;    }    private void setCheckForLabel()    {        if ((currentFlaggedToken & CLEAR_TI_MASK) != Token.NAME)            throw Kit.codeBug();        currentFlaggedToken |= TI_CHECK_LABEL;    }    private void mustMatchToken(int toMatch, String messageId)        throws IOException, ParserException    {        if (!matchToken(toMatch)) {            reportError(messageId);        }    }    private void mustHaveXML()    {        if (!compilerEnv.isXmlAvailable()) {            reportError("msg.XML.not.available");        }    }    public String getEncodedSource()    {        return encodedSource;    }    public boolean eof()    {        return ts.eof();    }    boolean insideFunction()    {        return nestingOfFunction != 0;    }    private Node enterLoop(Node loopLabel)    {        Node loop = nf.createLoopNode(loopLabel, ts.getLineno());        if (loopSet == null) {            loopSet = new ObjArray();            if (loopAndSwitchSet == null) {                loopAndSwitchSet = new ObjArray();            }        }        loopSet.push(loop);        loopAndSwitchSet.push(loop);        return loop;    }    private void exitLoop()    {        loopSet.pop();        loopAndSwitchSet.pop();    }    private Node enterSwitch(Node switchSelector, int lineno, Node switchLabel)    {        Node switchNode = nf.createSwitch(switchSelector, lineno);        if (loopAndSwitchSet == null) {            loopAndSwitchSet = new ObjArray();        }        loopAndSwitchSet.push(switchNode);        return switchNode;    }    private void exitSwitch()    {        loopAndSwitchSet.pop();    }    /*     * Build a parse tree from the given sourceString.     *     * @return an Object representing the parsed     * program.  If the parse fails, null will be returned.  (The     * parse failure will result in a call to the ErrorReporter from     * CompilerEnvirons.)     */    public ScriptOrFnNode parse(String sourceString,                                String sourceURI, int lineno)    {        this.sourceURI = sourceURI;        this.ts = new TokenStream(this, null, sourceString, lineno);        try {            return parse();        } catch (IOException ex) {            // Should never happen            throw new IllegalStateException();        }    }    /*     * Build a parse tree from the given sourceString.     *     * @return an Object representing the parsed     * program.  If the parse fails, null will be returned.  (The     * parse failure will result in a call to the ErrorReporter from     * CompilerEnvirons.)     */    public ScriptOrFnNode parse(Reader sourceReader,                                String sourceURI, int lineno)        throws IOException    {        this.sourceURI = sourceURI;        this.ts = new TokenStream(this, sourceReader, null, lineno);        return parse();    }    private ScriptOrFnNode parse()        throws IOException    {        this.decompiler = createDecompiler(compilerEnv);        this.nf = new IRFactory(this);        currentScriptOrFn = nf.createScript();        int sourceStartOffset = decompiler.getCurrentOffset();        this.encodedSource = null;        decompiler.addToken(Token.SCRIPT);        this.currentFlaggedToken = Token.EOF;        this.syntaxErrorCount = 0;        int baseLineno = ts.getLineno();  // line number where source starts        /* so we have something to add nodes to until         * we've collected all the source */        Node pn = nf.createLeaf(Token.BLOCK);        try {            for (;;) {                int tt = peekToken();                if (tt <= Token.EOF) {                    break;                }                Node n;                if (tt == Token.FUNCTION) {                    consumeToken();                    try {                        n = function(calledByCompileFunction                                     ? FunctionNode.FUNCTION_EXPRESSION                                     : FunctionNode.FUNCTION_STATEMENT);                    } catch (ParserException e) {                        break;                    }                } else {                    n = statement();                }                nf.addChildToBack(pn, n);            }        } catch (StackOverflowError ex) {            String msg = ScriptRuntime.getMessage0(                "mag.too.deep.parser.recursion");            throw Context.reportRuntimeError(msg, sourceURI,                                             ts.getLineno(), null, 0);        }        if (this.syntaxErrorCount != 0) {            String msg = String.valueOf(this.syntaxErrorCount);            msg = ScriptRuntime.getMessage1("msg.got.syntax.errors", msg);            throw errorReporter.runtimeError(msg, sourceURI, baseLineno,                                             null, 0);        }        currentScriptOrFn.setSourceName(sourceURI);        currentScriptOrFn.setBaseLineno(baseLineno);        currentScriptOrFn.setEndLineno(ts.getLineno());        int sourceEndOffset = decompiler.getCurrentOffset();        currentScriptOrFn.setEncodedSourceBounds(sourceStartOffset,                                                 sourceEndOffset);        nf.initScript(currentScriptOrFn, pn);        if (compilerEnv.isGeneratingSource()) {            encodedSource = decompiler.getEncodedSource();        }        this.decompiler = null; // It helps GC        return currentScriptOrFn;    }    /*     * The C version of this function takes an argument list,     * which doesn't seem to be needed for tree generation...     * it'd only be useful for checking argument hiding, which     * I'm not doing anyway...     */    private Node parseFunctionBody()        throws IOException    {        ++nestingOfFunction;        Node pn = nf.createBlock(ts.getLineno());        try {            bodyLoop: for (;;) {                Node n;                int tt = peekToken();                switch (tt) {                  case Token.ERROR:                  case Token.EOF:                  case Token.RC:

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品国产99国产| 婷婷综合另类小说色区| 欧美亚洲禁片免费| 国产成人一区在线| 亚洲精品视频一区二区| 国产香蕉久久精品综合网| 欧美私人免费视频| 91一区二区在线| 韩国欧美国产一区| 久久国产精品色婷婷| 亚洲自拍偷拍欧美| 亚洲精品视频观看| 欧美极品美女视频| 久久精品人人做人人综合| 欧美妇女性影城| 日本高清免费不卡视频| 成人丝袜视频网| 成人免费av在线| 成人免费视频视频| 国产.欧美.日韩| 粉嫩在线一区二区三区视频| 久久99精品网久久| 久久国产精品色婷婷| 亚洲一区av在线| 精品福利一区二区三区免费视频| 91网上在线视频| 色先锋资源久久综合| 91女神在线视频| 在线视频一区二区三| 欧美精品乱码久久久久久| 91精品久久久久久蜜臀| 69精品人人人人| 久久久精品蜜桃| 亚洲男同1069视频| 日韩在线一二三区| 国模冰冰炮一区二区| 99久久伊人网影院| 欧美羞羞免费网站| 久久综合九色综合97婷婷| 国产欧美一区二区三区沐欲| 亚洲精品日日夜夜| 另类人妖一区二区av| 99国产精品久久久久久久久久 | 国产一区999| 91丨porny丨蝌蚪视频| 欧美色精品天天在线观看视频| 精品国产乱码久久久久久1区2区| 国产精品伦理在线| 日韩电影在线免费看| 成人午夜私人影院| 欧美一区二区三区免费观看视频| 久久精品视频免费| 美女mm1313爽爽久久久蜜臀| 成人免费视频视频在线观看免费| 欧美性视频一区二区三区| 久久久精品国产免费观看同学| 午夜天堂影视香蕉久久| av电影在线观看完整版一区二区| 日韩欧美黄色影院| 日韩一区二区三区免费看| 欧美一区二区网站| 亚洲欧美国产77777| 国产精品小仙女| 精品久久国产字幕高潮| 日本午夜一区二区| 欧美日韩在线不卡| 亚洲成人资源网| 欧美日韩一区二区在线观看| 日韩毛片精品高清免费| av网站免费线看精品| 欧美韩日一区二区三区| 国产乱码精品一区二区三区五月婷| 欧美一区二区三区影视| 日韩二区三区四区| 91精品国产综合久久精品图片 | 成人免费在线视频| 99久免费精品视频在线观看| 国产欧美精品日韩区二区麻豆天美| 激情综合网激情| 久久伊人蜜桃av一区二区| 国内精品视频666| 国产农村妇女毛片精品久久麻豆 | 国产清纯美女被跳蛋高潮一区二区久久w| 日韩精品欧美成人高清一区二区| 欧美日本国产视频| 日韩成人av影视| 国产欧美一区二区三区鸳鸯浴| 国产精品一区二区久久精品爱涩 | 日韩毛片精品高清免费| 在线亚洲一区二区| 日本色综合中文字幕| 久久久久国产精品人| 粉嫩绯色av一区二区在线观看| 欧美刺激午夜性久久久久久久| 国产一区二区三区黄视频 | 人人精品人人爱| 国产视频亚洲色图| 在线观看国产91| 国产一区二区三区免费看| 国产日产欧美精品一区二区三区| 91在线无精精品入口| 亚洲一区在线电影| 久久一日本道色综合| 91香蕉视频黄| 免费的国产精品| 一区二区三区欧美在线观看| 91麻豆精品国产| 欧美日韩一区在线观看| 国产成人午夜片在线观看高清观看| 亚洲在线视频一区| 综合久久一区二区三区| 欧美大胆人体bbbb| 欧美日韩国产综合一区二区三区| 国产成人午夜99999| 国产精品一品二品| 免费高清成人在线| 日韩国产欧美三级| 亚洲国产欧美另类丝袜| 亚洲欧洲无码一区二区三区| 久久毛片高清国产| 久久综合久久久久88| 2021国产精品久久精品| 精品国产乱码久久久久久久| 欧美一区二区三区在线电影 | 蜜臀久久久久久久| 亚洲福利一区二区| 爽好多水快深点欧美视频| 欧美大片一区二区三区| 国产成人超碰人人澡人人澡| 精品一区二区影视| 精品一二线国产| 国产精品资源网| 不卡区在线中文字幕| 色噜噜偷拍精品综合在线| 成人开心网精品视频| 91久久久免费一区二区| 欧美无人高清视频在线观看| 欧美欧美午夜aⅴ在线观看| 91精品国产乱| 国产欧美精品一区aⅴ影院| 亚洲日本欧美天堂| 日韩精品一区第一页| 国产一区二区三区观看| 国产很黄免费观看久久| 欧美性受xxxx| 欧美一区二区在线看| 国产精品无码永久免费888| 一区二区三区免费看视频| 开心九九激情九九欧美日韩精美视频电影 | 99精品黄色片免费大全| 欧美日韩视频在线一区二区| 久久久久久久电影| 日韩中文字幕91| 91亚洲国产成人精品一区二区三| 日韩一区二区在线看片| 亚洲欧美激情小说另类| 国产精品亚洲一区二区三区妖精| 在线日韩国产精品| 国产精品国产三级国产aⅴ原创 | 亚洲视频一区二区免费在线观看| 午夜精品久久久久久久久| 成人av午夜影院| 2020日本不卡一区二区视频| 午夜视频在线观看一区二区| 91视视频在线观看入口直接观看www | 欧美喷水一区二区| 一区二区三区精品在线观看| 狠狠色狠狠色合久久伊人| 欧美日韩国产成人在线免费| 亚洲四区在线观看| a亚洲天堂av| 国产欧美一区二区在线| 国产精品资源在线观看| 精品久久久久久久久久久久包黑料| 香蕉加勒比综合久久 | 欧美精品色综合| 亚洲国产精品一区二区www| 色婷婷国产精品| 亚洲日本在线a| 一本色道久久综合亚洲精品按摩| 国产精品激情偷乱一区二区∴| 成人va在线观看| 亚洲视频电影在线| 在线观看免费亚洲| 美女任你摸久久 | 日韩精品一级中文字幕精品视频免费观看 | 91精品国产福利在线观看| 五月激情六月综合| 2021国产精品久久精品| 成人sese在线| 亚洲在线视频网站| 日韩午夜在线影院| 国产精品系列在线播放| 国产精品麻豆一区二区 | 国产视频不卡一区| 一本色道久久综合精品竹菊| 日韩一区精品视频| 中文字幕精品一区二区精品绿巨人| 色综合网色综合| 日本欧美肥老太交大片|