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

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

?? yacctabl.pas

?? Yacc例子代碼
?? PAS
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
{
  This module collects the various tables used by the Yacc program:
  - the symbol table
  - the rule table
  - the precedence table
  - the closure table
  - the LALR state, item, transition and reduction table
  Note: All tables are allocated dynamically (at initialization time)
  because of the 64KB static data limit. *)


  Copyright (c) 1990-92  Albert Graef <ag@muwiinfa.geschichte.uni-mainz.de>
  Copyright (C) 1996     Berend de Boer <berend@pobox.com>

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program 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 for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


$Revision: 2 $
$Modtime: 96-07-31 21:15 $

$History: YACCTABL.PAS $
 * 
 * *****************  Version 2  *****************
 * User: Berend       Date: 96-10-10   Time: 21:16
 * Updated in $/Lex and Yacc/tply
 * Updated for protected mode, windows and Delphi 1.X and 2.X.

}


unit YaccTabl;

interface

uses
  YaccBase;


{$IFNDEF Win32}
var max_bytes : LongInt;
  (* available memory *)

function n_bytes : LongInt;
  (* memory actually used *)
{$ENDIF}

const

(* Maximum table sizes: *)

max_keys           =  997;  (* size of hash symbol table (prime number!)   *)
{$IFDEF MsDos}
max_nts            =  300;  (* maximum number of nonterminals              *)
max_lits           =  556;  (* number of literals (300+256)                *)
max_rules          =  301;  (* number of rules (300+1)                     *)
max_types          =  100;  (* number of type tags                         *)
max_prec           =   50;  (* maximum precedence level                    *)
max_states         =  600;  (* number of LR(0) states                      *)
max_items          = 2400;  (* number of items                             *)
max_trans          = 2400;  (* number of transitions                       *)
max_redns          = 1200;  (* number of reductions                        *)
{$ELSE}
max_nts            =  900;  (* maximum number of nonterminals              *)
max_lits           =  max_nts+256;  (* number of literals (300+256)                *)
max_rules          =  max_nts+1;  (* number of rules (300+1)                     *)
max_types          =  100;  (* number of type tags                         *)
max_prec           =   50;  (* maximum precedence level                    *)
{$IFDEF Windows}
max_states         =  800;  (* number of LR(0) states                      *)
{$ELSE}
max_states         = 1200;  (* number of LR(0) states                      *)
{$ENDIF}
max_items          = 9600;  (* number of items                             *)
max_trans          = 9600;  (* number of transitions                       *)
max_redns          = 1200;  (* number of reductions                        *)
{$ENDIF}

{$IFDEF MsDos}
max_rule_len       =   64;  (* maximum length of rules                     *)
max_set_items      =   64;  (* maximum number of items in an item set      *)
{$ELSE}
max_rule_len       =   64;  (* maximum length of rules                     *)
max_set_items      =   96;  (* maximum number of items in an item set      *)
{$ENDIF}

var

(* Actual table sizes: *)

n_nts            : Integer;
n_lits           : Integer;
n_rules          : Integer;
n_types          : Integer;
n_prec           : Integer;
n_states         : Integer;
n_items          : Integer;
n_trans          : Integer;
n_redns          : Integer;

type

(* Table data structures: *)

(* Symbol table: The symbol table consists of a hash table which stores
   print names and internal symbol numbers, and a key table which stores,
   for each internal symbol number, the corresponding hash key. *)

SymRec = record
           pname  : StrPtr;
             (* print name; empty entries are denoted by pname=nil *)
           deff   : Boolean;
             (* flag denoting whether symbol is already defined *)
           sym    : Integer;
             (* internal symbol number (0 or positive: literal symbols
                (literal characters have symbol numbers 1 thru 255);
                negative: nonterminal symbols; 0 denotes endmarker,
                -1 augmented start nonterminal, 256 is reserved for
                error token; note that the predefined symbols except
                the error literal are not actually stored in the symbol
                table; the error symbol is entered at initialization
                s.t. it always has number 256) *)
         end;

SymTable = array [1..max_keys] of SymRec;

SymKeyTable = array [-max_nts..max_lits-1] of Integer;
  (* hash keys for nonterminal and literal symbols *)

(* Rule table: the rule table consists of an array storing the rules
   sequentially in the order in which they appear in the source grammar;
   a rule no.s table which is used to sort rules w.r.t. left-hand side
   nonterminals (after the rule table has been constructed and sorted, all
   references to rules are done indirectly via the rule_no array s.t. the
   rules for each nonterminal can be accessed easily); and an offset table
   which stores, for each nonterminal, the corresponding first and last
   index in the rule no.s table. *)

RuleRec = record
            lhs_sym : Integer; (* lhs nonterminal *)
            rhs_len : Integer; (* length of rhs *)
            rhs_sym : array [1..max_rule_len] of Integer;
              (* rhs symbols *)
          end;

RuleRecPtr = ^RuleRec;

RuleTable = array [1..max_rules] of RuleRecPtr;

RuleNoTable = array [1..max_rules] of Integer;

RuleOffsRec = record
                rule_lo, rule_hi : Integer;
              end;

RuleOffsTable = array [1..max_nts] of RuleOffsRec;

(* Symbol type table: The symbol type table stores the types associated
   with the nonterminal and terminal grammar symbols (0 if none). *)

TypeTable    = array [1..max_types] of Integer;
  (* types declared in the definitions section *)

SymTypeTable = array [-max_nts..max_lits-1] of Integer;
  (* symbol types *)

(* Precedence table: The precedence table stores the type of each
   precedence level (left, right, nonassoc) and, for each literal
   symbol and grammar rule, the assigned precedence level (precedence
   level 0 if none). *)

PrecType = ( left, right, nonassoc );

PrecTable = array [1..max_prec] of PrecType;

SymPrecTable = array [0..max_lits-1] of Integer;

RulePrecTable = array [1..max_rules] of Integer;

(* Closure and first symbols table: The closure table stores, for each
   nonterminal X, the set of those nonterminals Y for which there is a
   rightmost derivation X =>+ Y ... . Similarly, the first set table
   stores, for each nonterminal X, the set of literals a for which there
   is a derivation X =>+ a ... . Both tables are of type SymSetTable.

   The nullable table stores, for each nonterminal, a flag denoting whether
   the nonterminal is nullable (i.e. may be derived to the empty string).

   These tables are constructed by the routines in the YaccClosure unit,
   and are used by the LALR parser construction algorithms in YaccLR0 and
   YaccLookaheads. *)

SymSetTable = array [1..max_nts] of IntSetPtr;

NullableTable = array [1..max_nts] of Boolean;

(* State table:

   Each state stores the first and last index of the kernel items,
   transitions and reductions belonging to it, and a hash key determined
   from the kernel items which is used to speed up searches for existing
   states.

   The items table stores the individual kernel items in the LR(0) set.
   Each entry consists of a rule number together with the item position,
   and a "next" field indicating the associated item in the successor state
   (0 if there is none). The ItemSet type is used to retrieve and manipulate
   individual item sets from the item table.

   The transition table stores the shift and goto transitions in each state
   (each transition is denoted by a (symbol, next_state) pair). Similarly,
   the reductions table stores the reductions in each state, where each
   action is denoted by a (symbolset, ruleno) pair. *)

StateRec = record
             item_lo, item_hi : Integer;
             trans_lo, trans_hi : Integer;
             redns_lo, redns_hi : Integer;
             key : Integer;
           end;

StateTable = array [0..max_states-1] of StateRec;

ItemRec = record
            rule_no, pos_no : Integer;
            next : Integer;
          end;

ItemSet = record
            n_items : Integer;
            item    : array [1..max_set_items] of ItemRec;
          end;

ItemTable = array [1..max_items] of ItemRec;

TransRec = record
             sym, next_state : Integer;
           end;

TransTable = array [1..max_trans] of TransRec;

RednRec = record
            symset : IntSetPtr;
            rule_no : Integer;
          end;

RednTable = array [1..max_redns] of RednRec;

(* Lookaheads table: This table stores, for each kernel item, the
   corresponding LALR(1) lookahead symbol sets. *)

LookaheadTable = array [1..max_items] of IntSetPtr;

(* The propagation table is used to keep track of how lookaheads are
   propagated from kernel items to other lookahead sets. *)

PropList = ^PropEntry;

PropEntry = record
              symset : IntSetPtr;
              next : PropList;
            end;

PropTable = array [1..max_items] of PropList;


var

verbose           : Boolean;          (* status of the verbose option *)
debug             : Boolean;          (* status of the debug option *)
startnt           : Integer;          (* start nonterminal of grammar
                                         (0 if undefined) *)
sym_table         : ^SymTable;        (* symbol table *)
sym_key           : ^SymKeyTable;     (* symbol keys *)
rule_table        : ^RuleTable;       (* rule table *)
type_table        : ^TypeTable;       (* type table *)
sym_type          : ^SymTypeTable;    (* symbol types *)
prec_table        : ^PrecTable;       (* precedence table *)
sym_prec          : ^SymPrecTable;    (* literal symbols precedence *)
rule_prec         : ^RulePrecTable;   (* rules precedence *)
rule_no           : ^RuleNoTable;     (* rule no table *)
rule_offs         : ^RuleOffsTable;   (* rule offset table *)
closure_table     : ^SymSetTable;     (* closure table *)
first_set_table   : ^SymSetTable;     (* first set table *)
nullable          : ^NullableTable;   (* nullable flags table *)
state_table       : ^StateTable;      (* LR(0) state table *)
item_table        : ^ItemTable;       (* LR(0) kernel item table *)
trans_table       : ^TransTable;      (* transition table *)
redn_table        : ^RednTable;       (* reduction table *)
lookahead_table   : ^LookaheadTable;  (* LALR lookaheads table *)
prop_table        : ^PropTable;       (* lookahead propagation table *)


(* Operations: *)

(* Symbol table routines: *)

function new_nt : Integer;
  (* returns a new nonterminal number (<-1) *)

function new_lit : Integer;
  (* returns a new literal number above 256 *)

procedure add_lit ( sym : Integer );
  (* this routine allows to add a user-defined literal symbol;
     the current literal symbols count is adjusted accordingly *)

function get_key ( symbol : String ) : Integer;
  (* returns a hash key for symbol *)

procedure def_key ( k : Integer; sym : Integer );
  (* defines k to be a new symbol with internal symbol number sym *)

function is_def_key ( k : Integer; var sym : Integer ) : Boolean;
  (* checks whether symbol denoted by symbol table key k is already
     defined; if so, returns the corresponding symbol number *)

function pname ( sym : Integer ) : String;
  (* returns the print name of an internal symbol (`$end' for

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品在线视频| 亚洲区小说区图片区qvod| 欧美三级中文字幕在线观看| 色综合色狠狠综合色| 成人做爰69片免费看网站| 国产精品综合视频| 国产精品一区二区视频| 国产精品综合二区| 风流少妇一区二区| 99热国产精品| 色综合色狠狠综合色| 91精品福利视频| 欧美日韩综合色| 4438x成人网最大色成网站| 这里是久久伊人| 日韩你懂的电影在线观看| 精品国产欧美一区二区| 久久久久久久久99精品| 欧美激情在线一区二区三区| 中文字幕日韩一区| 一区二区三区四区五区视频在线观看| 亚洲一区在线观看免费观看电影高清| 亚洲成人在线免费| 狂野欧美性猛交blacked| 国产一区二区在线观看视频| 成人黄色小视频在线观看| 91最新地址在线播放| 欧美性猛交xxxx黑人交| 91精品国产91久久久久久一区二区| 欧美一级在线视频| 国产午夜精品一区二区三区视频| 欧美激情自拍偷拍| 一级特黄大欧美久久久| 91色在线porny| 欧美三片在线视频观看| 精品国产a毛片| 日韩美女啊v在线免费观看| 亚洲va欧美va人人爽午夜| 久久精品72免费观看| 成人av在线播放网站| 欧美亚洲动漫精品| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 日韩三级精品电影久久久| 久久一夜天堂av一区二区三区| 国产精品伦一区二区三级视频| 亚洲一区二区三区在线| 久久精品国产第一区二区三区| 成人深夜福利app| 欧美老年两性高潮| 亚洲国产成人自拍| 婷婷综合另类小说色区| 国产福利91精品| 欧美日韩免费在线视频| 国产日韩视频一区二区三区| 亚洲激情成人在线| 国产精品一区在线| 欧美日韩黄色一区二区| 国产女同互慰高潮91漫画| 无吗不卡中文字幕| 成人精品免费看| 91精品视频网| 亚洲欧美日韩在线不卡| 狠狠色丁香久久婷婷综合丁香| 国产精品久久久久影院老司| 亚洲电影视频在线| 国产乱码精品一区二区三区忘忧草| 91久久人澡人人添人人爽欧美| 精品蜜桃在线看| 一区二区三国产精华液| 国产精品一卡二| 91精品国产91热久久久做人人| 亚洲色欲色欲www| 国产精品99久久久| 91精品国产91久久久久久一区二区| 成人欧美一区二区三区视频网页| 久久er精品视频| 欧美日韩国产一二三| 亚洲男人的天堂在线aⅴ视频| 国产美女一区二区| 欧美一区二区视频在线观看| 亚洲女与黑人做爰| 成人黄色网址在线观看| 久久夜色精品一区| 麻豆一区二区三区| 欧美日韩国产影片| 亚洲蜜臀av乱码久久精品蜜桃| 国产成人小视频| 精品美女一区二区| 日产国产欧美视频一区精品| 在线免费亚洲电影| 亚洲视频一二三| 99精品桃花视频在线观看| 日本一区免费视频| 国产一区二区三区| 精品少妇一区二区三区日产乱码| 午夜精品久久久久久久| 在线日韩av片| 一区二区三区在线视频播放| 波多野结衣的一区二区三区| 国产午夜三级一区二区三| 国产一区美女在线| 久久久久久久久久看片| 国产一区二区三区电影在线观看| 精品乱码亚洲一区二区不卡| 久久99久国产精品黄毛片色诱| 欧美一区二区三区色| 青草国产精品久久久久久| 这里是久久伊人| 久久99热国产| wwwwww.欧美系列| 国产成都精品91一区二区三 | 日日夜夜精品视频免费| 欧美绝品在线观看成人午夜影视| 亚洲国产色一区| 91麻豆精品国产无毒不卡在线观看| 亚洲成人第一页| 制服.丝袜.亚洲.另类.中文| 日韩和欧美一区二区| 欧美一级高清片| 狠狠网亚洲精品| 久久精品亚洲麻豆av一区二区| 国产成人亚洲精品狼色在线| 国产精品久久夜| 在线观看日韩国产| 日本欧美韩国一区三区| 欧美一区二区久久久| 国内外成人在线| 国产精品丝袜黑色高跟| 91精品福利在线| 日韩精品91亚洲二区在线观看| 日韩欧美不卡一区| 国产黄色精品网站| 亚洲男同1069视频| 欧美日韩性生活| 久久不见久久见免费视频1| 久久综合狠狠综合久久综合88| 国产suv精品一区二区三区| 亚洲视频在线一区观看| 欧美日韩国产综合视频在线观看| 久久99国产精品久久99| 中文字幕国产一区二区| 欧美性极品少妇| 久久99热这里只有精品| 日韩美女精品在线| 欧美一级xxx| av在线不卡免费看| 丝袜国产日韩另类美女| 久久久电影一区二区三区| 色综合久久综合网| 麻豆视频一区二区| 国产精品久久久久毛片软件| 欧美日韩免费一区二区三区视频| 精品一区免费av| 日韩毛片在线免费观看| 欧美一区二区免费观在线| 成人av影视在线观看| 日韩激情av在线| 中文乱码免费一区二区| 欧美日韩精品免费| 丁香婷婷综合网| 日韩高清不卡一区| 亚洲视频一区在线| 精品欧美久久久| 欧美在线三级电影| 国产盗摄一区二区| 日韩av二区在线播放| 日韩毛片高清在线播放| 精品久久国产字幕高潮| 色94色欧美sute亚洲线路二| 国产一区二区美女诱惑| 亚洲成人激情社区| 亚洲四区在线观看| 国产日韩欧美综合一区| 911精品产国品一二三产区| www.亚洲精品| 国产一区在线精品| 日韩激情一区二区| 久久99国产精品成人| 亚洲一区二区欧美| 国产精品久久久久久亚洲毛片 | 在线观看视频欧美| 粉嫩aⅴ一区二区三区四区五区| 日韩av电影免费观看高清完整版 | 国产精品乱码人人做人人爱 | 久久久久久久久蜜桃| 欧美精品精品一区| 91极品视觉盛宴| 99精品视频中文字幕| 国产成人一区在线| 精久久久久久久久久久| 男女性色大片免费观看一区二区 | av中文字幕不卡| 国产成人精品网址| 经典三级在线一区| 免费一级片91| 天天操天天干天天综合网| 亚洲综合免费观看高清完整版在线| 中文字幕乱码久久午夜不卡| 久久久www成人免费无遮挡大片| 日韩精品一区二区在线观看|