scanner.pas 49 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615
  1. {
  2. $Id$
  3. Copyright (c) 1993,97 by Florian Klaempfl
  4. This unit implements the scanner part and handling of the switches
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. ****************************************************************************
  17. }
  18. {$ifdef tp}
  19. {$F+,N+,E+,R-}
  20. {$endif}
  21. unit scanner;
  22. interface
  23. uses
  24. cobjects,globals,verbose,comphook,files;
  25. const
  26. {$ifdef TP}
  27. maxmacrolen=1024;
  28. {$else}
  29. maxmacrolen=16*1024;
  30. {$endif}
  31. Newline = #10;
  32. type
  33. pmacrobuffer = ^tmacrobuffer;
  34. tmacrobuffer = array[0..maxmacrolen-1] of char;
  35. ppreprocstack = ^tpreprocstack;
  36. tpreprocstack = object
  37. accept : boolean;
  38. next : ppreprocstack;
  39. name : stringid;
  40. line_nb : longint;
  41. constructor init(a:boolean;n:ppreprocstack);
  42. destructor done;
  43. end;
  44. pscannerfile = ^tscannerfile;
  45. tscannerfile = object
  46. inputfile : pinputfile; { current inputfile list }
  47. inputbuffer, { input buffer }
  48. inputpointer : pchar;
  49. inputstart : longint;
  50. line_no, { line }
  51. lastlinepos : longint;
  52. lasttokenpos : longint; { token }
  53. lasttoken : ttoken;
  54. do_special, { 1=point after nr, 2=caret after id }
  55. comment_level,
  56. yylexcount : longint;
  57. lastasmgetchar : char;
  58. preprocstack : ppreprocstack;
  59. constructor init(const fn:string);
  60. destructor done;
  61. { File buffer things }
  62. function openinputfile:boolean;
  63. procedure closeinputfile;
  64. function tempopeninputfile:boolean;
  65. procedure tempcloseinputfile;
  66. procedure saveinputfile;
  67. procedure restoreinputfile;
  68. procedure nextfile;
  69. procedure addfile(hp:pinputfile);
  70. procedure reload;
  71. procedure insertmacro(p:pchar;len:longint);
  72. { Scanner things }
  73. procedure gettokenpos;
  74. procedure inc_comment_level;
  75. procedure dec_comment_level;
  76. procedure checkpreprocstack;
  77. procedure poppreprocstack;
  78. procedure addpreprocstack(a:boolean;const s:string;w:tmsgconst);
  79. procedure elsepreprocstack;
  80. procedure linebreak;
  81. procedure readchar;
  82. procedure readstring;
  83. procedure readnumber;
  84. function readid:string;
  85. function readval:longint;
  86. function readcomment:string;
  87. function readstate:char;
  88. procedure skipspace;
  89. procedure skipuntildirective;
  90. procedure skipcomment;
  91. procedure skipdelphicomment;
  92. procedure skipoldtpcomment;
  93. procedure readtoken;
  94. function readpreproc:ttoken;
  95. function asmgetchar:char;
  96. end;
  97. var
  98. c : char;
  99. orgpattern,
  100. pattern : string;
  101. current_scanner : pscannerfile;
  102. implementation
  103. uses
  104. dos,systems,symtable,switches;
  105. {*****************************************************************************
  106. Helper routines
  107. *****************************************************************************}
  108. type
  109. tokenidxrec=record
  110. first,last : ttoken;
  111. end;
  112. var
  113. tokenidx:array[2..tokenidlen] of tokenidxrec;
  114. procedure create_tokenidx;
  115. { create an index with the first and last token for every possible token
  116. length, so a search only will be done in that small part }
  117. var
  118. t : ttoken;
  119. begin
  120. for t:=low(ttoken) to high(ttoken) do
  121. begin
  122. if not tokens[t].special then
  123. begin
  124. if ord(tokenidx[length(tokens[t].str)].first)=0 then
  125. tokenidx[length(tokens[t].str)].first:=t;
  126. tokenidx[length(tokens[t].str)].last:=t;
  127. end;
  128. end;
  129. end;
  130. function is_keyword(const s:string):boolean;
  131. var
  132. low,high,mid : longint;
  133. begin
  134. if not (length(s) in [2..tokenidlen]) then
  135. begin
  136. is_keyword:=false;
  137. exit;
  138. end;
  139. low:=ord(tokenidx[length(s)].first);
  140. high:=ord(tokenidx[length(s)].last);
  141. while low<high do
  142. begin
  143. mid:=(high+low+1) shr 1;
  144. if pattern<tokens[ttoken(mid)].str then
  145. high:=mid-1
  146. else
  147. low:=mid;
  148. end;
  149. is_keyword:=(pattern=tokens[ttoken(high)].str) and
  150. (tokens[ttoken(high)].keyword in aktmodeswitches);
  151. end;
  152. {*****************************************************************************
  153. TPreProcStack
  154. *****************************************************************************}
  155. constructor tpreprocstack.init(a:boolean;n:ppreprocstack);
  156. begin
  157. accept:=a;
  158. next:=n;
  159. end;
  160. destructor tpreprocstack.done;
  161. begin
  162. end;
  163. {****************************************************************************
  164. TSCANNERFILE
  165. ****************************************************************************}
  166. constructor tscannerfile.init(const fn:string);
  167. begin
  168. inputfile:=new(pinputfile,init(fn));
  169. current_module^.sourcefiles.register_file(inputfile);
  170. { reset localinput }
  171. inputbuffer:=nil;
  172. inputpointer:=nil;
  173. inputstart:=0;
  174. { reset scanner }
  175. preprocstack:=nil;
  176. comment_level:=0;
  177. do_special:=0;
  178. yylexcount:=0;
  179. block_type:=bt_general;
  180. line_no:=0;
  181. lastlinepos:=0;
  182. lasttokenpos:=0;
  183. lasttoken:=_END;
  184. lastasmgetchar:=#0;
  185. { load block }
  186. if not openinputfile then
  187. Message1(scan_f_cannot_open_input,fn);
  188. reload;
  189. end;
  190. destructor tscannerfile.done;
  191. begin
  192. checkpreprocstack;
  193. { close file }
  194. if not inputfile^.closed then
  195. closeinputfile;
  196. end;
  197. function tscannerfile.openinputfile:boolean;
  198. begin
  199. openinputfile:=inputfile^.open;
  200. { load buffer }
  201. inputbuffer:=inputfile^.buf;
  202. inputpointer:=inputfile^.buf;
  203. inputstart:=inputfile^.bufstart;
  204. { line }
  205. line_no:=0;
  206. lastlinepos:=0;
  207. lasttokenpos:=0;
  208. end;
  209. procedure tscannerfile.closeinputfile;
  210. begin
  211. inputfile^.close;
  212. { reset buffer }
  213. inputbuffer:=nil;
  214. inputpointer:=nil;
  215. inputstart:=0;
  216. { reset line }
  217. line_no:=0;
  218. lastlinepos:=0;
  219. lasttokenpos:=0;
  220. end;
  221. function tscannerfile.tempopeninputfile:boolean;
  222. begin
  223. tempopeninputfile:=inputfile^.tempopen;
  224. { reload buffer }
  225. inputbuffer:=inputfile^.buf;
  226. inputpointer:=inputfile^.buf;
  227. inputstart:=inputfile^.bufstart;
  228. end;
  229. procedure tscannerfile.tempcloseinputfile;
  230. begin
  231. inputfile^.setpos(inputstart+(inputpointer-inputbuffer));
  232. inputfile^.tempclose;
  233. { reset buffer }
  234. inputbuffer:=nil;
  235. inputpointer:=nil;
  236. inputstart:=0;
  237. end;
  238. procedure tscannerfile.saveinputfile;
  239. begin
  240. inputfile^.saveinputpointer:=inputpointer;
  241. inputfile^.savelastlinepos:=lastlinepos;
  242. inputfile^.saveline_no:=line_no;
  243. end;
  244. procedure tscannerfile.restoreinputfile;
  245. begin
  246. inputpointer:=inputfile^.saveinputpointer;
  247. lastlinepos:=inputfile^.savelastlinepos;
  248. line_no:=inputfile^.saveline_no;
  249. end;
  250. procedure tscannerfile.nextfile;
  251. begin
  252. if assigned(inputfile^.next) then
  253. begin
  254. inputfile:=inputfile^.next;
  255. restoreinputfile;
  256. end;
  257. end;
  258. procedure tscannerfile.addfile(hp:pinputfile);
  259. begin
  260. saveinputfile;
  261. { add to list }
  262. hp^.next:=inputfile;
  263. inputfile:=hp;
  264. { load new inputfile }
  265. restoreinputfile;
  266. end;
  267. procedure tscannerfile.reload;
  268. begin
  269. with inputfile^ do
  270. begin
  271. repeat
  272. { still more to read?, then change the #0 to a space so its seen
  273. as a seperator }
  274. if (bufsize>0) and (inputpointer-inputbuffer<bufsize) then
  275. begin
  276. c:=' ';
  277. inc(longint(inputpointer));
  278. exit;
  279. end;
  280. { can we read more from this file ? }
  281. if not endoffile then
  282. begin
  283. readbuf;
  284. inputpointer:=buf;
  285. inputbuffer:=buf;
  286. inputstart:=bufstart;
  287. { first line? }
  288. if line_no=0 then
  289. begin
  290. line_no:=1;
  291. if cs_asm_source in aktglobalswitches then
  292. inputfile^.setline(line_no,bufstart);
  293. end;
  294. end
  295. else
  296. begin
  297. closeinputfile;
  298. { no next module, than EOF }
  299. if not assigned(inputfile^.next) then
  300. begin
  301. c:=#26;
  302. exit;
  303. end;
  304. { load next file and reopen it }
  305. nextfile;
  306. tempopeninputfile;
  307. { status }
  308. Message1(scan_d_back_in,name^);
  309. end;
  310. { load next char }
  311. c:=inputpointer^;
  312. inc(longint(inputpointer));
  313. until c<>#0; { if also end, then reload again }
  314. end;
  315. end;
  316. procedure tscannerfile.insertmacro(p:pchar;len:longint);
  317. var
  318. hp : pinputfile;
  319. begin
  320. { save old postion }
  321. dec(longint(inputpointer));
  322. tempcloseinputfile;
  323. { create macro 'file' }
  324. hp:=new(pinputfile,init('Macro'));
  325. addfile(hp);
  326. with inputfile^ do
  327. begin
  328. setmacro(p,len);
  329. { local buffer }
  330. inputbuffer:=buf;
  331. inputpointer:=buf;
  332. inputstart:=bufstart;
  333. end;
  334. { reset line }
  335. line_no:=0;
  336. lastlinepos:=0;
  337. lasttokenpos:=0;
  338. { load new c }
  339. c:=inputpointer^;
  340. inc(longint(inputpointer));
  341. end;
  342. procedure tscannerfile.gettokenpos;
  343. { load the values of tokenpos and lasttokenpos }
  344. begin
  345. lasttokenpos:=inputstart+(inputpointer-inputbuffer);
  346. tokenpos.line:=line_no;
  347. tokenpos.column:=lasttokenpos-lastlinepos;
  348. tokenpos.fileindex:=inputfile^.ref_index;
  349. aktfilepos:=tokenpos;
  350. end;
  351. procedure tscannerfile.inc_comment_level;
  352. var
  353. oldaktfilepos : tfileposinfo;
  354. begin
  355. inc(comment_level);
  356. if (comment_level>1) then
  357. begin
  358. oldaktfilepos:=aktfilepos;
  359. gettokenpos; { update for warning }
  360. Message1(scan_w_comment_level,tostr(comment_level));
  361. aktfilepos:=oldaktfilepos;
  362. end;
  363. end;
  364. procedure tscannerfile.dec_comment_level;
  365. begin
  366. if (m_nested_comment in aktmodeswitches) then
  367. dec(comment_level)
  368. else
  369. comment_level:=0;
  370. end;
  371. procedure tscannerfile.linebreak;
  372. var
  373. cur : char;
  374. oldtokenpos,
  375. oldaktfilepos : tfileposinfo;
  376. begin
  377. with inputfile^ do
  378. begin
  379. if (byte(inputpointer^)=0) and not(endoffile) then
  380. begin
  381. cur:=c;
  382. reload;
  383. if byte(cur)+byte(c)<>23 then
  384. dec(longint(inputpointer));
  385. end
  386. else
  387. begin
  388. { Fix linebreak to be only newline (=#10) for all types of linebreaks }
  389. if (byte(inputpointer^)+byte(c)=23) then
  390. inc(longint(inputpointer));
  391. end;
  392. c:=newline;
  393. { increase line counters }
  394. lastlinepos:=bufstart+(inputpointer-inputbuffer);
  395. inc(line_no);
  396. { update linebuffer }
  397. if cs_asm_source in aktglobalswitches then
  398. inputfile^.setline(line_no,lastlinepos);
  399. { update for status and call the show status routine,
  400. but don't touch aktfilepos ! }
  401. oldaktfilepos:=aktfilepos;
  402. oldtokenpos:=tokenpos;
  403. gettokenpos; { update for v_status }
  404. inc(status.compiledlines);
  405. ShowStatus;
  406. aktfilepos:=oldaktfilepos;
  407. tokenpos:=oldtokenpos;
  408. end;
  409. end;
  410. procedure tscannerfile.checkpreprocstack;
  411. begin
  412. { check for missing ifdefs }
  413. while assigned(preprocstack) do
  414. begin
  415. Message3(scan_e_endif_expected,'$IF(N)(DEF)',preprocstack^.name,tostr(preprocstack^.line_nb));
  416. poppreprocstack;
  417. end;
  418. end;
  419. procedure tscannerfile.poppreprocstack;
  420. var
  421. hp : ppreprocstack;
  422. begin
  423. if assigned(preprocstack) then
  424. begin
  425. hp:=preprocstack^.next;
  426. dispose(preprocstack,done);
  427. preprocstack:=hp;
  428. end
  429. else
  430. Message(scan_e_endif_without_if);
  431. end;
  432. procedure tscannerfile.addpreprocstack(a:boolean;const s:string;w:tmsgconst);
  433. begin
  434. preprocstack:=new(ppreprocstack,init(((preprocstack=nil) or preprocstack^.accept) and a,preprocstack));
  435. preprocstack^.name:=s;
  436. preprocstack^.line_nb:=line_no;
  437. if preprocstack^.accept then
  438. Message2(w,preprocstack^.name,'accepted')
  439. else
  440. Message2(w,preprocstack^.name,'rejected');
  441. end;
  442. procedure tscannerfile.elsepreprocstack;
  443. begin
  444. if assigned(preprocstack) then
  445. begin
  446. if not(assigned(preprocstack^.next)) or (preprocstack^.next^.accept) then
  447. preprocstack^.accept:=not preprocstack^.accept;
  448. if preprocstack^.accept then
  449. Message2(scan_c_else_found,preprocstack^.name,'accepted')
  450. else
  451. Message2(scan_c_else_found,preprocstack^.name,'rejected');
  452. end
  453. else
  454. Message(scan_e_endif_without_if);
  455. end;
  456. procedure tscannerfile.readchar;
  457. begin
  458. c:=inputpointer^;
  459. if c=#0 then
  460. reload
  461. else
  462. inc(longint(inputpointer));
  463. if c in [#10,#13] then
  464. linebreak;
  465. end;
  466. procedure tscannerfile.readstring;
  467. var
  468. i : longint;
  469. begin
  470. i:=0;
  471. repeat
  472. case c of
  473. '_',
  474. '0'..'9',
  475. 'A'..'Z' : begin
  476. if i<255 then
  477. begin
  478. inc(i);
  479. orgpattern[i]:=c;
  480. pattern[i]:=c;
  481. end;
  482. c:=inputpointer^;
  483. inc(longint(inputpointer));
  484. end;
  485. 'a'..'z' : begin
  486. if i<255 then
  487. begin
  488. inc(i);
  489. orgpattern[i]:=c;
  490. pattern[i]:=chr(ord(c)-32)
  491. end;
  492. c:=inputpointer^;
  493. inc(longint(inputpointer));
  494. end;
  495. #0 : reload;
  496. #13,#10 : begin
  497. linebreak;
  498. break;
  499. end;
  500. else
  501. break;
  502. end;
  503. until false;
  504. orgpattern[0]:=chr(i);
  505. pattern[0]:=chr(i);
  506. end;
  507. procedure tscannerfile.readnumber;
  508. var
  509. base,
  510. i : longint;
  511. begin
  512. case c of
  513. '%' : begin
  514. readchar;
  515. base:=2;
  516. pattern[1]:='%';
  517. i:=1;
  518. end;
  519. '$' : begin
  520. readchar;
  521. base:=16;
  522. pattern[1]:='$';
  523. i:=1;
  524. end;
  525. else
  526. begin
  527. base:=10;
  528. i:=0;
  529. end;
  530. end;
  531. while ((base>=10) and (c in ['0'..'9'])) or
  532. ((base=16) and (c in ['A'..'F','a'..'f'])) or
  533. ((base=2) and (c in ['0'..'1'])) do
  534. begin
  535. if i<255 then
  536. begin
  537. inc(i);
  538. pattern[i]:=c;
  539. end;
  540. { get next char }
  541. c:=inputpointer^;
  542. if c=#0 then
  543. reload
  544. else
  545. inc(longint(inputpointer));
  546. end;
  547. { was the next char a linebreak ? }
  548. if c in [#10,#13] then
  549. linebreak;
  550. pattern[0]:=chr(i);
  551. end;
  552. function tscannerfile.readid:string;
  553. begin
  554. readstring;
  555. readid:=pattern;
  556. end;
  557. function tscannerfile.readval:longint;
  558. var
  559. l : longint;
  560. w : integer;
  561. begin
  562. readnumber;
  563. valint(pattern,l,w);
  564. readval:=l;
  565. end;
  566. function tscannerfile.readcomment:string;
  567. var
  568. i : longint;
  569. begin
  570. i:=0;
  571. repeat
  572. case c of
  573. '}' : begin
  574. readchar;
  575. dec_comment_level;
  576. break;
  577. end;
  578. #26 : Message(scan_f_end_of_file);
  579. else
  580. begin
  581. if (i<255) then
  582. begin
  583. inc(i);
  584. readcomment[i]:=c;
  585. end;
  586. end;
  587. end;
  588. c:=inputpointer^;
  589. if c=#0 then
  590. reload
  591. else
  592. inc(longint(inputpointer));
  593. if c in [#10,#13] then
  594. linebreak;
  595. until false;
  596. readcomment[0]:=chr(i);
  597. end;
  598. function tscannerfile.readstate:char;
  599. var
  600. state : char;
  601. begin
  602. state:=' ';
  603. if c=' ' then
  604. begin
  605. current_scanner^.skipspace;
  606. current_scanner^.readid;
  607. if pattern='ON' then
  608. state:='+'
  609. else
  610. if pattern='OFF' then
  611. state:='-';
  612. end
  613. else
  614. state:=c;
  615. if not (state in ['+','-']) then
  616. Message(scan_e_wrong_switch_toggle);
  617. readstate:=state;
  618. end;
  619. procedure tscannerfile.skipspace;
  620. begin
  621. while c in [' ',#9..#13] do
  622. begin
  623. c:=inputpointer^;
  624. if c=#0 then
  625. reload
  626. else
  627. inc(longint(inputpointer));
  628. if c in [#10,#13] then
  629. linebreak;
  630. end;
  631. end;
  632. procedure tscannerfile.skipuntildirective;
  633. var
  634. found : longint;
  635. begin
  636. found:=0;
  637. repeat
  638. case c of
  639. #26 : Message(scan_f_end_of_file);
  640. '{' : begin
  641. if comment_level=0 then
  642. found:=1;
  643. inc_comment_level;
  644. end;
  645. '}' : begin
  646. dec_comment_level;
  647. found:=0;
  648. end;
  649. '$' : begin
  650. if found=1 then
  651. found:=2;
  652. end;
  653. else
  654. found:=0;
  655. end;
  656. c:=inputpointer^;
  657. if c=#0 then
  658. reload
  659. else
  660. inc(longint(inputpointer));
  661. if c in [#10,#13] then
  662. linebreak;
  663. until (found=2);
  664. end;
  665. {$i scandir.inc}
  666. procedure tscannerfile.skipcomment;
  667. begin
  668. readchar;
  669. inc_comment_level;
  670. { handle compiler switches }
  671. if (c='$') then
  672. handledirectives;
  673. { handle_switches can dec comment_level, }
  674. while (comment_level>0) do
  675. begin
  676. case c of
  677. '{' : inc_comment_level;
  678. '}' : dec_comment_level;
  679. #26 : Message(scan_f_end_of_file);
  680. end;
  681. c:=inputpointer^;
  682. if c=#0 then
  683. reload
  684. else
  685. inc(longint(inputpointer));
  686. if c in [#10,#13] then
  687. linebreak;
  688. end;
  689. end;
  690. procedure tscannerfile.skipdelphicomment;
  691. begin
  692. inc_comment_level;
  693. readchar;
  694. { this is currently not supported }
  695. if c='$' then
  696. Message(scan_e_wrong_styled_switch);
  697. { skip comment }
  698. while c<>newline do
  699. begin
  700. if c=#26 then
  701. Message(scan_f_end_of_file);
  702. readchar;
  703. end;
  704. dec_comment_level;
  705. end;
  706. procedure tscannerfile.skipoldtpcomment;
  707. var
  708. found : longint;
  709. begin
  710. inc_comment_level;
  711. readchar;
  712. { this is currently not supported }
  713. if c='$' then
  714. Message(scan_e_wrong_styled_switch);
  715. { skip comment }
  716. while (comment_level>0) do
  717. begin
  718. found:=0;
  719. repeat
  720. case c of
  721. #26 : Message(scan_f_end_of_file);
  722. '*' : begin
  723. if found=3 then
  724. inc_comment_level
  725. else
  726. found:=1;
  727. end;
  728. ')' : begin
  729. if found=1 then
  730. begin
  731. dec_comment_level;
  732. if comment_level=0 then
  733. found:=2;
  734. end;
  735. end;
  736. '(' : found:=3;
  737. else
  738. found:=0;
  739. end;
  740. c:=inputpointer^;
  741. if c=#0 then
  742. reload
  743. else
  744. inc(longint(inputpointer));
  745. if c in [#10,#13] then
  746. linebreak;
  747. until (found=2);
  748. end;
  749. end;
  750. procedure tscannerfile.readtoken;
  751. var
  752. code : integer;
  753. low,high,mid,
  754. l : longint;
  755. mac : pmacrosym;
  756. asciinr : string[3];
  757. label
  758. exit_label;
  759. begin
  760. { was the last character a point ? }
  761. { this code is needed because the scanner if there is a 1. found if }
  762. { this is a floating point number or range like 1..3 }
  763. if do_special>0 then
  764. begin
  765. gettokenpos;
  766. l:=do_special;
  767. do_special:=0;
  768. case l of
  769. 1 : begin { first char was a point }
  770. case c of
  771. '.' : begin
  772. readchar;
  773. token:=POINTPOINT;
  774. goto exit_label;
  775. end;
  776. ')' : begin
  777. readchar;
  778. token:=RECKKLAMMER;
  779. goto exit_label;
  780. end;
  781. end;
  782. token:=POINT;
  783. goto exit_label;
  784. end;
  785. 2 : begin { first char was a Caret }
  786. token:=CARET;
  787. readchar;
  788. goto exit_label;
  789. end;
  790. end;
  791. end;
  792. { Skip all spaces and comments }
  793. repeat
  794. case c of
  795. '{' : skipcomment;
  796. ' ',#9..#13 : skipspace;
  797. else
  798. break;
  799. end;
  800. until false;
  801. { Save current token position }
  802. gettokenpos;
  803. { Check first for a identifier/keyword, this is 20+% faster (PFV) }
  804. if c in ['_','A'..'Z','a'..'z'] then
  805. begin
  806. readstring;
  807. token:=ID;
  808. idtoken:=ID;
  809. { keyword or any other known token ? }
  810. if (length(pattern) in [2..tokenidlen]) then
  811. begin
  812. low:=ord(tokenidx[length(pattern)].first);
  813. high:=ord(tokenidx[length(pattern)].last);
  814. while low<high do
  815. begin
  816. mid:=(high+low+1) shr 1;
  817. if pattern<tokens[ttoken(mid)].str then
  818. high:=mid-1
  819. else
  820. low:=mid;
  821. end;
  822. if pattern=tokens[ttoken(high)].str then
  823. begin
  824. if tokens[ttoken(high)].keyword in aktmodeswitches then
  825. token:=ttoken(high);
  826. idtoken:=ttoken(high);
  827. end;
  828. end;
  829. { Only process identifiers and not keywords }
  830. if token=ID then
  831. begin
  832. { this takes some time ... }
  833. if (cs_support_macro in aktmoduleswitches) then
  834. begin
  835. mac:=pmacrosym(macros^.search(pattern));
  836. if assigned(mac) and (assigned(mac^.buftext)) then
  837. begin
  838. insertmacro(mac^.buftext,mac^.buflen);
  839. { handle empty macros }
  840. if c=#0 then
  841. reload;
  842. { play it again ... }
  843. inc(yylexcount);
  844. if yylexcount>16 then
  845. Message(scan_w_macro_deep_ten);
  846. readtoken;
  847. { that's all folks }
  848. dec(yylexcount);
  849. exit;
  850. end;
  851. end;
  852. end;
  853. { a following caret, then set special handling }
  854. if (c='^') then
  855. do_special:=2;
  856. { return token }
  857. goto exit_label;
  858. end
  859. else
  860. begin
  861. idtoken:=NOID;
  862. case c of
  863. '$' : begin
  864. readnumber;
  865. token:=INTCONST;
  866. goto exit_label;
  867. end;
  868. '%' : begin
  869. readnumber;
  870. token:=INTCONST;
  871. goto exit_label;
  872. end;
  873. '0'..'9' : begin
  874. readnumber;
  875. if (c in ['.','e','E']) then
  876. begin
  877. { first check for a . }
  878. if c='.' then
  879. begin
  880. readchar;
  881. if not(c in ['0'..'9']) then
  882. begin
  883. do_special:=1;
  884. token:=INTCONST;
  885. goto exit_label;
  886. end;
  887. pattern:=pattern+'.';
  888. while c in ['0'..'9'] do
  889. begin
  890. pattern:=pattern+c;
  891. readchar;
  892. end;
  893. end;
  894. { E can also follow after a point is scanned }
  895. if c in ['e','E'] then
  896. begin
  897. pattern:=pattern+'E';
  898. readchar;
  899. if c in ['-','+'] then
  900. begin
  901. pattern:=pattern+c;
  902. readchar;
  903. end;
  904. if not(c in ['0'..'9']) then
  905. Message(scan_f_illegal_char);
  906. while c in ['0'..'9'] do
  907. begin
  908. pattern:=pattern+c;
  909. readchar;
  910. end;
  911. end;
  912. token:=REALNUMBER;
  913. goto exit_label;
  914. end;
  915. token:=INTCONST;
  916. goto exit_label;
  917. end;
  918. ';' : begin
  919. readchar;
  920. token:=SEMICOLON;
  921. goto exit_label;
  922. end;
  923. '[' : begin
  924. readchar;
  925. token:=LECKKLAMMER;
  926. goto exit_label;
  927. end;
  928. ']' : begin
  929. readchar;
  930. token:=RECKKLAMMER;
  931. goto exit_label;
  932. end;
  933. '(' : begin
  934. readchar;
  935. case c of
  936. '*' : begin
  937. skipoldtpcomment;
  938. readtoken;
  939. exit;
  940. end;
  941. '.' : begin
  942. readchar;
  943. token:=LECKKLAMMER;
  944. goto exit_label;
  945. end;
  946. end;
  947. token:=LKLAMMER;
  948. goto exit_label;
  949. end;
  950. ')' : begin
  951. readchar;
  952. token:=RKLAMMER;
  953. goto exit_label;
  954. end;
  955. '+' : begin
  956. readchar;
  957. if (c='=') and (cs_support_c_operators in aktmoduleswitches) then
  958. begin
  959. readchar;
  960. token:=_PLUSASN;
  961. goto exit_label;
  962. end;
  963. token:=PLUS;
  964. goto exit_label;
  965. end;
  966. '-' : begin
  967. readchar;
  968. if (c='=') and (cs_support_c_operators in aktmoduleswitches) then
  969. begin
  970. readchar;
  971. token:=_MINUSASN;
  972. goto exit_label;
  973. end;
  974. token:=MINUS;
  975. goto exit_label;
  976. end;
  977. ':' : begin
  978. readchar;
  979. if c='=' then
  980. begin
  981. readchar;
  982. token:=ASSIGNMENT;
  983. goto exit_label;
  984. end;
  985. token:=COLON;
  986. goto exit_label;
  987. end;
  988. '*' : begin
  989. readchar;
  990. if (c='=') and (cs_support_c_operators in aktmoduleswitches) then
  991. begin
  992. readchar;
  993. token:=_STARASN;
  994. end
  995. else
  996. if c='*' then
  997. begin
  998. readchar;
  999. token:=STARSTAR;
  1000. end
  1001. else
  1002. token:=STAR;
  1003. goto exit_label;
  1004. end;
  1005. '/' : begin
  1006. readchar;
  1007. case c of
  1008. '=' : begin
  1009. if (cs_support_c_operators in aktmoduleswitches) then
  1010. begin
  1011. readchar;
  1012. token:=_SLASHASN;
  1013. goto exit_label;
  1014. end;
  1015. end;
  1016. '/' : begin
  1017. skipdelphicomment;
  1018. readtoken;
  1019. exit;
  1020. end;
  1021. end;
  1022. token:=SLASH;
  1023. goto exit_label;
  1024. end;
  1025. '=' : begin
  1026. readchar;
  1027. token:=EQUAL;
  1028. goto exit_label;
  1029. end;
  1030. '.' : begin
  1031. readchar;
  1032. case c of
  1033. '.' : begin
  1034. readchar;
  1035. token:=POINTPOINT;
  1036. goto exit_label;
  1037. end;
  1038. ')' : begin
  1039. readchar;
  1040. token:=RECKKLAMMER;
  1041. goto exit_label;
  1042. end;
  1043. end;
  1044. token:=POINT;
  1045. goto exit_label;
  1046. end;
  1047. '@' : begin
  1048. readchar;
  1049. if c='@' then
  1050. begin
  1051. readchar;
  1052. token:=DOUBLEADDR;
  1053. end
  1054. else
  1055. token:=KLAMMERAFFE;
  1056. goto exit_label;
  1057. end;
  1058. ',' : begin
  1059. readchar;
  1060. token:=COMMA;
  1061. goto exit_label;
  1062. end;
  1063. '''','#','^' : begin
  1064. if c='^' then
  1065. begin
  1066. readchar;
  1067. c:=upcase(c);
  1068. if not(block_type=bt_type) and (c in ['A'..'Z']) then
  1069. begin
  1070. pattern:=chr(ord(c)-64);
  1071. readchar;
  1072. end
  1073. else
  1074. begin
  1075. token:=CARET;
  1076. goto exit_label;
  1077. end;
  1078. end
  1079. else
  1080. pattern:='';
  1081. repeat
  1082. case c of
  1083. '#' : begin
  1084. readchar; { read # }
  1085. if c='$' then
  1086. begin
  1087. readchar; { read leading $ }
  1088. asciinr:='$';
  1089. while (upcase(c) in ['A'..'F','0'..'9']) and (length(asciinr)<3) do
  1090. begin
  1091. asciinr:=asciinr+c;
  1092. readchar;
  1093. end;
  1094. end
  1095. else
  1096. begin
  1097. asciinr:='';
  1098. while (c in ['0'..'9']) and (length(asciinr)<3) do
  1099. begin
  1100. asciinr:=asciinr+c;
  1101. readchar;
  1102. end;
  1103. end;
  1104. valint(asciinr,l,code);
  1105. if (asciinr='') or (code<>0) or
  1106. (l<0) or (l>255) then
  1107. Message(scan_e_illegal_char_const);
  1108. pattern:=pattern+chr(l);
  1109. end;
  1110. '''' : begin
  1111. repeat
  1112. readchar;
  1113. case c of
  1114. #26 : Message(scan_f_end_of_file);
  1115. newline : Message(scan_f_string_exceeds_line);
  1116. '''' : begin
  1117. readchar;
  1118. if c<>'''' then
  1119. break;
  1120. end;
  1121. end;
  1122. pattern:=pattern+c;
  1123. until false;
  1124. end;
  1125. '^' : begin
  1126. readchar;
  1127. if c<#64 then
  1128. c:=chr(ord(c)+64)
  1129. else
  1130. c:=chr(ord(c)-64);
  1131. pattern:=pattern+c;
  1132. readchar;
  1133. end;
  1134. else
  1135. break;
  1136. end;
  1137. until false;
  1138. { strings with length 1 become const chars }
  1139. if length(pattern)=1 then
  1140. token:=CCHAR
  1141. else
  1142. token:=CSTRING;
  1143. goto exit_label;
  1144. end;
  1145. '>' : begin
  1146. readchar;
  1147. case c of
  1148. '=' : begin
  1149. readchar;
  1150. token:=GTE;
  1151. goto exit_label;
  1152. end;
  1153. '>' : begin
  1154. readchar;
  1155. token:=_SHR;
  1156. goto exit_label;
  1157. end;
  1158. '<' : begin { >< is for a symetric diff for sets }
  1159. readchar;
  1160. token:=SYMDIF;
  1161. goto exit_label;
  1162. end;
  1163. end;
  1164. token:=GT;
  1165. goto exit_label;
  1166. end;
  1167. '<' : begin
  1168. readchar;
  1169. case c of
  1170. '>' : begin
  1171. readchar;
  1172. token:=UNEQUAL;
  1173. goto exit_label;
  1174. end;
  1175. '=' : begin
  1176. readchar;
  1177. token:=LTE;
  1178. goto exit_label;
  1179. end;
  1180. '<' : begin
  1181. readchar;
  1182. token:=_SHL;
  1183. goto exit_label;
  1184. end;
  1185. end;
  1186. token:=LT;
  1187. goto exit_label;
  1188. end;
  1189. #26 : begin
  1190. token:=_EOF;
  1191. goto exit_label;
  1192. end;
  1193. else
  1194. begin
  1195. Message(scan_f_illegal_char);
  1196. end;
  1197. end;
  1198. end;
  1199. exit_label:
  1200. end;
  1201. function tscannerfile.readpreproc:ttoken;
  1202. begin
  1203. skipspace;
  1204. case c of
  1205. 'A'..'Z',
  1206. 'a'..'z',
  1207. '_','0'..'9' : begin
  1208. preprocpat:=readid;
  1209. readpreproc:=ID;
  1210. end;
  1211. '(' : begin
  1212. readchar;
  1213. readpreproc:=LKLAMMER;
  1214. end;
  1215. ')' : begin
  1216. readchar;
  1217. readpreproc:=RKLAMMER;
  1218. end;
  1219. '+' : begin
  1220. readchar;
  1221. readpreproc:=PLUS;
  1222. end;
  1223. '-' : begin
  1224. readchar;
  1225. readpreproc:=MINUS;
  1226. end;
  1227. '*' : begin
  1228. readchar;
  1229. readpreproc:=STAR;
  1230. end;
  1231. '/' : begin
  1232. readchar;
  1233. readpreproc:=SLASH;
  1234. end;
  1235. '=' : begin
  1236. readchar;
  1237. readpreproc:=EQUAL;
  1238. end;
  1239. '>' : begin
  1240. readchar;
  1241. if c='=' then
  1242. begin
  1243. readchar;
  1244. readpreproc:=GTE;
  1245. end
  1246. else
  1247. readpreproc:=GT;
  1248. end;
  1249. '<' : begin
  1250. readchar;
  1251. case c of
  1252. '>' : begin
  1253. readchar;
  1254. readpreproc:=UNEQUAL;
  1255. end;
  1256. '=' : begin
  1257. readchar;
  1258. readpreproc:=LTE;
  1259. end;
  1260. else readpreproc:=LT;
  1261. end;
  1262. end;
  1263. #26 : Message(scan_f_end_of_file);
  1264. else
  1265. begin
  1266. readpreproc:=_EOF;
  1267. end;
  1268. end;
  1269. end;
  1270. function tscannerfile.asmgetchar : char;
  1271. begin
  1272. if lastasmgetchar<>#0 then
  1273. begin
  1274. c:=lastasmgetchar;
  1275. lastasmgetchar:=#0;
  1276. end
  1277. else
  1278. readchar;
  1279. case c of
  1280. '{' : begin
  1281. skipcomment;
  1282. lastasmgetchar:=c;
  1283. asmgetchar:=';';
  1284. exit;
  1285. end;
  1286. '/' : begin
  1287. readchar;
  1288. if c='/' then
  1289. begin
  1290. skipdelphicomment;
  1291. asmgetchar:=';';
  1292. end
  1293. else
  1294. asmgetchar:='/';
  1295. lastasmgetchar:=c;
  1296. exit;
  1297. end;
  1298. '(' : begin
  1299. readchar;
  1300. if c='*' then
  1301. begin
  1302. skipoldtpcomment;
  1303. asmgetchar:=';';
  1304. end
  1305. else
  1306. asmgetchar:='(';
  1307. lastasmgetchar:=c;
  1308. exit;
  1309. end;
  1310. else
  1311. begin
  1312. asmgetchar:=c;
  1313. end;
  1314. end;
  1315. end;
  1316. begin
  1317. create_tokenidx;
  1318. end.
  1319. {
  1320. $Log$
  1321. Revision 1.54 1998-09-26 17:45:41 peter
  1322. + idtoken and only one token table
  1323. Revision 1.53 1998/09/24 23:49:20 peter
  1324. + aktmodeswitches
  1325. Revision 1.52 1998/09/18 16:03:45 florian
  1326. * some changes to compile with Delphi
  1327. Revision 1.51 1998/09/16 16:41:49 peter
  1328. * merged fixes
  1329. Revision 1.50.2.1 1998/09/16 16:09:49 peter
  1330. * on/off support also for the local/module switches
  1331. Revision 1.50 1998/09/04 08:36:06 peter
  1332. + (. and .) which are equal to [ and ]
  1333. Revision 1.49 1998/09/03 11:24:03 peter
  1334. * moved more inputfile things from tscannerfile to tinputfile
  1335. * changed ifdef Sourceline to cs_asm_source
  1336. Revision 1.48 1998/09/01 12:51:02 peter
  1337. * close also resets lastlinepos
  1338. Revision 1.47 1998/09/01 09:01:52 peter
  1339. * initialize all object variables in .init
  1340. Revision 1.46 1998/08/29 13:49:00 peter
  1341. * fixed freemem calls which had the wrong size sometimes
  1342. Revision 1.45 1998/08/26 15:35:35 peter
  1343. * fixed scannerfiles for macros
  1344. + $I %<environment>%
  1345. Revision 1.44 1998/08/20 16:09:55 pierre
  1346. * tokenpos has to be restored also after
  1347. printstatus
  1348. Revision 1.43 1998/08/20 09:26:45 pierre
  1349. + funcret setting in underproc testing
  1350. compile with _dTEST_FUNCRET
  1351. Revision 1.42 1998/08/19 14:57:51 peter
  1352. * small fix for aktfilepos
  1353. Revision 1.41 1998/08/18 14:17:10 pierre
  1354. * bug about assigning the return value of a function to
  1355. a procvar fixed : warning
  1356. assigning a proc to a procvar need @ in FPC mode !!
  1357. * missing file/line info restored
  1358. Revision 1.40 1998/08/11 14:04:33 peter
  1359. * auto close an open file and better error msg
  1360. Revision 1.39 1998/08/10 14:50:26 peter
  1361. + localswitches, moduleswitches, globalswitches splitting
  1362. Revision 1.38 1998/08/10 10:18:34 peter
  1363. + Compiler,Comphook unit which are the new interface units to the
  1364. compiler
  1365. Revision 1.37 1998/07/23 12:40:41 michael
  1366. No nested comments in Delphi mode.
  1367. Revision 1.36 1998/07/20 22:17:17 florian
  1368. * hex constants in numeric char (#$54#$43 ...) are now allowed
  1369. * there was a bug in record_var_dec which prevents the used
  1370. of nested variant records (for example drivers.tevent of tv)
  1371. Revision 1.35 1998/07/14 21:38:13 peter
  1372. + support for with p^do constructs
  1373. Revision 1.34 1998/07/14 14:47:04 peter
  1374. * released NEWINPUT
  1375. Revision 1.33 1998/07/10 10:48:40 peter
  1376. * fixed realnumber scanning
  1377. * [] after asmblock was not uppercased anymore
  1378. Revision 1.31 1998/07/07 17:39:38 peter
  1379. * fixed $I with following eof
  1380. Revision 1.30 1998/07/07 12:32:55 peter
  1381. * status.currentsource is now calculated in verbose (more accurated)
  1382. Revision 1.29 1998/07/07 11:20:11 peter
  1383. + NEWINPUT for a better inputfile and scanner object
  1384. Revision 1.28 1998/07/01 15:26:57 peter
  1385. * better bufferfile.reset error handling
  1386. Revision 1.27 1998/06/25 08:48:19 florian
  1387. * first version of rtti support
  1388. Revision 1.26 1998/06/16 08:56:30 peter
  1389. + targetcpu
  1390. * cleaner pmodules for newppu
  1391. Revision 1.25 1998/06/13 00:10:15 peter
  1392. * working browser and newppu
  1393. * some small fixes against crashes which occured in bp7 (but not in
  1394. fpc?!)
  1395. Revision 1.24 1998/06/12 10:32:36 pierre
  1396. * column problem hopefully solved
  1397. + C vars declaration changed
  1398. Revision 1.23 1998/06/03 22:49:02 peter
  1399. + wordbool,longbool
  1400. * rename bis,von -> high,low
  1401. * moved some systemunit loading/creating to psystem.pas
  1402. Revision 1.21 1998/05/27 00:20:32 peter
  1403. * some scanner optimizes
  1404. * automaticly aout2exe for go32v1
  1405. * fixed dynamiclinker option which was added at the wrong place
  1406. Revision 1.20 1998/05/23 01:21:30 peter
  1407. + aktasmmode, aktoptprocessor, aktoutputformat
  1408. + smartlink per module $SMARTLINK-/+ (like MMX) and moved to aktswitches
  1409. + $LIBNAME to set the library name where the unit will be put in
  1410. * splitted cgi386 a bit (codeseg to large for bp7)
  1411. * nasm, tasm works again. nasm moved to ag386nsm.pas
  1412. Revision 1.19 1998/05/20 09:42:37 pierre
  1413. + UseTokenInfo now default
  1414. * unit in interface uses and implementation uses gives error now
  1415. * only one error for unknown symbol (uses lastsymknown boolean)
  1416. the problem came from the label code !
  1417. + first inlined procedures and function work
  1418. (warning there might be allowed cases were the result is still wrong !!)
  1419. * UseBrower updated gives a global list of all position of all used symbols
  1420. with switch -gb
  1421. Revision 1.18 1998/05/12 10:47:00 peter
  1422. * moved printstatus to verb_def
  1423. + V_Normal which is between V_Error and V_Warning and doesn't have a
  1424. prefix like error: warning: and is included in V_Default
  1425. * fixed some messages
  1426. * first time parameter scan is only for -v and -T
  1427. - removed old style messages
  1428. Revision 1.17 1998/05/06 08:38:47 pierre
  1429. * better position info with UseTokenInfo
  1430. UseTokenInfo greatly simplified
  1431. + added check for changed tree after first time firstpass
  1432. (if we could remove all the cases were it happen
  1433. we could skip all firstpass if firstpasscount > 1)
  1434. Only with ExtDebug
  1435. Revision 1.16 1998/05/04 17:54:28 peter
  1436. + smartlinking works (only case jumptable left todo)
  1437. * redesign of systems.pas to support assemblers and linkers
  1438. + Unitname is now also in the PPU-file, increased version to 14
  1439. Revision 1.15 1998/05/01 16:38:46 florian
  1440. * handling of private and protected fixed
  1441. + change_keywords_to_tp implemented to remove
  1442. keywords which aren't supported by tp
  1443. * break and continue are now symbols of the system unit
  1444. + widestring, longstring and ansistring type released
  1445. Revision 1.14 1998/04/30 15:59:42 pierre
  1446. * GDB works again better :
  1447. correct type info in one pass
  1448. + UseTokenInfo for better source position
  1449. * fixed one remaining bug in scanner for line counts
  1450. * several little fixes
  1451. Revision 1.13 1998/04/29 13:42:27 peter
  1452. + $IOCHECKS and $ALIGN to test already, other will follow soon
  1453. * fixed the wrong linecounting with comments
  1454. Revision 1.12 1998/04/29 10:34:04 pierre
  1455. + added some code for ansistring (not complete nor working yet)
  1456. * corrected operator overloading
  1457. * corrected nasm output
  1458. + started inline procedures
  1459. + added starstarn : use ** for exponentiation (^ gave problems)
  1460. + started UseTokenInfo cond to get accurate positions
  1461. Revision 1.11 1998/04/27 23:10:29 peter
  1462. + new scanner
  1463. * $makelib -> if smartlink
  1464. * small filename fixes pmodule.setfilename
  1465. * moved import from files.pas -> import.pas
  1466. }