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

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

?? lr_parser.java

?? 有關JDBC的使用一些編程實例,有關與數據庫連接的代碼
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
package java_cup.runtime;import java.util.Stack;/** This class implements a skeleton table driven LR parser.  In general, *  LR parsers are a form of bottom up shift-reduce parsers.  Shift-reduce *  parsers act by shifting input onto a parse stack until the symbols  *  matching the right hand side of a production appear on the top of the  *  stack.  Once this occurs, a reduce is performed.  This involves removing *  the symbols corresponding to the right hand side of the production *  (the so called "handle") and replacing them with the non-terminal from *  the left hand side of the production.  <p> * *  To control the decision of whether to shift or reduce at any given point,  *  the parser uses a state machine (the "viable prefix recognition machine"  *  built by the parser generator).  The current state of the machine is placed *  on top of the parse stack (stored as part of a symbol object representing *  a terminal or non terminal).  The parse action table is consulted  *  (using the current state and the current lookahead token as indexes) to  *  determine whether to shift or to reduce.  When the parser shifts, it  *  changes to a new state by pushing a new symbol (containing a new state)  *  onto the stack.  When the parser reduces, it pops the handle (right hand  *  side of a production) off the stack.  This leaves the parser in the state  *  it was in before any of those symbols were matched.  Next the reduce-goto  *  table is consulted (using the new state and current lookahead token as  *  indexes) to determine a new state to go to.  The parser then shifts to  *  this goto state by pushing the left hand side symbol of the production  *  (also containing the new state) onto the stack.<p> * *  This class actually provides four LR parsers.  The methods parse() and  *  debug_parse() provide two versions of the main parser (the only difference  *  being that debug_parse() emits debugging trace messages as it parses).   *  In addition to these main parsers, the error recovery mechanism uses two  *  more.  One of these is used to simulate "parsing ahead" in the input  *  without carrying out actions (to verify that a potential error recovery  *  has worked), and the other is used to parse through buffered "parse ahead"  *  input in order to execute all actions and re-synchronize the actual parser  *  configuration.<p> * *  This is an abstract class which is normally filled out by a subclass *  generated by the JavaCup parser generator.  In addition to supplying *  the actual parse tables, generated code also supplies methods which  *  invoke various pieces of user supplied code, provide access to certain *  special symbols (e.g., EOF and error), etc.  Specifically, the following *  abstract methods are normally supplied by generated code: *  <dl compact> *  <dt> short[][] production_table() *  <dd> Provides a reference to the production table (indicating the index of *       the left hand side non terminal and the length of the right hand side *       for each production in the grammar). *  <dt> short[][] action_table() *  <dd> Provides a reference to the parse action table. *  <dt> short[][] reduce_table() *  <dd> Provides a reference to the reduce-goto table. *  <dt> int start_state()       *  <dd> Indicates the index of the start state. *  <dt> int start_production()  *  <dd> Indicates the index of the starting production. *  <dt> int EOF_sym()  *  <dd> Indicates the index of the EOF symbol. *  <dt> int error_sym()  *  <dd> Indicates the index of the error symbol. *  <dt> symbol do_action()  *  <dd> Executes a piece of user supplied action code.  This always comes at  *       the point of a reduce in the parse, so this code also allocates and  *       fills in the left hand side non terminal symbol object that is to be  *       pushed onto the stack for the reduce. *  <dt> void init_actions() *  <dd> Code to initialize a special object that encapsulates user supplied *       actions (this object is used by do_action() to actually carry out the  *       actions). *  <dt> token scan() *  <dd> Used to get the next input token from the scanner. *  </dl> *   *  In addition to these routines that <i>must</i> be supplied by the  *  generated subclass there are also a series of routines that <i>may</i>  *  be supplied.  These include: *  <dl> *  <dt> int error_sync_size() *  <dd> This determines how many tokens past the point of an error  *       must be parsed without error in order to consider a recovery to  *       be valid.  This defaults to 3.  Values less than 2 are not  *       recommended. *  <dt> void report_error(String message, Object info) *  <dd> This method is called to report an error.  The default implementation *       simply prints a message to System.err and ignores its second parameter. *       This method is often replaced in order to provide a more sophisticated *       error reporting mechanism. *  <dt> void report_fatal_error(String message, Object info) *  <dd> This method is called when a fatal error that cannot be recovered from *       is encountered.  In the default implementation, it calls  *       report_error() to emit a message, then throws an exception. *  <dt> void syntax_error(token cur_token) *  <dd> This method is called as soon as syntax error is detected (but *       before recovery is attempted).  In the default implementation it  *       invokes: report_error("Syntax error", null); *  <dt> void unrecovered_syntax_error(token cur_token) *  <dd> This method is called if syntax error recovery fails.  In the default *       implementation it invokes:<br>  *         report_fatal_error("Couldn't repair and continue parse", null); *  </dl> * * @see     java_cup.runtime.symbol * @see     java_cup.runtime.token * @see     java_cup.runtime.virtual_parse_stack * @version last updated: 11/25/95 * @author  Scott Hudson */public abstract class lr_parser {  /*-----------------------------------------------------------*/  /*--- Constructor(s) ----------------------------------------*/  /*-----------------------------------------------------------*/  /** Simple constructor. */  public lr_parser()    {      /* nothing to do here */    }  /*-----------------------------------------------------------*/  /*--- (Access to) Static (Class) Variables ------------------*/  /*-----------------------------------------------------------*/  /** The default number of tokens after an error we much match to consider    *  it recovered from.    */  protected final static int _error_sync_size = 3;  /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/  /** The number of tokens after an error we much match to consider it    *  recovered from.    */  protected int error_sync_size() {return _error_sync_size; }  /*-----------------------------------------------------------*/  /*--- (Access to) Instance Variables ------------------------*/  /*-----------------------------------------------------------*/  /** Table of production information (supplied by generated subclass).   *  This table contains one entry per production and is indexed by    *  the negative-encoded values (reduce actions) in the action_table.     *  Each entry has two parts, the index of the non-terminal on the    *  left hand side of the production, and the number of symbols    *  on the right hand side.    */  public abstract short[][] production_table();  /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/  /** The action table (supplied by generated subclass).  This table is   *  indexed by state and terminal number indicating what action is to   *  be taken when the parser is in the given state (i.e., the given state    *  is on top of the stack) and the given terminal is next on the input.     *  States are indexed using the first dimension, however, the entries for    *  a given state are compacted and stored in adjacent index, value pairs    *  which are searched for rather than accessed directly (see get_action()).     *  The actions stored in the table will be either shifts, reduces, or    *  errors.  Shifts are encoded as positive values (one greater than the    *  state shifted to).  Reduces are encoded as negative values (one less    *  than the production reduced by).  Error entries are denoted by zero.    *    * @see java_cup.runtime.lr_parser#get_action   */  public abstract short[][] action_table();  /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/  /** The reduce-goto table (supplied by generated subclass).  This   *  table is indexed by state and non-terminal number and contains   *  state numbers.  States are indexed using the first dimension, however,   *  the entries for a given state are compacted and stored in adjacent   *  index, value pairs which are searched for rather than accessed    *  directly (see get_reduce()).  When a reduce occurs, the handle    *  (corresponding to the RHS of the matched production) is popped off    *  the stack.  The new top of stack indicates a state.  This table is    *  then indexed by that state and the LHS of the reducing production to    *  indicate where to "shift" to.    *   * @see java_cup.runtime.lr_parser#get_reduce   */  public abstract short[][] reduce_table();  /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/  /** The index of the start state (supplied by generated subclass). */  public abstract int start_state();  /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/  /** The index of the start production (supplied by generated subclass). */  public abstract int start_production();  /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/  /** The index of the end of file terminal symbol (supplied by generated    *  subclass).    */  public abstract int EOF_sym();  /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/  /** The index of the special error symbol (supplied by generated subclass). */  public abstract int error_sym();  /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/  /** Internal flag to indicate when parser should quit. */  protected boolean _done_parsing = false;  /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/  /** This method is called to indicate that the parser should quit.  This is    *  normally called by an accept action, but can be used to cancel parsing    *  early in other circumstances if desired.    */  public void done_parsing()    {      _done_parsing = true;    }  /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/  /* Global parse state shared by parse(), error recovery, and    * debugging routines */  /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/  /** Indication of the index for top of stack (for use by actions). */  protected int tos;  /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/  /** The current lookahead token. */  protected token cur_token;  /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/  /** The parse stack itself. */  protected Stack stack = new Stack();  /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/  /** Direct reference to the production table. */   protected short[][] production_tab;  /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/  /** Direct reference to the action table. */  protected short[][] action_tab;  /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/  /** Direct reference to the reduce-goto table. */  protected short[][] reduce_tab;  /*-----------------------------------------------------------*/  /*--- General Methods ---------------------------------------*/  /*-----------------------------------------------------------*/  /** Perform a bit of user supplied action code (supplied by generated    *  subclass).  Actions are indexed by an internal action number assigned   *  at parser generation time.   *   * @param act_num   the internal index of the action to be performed.   * @param parser    the parser object we are acting for.   * @param stack     the parse stack of that object.   * @param top       the index of the top element of the parse stack.   */  public abstract symbol do_action(    int       act_num,     lr_parser parser,     Stack     stack,     int       top)     throws java.lang.Exception;  /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/  /** User code for initialization inside the parser.  Typically this    *  initializes the scanner.  This is called before the parser requests   *  the first token.  Here this is just a placeholder for subclasses that    *  might need this and we perform no action.   This method is normally   *  overridden by the generated code using this contents of the "init with"   *  clause as its body.   */  public void user_init() throws java.lang.Exception { }  /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/  /** Initialize the action object.  This is called before the parser does   *  any parse actions. This is filled in by generated code to create   *  an object that encapsulates all action code.    */   protected abstract void init_actions() throws java.lang.Exception;  /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/  /** Get the next token from the input (supplied by generated subclass).   *  Once end of file has been reached, all subsequent calls to scan    *  should return an EOF token (which is symbol number 0).  This method   *  is supplied by the generator using using the code declared in the    *  "scan with" clause.   */  public abstract token scan() throws java.lang.Exception;  /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/  /** Report a fatal error.  This method takes a  message string and an    *  additional object (to be used by specializations implemented in    *  subclasses).  Here in the base class a very simple implementation    *  is provided which reports the error then throws an exception.    *   * @param message an error message.   * @param info    an extra object reserved for use by specialized subclasses.   */  public void report_fatal_error(    String   message,     Object   info)    throws java.lang.Exception    {      /* stop parsing (not really necessary since we throw an exception, but) */      done_parsing();      /* use the normal error message reporting to put out the message */      report_error(message, info);      /* throw an exception */      throw new Exception("Can't recover from previous error(s)");    }  /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/  /** Report a non fatal error (or warning).  This method takes a message    *  string and an additional object (to be used by specializations    *  implemented in subclasses).  Here in the base class a very simple    *  implementation is provided which simply prints the message to    *  System.err.    *   * @param message an error message.   * @param info    an extra object reserved for use by specialized subclasses.   */  public void report_error(String message, Object info)    {      System.err.println(message);    }  /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/  /** This method is called when a syntax error has been detected and recovery    *  is about to be invoked.  Here in the base class we just emit a    *  "Syntax error" error message.     *   * @param cur_token the current lookahead token.   */  public void syntax_error(token cur_token)    {      report_error("Syntax error", null);    }  /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/  /** This method is called if it is determined that syntax error recovery    *  has been unsuccessful.  Here in the base class we report a fatal error.    *   * @param cur_token the current lookahead token.   */  public void unrecovered_syntax_error(token cur_token)    throws java.lang.Exception    {      report_fatal_error("Couldn't repair and continue parse", null);    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品乡下勾搭老头1| 成人动漫中文字幕| 狠狠色狠狠色综合系列| 高潮精品一区videoshd| 精品中文字幕一区二区小辣椒| 国产美女主播视频一区| 色婷婷精品久久二区二区蜜臀av | 日本道色综合久久| 欧美一区二区三区播放老司机| 国产视频911| 国产精品麻豆网站| 免费成人结看片| 色综合久久88色综合天天6 | 欧美精品一二三| 久久久不卡网国产精品一区| 亚洲欧美激情小说另类| 美国精品在线观看| 91在线高清观看| 欧美精品一区二区在线观看| 一区二区久久久| 成人小视频在线| 欧美一卡二卡三卡| 亚洲福利视频导航| www.亚洲人| 欧美国产精品一区二区| 美女被吸乳得到大胸91| 欧美日韩在线不卡| 综合激情成人伊人| 国产福利91精品| 欧美精品亚洲一区二区在线播放| 亚洲三级理论片| 成人av电影免费观看| 亚洲精品在线三区| 日本中文在线一区| 欧美日本精品一区二区三区| 一区二区三区四区精品在线视频| 成人免费毛片嘿嘿连载视频| 久久婷婷久久一区二区三区| 久久99久久久久久久久久久| 欧美日韩第一区日日骚| 夜夜夜精品看看| 91麻豆高清视频| 亚洲欧美色图小说| 91视频免费观看| 亚洲精品乱码久久久久久久久| 色婷婷国产精品久久包臀| 一区二区激情视频| 91精品欧美综合在线观看最新| 成人免费一区二区三区在线观看| 成人aa视频在线观看| 一区二区成人在线观看| 亚洲一区二区四区蜜桃| 国模大尺度一区二区三区| 国产精品一色哟哟哟| 99re成人精品视频| 欧美精品99久久久**| 亚洲免费成人av| 亚洲高清不卡在线观看| www国产成人免费观看视频 深夜成人网| 亚洲一区二区在线观看视频 | 中文字幕一区二区三区四区| 色综合久久88色综合天天6| 日韩一区精品视频| 国产精品麻豆欧美日韩ww| 欧美三级电影网| 国产精品一区二区你懂的| 一区二区三区四区蜜桃| 久久日一线二线三线suv| 色综合久久综合网97色综合| 看电视剧不卡顿的网站| 国产精品国产三级国产| 欧美日韩精品专区| 成人a区在线观看| 欧美aaaaaa午夜精品| 国产精品护士白丝一区av| 3d动漫精品啪啪| 成人a区在线观看| 极品少妇xxxx精品少妇| 亚洲午夜国产一区99re久久| 久久久久久久久久美女| 欧美日韩午夜在线视频| 成人免费看的视频| 黄色成人免费在线| 日本欧洲一区二区| 亚洲自拍偷拍av| 中文字幕电影一区| 精品国产一区二区国模嫣然| 在线国产电影不卡| 99久久精品国产观看| 国内精品久久久久影院色| 偷拍日韩校园综合在线| 亚洲精品国产第一综合99久久| 久久免费国产精品| 日韩一区二区在线播放| 欧美在线免费播放| 色综合视频在线观看| 成人黄色片在线观看| 国产一区不卡在线| 麻豆高清免费国产一区| 天天射综合影视| 亚洲成人自拍一区| 亚洲一区二区三区精品在线| 亚洲男同1069视频| 亚洲男人的天堂网| 亚洲黄色尤物视频| 亚洲男人的天堂在线观看| 亚洲欧美自拍偷拍| 亚洲丝袜制服诱惑| 亚洲欧洲综合另类| 最好看的中文字幕久久| 成人免费一区二区三区在线观看| 中文字幕av免费专区久久| 国产欧美精品一区aⅴ影院| 久久综合九色综合欧美亚洲| 欧美精品一区二区三区久久久| 日韩精品专区在线| 久久综合九色综合欧美亚洲| 国产亚洲污的网站| 国产精品乱码人人做人人爱| 国产精品成人免费精品自在线观看| 国产亚洲精品aa| 国产精品电影院| 一区二区三区成人| 亚洲chinese男男1069| 日韩国产高清影视| 久久成人免费网站| 国产成都精品91一区二区三| 波多野结衣91| 欧美网站一区二区| 91精品国产综合久久国产大片| 日韩免费电影一区| 久久精品日产第一区二区三区高清版| 久久久久国产精品厨房| 日本一区二区三区在线观看| 日韩毛片在线免费观看| 亚洲成人资源在线| 九一久久久久久| 国产成人午夜片在线观看高清观看| 成人高清视频在线观看| 欧美色涩在线第一页| 精品少妇一区二区三区视频免付费 | 欧美一区二区黄色| 精品国产免费视频| 中文字幕在线一区| 丝袜美腿成人在线| 国产在线视频一区二区三区| av在线一区二区| 日韩欧美在线1卡| 亚洲国产精品成人综合色在线婷婷| 亚洲综合在线观看视频| 狠狠v欧美v日韩v亚洲ⅴ| 99久久精品国产观看| 日韩视频一区二区三区 | av资源网一区| 欧美日本国产视频| 国产精品对白交换视频| 日本欧美肥老太交大片| 99国产精品久久久久| 欧美一区二区网站| 伊人一区二区三区| 粉嫩一区二区三区性色av| 欧美视频在线观看一区二区| 国产片一区二区三区| 日本伊人色综合网| 日本久久精品电影| 国产女人aaa级久久久级| 青青国产91久久久久久| 日本精品视频一区二区三区| 久久久一区二区三区| 亚洲午夜三级在线| 99久久精品国产麻豆演员表| 久久一留热品黄| 青青草97国产精品免费观看 | 精品国产制服丝袜高跟| 亚洲一区二区三区四区在线免费观看| 国产精品88888| 精品美女一区二区三区| 亚洲午夜精品网| 色8久久精品久久久久久蜜| 国产情人综合久久777777| 蜜桃久久久久久| 欧美美女黄视频| 亚洲一级二级三级在线免费观看| 成人av在线一区二区三区| 国产三级精品视频| 激情丁香综合五月| 欧美精品一区二区三区四区| 久久激五月天综合精品| 日韩一二在线观看| 日韩电影在线免费看| 欧美日本在线观看| 亚洲午夜久久久久久久久电影网| 色88888久久久久久影院按摩| 亚洲男人天堂av| 91香蕉视频污| 亚洲无线码一区二区三区| 欧美性色黄大片| 亚洲成人免费视频| 51精品视频一区二区三区| 日韩在线播放一区二区|