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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? parser.java

?? 主要的怎么樣結(jié)合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:

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美理论片在线| 精品国免费一区二区三区| 免费久久99精品国产| 欧美激情一区二区三区蜜桃视频| 在线日韩av片| 粉嫩绯色av一区二区在线观看 | 首页亚洲欧美制服丝腿| 中文字幕不卡在线| 欧美xxxxx牲另类人与| 欧美在线你懂的| 成人在线视频一区二区| 久久精品国产99国产| 亚洲第一在线综合网站| 亚洲欧洲国产专区| 久久精品欧美一区二区三区不卡 | 国产亚洲美州欧州综合国| 欧美日韩一级片在线观看| 91尤物视频在线观看| 岛国av在线一区| 日本va欧美va瓶| 亚洲午夜激情av| 亚洲综合色噜噜狠狠| 国产蜜臀av在线一区二区三区| 91麻豆精品国产91久久久使用方法 | 午夜精品福利一区二区三区av | 视频在线在亚洲| 亚洲精品中文字幕在线观看| 国产校园另类小说区| 久久综合色综合88| 精品国内片67194| 日韩欧美一区在线观看| 91精品国产综合久久婷婷香蕉 | 欧美喷潮久久久xxxxx| 欧美视频在线观看一区| 色综合久久99| 色婷婷久久久久swag精品| 99久久国产综合精品女不卡| www.成人网.com| 成人app网站| 91丝袜国产在线播放| 99riav久久精品riav| 99视频热这里只有精品免费| 99国内精品久久| 91美女福利视频| 91福利视频在线| 欧美乱熟臀69xxxxxx| 777久久久精品| 日韩免费成人网| 国产午夜亚洲精品羞羞网站| 国产三区在线成人av| 国产精品美女视频| 一级日本不卡的影视| 午夜视频一区二区三区| 蜜臀av性久久久久蜜臀aⅴ四虎| 蜜臀av一区二区| 国产在线播放一区二区三区| 大尺度一区二区| av成人老司机| 欧美视频自拍偷拍| 精品国产一区二区国模嫣然| 国产日本亚洲高清| 中文字幕一区二区三区不卡 | 欧美哺乳videos| 国产精品人成在线观看免费| 亚洲婷婷综合久久一本伊一区 | 亚洲一区在线观看免费观看电影高清| 一区二区三区中文字幕电影| 日日夜夜精品视频免费| 久久精品国产色蜜蜜麻豆| 国产凹凸在线观看一区二区| 91丨九色丨尤物| 日韩欧美一级精品久久| 国产色产综合色产在线视频| 亚洲免费在线播放| 蜜桃av一区二区三区电影| 国产成人av在线影院| 一本色道久久综合亚洲91| 欧美在线高清视频| wwww国产精品欧美| 亚洲综合丁香婷婷六月香| 久久国产人妖系列| 色综合咪咪久久| 精品成人一区二区| 亚洲另类在线一区| 国产一区二区久久| 91福利精品视频| 久久精品视频一区二区三区| 亚洲综合av网| 国产河南妇女毛片精品久久久| 欧美在线观看你懂的| 久久久国产精品麻豆| 午夜视频在线观看一区| 成人高清免费在线播放| 欧美日韩第一区日日骚| 欧美激情在线一区二区| 日日夜夜免费精品| av不卡免费电影| 欧美一区二区三区电影| 一区二区三区四区乱视频| 国产真实乱子伦精品视频| 在线观看日韩高清av| 久久精品网站免费观看| 日韩高清不卡在线| 色综合久久66| 国产欧美一区二区在线观看| 日韩国产欧美三级| 97精品久久久午夜一区二区三区| 日韩精品一区二区三区中文不卡| 一区二区在线观看免费| 成人黄动漫网站免费app| 精品三级在线观看| 日本大胆欧美人术艺术动态 | 欧美刺激午夜性久久久久久久| 亚洲人成网站在线| 国产白丝网站精品污在线入口| 日韩精品一区二区三区中文不卡 | 欧美最猛黑人xxxxx猛交| 国产精品美日韩| 国产成人免费高清| 精品国产一区二区三区不卡 | 国产一区激情在线| 91精品国产一区二区| 亚洲国产一区二区三区青草影视| 成人av网站大全| 亚洲国产成人一区二区三区| 国产呦精品一区二区三区网站| 日韩一级在线观看| 久久精品国产99国产精品| 日韩一区二区免费高清| 婷婷成人综合网| 欧美一区二区在线免费观看| 日本成人在线视频网站| 欧美一区二区大片| 免费观看在线综合| 欧美第一区第二区| 狠狠v欧美v日韩v亚洲ⅴ| 精品不卡在线视频| 国产资源精品在线观看| 国产色综合一区| av亚洲精华国产精华| 日韩理论片中文av| 欧美四级电影在线观看| 亚洲一二三四区不卡| 欧美精选在线播放| 蜜臀久久99精品久久久久宅男| 日韩欧美美女一区二区三区| 久久国产乱子精品免费女| 欧美电影免费观看高清完整版| 久久国产福利国产秒拍| 亚洲精品一区二区三区99| 国产福利一区二区三区在线视频| 国产欧美一二三区| 91小视频在线免费看| 一区二区国产盗摄色噜噜| 欧美人妖巨大在线| 国产一区二区福利| 亚洲欧美综合色| 欧美在线看片a免费观看| 免费美女久久99| 国产日韩欧美在线一区| 99精品国产99久久久久久白柏| 亚洲综合免费观看高清在线观看| 91精品在线免费| 韩国在线一区二区| 日韩美女视频一区二区 | 亚洲精品一区二区三区99| 不卡视频一二三四| 亚洲国产日日夜夜| 亚洲精品一区二区在线观看| av在线综合网| 性久久久久久久久久久久| 久久美女高清视频| 91黄视频在线观看| 韩国三级在线一区| 亚洲女子a中天字幕| 日韩丝袜美女视频| 99精品热视频| 伦理电影国产精品| 成人欧美一区二区三区1314| 91麻豆精品国产91久久久久| 国产呦精品一区二区三区网站| 一区二区三区日韩在线观看| 日韩三级在线免费观看| 91网址在线看| 九色porny丨国产精品| 尤物在线观看一区| 久久久久久免费网| 欧美图区在线视频| 成人伦理片在线| 蜜臀av亚洲一区中文字幕| 伊人色综合久久天天| 久久久久久99久久久精品网站| 欧美在线高清视频| 成人精品gif动图一区| 日韩高清在线一区| 亚洲黄色小说网站| 国产精品三级视频| 欧美哺乳videos| 欧美日本在线观看| 91麻豆国产自产在线观看|