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

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

?? yufafenxi.~pas

?? delphi編的pl0編譯器
?? ~PAS
字號:
unit YuFaFenXi;

interface
uses
  SysUtils,Defination,Main;


var
  table:array[0..1000] of record
                        name:alfa;
                        kind:integer;
                        value:integer;
                        level:integer;
                        adr:integer;
                        size:integer;
        end;

  table_index:integer;
  err:integer;

  ident_kind:integer;

  temp_wordlist_index:integer;
  if_end:boolean;
procedure Analyze;

implementation


procedure error(n:integer;line:integer);
begin

  inc(err);
  Mainform.Memo2.Lines.Append('行號:'+inttostr(line));
  mainform.Memo2.Lines.Append('   '+
                              wordlist[temp_wordlist_index].name+
                              '    :'
                              +'             '+errlist[n]);
  if line<=30 then
    error_mark[line]:=1;
  
end;

procedure Advance;
begin

  if temp_wordlist_index>=wordlist_index then
  begin
    if_end:=true;
    exit;
  end;
  inc(temp_wordlist_index);
end;

procedure test(s1,s2:symset;n:integer);
begin
  if not(wordlist[temp_wordlist_index].symb in s1+[period]) then
  begin
    error(n,wordlist[temp_wordlist_index].info);
    s1:=s1+s2;
    while not(wordlist[temp_wordlist_index].symb in s1) do
      if if_end then exit
      else Advance;
  end;
end;




procedure block(lev,table_index:integer;fsys:symset);    //分程序段
var
  tx0:integer;//初始化table表
  data_index:integer;

  procedure enter(n:integer);       //建立符號表
  
  begin
    inc(table_index);

      table[table_index].name:=wordlist[n].name;
      if ident_kind=7 then
      begin
        table[table_index].kind:=7;
        table[table_index].level:=lev;
      end;
      if ident_kind=5 then
      begin
        table[table_index].kind:=888;
        table[table_index].level:=lev;
        table[table_index].adr:=data_index;
        inc(data_index);
      end;
      if ident_kind=6 then
      begin
        table[table_index].name:=wordlist[n-2].name;
        table[table_index].kind:=999;
        table[table_index].value:=wordlist[n].value;
      end;
 
    
  end;//enter

  function position(id:alfa):integer;     //查找符號表
  var
    i:integer;
  begin
      table[0].name:=id;
      i:=table_index;
      while table[i].name<>id do dec(i);
      result:=i;
  end;

  procedure constdeclaration;        //
  begin
    if wordlist[temp_wordlist_index].symb=ident then
    begin
      Advance;
      if if_end then exit;//////////////

      if wordlist[temp_wordlist_index].symb in [eql,becomes] then
      begin
        if wordlist[temp_wordlist_index].symb=becomes then
          error(1,wordlist[temp_wordlist_index].info);
        Advance;
        if if_end then exit;//////////////////
        if wordlist[temp_wordlist_index].symb=number then
        begin
          enter(temp_wordlist_index);
          Advance;
          if if_end then exit;///////////////////////
        end
        else error(2,wordlist[temp_wordlist_index].info);
      end
    else error(3,wordlist[temp_wordlist_index].info);
    end
    else error(4,wordlist[temp_wordlist_index].info)
  end;

  procedure vardeclaration;
  begin
    if wordlist[temp_wordlist_index].symb=ident then
    begin
      enter(temp_wordlist_index);
      Advance;
      if if_end then exit;///////////////////////////
    end
    else error(4,wordlist[temp_wordlist_index].info);
  end;



  procedure statement(fsys:symset);
  var
    i:integer;

    procedure expression(fsys:symset);
//    var
//      addop:symbol;

      procedure term(fsys:symset);


        procedure factor(fsys:symset);
        var
          i:integer;
        begin
          test(facbegsys,fsys,24);
          while wordlist[temp_wordlist_index].symb in facbegsys do
          begin
            if wordlist[temp_wordlist_index].symb=ident then
            begin
              i:=position(wordlist[temp_wordlist_index].name);
              if i=0 then error(11,wordlist[temp_wordlist_index].info)
              else if table[i].kind=7 then
                error(21,wordlist[temp_wordlist_index].info);//7為procedure
              advance;
          //    if i=3 then;///////////////
            end
            else
            if wordlist[temp_wordlist_index].symb=number then
            begin
              advance;
              if if_end then exit;////////////////////
            end
            else if wordlist[temp_wordlist_index].symb=lparen then
            begin
              advance;
              if if_end then exit;//////////////////
              expression([rparen]+fsys);
              if wordlist[temp_wordlist_index].symb=rparen then
              begin
                advance;
                if if_end then exit;/////////////
              end
              else error(22,wordlist[temp_wordlist_index].info)
            end;
          if if_end then exit;
          test(fsys,facbegsys,23);
          end;
        end;


      begin//term
        factor([times,slash]+fsys);
        while wordlist[temp_wordlist_index].symb in [times,slash] do
        begin
          advance;
          if if_end then exit;////////////////
          factor(fsys+[times,slash]);
        end;
      end;//term


    begin//expression
      if wordlist[temp_wordlist_index].symb in [plus,minus] then
      begin
        advance;
        if if_end then exit;///////////////////
        term(fsys+[plus,minus]);
      end
      else term(fsys+[plus,minus]);
      while wordlist[temp_wordlist_index].symb in[plus,minus] do
      begin
        advance;
        if if_end then exit;/////////////////
        term(fsys+[plus,minus]);
      end;
    end;//expression


  procedure condition(fsys:symset);
  begin
    if wordlist[temp_wordlist_index].symb=oddsym then
    begin
      advance;
      if if_end then exit;/////////////////////
      expression(fsys);
    end
    else
    begin
      expression([eql,neq,lss,leq,gtr,geq]+fsys);
      if not (wordlist[temp_wordlist_index].symb in [eql,neq,lss,leq,gtr,geq])
        then error(20,wordlist[temp_wordlist_index].info)
      else
      begin
        advance;
        if if_end then exit;////////////////////////////
        expression(fsys);
      end;
    end;
  end;


  begin//statement
    if wordlist[temp_wordlist_index].symb=ident then
    begin
      i:=position(wordlist[temp_wordlist_index].name);
      if i=0 then error(11,wordlist[temp_wordlist_index].info)
      else
      if table[i].kind<>888 then
      begin
        error(12,wordlist[temp_wordlist_index].info);
        i:=0;
      end;
      advance;
      
      if if_end then exit;
      if wordlist[temp_wordlist_index].symb=becomes then
      begin
        advance;
        if if_end then exit;////////////////////////////
      end
      else error(13,wordlist[temp_wordlist_index].info);
      expression(fsys);
    end
    else
    if wordlist[temp_wordlist_index].symb=readsym then
    begin
      advance;
      if if_end then exit;////////////////////////////
      if wordlist[temp_wordlist_index].symb<>lparen then
        error(34,wordlist[temp_wordlist_index].info)
      else
      repeat
        advance;
        if if_end then exit;////////////////////////////
        if wordlist[temp_wordlist_index].symb=ident then i:=
                              position(wordlist[temp_wordlist_index].name)
        else i:=0;
        if i=0 then error(35,wordlist[temp_wordlist_index].info);
        advance;
        if if_end then exit;////////////////////////////
      until wordlist[temp_wordlist_index].symb<>comma;
      if wordlist[temp_wordlist_index].symb<>rparen then
      begin
        error(33,wordlist[temp_wordlist_index].info);
        while not (wordlist[temp_wordlist_index].symb in fsys) do
        begin
          advance;
          if if_end then exit;////////////////////////////
        end
      end
      else
      begin
        advance;
        if if_end then exit;////////////////////////////
      end;
    end

    else
    if wordlist[temp_wordlist_index].symb=writesym then
    begin
      advance;
      if if_end then exit;////////////////////////////
      if wordlist[temp_wordlist_index].symb=lparen then
      begin
        repeat
          advance;
          if if_end then exit;////////////////////////////
          expression([rparen,comma]+fsys);
        until wordlist[temp_wordlist_index].symb<>comma;
        if wordlist[temp_wordlist_index].symb<>rparen then
          error(33,wordlist[temp_wordlist_index].info)
        else
        begin
          advance;
          if if_end then exit;////////////////////////////
        end;
      end;
    end

    else
    if wordlist[temp_wordlist_index].symb=callsym then
    begin
      advance;
      if if_end then exit;////////////////////////////
      if wordlist[temp_wordlist_index].symb<>ident then
        error(14,wordlist[temp_wordlist_index].info)
      else
      begin
        i:=position(wordlist[temp_wordlist_index].name);
        if i=0 then error(11,wordlist[temp_wordlist_index].info)
        else
        if table[i].kind<>7 then error(15,wordlist[temp_wordlist_index].info);
        advance;
        if if_end then exit;////////////////////////////
      end;
    end

    else
    if wordlist[temp_wordlist_index].symb=ifsym then
    begin
      advance;
      if if_end then exit;////////////////////////////
      condition([thensym,dosym]+fsys);
      if wordlist[temp_wordlist_index].symb=thensym then
      begin
        advance;
        if if_end then exit;////////////////////////////
      end
      else error(16,wordlist[temp_wordlist_index].info);
      statement(fsys);
    end

    else
    if wordlist[temp_wordlist_index].symb=beginsym then
    begin
      advance;
      if if_end then exit;////////////////////////////
      statement([semicolon,endsym]+fsys);
      while wordlist[temp_wordlist_index].symb in[semicolon]+statbegsys do
      begin
        if wordlist[temp_wordlist_index].symb=semicolon then
        begin
          advance;
          if if_end then exit;////////////////////////////
        end
        else error(10,wordlist[temp_wordlist_index].info);
        statement([semicolon,endsym]+fsys);
      end;
      if wordlist[temp_wordlist_index].symb=endsym then
      begin
        advance;
        if if_end then exit;////////////////////////////
      end
      else error(17,wordlist[temp_wordlist_index].info)
    end

    else
    if wordlist[temp_wordlist_index].symb=whilesym then
    begin
      advance;
      if if_end then exit;////////////////////////////
      condition([dosym]+fsys);
      if wordlist[temp_wordlist_index].symb=dosym then
      begin
        advance;
        if if_end then exit;////////////////////////////
      end
      else error(18,wordlist[temp_wordlist_index].info);
      statement(fsys);
    end;
    test(fsys,[],19);
  end;



begin//block
  data_index:=3;
  tx0:=table_index;
//  table[table_index].adr:=
  repeat
    if wordlist[temp_wordlist_index].symb=constsym then
    begin
      ident_kind:=6;
      advance;
      if if_end then exit;////////////////////////////
      repeat
        constdeclaration;
        while wordlist[temp_wordlist_index].symb=comma do
        begin
          advance;
          if if_end then exit;////////////////////////////
          constdeclaration;
        end;
        if wordlist[temp_wordlist_index].symb=semicolon then
        begin
          advance;
          if if_end then exit;////////////////////////////
        end
        else error(5,wordlist[temp_wordlist_index].info);
      until wordlist[temp_wordlist_index].symb<>ident;
    end;
    if wordlist[temp_wordlist_index].symb=varsym then
    begin
      ident_kind:=5;
      advance;
      if if_end then exit;////////////////////////////
      repeat
        vardeclaration;
        while wordlist[temp_wordlist_index].symb=comma do
        begin
          advance;
          if if_end then exit;////////////////////////////
          vardeclaration;
        end;
        if wordlist[temp_wordlist_index].symb=semicolon then
        begin
          advance;
          if if_end then exit;////////////////////////////
        end
        else error(5,wordlist[temp_wordlist_index].info);
      until wordlist[temp_wordlist_index].symb<>ident;
    end;
    while wordlist[temp_wordlist_index].symb=procsym do
    begin
      ident_kind:=7;
      advance;
      if if_end then exit;////////////////////////////
      if wordlist[temp_wordlist_index].symb=ident then
      begin
        enter(temp_wordlist_index);
        advance;
        if if_end then exit;////////////////////////////
      end
      else error(4,wordlist[temp_wordlist_index].info);
      if wordlist[temp_wordlist_index].symb=semicolon then
      begin
        advance;
        if if_end then exit;////////////////////////////
      end
      else error(5,wordlist[temp_wordlist_index].info);
      block(lev+1,table_index,[semicolon]+fsys);
      if wordlist[temp_wordlist_index].symb=semicolon then
      begin
        advance;
        if if_end then exit;////////////////////////////
        test(statbegsys+[ident,procsym],fsys,6);
      end
      else error(5,wordlist[temp_wordlist_index].info);
    end;
    ////////////////////////////////////////////

    /////////////////////////////////////////
    test(statbegsys+[ident]+[semicolon],declbegsys,7);
  until not (wordlist[temp_wordlist_index].symb in declbegsys);


  if if_end then exit;

  with table[tx0] do
  begin
    size:=data_index;
  end;

  statement([semicolon,endsym]+fsys);
  test(fsys,[],8);
end;




procedure Analyze;        //語法分析

begin


  Initialize;

  err:=0;
  if_end:=false;
  temp_wordlist_index:=1;
  table_index:=0;

  declbegsys:=[constsym,varsym,procsym];
  statbegsys:=[beginsym,callsym,ifsym,whilesym];
  facbegsys:=[ident,number,lparen];

  if temp_wordlist_index>wordlist_index then
  begin
    error(9,1);

    exit;
  end;

  block(0,0,[period]+declbegsys+statbegsys);

  if if_end then exit;////////////////////////////

  if wordlist[temp_wordlist_index].symb<>period then
    error(9,wordlist[temp_wordlist_index].info);

  if err=0 then
  begin
    MainForm.Memo2.Lines.Append('  程序無語法錯誤,可以繼續編譯!');
    MainForm.N13.Enabled:=true;
  end;
end;

initialization err:=1;
end.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品乱人伦小说| 欧美卡1卡2卡| 亚洲丝袜美腿综合| 91亚洲精品乱码久久久久久蜜桃| 国产精品久久久久四虎| 91美女视频网站| 亚洲成a人片综合在线| 日韩欧美一二三| 成人涩涩免费视频| 有码一区二区三区| 日韩一区二区精品在线观看| 国产精品一区在线观看乱码| 国产精品久久久久久久久久免费看 | 日本不卡一二三| 欧美xxxxxxxxx| 成人国产一区二区三区精品| 亚洲综合自拍偷拍| 日韩午夜中文字幕| 成人av片在线观看| 午夜精品久久久久久久久久| 精品成人一区二区三区四区| 色一情一乱一乱一91av| 日本视频一区二区三区| 欧美国产一区视频在线观看| 欧美日韩国产免费一区二区 | 亚洲一区二区三区三| 91精品国产一区二区三区香蕉| 国产福利一区在线| 亚洲一区二区美女| 久久久99免费| 欧美三级电影精品| 大桥未久av一区二区三区中文| 亚洲在线中文字幕| 国产日韩欧美综合在线| 3751色影院一区二区三区| 国产精品羞羞答答xxdd| 日日夜夜一区二区| 亚洲色图欧美在线| 国产亚洲午夜高清国产拍精品| 欧美日韩久久一区| 99视频在线精品| 久久99最新地址| 午夜精品视频在线观看| 中文字幕乱码久久午夜不卡| 日韩美女视频一区二区在线观看| 91久久精品日日躁夜夜躁欧美| 国产一区二区三区在线观看精品| 午夜精品在线视频一区| 一区二区三区在线观看网站| 国产亚洲一区二区三区在线观看| 日韩一区二区三区高清免费看看| 91成人免费网站| 97超碰欧美中文字幕| 国产精品一卡二卡| 国产最新精品精品你懂的| 日本在线播放一区二区三区| 樱桃国产成人精品视频| 亚洲青青青在线视频| 亚洲视频一区二区在线| 国产精品麻豆99久久久久久| 久久免费电影网| 久久综合国产精品| 欧美电影免费观看高清完整版| 欧美日韩国产成人在线免费| 欧美做爰猛烈大尺度电影无法无天| 99视频超级精品| av电影天堂一区二区在线观看| 岛国精品一区二区| 国产999精品久久| 国产suv精品一区二区883| 国产成人丝袜美腿| 国产精品亚洲专一区二区三区| 久久精品国产色蜜蜜麻豆| 蜜臀国产一区二区三区在线播放| 日本一不卡视频| 天天综合天天综合色| 婷婷久久综合九色国产成人| 日本人妖一区二区| 麻豆成人av在线| 国产原创一区二区三区| 国产自产高清不卡| 国产成人综合自拍| 成人久久18免费网站麻豆| 成人高清视频在线| 色狠狠综合天天综合综合| 欧美午夜一区二区三区免费大片| 欧美午夜寂寞影院| 777午夜精品免费视频| 精品乱码亚洲一区二区不卡| 久久久久国产精品麻豆ai换脸| 欧美国产日本视频| 日韩理论片在线| 丝袜诱惑制服诱惑色一区在线观看| 日本不卡一二三| 国产xxx精品视频大全| 91在线观看高清| 欧美三级三级三级爽爽爽| 日韩欧美区一区二| 欧美国产在线观看| 亚洲成人动漫在线免费观看| 美女视频网站久久| 成人动漫中文字幕| 4438亚洲最大| 国产日韩v精品一区二区| 国产精品久久夜| 青青草国产精品亚洲专区无| 国产在线播放一区| 91成人看片片| 久久一区二区三区四区| 亚洲人成7777| 久久99久久99| 欧日韩精品视频| 国产日韩欧美电影| 三级成人在线视频| av亚洲精华国产精华| 欧美三级电影网| 国产精品卡一卡二| 久久99国产精品免费| 白白色 亚洲乱淫| 欧美一级艳片视频免费观看| 中文字幕亚洲区| 久久狠狠亚洲综合| 欧美色偷偷大香| 国产欧美在线观看一区| 日韩精品五月天| 91年精品国产| 欧美国产精品劲爆| 免费观看成人鲁鲁鲁鲁鲁视频| 91天堂素人约啪| 久久久www成人免费毛片麻豆| 丝袜国产日韩另类美女| 色综合 综合色| 久久九九久精品国产免费直播| 亚洲成年人影院| 色哟哟国产精品免费观看| 久久精品一区二区| 日本一道高清亚洲日美韩| 91国在线观看| 亚洲人午夜精品天堂一二香蕉| 激情综合五月婷婷| 欧美福利一区二区| 亚洲黄色免费网站| 99精品视频中文字幕| 国产午夜亚洲精品理论片色戒| 奇米四色…亚洲| 欧美精品免费视频| 亚洲午夜日本在线观看| 91在线观看下载| 1000部国产精品成人观看| 国产精品性做久久久久久| 欧美精品一区二区三区视频| 日本人妖一区二区| 欧美日韩国产高清一区二区| 亚洲综合成人在线视频| 91黄视频在线观看| 亚洲男人天堂av| 色综合一个色综合亚洲| 1024国产精品| 一本色道久久综合精品竹菊| 亚洲色图视频网站| 色综合久久99| 亚洲国产中文字幕| 欧美日韩极品在线观看一区| 亚洲午夜一区二区三区| 欧美视频在线播放| 天天影视色香欲综合网老头| 在线播放日韩导航| 日韩高清一级片| 日韩亚洲欧美综合| 精品一区二区三区欧美| 国产亚洲午夜高清国产拍精品 | 最新热久久免费视频| 成人午夜私人影院| 亚洲人成精品久久久久久| 精品欧美一区二区三区精品久久| 日韩电影在线免费观看| 日韩欧美国产电影| 国产一区二区三区不卡在线观看| 国产欧美日韩另类视频免费观看| 高清国产午夜精品久久久久久| 国产精品国产成人国产三级| 色婷婷精品大视频在线蜜桃视频| 一区二区高清视频在线观看| 欧美久久久久久久久| 久色婷婷小香蕉久久| 欧美激情一区二区三区四区| 色综合久久88色综合天天| 日韩高清在线观看| 国产欧美在线观看一区| 色噜噜狠狠成人网p站| 日韩一区欧美二区| 久久久国产午夜精品| 色综合久久久久久久久久久| 五月婷婷久久丁香| 国产亚洲综合在线| 欧美中文一区二区三区| 韩国视频一区二区| 亚洲欧美日韩中文字幕一区二区三区| 欧美日韩国产精品成人| 国产成人精品一区二|