正在加载图片...
大★★大大大大大★大大大大大★大★大大大大大大★★大 PARser大★大大大★★大大★大大★★大大★★★大★★大大大★★} constructor pARser. Create eaIn inherited creat HIstory :=TStringList Create Style des tructor TIParser Destroyi n HIstory. Free inherited Destroy function TIParser To ken: stringi Stskip=['',#10,#13]; I SENDIF RA DE [SIFDEF RA B] Stskip #10#13 I SENDIF RA B] edure Skil P[0] of if EStyle psPascal then F if F nil then IParserError(ieBadRemark, P Fpc Progr am) F+1 f Styl psPascal then IParserError(ie BadRemar k Epc Program)i if (EStyle ps Pascal) and (P[l]=l*)then{*************************** TIParser ****************************} constructor TIParser.Create; begin inherited Create; FHistory := TStringList.Create; HistorySize := 10; Style := psPascal; end; destructor TIParser.Destroy; begin FHistory.Free; inherited Destroy; end; function TIParser.Token: string; var P, F: PChar; const {$IFDEF RA_D} StSkip = [' ', #10, #13]; {$ENDIF RA_D} {$IFDEF RA_B} StSkip = ' '#10#13; {$ENDIF RA_B} procedure SkipComments; begin case P[0] of '{': if FStyle = psPascal then begin F := StrScan(P + 1, '}'); if F = nil then IParserError(ieBadRemark, P - FpcProgram); P := F + 1; end; '}': if FStyle = psPascal then IParserError(ieBadRemark, P - FpcProgram); '(': if (FStyle = psPascal) and (P[1] = '*') then begin F := P + 2;
向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有