pdecl.pas 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300
  1. {
  2. $Id$
  3. Copyright (c) 1993-99 by Florian Klaempfl
  4. Does declaration (but not type) parsing for Free Pascal
  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. unit pdecl;
  19. interface
  20. uses
  21. globtype,tokens,globals,symtable;
  22. procedure parameter_dec(aktprocdef:pabstractprocdef);
  23. procedure read_var_decs(is_record,is_object,is_threadvar:boolean);
  24. { reads the declaration blocks }
  25. procedure read_declarations(islibrary : boolean);
  26. { reads declarations in the interface part of a unit }
  27. procedure read_interface_declarations;
  28. implementation
  29. uses
  30. cobjects,scanner,
  31. symconst,aasm,tree,pass_1,strings,
  32. files,types,verbose,systems,import,
  33. cpubase
  34. {$ifndef newcg}
  35. ,tccnv
  36. {$endif newcg}
  37. {$ifdef GDB}
  38. ,gdb
  39. {$endif GDB}
  40. { parser specific stuff }
  41. ,pbase,ptconst,pexpr,ptype,psub,pexports
  42. { processor specific stuff }
  43. { codegen }
  44. {$ifdef newcg}
  45. ,cgbase
  46. {$else}
  47. ,hcodegen
  48. {$endif}
  49. ,hcgdata
  50. ;
  51. procedure parameter_dec(aktprocdef:pabstractprocdef);
  52. {
  53. handle_procvar needs the same changes
  54. }
  55. var
  56. is_procvar : boolean;
  57. sc : Pstringcontainer;
  58. s : string;
  59. storetokenpos : tfileposinfo;
  60. p : Pdef;
  61. hsym : psym;
  62. hvs,
  63. vs : Pvarsym;
  64. hs1,hs2 : string;
  65. varspez : Tvarspez;
  66. inserthigh : boolean;
  67. begin
  68. { parsing a proc or procvar ? }
  69. is_procvar:=(aktprocdef^.deftype=procvardef);
  70. consume(_LKLAMMER);
  71. inc(testcurobject);
  72. repeat
  73. if try_to_consume(_VAR) then
  74. varspez:=vs_var
  75. else
  76. if try_to_consume(_CONST) then
  77. varspez:=vs_const
  78. else
  79. varspez:=vs_value;
  80. inserthigh:=false;
  81. readtypesym:=nil;
  82. if idtoken=_SELF then
  83. begin
  84. { only allowed in procvars and class methods }
  85. if is_procvar or
  86. (assigned(procinfo^._class) and procinfo^._class^.is_class) then
  87. begin
  88. if not is_procvar then
  89. begin
  90. {$ifndef UseNiceNames}
  91. hs2:=hs2+'$'+'self';
  92. {$else UseNiceNames}
  93. hs2:=hs2+tostr(length('self'))+'self';
  94. {$endif UseNiceNames}
  95. vs:=new(Pvarsym,init('@',procinfo^._class));
  96. vs^.varspez:=vs_var;
  97. { insert the sym in the parasymtable }
  98. pprocdef(aktprocdef)^.parast^.insert(vs);
  99. {$ifdef INCLUDEOK}
  100. include(aktprocdef^.procoptions,po_containsself);
  101. {$else}
  102. aktprocdef^.procoptions:=aktprocdef^.procoptions+[po_containsself];
  103. {$endif}
  104. inc(procinfo^.selfpointer_offset,vs^.address);
  105. end;
  106. consume(idtoken);
  107. consume(_COLON);
  108. p:=single_type(hs1,false);
  109. if assigned(readtypesym) then
  110. aktprocdef^.concattypesym(readtypesym,vs_value)
  111. else
  112. aktprocdef^.concatdef(p,vs_value);
  113. { check the types for procedures only }
  114. if not is_procvar then
  115. CheckTypes(p,procinfo^._class);
  116. end
  117. else
  118. consume(_ID);
  119. end
  120. else
  121. begin
  122. { read identifiers }
  123. sc:=idlist;
  124. { read type declaration, force reading for value and const paras }
  125. if (token=_COLON) or (varspez=vs_value) then
  126. begin
  127. consume(_COLON);
  128. { check for an open array }
  129. if token=_ARRAY then
  130. begin
  131. consume(_ARRAY);
  132. consume(_OF);
  133. { define range and type of range }
  134. p:=new(Parraydef,init(0,-1,s32bitdef));
  135. { array of const ? }
  136. if (token=_CONST) and (m_objpas in aktmodeswitches) then
  137. begin
  138. consume(_CONST);
  139. srsym:=nil;
  140. getsymonlyin(systemunit,'TVARREC');
  141. if not assigned(srsym) then
  142. InternalError(1234124);
  143. Parraydef(p)^.definition:=ptypesym(srsym)^.definition;
  144. Parraydef(p)^.IsArrayOfConst:=true;
  145. hs1:='array_of_const';
  146. end
  147. else
  148. begin
  149. { define field type }
  150. Parraydef(p)^.definition:=single_type(hs1,false);
  151. hs1:='array_of_'+hs1;
  152. { we don't need the typesym anymore }
  153. readtypesym:=nil;
  154. end;
  155. inserthigh:=true;
  156. end
  157. { open string ? }
  158. else if (varspez=vs_var) and
  159. (
  160. (
  161. ((token=_STRING) or (idtoken=_SHORTSTRING)) and
  162. (cs_openstring in aktmoduleswitches) and
  163. not(cs_ansistrings in aktlocalswitches)
  164. ) or
  165. (idtoken=_OPENSTRING)) then
  166. begin
  167. consume(token);
  168. p:=openshortstringdef;
  169. hs1:='openstring';
  170. inserthigh:=true;
  171. end
  172. { everything else }
  173. else
  174. p:=single_type(hs1,false);
  175. end
  176. else
  177. begin
  178. {$ifndef UseNiceNames}
  179. hs1:='$$$';
  180. {$else UseNiceNames}
  181. hs1:='var';
  182. {$endif UseNiceNames}
  183. p:=cformaldef;
  184. end;
  185. if not is_procvar then
  186. hs2:=pprocdef(aktprocdef)^.mangledname;
  187. storetokenpos:=tokenpos;
  188. while not sc^.empty do
  189. begin
  190. s:=sc^.get_with_tokeninfo(tokenpos);
  191. if assigned(readtypesym) then
  192. aktprocdef^.concattypesym(readtypesym,varspez)
  193. else
  194. aktprocdef^.concatdef(p,varspez);
  195. { For proc vars we only need the definitions }
  196. if not is_procvar then
  197. begin
  198. {$ifndef UseNiceNames}
  199. hs2:=hs2+'$'+hs1;
  200. {$else UseNiceNames}
  201. hs2:=hs2+tostr(length(hs1))+hs1;
  202. {$endif UseNiceNames}
  203. if assigned(readtypesym) then
  204. vs:=new(Pvarsym,initsym(s,readtypesym))
  205. else
  206. vs:=new(Pvarsym,init(s,p));
  207. vs^.varspez:=varspez;
  208. { we have to add this to avoid var param to be in registers !!!}
  209. if (varspez in [vs_var,vs_const]) and push_addr_param(p) then
  210. {$ifdef INCLUDEOK}
  211. include(vs^.varoptions,vo_regable);
  212. {$else}
  213. vs^.varoptions:=vs^.varoptions+[vo_regable];
  214. {$endif}
  215. { search for duplicate ids in object members/methods }
  216. { but only the current class, I don't know why ... }
  217. { at least TP and Delphi do it in that way (FK) }
  218. if assigned(procinfo^._class) and
  219. (lexlevel=normal_function_level) then
  220. begin
  221. hsym:=procinfo^._class^.symtable^.search(vs^.name);
  222. if assigned(hsym) then
  223. DuplicateSym(hsym);
  224. end;
  225. { do we need a local copy? }
  226. if (varspez=vs_value) and
  227. push_addr_param(p) and
  228. not(is_open_array(p) or is_array_of_const(p)) then
  229. vs^.setname('val'+vs^.name);
  230. { insert the sym in the parasymtable }
  231. pprocdef(aktprocdef)^.parast^.insert(vs);
  232. { also need to push a high value? }
  233. if inserthigh then
  234. begin
  235. hvs:=new(Pvarsym,init('high'+s,s32bitdef));
  236. hvs^.varspez:=vs_const;
  237. pprocdef(aktprocdef)^.parast^.insert(hvs);
  238. end;
  239. end;
  240. end;
  241. dispose(sc,done);
  242. tokenpos:=storetokenpos;
  243. end;
  244. { set the new mangled name }
  245. if not is_procvar then
  246. pprocdef(aktprocdef)^.setmangledname(hs2);
  247. until not try_to_consume(_SEMICOLON);
  248. dec(testcurobject);
  249. consume(_RKLAMMER);
  250. end;
  251. const
  252. variantrecordlevel : longint = 0;
  253. procedure read_var_decs(is_record,is_object,is_threadvar:boolean);
  254. { reads the filed of a record into a }
  255. { symtablestack, if record=false }
  256. { variants are forbidden, so this procedure }
  257. { can be used to read object fields }
  258. { if absolute is true, ABSOLUTE and file }
  259. { types are allowed }
  260. { => the procedure is also used to read }
  261. { a sequence of variable declaration }
  262. procedure insert_syms(st : psymtable;sc : pstringcontainer;def : pdef;sym:ptypesym;is_threadvar : boolean);
  263. { inserts the symbols of sc in st with def as definition or sym as ptypesym, sc is disposed }
  264. var
  265. s : string;
  266. filepos : tfileposinfo;
  267. ss : pvarsym;
  268. begin
  269. { can't have a definition and ttypesym }
  270. if assigned(def) and assigned(sym) then
  271. internalerror(5438257);
  272. filepos:=tokenpos;
  273. while not sc^.empty do
  274. begin
  275. s:=sc^.get_with_tokeninfo(tokenpos);
  276. if assigned(sym) then
  277. ss:=new(pvarsym,initsym(s,sym))
  278. else
  279. ss:=new(pvarsym,init(s,def));
  280. if is_threadvar then
  281. {$ifdef INCLUDEOK}
  282. include(ss^.varoptions,vo_is_thread_var);
  283. {$else}
  284. ss^.varoptions:=ss^.varoptions+[vo_is_thread_var];
  285. {$endif}
  286. st^.insert(ss);
  287. { static data fields are inserted in the globalsymtable }
  288. if (st^.symtabletype=objectsymtable) and
  289. (sp_static in current_object_option) then
  290. begin
  291. s:=lower(st^.name^)+'_'+s;
  292. st^.defowner^.owner^.insert(new(pvarsym,init(s,def)));
  293. end;
  294. end;
  295. dispose(sc,done);
  296. tokenpos:=filepos;
  297. end;
  298. var
  299. sc : pstringcontainer;
  300. s : stringid;
  301. old_block_type : tblock_type;
  302. declarepos,storetokenpos : tfileposinfo;
  303. symdone : boolean;
  304. { to handle absolute }
  305. abssym : pabsolutesym;
  306. l : longint;
  307. code : integer;
  308. { c var }
  309. newtype : ptypesym;
  310. is_dll,
  311. is_gpc_name,is_cdecl,extern_aktvarsym,export_aktvarsym : boolean;
  312. dll_name,
  313. C_name : string;
  314. { case }
  315. p,casedef : pdef;
  316. { Delphi initialized vars }
  317. pconstsym : ptypedconstsym;
  318. { maxsize contains the max. size of a variant }
  319. { startvarrec contains the start of the variant part of a record }
  320. maxsize,startvarrec : longint;
  321. pt : ptree;
  322. begin
  323. old_block_type:=block_type;
  324. block_type:=bt_type;
  325. is_gpc_name:=false;
  326. { Force an expected ID error message }
  327. if not (token in [_ID,_CASE,_END]) then
  328. consume(_ID);
  329. { read vars }
  330. while (token=_ID) and
  331. not(is_object and (idtoken in [_PUBLIC,_PRIVATE,_PUBLISHED,_PROTECTED])) do
  332. begin
  333. C_name:=orgpattern;
  334. sc:=idlist;
  335. consume(_COLON);
  336. if (m_gpc in aktmodeswitches) and
  337. not(is_record or is_object or is_threadvar) and
  338. (token=_ID) and (orgpattern='__asmname__') then
  339. begin
  340. consume(_ID);
  341. C_name:=pattern;
  342. if token=_CCHAR then
  343. consume(_CCHAR)
  344. else
  345. consume(_CSTRING);
  346. Is_gpc_name:=true;
  347. end;
  348. { this is needed for Delphi mode at least
  349. but should be OK for all modes !! (PM) }
  350. ignore_equal:=true;
  351. p:=read_type('');
  352. if (variantrecordlevel>0) and p^.needs_inittable then
  353. Message(parser_e_cant_use_inittable_here);
  354. ignore_equal:=false;
  355. symdone:=false;
  356. if is_gpc_name then
  357. begin
  358. storetokenpos:=tokenpos;
  359. s:=sc^.get_with_tokeninfo(tokenpos);
  360. if not sc^.empty then
  361. Message(parser_e_absolute_only_one_var);
  362. dispose(sc,done);
  363. aktvarsym:=new(pvarsym,init_C(s,target_os.Cprefix+C_name,p));
  364. {$ifdef INCLUDEOK}
  365. include(aktvarsym^.varoptions,vo_is_external);
  366. {$else}
  367. aktvarsym^.varoptions:=aktvarsym^.varoptions+[vo_is_external];
  368. {$endif}
  369. symtablestack^.insert(aktvarsym);
  370. tokenpos:=storetokenpos;
  371. symdone:=true;
  372. end;
  373. { check for absolute }
  374. if not symdone and
  375. (idtoken=_ABSOLUTE) and not(is_record or is_object or is_threadvar) then
  376. begin
  377. consume(_ABSOLUTE);
  378. { only allowed for one var }
  379. s:=sc^.get_with_tokeninfo(declarepos);
  380. if not sc^.empty then
  381. Message(parser_e_absolute_only_one_var);
  382. dispose(sc,done);
  383. { parse the rest }
  384. if token=_ID then
  385. begin
  386. getsym(pattern,true);
  387. consume(_ID);
  388. { support unit.variable }
  389. if srsym^.typ=unitsym then
  390. begin
  391. consume(_POINT);
  392. getsymonlyin(punitsym(srsym)^.unitsymtable,pattern);
  393. consume(_ID);
  394. end;
  395. { we should check the result type of srsym }
  396. if not (srsym^.typ in [varsym,typedconstsym]) then
  397. Message(parser_e_absolute_only_to_var_or_const);
  398. storetokenpos:=tokenpos;
  399. tokenpos:=declarepos;
  400. abssym:=new(pabsolutesym,init(s,p));
  401. abssym^.abstyp:=tovar;
  402. abssym^.ref:=srsym;
  403. symtablestack^.insert(abssym);
  404. tokenpos:=storetokenpos;
  405. end
  406. else
  407. if (token=_CSTRING) or (token=_CCHAR) then
  408. begin
  409. storetokenpos:=tokenpos;
  410. tokenpos:=declarepos;
  411. abssym:=new(pabsolutesym,init(s,p));
  412. s:=pattern;
  413. consume(token);
  414. abssym^.abstyp:=toasm;
  415. abssym^.asmname:=stringdup(s);
  416. symtablestack^.insert(abssym);
  417. tokenpos:=storetokenpos;
  418. end
  419. else
  420. { absolute address ?!? }
  421. if token=_INTCONST then
  422. begin
  423. if (target_info.target=target_i386_go32v2) then
  424. begin
  425. storetokenpos:=tokenpos;
  426. tokenpos:=declarepos;
  427. abssym:=new(pabsolutesym,init(s,p));
  428. abssym^.abstyp:=toaddr;
  429. abssym^.absseg:=false;
  430. s:=pattern;
  431. consume(_INTCONST);
  432. val(s,abssym^.address,code);
  433. if token=_COLON then
  434. begin
  435. consume(token);
  436. s:=pattern;
  437. consume(_INTCONST);
  438. val(s,l,code);
  439. abssym^.address:=abssym^.address shl 4+l;
  440. abssym^.absseg:=true;
  441. end;
  442. symtablestack^.insert(abssym);
  443. tokenpos:=storetokenpos;
  444. end
  445. else
  446. Message(parser_e_absolute_only_to_var_or_const);
  447. end
  448. else
  449. Message(parser_e_absolute_only_to_var_or_const);
  450. symdone:=true;
  451. end;
  452. { Handling of Delphi typed const = initialized vars ! }
  453. { When should this be rejected ?
  454. - in parasymtable
  455. - in record or object
  456. - ... (PM) }
  457. if (m_delphi in aktmodeswitches) and (token=_EQUAL) and
  458. not (symtablestack^.symtabletype in [parasymtable]) and
  459. not is_record and not is_object then
  460. begin
  461. storetokenpos:=tokenpos;
  462. s:=sc^.get_with_tokeninfo(tokenpos);
  463. if not sc^.empty then
  464. Message(parser_e_initialized_only_one_var);
  465. if assigned(readtypesym) then
  466. pconstsym:=new(ptypedconstsym,initsym(s,readtypesym,false))
  467. else
  468. pconstsym:=new(ptypedconstsym,init(s,p,false));
  469. symtablestack^.insert(pconstsym);
  470. tokenpos:=storetokenpos;
  471. consume(_EQUAL);
  472. readtypedconst(p,pconstsym,false);
  473. symdone:=true;
  474. end;
  475. { for a record there doesn't need to be a ; before the END or ) }
  476. if not((is_record or is_object) and (token in [_END,_RKLAMMER])) then
  477. consume(_SEMICOLON);
  478. { procvar handling }
  479. if (p^.deftype=procvardef) and (p^.sym=nil) then
  480. begin
  481. newtype:=new(ptypesym,init('unnamed',p));
  482. parse_var_proc_directives(psym(newtype));
  483. newtype^.definition:=nil;
  484. p^.sym:=nil;
  485. dispose(newtype,done);
  486. end;
  487. { Check for variable directives }
  488. if not symdone and (token=_ID) then
  489. begin
  490. { Check for C Variable declarations }
  491. if (m_cvar_support in aktmodeswitches) and
  492. not(is_record or is_object or is_threadvar) and
  493. (idtoken in [_EXPORT,_EXTERNAL,_PUBLIC,_CVAR]) then
  494. begin
  495. { only allowed for one var }
  496. s:=sc^.get_with_tokeninfo(declarepos);
  497. if not sc^.empty then
  498. Message(parser_e_absolute_only_one_var);
  499. dispose(sc,done);
  500. { defaults }
  501. is_dll:=false;
  502. is_cdecl:=false;
  503. extern_aktvarsym:=false;
  504. export_aktvarsym:=false;
  505. { cdecl }
  506. if idtoken=_CVAR then
  507. begin
  508. consume(_CVAR);
  509. consume(_SEMICOLON);
  510. is_cdecl:=true;
  511. C_name:=target_os.Cprefix+C_name;
  512. end;
  513. { external }
  514. if idtoken=_EXTERNAL then
  515. begin
  516. consume(_EXTERNAL);
  517. extern_aktvarsym:=true;
  518. end;
  519. { export }
  520. if idtoken in [_EXPORT,_PUBLIC] then
  521. begin
  522. consume(_ID);
  523. if extern_aktvarsym then
  524. Message(parser_e_not_external_and_export)
  525. else
  526. export_aktvarsym:=true;
  527. end;
  528. { external and export need a name after when no cdecl is used }
  529. if not is_cdecl then
  530. begin
  531. { dll name ? }
  532. if (extern_aktvarsym) and (idtoken<>_NAME) then
  533. begin
  534. is_dll:=true;
  535. dll_name:=get_stringconst;
  536. end;
  537. consume(_NAME);
  538. C_name:=get_stringconst;
  539. end;
  540. { consume the ; when export or external is used }
  541. if extern_aktvarsym or export_aktvarsym then
  542. consume(_SEMICOLON);
  543. { insert in the symtable }
  544. storetokenpos:=tokenpos;
  545. tokenpos:=declarepos;
  546. if is_dll then
  547. begin
  548. if assigned(readtypesym) then
  549. aktvarsym:=new(pvarsym,initsym_dll(s,readtypesym))
  550. else
  551. aktvarsym:=new(pvarsym,init_dll(s,p))
  552. end
  553. else
  554. begin
  555. if assigned(readtypesym) then
  556. aktvarsym:=new(pvarsym,initsym_C(s,C_name,readtypesym))
  557. else
  558. aktvarsym:=new(pvarsym,init_C(s,C_name,p));
  559. end;
  560. { set some vars options }
  561. if export_aktvarsym then
  562. inc(aktvarsym^.refs);
  563. if extern_aktvarsym then
  564. {$ifdef INCLUDEOK}
  565. include(aktvarsym^.varoptions,vo_is_external);
  566. {$else}
  567. aktvarsym^.varoptions:=aktvarsym^.varoptions+[vo_is_external];
  568. {$endif}
  569. { insert in the stack/datasegment }
  570. symtablestack^.insert(aktvarsym);
  571. tokenpos:=storetokenpos;
  572. { now we can insert it in the import lib if its a dll, or
  573. add it to the externals }
  574. if extern_aktvarsym then
  575. begin
  576. if is_dll then
  577. begin
  578. if not(current_module^.uses_imports) then
  579. begin
  580. current_module^.uses_imports:=true;
  581. importlib^.preparelib(current_module^.modulename^);
  582. end;
  583. importlib^.importvariable(aktvarsym^.mangledname,dll_name,C_name)
  584. end
  585. end;
  586. symdone:=true;
  587. end
  588. else
  589. if (is_object) and (cs_static_keyword in aktmoduleswitches) and (idtoken=_STATIC) then
  590. begin
  591. {$ifdef INCLUDEOK}
  592. include(current_object_option,sp_static);
  593. {$else}
  594. current_object_option:=current_object_option+[sp_static];
  595. {$endif}
  596. if assigned(readtypesym) then
  597. insert_syms(symtablestack,sc,nil,readtypesym,false)
  598. else
  599. insert_syms(symtablestack,sc,p,nil,false);
  600. {$ifdef INCLUDEOK}
  601. exclude(current_object_option,sp_static);
  602. {$else}
  603. current_object_option:=current_object_option-[sp_static];
  604. {$endif}
  605. consume(_STATIC);
  606. consume(_SEMICOLON);
  607. symdone:=true;
  608. end;
  609. end;
  610. { insert it in the symtable, if not done yet }
  611. if not symdone then
  612. begin
  613. if (sp_published in current_object_option) and
  614. (not((p^.deftype=objectdef) and (pobjectdef(p)^.is_class))) then
  615. Message(parser_e_cant_publish_that)
  616. else if (sp_published in current_object_option) and
  617. not(oo_can_have_published in pobjectdef(p)^.objectoptions) then
  618. Message(parser_e_only_publishable_classes_can__be_published);
  619. if assigned(readtypesym) then
  620. insert_syms(symtablestack,sc,nil,readtypesym,is_threadvar)
  621. else
  622. insert_syms(symtablestack,sc,p,nil,is_threadvar);
  623. end;
  624. end;
  625. { Check for Case }
  626. if is_record and (token=_CASE) then
  627. begin
  628. maxsize:=0;
  629. consume(_CASE);
  630. s:=pattern;
  631. getsym(s,false);
  632. { may be only a type: }
  633. if assigned(srsym) and (srsym^.typ in [typesym,unitsym]) then
  634. casedef:=read_type('')
  635. else
  636. begin
  637. consume(_ID);
  638. consume(_COLON);
  639. casedef:=read_type('');
  640. symtablestack^.insert(new(pvarsym,init(s,casedef)));
  641. end;
  642. if not(is_ordinal(casedef)) or is_64bitint(casedef) then
  643. Message(type_e_ordinal_expr_expected);
  644. consume(_OF);
  645. startvarrec:=symtablestack^.datasize;
  646. repeat
  647. repeat
  648. pt:=comp_expr(true);
  649. do_firstpass(pt);
  650. if not(pt^.treetype=ordconstn) then
  651. Message(cg_e_illegal_expression);
  652. disposetree(pt);
  653. if token=_COMMA then
  654. consume(_COMMA)
  655. else
  656. break;
  657. until false;
  658. consume(_COLON);
  659. { read the vars }
  660. consume(_LKLAMMER);
  661. inc(variantrecordlevel);
  662. if token<>_RKLAMMER then
  663. read_var_decs(true,false,false);
  664. dec(variantrecordlevel);
  665. consume(_RKLAMMER);
  666. { calculates maximal variant size }
  667. maxsize:=max(maxsize,symtablestack^.datasize);
  668. { the items of the next variant are overlayed }
  669. symtablestack^.datasize:=startvarrec;
  670. if (token<>_END) and (token<>_RKLAMMER) then
  671. consume(_SEMICOLON)
  672. else
  673. break;
  674. until (token=_END) or (token=_RKLAMMER);
  675. { at last set the record size to that of the biggest variant }
  676. symtablestack^.datasize:=maxsize;
  677. end;
  678. block_type:=old_block_type;
  679. end;
  680. procedure const_dec;
  681. var
  682. name : stringid;
  683. p : ptree;
  684. def : pdef;
  685. sym : psym;
  686. storetokenpos,filepos : tfileposinfo;
  687. old_block_type : tblock_type;
  688. ps : pconstset;
  689. pd : pbestreal;
  690. sp : pchar;
  691. skipequal : boolean;
  692. begin
  693. consume(_CONST);
  694. old_block_type:=block_type;
  695. block_type:=bt_const;
  696. repeat
  697. name:=pattern;
  698. filepos:=tokenpos;
  699. consume(_ID);
  700. case token of
  701. _EQUAL:
  702. begin
  703. consume(_EQUAL);
  704. p:=comp_expr(true);
  705. do_firstpass(p);
  706. storetokenpos:=tokenpos;
  707. tokenpos:=filepos;
  708. case p^.treetype of
  709. ordconstn:
  710. begin
  711. if is_constintnode(p) then
  712. symtablestack^.insert(new(pconstsym,init_def(name,constint,p^.value,nil)))
  713. else if is_constcharnode(p) then
  714. symtablestack^.insert(new(pconstsym,init_def(name,constchar,p^.value,nil)))
  715. else if is_constboolnode(p) then
  716. symtablestack^.insert(new(pconstsym,init_def(name,constbool,p^.value,nil)))
  717. else if p^.resulttype^.deftype=enumdef then
  718. symtablestack^.insert(new(pconstsym,init_def(name,constord,p^.value,p^.resulttype)))
  719. else if p^.resulttype^.deftype=pointerdef then
  720. symtablestack^.insert(new(pconstsym,init_def(name,constord,p^.value,p^.resulttype)))
  721. else internalerror(111);
  722. end;
  723. stringconstn:
  724. begin
  725. getmem(sp,p^.length+1);
  726. move(p^.value_str^,sp^,p^.length+1);
  727. symtablestack^.insert(new(pconstsym,init_string(name,conststring,sp,p^.length)));
  728. end;
  729. realconstn :
  730. begin
  731. new(pd);
  732. pd^:=p^.value_real;
  733. symtablestack^.insert(new(pconstsym,init(name,constreal,longint(pd))));
  734. end;
  735. setconstn :
  736. begin
  737. new(ps);
  738. ps^:=p^.value_set^;
  739. symtablestack^.insert(new(pconstsym,init_def(name,constset,longint(ps),p^.resulttype)));
  740. end;
  741. pointerconstn :
  742. begin
  743. symtablestack^.insert(new(pconstsym,init_def(name,constpointer,p^.value,p^.resulttype)))
  744. end;
  745. niln :
  746. begin
  747. symtablestack^.insert(new(pconstsym,init_def(name,constnil,0,p^.resulttype)));
  748. end;
  749. else
  750. Message(cg_e_illegal_expression);
  751. end;
  752. tokenpos:=storetokenpos;
  753. consume(_SEMICOLON);
  754. disposetree(p);
  755. end;
  756. _COLON:
  757. begin
  758. { set the blocktype first so a consume also supports a
  759. caret, to support const s : ^string = nil }
  760. block_type:=bt_type;
  761. consume(_COLON);
  762. ignore_equal:=true;
  763. def:=read_type('');
  764. ignore_equal:=false;
  765. block_type:=bt_const;
  766. skipequal:=false;
  767. { create symbol }
  768. storetokenpos:=tokenpos;
  769. tokenpos:=filepos;
  770. {$ifdef DELPHI_CONST_IN_RODATA}
  771. if m_delphi in aktmodeswitches then
  772. begin
  773. if assigned(readtypesym) then
  774. sym:=new(ptypedconstsym,initsym(name,readtypesym,true))
  775. else
  776. sym:=new(ptypedconstsym,init(name,def,true))
  777. end
  778. else
  779. {$endif DELPHI_CONST_IN_RODATA}
  780. begin
  781. if assigned(readtypesym) then
  782. sym:=new(ptypedconstsym,initsym(name,readtypesym,false))
  783. else
  784. sym:=new(ptypedconstsym,init(name,def,false))
  785. end;
  786. tokenpos:=storetokenpos;
  787. symtablestack^.insert(sym);
  788. { procvar can have proc directives }
  789. if (def^.deftype=procvardef) then
  790. begin
  791. { support p : procedure;stdcall=nil; }
  792. if (token=_SEMICOLON) then
  793. begin
  794. consume(_SEMICOLON);
  795. if is_proc_directive(token) then
  796. parse_var_proc_directives(sym)
  797. else
  798. begin
  799. Message(parser_e_proc_directive_expected);
  800. skipequal:=true;
  801. end;
  802. end
  803. else
  804. { support p : procedure stdcall=nil; }
  805. begin
  806. if is_proc_directive(token) then
  807. parse_var_proc_directives(sym);
  808. end;
  809. end;
  810. if not skipequal then
  811. begin
  812. { get init value }
  813. consume(_EQUAL);
  814. {$ifdef DELPHI_CONST_IN_RODATA}
  815. if m_delphi in aktmodeswitches then
  816. readtypedconst(def,ptypedconstsym(sym),true)
  817. else
  818. {$endif DELPHI_CONST_IN_RODATA}
  819. readtypedconst(def,ptypedconstsym(sym),false);
  820. consume(_SEMICOLON);
  821. end;
  822. end;
  823. else
  824. { generate an error }
  825. consume(_EQUAL);
  826. end;
  827. until token<>_ID;
  828. block_type:=old_block_type;
  829. end;
  830. procedure label_dec;
  831. var
  832. hl : pasmlabel;
  833. begin
  834. consume(_LABEL);
  835. if not(cs_support_goto in aktmoduleswitches) then
  836. Message(sym_e_goto_and_label_not_supported);
  837. repeat
  838. if not(token in [_ID,_INTCONST]) then
  839. consume(_ID)
  840. else
  841. begin
  842. getlabel(hl);
  843. symtablestack^.insert(new(plabelsym,init(pattern,hl)));
  844. consume(token);
  845. end;
  846. if token<>_SEMICOLON then consume(_COMMA);
  847. until not(token in [_ID,_INTCONST]);
  848. consume(_SEMICOLON);
  849. end;
  850. { search in symtablestack used, but not defined type }
  851. procedure resolve_type_forward(p : pnamedindexobject);{$ifndef FPC}far;{$endif}
  852. var
  853. hpd,pd : pdef;
  854. stpos : tfileposinfo;
  855. begin
  856. { Check only typesyms or record/object fields }
  857. case psym(p)^.typ of
  858. typesym :
  859. pd:=ptypesym(p)^.definition;
  860. varsym :
  861. if (psym(p)^.owner^.symtabletype in [objectsymtable,recordsymtable]) then
  862. pd:=pvarsym(p)^.definition
  863. else
  864. exit;
  865. else
  866. exit;
  867. end;
  868. case pd^.deftype of
  869. pointerdef,
  870. classrefdef :
  871. begin
  872. { classrefdef inherits from pointerdef }
  873. hpd:=ppointerdef(pd)^.definition;
  874. { still a forward def ? }
  875. if hpd^.deftype=forwarddef then
  876. begin
  877. { try to resolve the forward }
  878. { get the correct position for it }
  879. stpos:=tokenpos;
  880. tokenpos:=pforwarddef(hpd)^.forwardpos;
  881. resolving_forward:=true;
  882. getsym(pforwarddef(hpd)^.tosymname,false);
  883. resolving_forward:=false;
  884. tokenpos:=stpos;
  885. { we don't need the forwarddef anymore, dispose it }
  886. dispose(hpd,done);
  887. { was a type sym found ? }
  888. if assigned(srsym) and
  889. (srsym^.typ=typesym) then
  890. begin
  891. ppointerdef(pd)^.definition:=ptypesym(srsym)^.definition;
  892. {$ifdef GDB}
  893. if (cs_debuginfo in aktmoduleswitches) and assigned(debuglist) and
  894. (psym(p)^.owner^.symtabletype in [globalsymtable,staticsymtable]) then
  895. begin
  896. ptypesym(p)^.isusedinstab := true;
  897. psym(p)^.concatstabto(debuglist);
  898. end;
  899. {$endif GDB}
  900. { we need a class type for classrefdef }
  901. if (pd^.deftype=classrefdef) and
  902. not((ptypesym(srsym)^.definition^.deftype=objectdef) and
  903. pobjectdef(ptypesym(srsym)^.definition)^.is_class) then
  904. Message1(type_e_class_type_expected,ptypesym(srsym)^.definition^.typename);
  905. end
  906. else
  907. begin
  908. MessagePos1(psym(p)^.fileinfo,sym_e_forward_type_not_resolved,p^.name);
  909. { try to recover }
  910. ppointerdef(pd)^.definition:=generrordef;
  911. end;
  912. end;
  913. end;
  914. recorddef :
  915. precorddef(pd)^.symtable^.foreach({$ifndef TP}@{$endif}resolve_type_forward);
  916. objectdef :
  917. { Don't check objectdefs in objects/records, because these can't
  918. exist (anonymous objects aren't allowed) }
  919. if not(psym(p)^.owner^.symtabletype in [objectsymtable,recordsymtable]) then
  920. pobjectdef(pd)^.symtable^.foreach({$ifndef TP}@{$endif}resolve_type_forward);
  921. end;
  922. end;
  923. { reads a type declaration to the symbol table }
  924. procedure type_dec;
  925. var
  926. typename : stringid;
  927. newtype : ptypesym;
  928. sym : psym;
  929. typedef : pdef;
  930. defpos,storetokenpos : tfileposinfo;
  931. old_block_type : tblock_type;
  932. begin
  933. old_block_type:=block_type;
  934. block_type:=bt_type;
  935. consume(_TYPE);
  936. typecanbeforward:=true;
  937. repeat
  938. typename:=pattern;
  939. defpos:=tokenpos;
  940. consume(_ID);
  941. consume(_EQUAL);
  942. { support 'ttype=type word' syntax }
  943. if token=_TYPE then
  944. Consume(_TYPE);
  945. { is the type already defined? }
  946. getsym(typename,false);
  947. sym:=srsym;
  948. newtype:=nil;
  949. { found a symbol with this name? }
  950. if assigned(sym) then
  951. begin
  952. if (sym^.typ=typesym) then
  953. begin
  954. if (token=_CLASS) and
  955. (assigned(ptypesym(sym)^.definition)) and
  956. (ptypesym(sym)^.definition^.deftype=objectdef) and
  957. pobjectdef(ptypesym(sym)^.definition)^.is_class and
  958. (oo_is_forward in pobjectdef(ptypesym(sym)^.definition)^.objectoptions) then
  959. begin
  960. { we can ignore the result }
  961. { the definition is modified }
  962. object_dec(typename,pobjectdef(ptypesym(sym)^.definition));
  963. newtype:=ptypesym(sym);
  964. end;
  965. end;
  966. end;
  967. { no old type reused ? Then insert this new type }
  968. if not assigned(newtype) then
  969. begin
  970. typedef:=read_type(typename);
  971. storetokenpos:=tokenpos;
  972. tokenpos:=defpos;
  973. newtype:=new(ptypesym,init(typename,typedef));
  974. newtype:=ptypesym(symtablestack^.insert(newtype));
  975. tokenpos:=storetokenpos;
  976. end;
  977. consume(_SEMICOLON);
  978. if assigned(newtype^.definition) and
  979. (newtype^.definition^.deftype=procvardef) then
  980. parse_var_proc_directives(psym(newtype));
  981. until token<>_ID;
  982. typecanbeforward:=false;
  983. symtablestack^.foreach({$ifndef TP}@{$endif}resolve_type_forward);
  984. block_type:=old_block_type;
  985. end;
  986. procedure var_dec;
  987. { parses variable declarations and inserts them in }
  988. { the top symbol table of symtablestack }
  989. begin
  990. consume(_VAR);
  991. read_var_decs(false,false,false);
  992. end;
  993. procedure threadvar_dec;
  994. { parses thread variable declarations and inserts them in }
  995. { the top symbol table of symtablestack }
  996. begin
  997. consume(_THREADVAR);
  998. if not(symtablestack^.symtabletype in [staticsymtable,globalsymtable]) then
  999. message(parser_e_threadvars_only_sg);
  1000. read_var_decs(false,false,true);
  1001. end;
  1002. procedure resourcestring_dec;
  1003. var
  1004. name : stringid;
  1005. p : ptree;
  1006. storetokenpos,filepos : tfileposinfo;
  1007. old_block_type : tblock_type;
  1008. sp : pchar;
  1009. begin
  1010. consume(_RESOURCESTRING);
  1011. if not(symtablestack^.symtabletype in [staticsymtable,globalsymtable]) then
  1012. message(parser_e_resourcestring_only_sg);
  1013. old_block_type:=block_type;
  1014. block_type:=bt_const;
  1015. repeat
  1016. name:=pattern;
  1017. filepos:=tokenpos;
  1018. consume(_ID);
  1019. case token of
  1020. _EQUAL:
  1021. begin
  1022. consume(_EQUAL);
  1023. p:=comp_expr(true);
  1024. do_firstpass(p);
  1025. storetokenpos:=tokenpos;
  1026. tokenpos:=filepos;
  1027. case p^.treetype of
  1028. ordconstn:
  1029. begin
  1030. if is_constcharnode(p) then
  1031. begin
  1032. getmem(sp,2);
  1033. sp[0]:=chr(p^.value);
  1034. sp[1]:=#0;
  1035. symtablestack^.insert(new(pconstsym,init_string(name,constresourcestring,sp,1)));
  1036. end
  1037. else
  1038. Message(cg_e_illegal_expression);
  1039. end;
  1040. stringconstn:
  1041. begin
  1042. getmem(sp,p^.length+1);
  1043. move(p^.value_str^,sp^,p^.length+1);
  1044. symtablestack^.insert(new(pconstsym,init_string(name,constresourcestring,sp,p^.length)));
  1045. end;
  1046. else
  1047. Message(cg_e_illegal_expression);
  1048. end;
  1049. tokenpos:=storetokenpos;
  1050. consume(_SEMICOLON);
  1051. disposetree(p);
  1052. end;
  1053. else consume(_EQUAL);
  1054. end;
  1055. until token<>_ID;
  1056. block_type:=old_block_type;
  1057. end;
  1058. procedure Not_supported_for_inline(t : ttoken);
  1059. begin
  1060. if assigned(aktprocsym) and
  1061. (pocall_inline in aktprocsym^.definition^.proccalloptions) then
  1062. Begin
  1063. Message1(parser_w_not_supported_for_inline,tokenstring(t));
  1064. Message(parser_w_inlining_disabled);
  1065. {$ifdef INCLUDEOK}
  1066. exclude(aktprocsym^.definition^.proccalloptions,pocall_inline);
  1067. {$else}
  1068. aktprocsym^.definition^.proccalloptions:=aktprocsym^.definition^.proccalloptions-[pocall_inline];
  1069. {$endif}
  1070. End;
  1071. end;
  1072. procedure read_declarations(islibrary : boolean);
  1073. begin
  1074. repeat
  1075. case token of
  1076. _LABEL:
  1077. begin
  1078. Not_supported_for_inline(token);
  1079. label_dec;
  1080. end;
  1081. _CONST:
  1082. begin
  1083. Not_supported_for_inline(token);
  1084. const_dec;
  1085. end;
  1086. _TYPE:
  1087. begin
  1088. Not_supported_for_inline(token);
  1089. type_dec;
  1090. end;
  1091. _VAR:
  1092. var_dec;
  1093. _THREADVAR:
  1094. threadvar_dec;
  1095. _CONSTRUCTOR,_DESTRUCTOR,
  1096. _FUNCTION,_PROCEDURE,_OPERATOR,_CLASS:
  1097. begin
  1098. Not_supported_for_inline(token);
  1099. read_proc;
  1100. end;
  1101. _RESOURCESTRING:
  1102. resourcestring_dec;
  1103. _EXPORTS:
  1104. begin
  1105. Not_supported_for_inline(token);
  1106. { here we should be at lexlevel 1, no ? PM }
  1107. if (lexlevel<>main_program_level) or
  1108. (current_module^.is_unit) then
  1109. begin
  1110. Message(parser_e_syntax_error);
  1111. consume_all_until(_SEMICOLON);
  1112. end
  1113. else if islibrary or (target_info.target=target_i386_WIN32) then
  1114. read_exports;
  1115. end
  1116. else break;
  1117. end;
  1118. until false;
  1119. end;
  1120. procedure read_interface_declarations;
  1121. begin
  1122. {Since the body is now parsed at lexlevel 1, and the declarations
  1123. must be parsed at the same lexlevel we increase the lexlevel.}
  1124. inc(lexlevel);
  1125. repeat
  1126. case token of
  1127. _CONST : const_dec;
  1128. _TYPE : type_dec;
  1129. _VAR : var_dec;
  1130. _THREADVAR : threadvar_dec;
  1131. _RESOURCESTRING:
  1132. resourcestring_dec;
  1133. _FUNCTION,
  1134. _PROCEDURE,
  1135. _OPERATOR : read_proc;
  1136. else
  1137. break;
  1138. end;
  1139. until false;
  1140. dec(lexlevel);
  1141. end;
  1142. end.
  1143. {
  1144. $Log$
  1145. Revision 1.172 1999-11-29 15:18:27 pierre
  1146. + allow exports in win32 executables
  1147. Revision 1.171 1999/11/09 23:43:08 pierre
  1148. * better browser info
  1149. Revision 1.170 1999/11/09 23:06:45 peter
  1150. * esi_offset -> selfpointer_offset to be newcg compatible
  1151. * hcogegen -> cgbase fixes for newcg
  1152. Revision 1.169 1999/11/09 12:58:29 peter
  1153. * support absolute unit.variable
  1154. Revision 1.168 1999/11/06 14:34:21 peter
  1155. * truncated log to 20 revs
  1156. Revision 1.167 1999/10/26 12:30:44 peter
  1157. * const parameter is now checked
  1158. * better and generic check if a node can be used for assigning
  1159. * export fixes
  1160. * procvar equal works now (it never had worked at least from 0.99.8)
  1161. * defcoll changed to linkedlist with pparaitem so it can easily be
  1162. walked both directions
  1163. Revision 1.166 1999/10/22 10:39:34 peter
  1164. * split type reading from pdecl to ptype unit
  1165. * parameter_dec routine is now used for procedure and procvars
  1166. Revision 1.165 1999/10/21 16:41:41 florian
  1167. * problems with readln fixed: esi wasn't restored correctly when
  1168. reading ordinal fields of objects futher the register allocation
  1169. didn't take care of the extra register when reading ordinal values
  1170. * enumerations can now be used in constant indexes of properties
  1171. Revision 1.164 1999/10/14 14:57:52 florian
  1172. - removed the hcodegen use in the new cg, use cgbase instead
  1173. Revision 1.163 1999/10/06 17:39:14 peter
  1174. * fixed stabs writting for forward types
  1175. Revision 1.162 1999/10/03 19:44:42 peter
  1176. * removed objpasunit reference, tvarrec is now searched in systemunit
  1177. where it already was located
  1178. Revision 1.161 1999/10/01 11:18:02 peter
  1179. * class/record type forward checking fixed
  1180. Revision 1.159 1999/10/01 10:05:42 peter
  1181. + procedure directive support in const declarations, fixes bug 232
  1182. Revision 1.158 1999/10/01 08:02:46 peter
  1183. * forward type declaration rewritten
  1184. Revision 1.157 1999/09/27 23:44:53 peter
  1185. * procinfo is now a pointer
  1186. * support for result setting in sub procedure
  1187. Revision 1.156 1999/09/26 21:30:19 peter
  1188. + constant pointer support which can happend with typecasting like
  1189. const p=pointer(1)
  1190. * better procvar parsing in typed consts
  1191. Revision 1.155 1999/09/20 16:38:59 peter
  1192. * cs_create_smart instead of cs_smartlink
  1193. * -CX is create smartlink
  1194. * -CD is create dynamic, but does nothing atm.
  1195. Revision 1.154 1999/09/15 22:09:24 florian
  1196. + rtti is now automatically generated for published classes, i.e.
  1197. they are handled like an implicit property
  1198. Revision 1.153 1999/09/14 11:09:08 florian
  1199. * per default a property is stored, fixed
  1200. Revision 1.152 1999/09/12 14:50:50 florian
  1201. + implemented creation of methodname/address tables
  1202. Revision 1.151 1999/09/12 08:48:09 florian
  1203. * bugs 593 and 607 fixed
  1204. * some other potential bugs with array constructors fixed
  1205. * for classes compiled in $M+ and it's childs, the default access method
  1206. is now published
  1207. * fixed copyright message (it is now 1993-99)
  1208. Revision 1.150 1999/09/10 20:57:33 florian
  1209. * some more fixes for stored properties
  1210. Revision 1.149 1999/09/10 18:48:07 florian
  1211. * some bug fixes (e.g. must_be_valid and procinfo^.funcret_is_valid)
  1212. * most things for stored properties fixed
  1213. Revision 1.148 1999/09/08 21:06:06 michael
  1214. * Stored specifier for properties is now correctly parsed
  1215. Revision 1.147 1999/09/02 09:23:51 peter
  1216. * fixed double dispose of propsymlist
  1217. }