⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ezscryacc.pas

📁 很管用的GIS控件
💻 PAS
📖 第 1 页 / 共 3 页
字号:
       end;
  54 : begin
         yyval := yyv[yysp-0];
       end;
  55 : begin
         yyval := yyv[yysp-0];
       end;
  56 : begin
         yyval := yyv[yysp-0];
       end;
  57 : begin
         yyval := yyv[yysp-0];
       end;
  58 : begin
         yyval := yyv[yysp-0];
       end;
  59 : begin
         yyval := yyv[yysp-0];
       end;
  60 : begin
         yyval := yyv[yysp-0];
       end;
  61 : begin
         yyval := yyv[yysp-0];
       end;
  62 : begin
         yyval := yyv[yysp-0];
       end;
  63 : begin
         yyval := yyv[yysp-0];
       end;
  64 : begin
         yyval := yyv[yysp-0];
       end;
  65 : begin
         yyval := yyv[yysp-0];
       end;
  66 : begin
         do_none;
         FVector.Clear;
       end;
  67 : begin
         do_point(FVector[0]);
         FVector.Clear;
       end;
  68 : begin
         do_insert(FVector[0],GetString( yyv[yysp-8].yystring ),StrToFloat(yyv[yysp-6].yystring),
         StrToFloat(yyv[yysp-4].yystring), StrToFloat(yyv[yysp-2].yystring),GetString( yyv[yysp-0].yystring ));
         FVector.Clear;
       end;
  69 : begin
         do_place(FVector[0], GetString( yyv[yysp-0].yystring ) );
         FVector.Clear;
       end;
  70 : begin
         do_polyline(FVector);
         FVector.Clear
       end;
  71 : begin
         do_polygon(FVector);
         FVector.Clear;
       end;
  72 : begin
         do_line(FVector[0], FVector[1] );
         FVector.Clear;
       end;
  73 : begin
         do_rectangle(FVector[0], FVector[1], StrToFloat(yyv[yysp-0].yystring));
         FVector.Clear;
       end;
  74 : begin
         do_arc(FVector[0], strtofloat(yyv[yysp-6].yystring), strtofloat(yyv[yysp-4].yystring),
         strtofloat(yyv[yysp-2].yystring), GetBoolean(yyv[yysp-0].yystring));
         FVector.Clear;
       end;
  75 : begin
         do_arc2(FVector[0], FVector[1], FVector[2]);
         FVector.Clear;
       end;
  76 : begin
         do_ellipse(FVector[0], FVector[1], StrToFloat(yyv[yysp-0].yystring));
         FVector.Clear;
       end;
  77 : begin
         do_truetypetext( FVector[0], GetString( yyv[yysp-6].yystring ),
         StrToInt(yyv[yysp-4].yystring), StrToFloat(yyv[yysp-2].yystring),
         StrToFloat(yyv[yysp-0].yystring) );
         FVector.Clear;
       end;
  78 : begin
         do_fittedtext(FVector[0], GetString( yyv[yysp-8].yystring ),
         StrToFloat(yyv[yysp-6].yystring), StrToFloat(yyv[yysp-4].yystring),
         StrToFloat(yyv[yysp-2].yystring), StrToInt(yyv[yysp-0].yystring));
         FVector.Clear;
       end;
  79 : begin
         do_justiftext(FVector[0], FVector[1], yyv[yysp-10].yystring,
         StrToFloat(yyv[yysp-8].yystring), StrToFloat(yyv[yysp-6].yystring),
         StrToInt(yyv[yysp-4].yystring), StrToInt(yyv[yysp-2].yystring), StrToInt(yyv[yysp-0].yystring));
         FVector.Clear;
       end;
  80 : begin
         do_pictureref(FVector[0], FVector[1], GetString( yyv[yysp-4].yystring ), StrToInt(yyv[yysp-2].yystring), StrToFloat(yyv[yysp-0].yystring) );
         FVector.Clear;
       end;
  81 : begin
         do_bandsbitmap(FVector[0], FVector[1], GetString( yyv[yysp-2].yystring ), StrToInt(yyv[yysp-0].yystring) );
         FVector.Clear;
       end;
  82 : begin
         do_persistbitmap(FVector[0], FVector[1], GetString( yyv[yysp-0].yystring ) );
         FVector.Clear;
       end;
  83 : begin
         do_custpict(FVector[0], FVector[1] );
         FVector.Clear;
       end;
  84 : begin
         do_spline(FVector);
         FVector.Clear;
       end;
  85 : begin
         do_splinetext(GetBoolean(yyv[yysp-4].yystring), yyv[yysp-4].yystring, FVector);
         FVector.Clear;
       end;
  86 : begin
         do_preview(FVector[0], FVector[1], StrToInt(yyv[yysp-14].yystring),
         StrToFloat(yyv[yysp-12].yystring), StrToFloat(yyv[yysp-10].yystring), GetBoolean(yyv[yysp-8].yystring),
         Rect2d(StrToFloat(yyv[yysp-6].yystring), StrToFloat(yyv[yysp-4].yystring),
         StrToFloat(yyv[yysp-2].yystring), StrToFloat(yyv[yysp-0].yystring)) );
         FVector.Clear;
       end;
  87 : begin
         // baselinefrom, baselineto, textlineY
         do_dimhorizontal(FVector[0], FVector[1], StrToFloat(yyv[yysp-0].yystring));
         FVector.Clear;
       end;
  88 : begin
         // baselinefrom, baselineto, textlineX
         do_dimvertical(FVector[0], FVector[1], StrToFloat(yyv[yysp-0].yystring));
         FVector.Clear;
       end;
  89 : begin
         // baselinefrom, baselineto, TextLineDistanceApart
         do_dimparallel(FVector[0], FVector[1], StrToFloat(yyv[yysp-0].yystring));
         FVector.Clear;
       end;
  90 : begin
         yyval := yyv[yysp-2];
       end;
  91 : begin
         FGroupInProgress := True; FGroup.Clear;
       end;
  92 : begin
         do_group;
       end;
  93 : begin
         yyval := yyv[yysp-0];
       end;
  94 : begin
         yyval := yyv[yysp-1];
       end;
  95 : begin
         yyval := yyv[yysp-0];
       end;
  96 : begin
         yyval := yyv[yysp-0];
       end;
  97 : begin
         yyval := yyv[yysp-0];
       end;
  98 : begin
         yyval := yyv[yysp-0];
       end;
  99 : begin
         yyval := yyv[yysp-0];
       end;
 100 : begin
         yyval := yyv[yysp-0];
       end;
 101 : begin
         yyval := yyv[yysp-0];
       end;
 102 : begin
         do_newlayer( GetString( yyv[yysp-0].yystring ) );
       end;
 103 : begin
         do_newlayer( GetString( yyv[yysp-5].yystring ) );
       end;
 104 : begin
         yyval := yyv[yysp-0];
       end;
 105 : begin
         yyval := yyv[yysp-1];
       end;
 106 : begin
         if not FCheckSyntax then
         with FNewLayerFields.Add do
         begin
         FieldName := yyv[yysp-2].yystring;
         FieldType := self.FTmpFieldType;
         FieldSize := self.FTmpFieldSize;
         FieldDec  := self.FTmpFieldDec;
         end;
       end;
 107 : begin
         self.FTmpFieldType := RW_CHAR;
         self.FTmpFieldSize := StrToInt(yyv[yysp-1].yystring);
         self.FTmpFieldDec  := 0;
       end;
 108 : begin
         self.FTmpFieldType := RW_INTEGER;
         self.FTmpFieldSize := StrToInt(yyv[yysp-1].yystring);
         self.FTmpFieldDec  := 0;
       end;
 109 : begin
         self.FTmpFieldType := RW_DATETIME;
         self.FTmpFieldSize := 8;
         self.FTmpFieldDec  := 0;
       end;
 110 : begin
         self.FTmpFieldType := RW_LOGIC;
         self.FTmpFieldSize := 1;
         self.FTmpFieldDec  := 0;
       end;
 111 : begin
         self.FTmpFieldType := RW_FLOAT;
         self.FTmpFieldSize := StrToInt(yyv[yysp-3].yystring);
         self.FTmpFieldDec  := StrToInt(yyv[yysp-1].yystring);
       end;
 112 : begin
         self.FTmpFieldType := RW_MEMO;
         self.FTmpFieldSize := 0;
         self.FTmpFieldDec  := 0;
       end;
 113 : begin
         self.FTmpFieldType := RW_BINARY;
         self.FTmpFieldSize := 0;
         self.FTmpFieldDec  := 0;
       end;
 114 : begin
       end;
 115 : begin
         yyval := yyv[yysp-2];
       end;
 116 : begin
         yyval := yyv[yysp-0];
       end;
 117 : begin
         yyval := yyv[yysp-1];
       end;
 118 : begin
         FProjParams.Add(yyv[yysp-2].yystring + '=' + yyv[yysp-0].yystring);
       end;
 119 : begin
         do_activelayer( GetString( yyv[yysp-0].yystring ) );
       end;
 120 : begin
         Val( yyv[yysp-0].yystring, FIntValue, Fcode );
         yyval.yystring:= IntToStr(FIntValue);
       end;
 121 : begin
         yyval := yyv[yysp-0];
       end;
 122 : begin
         do_table;
       end;
 123 : begin
         FTableEntity.Pentool.FPenStyle:= Ez_Preferences.DefPenStyle.FPenStyle;
         FTableEntity.Brushtool.FBrushStyle:= Ez_Preferences.DefBrushStyle.FBrushStyle;
         FTableEntity.Columns.Clear;
         FColIndex:= 0;
         FDataIndex:= 0;
         FTableEntity.Points[0]:= FVector[0];
         FTableEntity.Points[1]:= FVector[1];
         FNumRows:= StrToInt(yyv[yysp-18].yystring);
         FNumCols:= StrToInt(yyv[yysp-16].yystring);
         For I:= 1 to FNumCols Do
         FTableEntity.Columns.Add;
         FTableEntity.RowCount:= FNumRows;
         FTableEntity.Options:= [];
         If GetBoolean(yyv[yysp-14].yystring) Then
         FTableEntity.Options:= FTableEntity.Options + [ezgoHorzLine];
         If GetBoolean(yyv[yysp-12].yystring) Then
         FTableEntity.Options:= FTableEntity.Options + [ezgoVertLine];
         gstyle.Visible:= GetBoolean(yyv[yysp-10].yystring);
         gstyle.Style:= StrToInt(yyv[yysp-8].yystring);
         gstyle.Color:= StrToInt(yyv[yysp-6].yystring);
         gstyle.Width:= StrToFloat(yyv[yysp-4].yystring);
         FTableEntity.GridStyle:= gstyle;
         FTableEntity.BorderWidth:= StrToFloat(yyv[yysp-2].yystring);
         FTableEntity.LoweredColor:= StrToInt(yyv[yysp-0].yystring);
         FVector.Clear;
       end;
 124 : begin
       end;
 125 : begin
         yyval := yyv[yysp-0];
       end;
 126 : begin
         Inc(FColIndex);
       end;
 127 : begin
         Inc(FColIndex);
       end;
 128 : begin
         yyval := yyv[yysp-5];
       end;
 129 : begin
         with FTableEntity.Columns[FColIndex] do
         begin
         Font:= Ez_Preferences.DefTTFontStyle.FFontStyle;
         Width:= StrToFloat(yyv[yysp-10].yystring);
         Transparent:= GetBoolean(yyv[yysp-8].yystring);
         Color:= StrToInt(yyv[yysp-6].yystring);
         Alignment:= TAlignment(StrToInt(yyv[yysp-4].yystring));
         ColumnType:= TEzColumnType(StrToInt(yyv[yysp-2].yystring));
         fnt:= Font;
         fnt.Height:= StrToFloat(yyv[yysp-0].yystring);
         Font:= fnt;
         end;
         FDataIndex:= 0;
       end;
 130 : begin
         with FTableEntity.Columns[FColIndex] do
         begin
         Title.Font:= Ez_Preferences.DefTTFontStyle.FFontStyle;
         Title.Caption:= GetString(yyv[yysp-8].yystring);
         Title.Alignment:= TAlignment(StrToInt(yyv[yysp-6].yystring));
         Title.Color:= StrToInt(yyv[yysp-4].yystring);
         Title.Transparent:= GetBoolean(yyv[yysp-2].yystring);
         fnt:= Title.Font;
         fnt.Height:= StrToFloat(yyv[yysp-0].yystring);
         Title.Font:= fnt;
         end;
       end;
 131 : begin
         yyval := yyv[yysp-2];
       end;
 132 : begin
         FTableEntity.Columns[FColIndex].Strings[FDataIndex]:= GetString(yyv[yysp-0].yystring);
         Inc(FDataIndex);
       end;
 133 : begin
         FTableEntity.Columns[FColIndex].Strings[FDataIndex]:= GetString(yyv[yysp-0].yystring);
         Inc(FDataIndex);
       end;
  end;
end(*yyaction*);

(* parse table: *)

type YYARec = record
                sym, act : SmallInt;
              end;
     YYRRec = record
                len, sym : SmallInt;
              end;

const

yynacts   = 795;
yyngotos  = 293;
yynstates = 401;
yynrules  = 133;

var

yya : array [1..yynacts    ] of YYARec;
yyg : array [1..yyngotos   ] of YYARec;
yyd : array [0..yynstates-1] of SmallInt;
yyal: array [0..yynstates-1] of SmallInt;
yyah: array [0..yynstates-1] of SmallInt;
yygl: array [0..yynstates-1] of SmallInt;
yygh: array [0..yynstates-1] of SmallInt;
yyr : array [1..yynrules   ] of YYRRec;

procedure LoadResArrays;

  procedure ResLoad(const resname: string; ResourceBuffer: Pointer);
  var
    ResourceSize: Integer;
    ResourcePtr: PChar;
    BinResource: THandle;
    ResInstance: Longint;
    H: THandle;
    Buf: array[0..255] of Char;
  begin
    H := System.FindResourceHInstance(HInstance);
    StrPLCopy(Buf, resname, SizeOf(Buf)-1);
    ResInstance := FindResource(H, Buf, RT_RCDATA);
    if ResInstance = 0 then begin
      H := HInstance;
      {try to find in main binary}
      ResInstance := FindResource(H, Buf, RT_RCDATA);
    end;
    ResourceSize := SizeofResource(H,ResInstance);
    BinResource := LoadResource(H,ResInstance);
    ResourcePtr := LockResource(BinResource);
    Move(ResourcePtr^, ResourceBuffer^, ResourceSize);
    UnlockResource(BinResource);
    FreeResource(BinResource);

  end;
begin

  ResLoad('EzScrYacc_YYA', @yya[1]);
  ResLoad('EzScrYacc_YYG', @yyg[1]);

  ResLoad('EzScrYacc_YYD', @yyd[0]);

  ResLoad('EzScrYacc_YYAL', @yyal[0]);

  ResLoad('EzScrYacc_YYAH', @yyah[0]);

  ResLoad('EzScrYacc_YYGL', @yygl[0]);

  ResLoad('EzScrYacc_YYGH', @yygh[0]);

  ResLoad('EzScrYacc_YYR', @yyr[1]);


end;


const _error = 256; (* error token *)

function yyact(state, sym : Integer; var act : SmallInt) : Boolean;
  (* search action table *)
  var k : Integer;
  begin
    k := yyal[state];
    while (k<=yyah[state]) and (yya[k].sym<>sym) do inc(k);
    if k>yyah[state] then
      yyact := false
    else
      begin
        act := yya[k].act;
        yyact := true;
      end;
  end(*yyact*);

function yygoto(state, sym : Integer; var nstate : SmallInt) : Boolean;
  (* search goto table *)
  var k : Integer;
  begin
    k := yygl[state];
    while (k<=yygh[state]) and (yyg[k].sym<>sym) do inc(k);
    if k>yygh[state] then
      yygoto := false
    else
      begin
        nstate := yyg[k].act;
        yygoto := true;
      end;
  end(*yygoto*);

label parse, next, error, errlab, shift, reduce, accept, abort;

begin(*yyparse*)

  (* load arrays from resource *)
  LoadResArrays;

  (* Initialize the tick counter *)
  TickStart := GetTickCount;

  yystate := 0; yychar := -1; yynerrs := 0; yyerrflag := 0; yysp := 0;

{$ifdef yydebug}
  yydebug := true;
{$else}
  yydebug := false;
{$endif}

parse:

  (* push state and value: *)

  inc(yysp);
  if yysp>yymaxdepth then
    begin
      yyerror('yyparse stack overflow');
      goto abort;
    end;
  yys[yysp] := yystate; yyv[yysp] := yyval;

next:

  if (yyd[yystate]=0) and (yychar=-1) then
    (* get next symbol *)
    begin
      repeat
         yychar := yyLexer.yylex; if yychar<0 then yychar := 0;
         // ignore comments and blanks [ \n\t]
         if not( (yychar=_COMMENT) or (yychar=_BLANK) or
                 (yychar=_TAB) or (yychar=_NEWLINE) ) then break;

         // check for time elapsed in order to be able to cancel parsing
         if GetTickCount>=TickStart+500 then   // 1/2 second the test
         begin
            // check if specific messages are waiting and if so, cancel internal selecting
            PeekMessage(Msg, FDrawBox.Handle, WM_KEYDOWN, WM_KEYDOWN, PM_REMOVE);
            if (Msg.Message=WM_KEYDOWN) and (Msg.WParam=VK_ESCAPE) then begin
               yyerrormsg:= Sscrcanceled;
               goto Abort;
            end;

            TickStart:= GetTickCount;
         end;
      until false;
      if yychar= _ILLEGAL then goto error;
    end;

  {if yydebug then
    writeln( yyLexer.yyOutput, 'state '+intToStr( yystate)+ ', char '+
                               intToStr( yychar) + ' at line n

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -