parser.pas 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654
  1. {
  2. $Id$
  3. Copyright (c) 1993-98 by Florian Klaempfl
  4. This unit does the parsing process
  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. {$E+,N+,D+,F+}
  20. {$endif}
  21. unit parser;
  22. interface
  23. procedure compile(const filename:string;compile_system:boolean);
  24. procedure initparser;
  25. procedure doneparser;
  26. implementation
  27. uses
  28. cobjects,comphook,systems,globals,
  29. hcodegen,verbose, { leave this order, else hcodegen.message will be used !! }
  30. symtable,files,aasm,
  31. assemble,link,script,gendef,
  32. {$ifdef UseBrowser}
  33. browser,
  34. {$endif UseBrowser}
  35. tree,scanner,pbase,pdecl,psystem,pmodules;
  36. procedure initparser;
  37. begin
  38. forwardsallowed:=false;
  39. { ^M means a string or a char, because we don't parse a }
  40. { type declaration }
  41. ignore_equal:=false;
  42. { we didn't parse a object or class declaration }
  43. { and no function header }
  44. testcurobject:=0;
  45. { a long time, this was forgotten }
  46. aktprocsym:=nil;
  47. current_module:=nil;
  48. loaded_units.init;
  49. usedunits.init;
  50. { global switches }
  51. aktglobalswitches:=initglobalswitches;
  52. { memory sizes }
  53. if heapsize=0 then
  54. heapsize:=target_info.heapsize;
  55. if maxheapsize=0 then
  56. maxheapsize:=target_info.maxheapsize;
  57. if stacksize=0 then
  58. stacksize:=target_info.stacksize;
  59. end;
  60. procedure doneparser;
  61. begin
  62. loaded_units.done;
  63. usedunits.done;
  64. end;
  65. procedure default_macros;
  66. var
  67. hp : pstring_item;
  68. begin
  69. { commandline }
  70. hp:=pstring_item(initdefines.first);
  71. while assigned(hp) do
  72. begin
  73. def_macro(hp^.str^);
  74. hp:=pstring_item(hp^.next);
  75. end;
  76. { set macros for version checking }
  77. set_macro('FPC_VERSION',version_nr);
  78. set_macro('FPC_RELEASE',release_nr);
  79. set_macro('FPC_PATCH',patch_nr);
  80. end;
  81. procedure compile(const filename:string;compile_system:boolean);
  82. var
  83. { scanner }
  84. oldidtoken,
  85. oldtoken : ttoken;
  86. oldtokenpos : tfileposinfo;
  87. oldc : char;
  88. oldpattern,
  89. oldorgpattern : string;
  90. old_block_type : tblock_type;
  91. oldcurrent_scanner,prev_scanner,
  92. scanner : pscannerfile;
  93. { symtable }
  94. oldmacros,
  95. oldrefsymtable,
  96. oldsymtablestack : psymtable;
  97. oldprocprefix : string;
  98. oldaktprocsym : pprocsym;
  99. { cg }
  100. oldnextlabelnr : longint;
  101. oldparse_only : boolean;
  102. { asmlists }
  103. oldimports,
  104. oldexports,
  105. oldresource,
  106. oldrttilist,
  107. oldbsssegment,
  108. olddatasegment,
  109. oldcodesegment,
  110. oldexprasmlist,
  111. olddebuglist,
  112. oldinternals,
  113. oldexternals,
  114. oldconsts : paasmoutput;
  115. { akt.. things }
  116. oldaktlocalswitches : tlocalswitches;
  117. oldaktmoduleswitches : tmoduleswitches;
  118. oldaktfilepos : tfileposinfo;
  119. oldaktpackrecords : word;
  120. oldaktoutputformat : tasm;
  121. oldaktoptprocessor : tprocessors;
  122. oldaktasmmode : tasmmode;
  123. {$ifdef usebrowser}
  124. {$ifdef dummydebug}
  125. hp : pmodule;
  126. {$endif debug}
  127. {$endif usebrowser}
  128. begin
  129. inc(compile_level);
  130. { save symtable state }
  131. oldsymtablestack:=symtablestack;
  132. oldrefsymtable:=refsymtable;
  133. oldmacros:=macros;
  134. oldprocprefix:=procprefix;
  135. oldaktprocsym:=aktprocsym;
  136. { save scanner state }
  137. oldc:=c;
  138. oldpattern:=pattern;
  139. oldorgpattern:=orgpattern;
  140. oldtoken:=token;
  141. oldidtoken:=idtoken;
  142. old_block_type:=block_type;
  143. oldtokenpos:=tokenpos;
  144. oldcurrent_scanner:=current_scanner;
  145. { save cg }
  146. oldnextlabelnr:=nextlabelnr;
  147. oldparse_only:=parse_only;
  148. { save assembler lists }
  149. olddatasegment:=datasegment;
  150. oldbsssegment:=bsssegment;
  151. oldcodesegment:=codesegment;
  152. olddebuglist:=debuglist;
  153. oldexternals:=externals;
  154. oldinternals:=internals;
  155. oldconsts:=consts;
  156. oldrttilist:=rttilist;
  157. oldexprasmlist:=exprasmlist;
  158. oldimports:=importssection;
  159. oldexports:=exportssection;
  160. oldresource:=resourcesection;
  161. { save akt... state }
  162. oldaktlocalswitches:=aktlocalswitches;
  163. oldaktmoduleswitches:=aktmoduleswitches;
  164. oldaktpackrecords:=aktpackrecords;
  165. oldaktoutputformat:=aktoutputformat;
  166. oldaktoptprocessor:=aktoptprocessor;
  167. oldaktasmmode:=aktasmmode;
  168. oldaktfilepos:=aktfilepos;
  169. { show info }
  170. Message1(parser_i_compiling,filename);
  171. { reset symtable }
  172. symtablestack:=nil;
  173. defaultsymtablestack:=nil;
  174. systemunit:=nil;
  175. objpasunit:=nil;
  176. refsymtable:=nil;
  177. aktprocsym:=nil;
  178. procprefix:='';
  179. registerdef:=true;
  180. { macros }
  181. macros:=new(psymtable,init(macrosymtable));
  182. macros^.name:=stringdup('Conditionals for '+filename);
  183. default_macros;
  184. { reset the unit or create a new program }
  185. if assigned(current_module) then
  186. begin
  187. {current_module^.reset this is wrong !! }
  188. scanner:=current_module^.scanner;
  189. current_module^.reset;
  190. current_module^.scanner:=scanner;
  191. end
  192. else
  193. begin
  194. current_module:=new(pmodule,init(filename,false));
  195. main_module:=current_module;
  196. end;
  197. { Load current state from the init values }
  198. aktlocalswitches:=initlocalswitches;
  199. aktmoduleswitches:=initmoduleswitches;
  200. aktmodeswitches:=initmodeswitches;
  201. aktpackrecords:=initpackrecords;
  202. aktpackenum:=initpackenum;
  203. aktoutputformat:=initoutputformat;
  204. aktoptprocessor:=initoptprocessor;
  205. aktasmmode:=initasmmode;
  206. { we need this to make the system unit }
  207. if compile_system then
  208. aktmoduleswitches:=aktmoduleswitches+[cs_compilesystem];
  209. { startup scanner, and save in current_module }
  210. current_scanner:=new(pscannerfile,Init(filename));
  211. current_scanner^.readtoken;
  212. prev_scanner:=current_module^.scanner;
  213. current_module^.scanner:=current_scanner;
  214. { init code generator for a new module }
  215. codegen_newmodule;
  216. { Handle things which need to be once }
  217. if (compile_level=1) then
  218. begin
  219. { open assembler response }
  220. AsmRes.Init('ppas');
  221. end;
  222. { If the compile level > 1 we get a nice "unit expected" error
  223. message if we are trying to use a program as unit.}
  224. if (token=_UNIT) or (compile_level>1) then
  225. begin
  226. current_module^.is_unit:=true;
  227. proc_unit;
  228. end
  229. else
  230. proc_program(token=_LIBRARY);
  231. { clear memory }
  232. {$ifdef Splitheap}
  233. if testsplit then
  234. begin
  235. { temp heap should be empty after that !!!}
  236. codegen_donemodule;
  237. Releasetempheap;
  238. end;
  239. {$endif Splitheap}
  240. { restore old state, close trees, > 0.99.5 has heapblocks, so
  241. it's the default to release the trees }
  242. codegen_donemodule;
  243. { free ppu }
  244. if assigned(current_module^.ppufile) then
  245. begin
  246. dispose(current_module^.ppufile,done);
  247. current_module^.ppufile:=nil;
  248. end;
  249. { free scanner }
  250. dispose(current_scanner,done);
  251. { restore previous scanner !! }
  252. current_module^.scanner:=prev_scanner;
  253. if assigned(prev_scanner) then
  254. prev_scanner^.invalid:=true;
  255. { free macros }
  256. {!!! No check for unused macros yet !!! }
  257. dispose(macros,done);
  258. if (compile_level>1) then
  259. begin
  260. { reset ranges/stabs in exported definitions }
  261. reset_global_defs;
  262. { restore scanner }
  263. c:=oldc;
  264. pattern:=oldpattern;
  265. orgpattern:=oldorgpattern;
  266. token:=oldtoken;
  267. idtoken:=oldidtoken;
  268. tokenpos:=oldtokenpos;
  269. block_type:=old_block_type;
  270. current_scanner:=oldcurrent_scanner;
  271. { restore cg }
  272. nextlabelnr:=oldnextlabelnr;
  273. parse_only:=oldparse_only;
  274. { restore asmlists }
  275. exprasmlist:=oldexprasmlist;
  276. datasegment:=olddatasegment;
  277. bsssegment:=oldbsssegment;
  278. codesegment:=oldcodesegment;
  279. consts:=oldconsts;
  280. debuglist:=olddebuglist;
  281. externals:=oldexternals;
  282. internals:=oldinternals;
  283. importssection:=oldimports;
  284. exportssection:=oldexports;
  285. resourcesection:=oldresource;
  286. rttilist:=oldrttilist;
  287. { restore symtable state }
  288. refsymtable:=oldrefsymtable;
  289. symtablestack:=oldsymtablestack;
  290. macros:=oldmacros;
  291. aktprocsym:=oldaktprocsym;
  292. procprefix:=oldprocprefix;
  293. aktlocalswitches:=oldaktlocalswitches;
  294. aktmoduleswitches:=oldaktmoduleswitches;
  295. aktpackrecords:=oldaktpackrecords;
  296. aktoutputformat:=oldaktoutputformat;
  297. aktoptprocessor:=oldaktoptprocessor;
  298. aktasmmode:=oldaktasmmode;
  299. aktfilepos:=oldaktfilepos;
  300. end;
  301. { Shut down things when the last file is compiled }
  302. if (compile_level=1) then
  303. begin
  304. { Close script }
  305. if (not AsmRes.Empty) then
  306. begin
  307. Message1(exec_i_closing_script,AsmRes.Fn);
  308. AsmRes.WriteToDisk;
  309. end;
  310. {$ifdef UseBrowser}
  311. { Write Browser }
  312. {$ifdef dummydebug}
  313. hp:=pmodule(loaded_units.first);
  314. while assigned(hp) do
  315. begin
  316. writeln('Unit ',hp^.modulename^,' has index ',hp^.unit_index);
  317. hp:=pmodule(hp^.next);
  318. end;
  319. {$endif dummydebug}
  320. if cs_browser in aktmoduleswitches then
  321. if Browse.elements_to_list^.empty then
  322. begin
  323. Message1(parser_i_writing_browser_log,Browse.Fname);
  324. write_browser_log;
  325. end
  326. else
  327. Browse.list_elements;
  328. {$endif UseBrowser}
  329. if assigned(aktprocsym) then
  330. begin
  331. if (aktprocsym^.owner=nil) then
  332. begin
  333. { init parts are not needed in units !! }
  334. if current_module^.is_unit then
  335. aktprocsym^.definition^.forwarddef:=false;
  336. dispose(aktprocsym,done);
  337. end;
  338. end;
  339. end;
  340. dec(compile_level);
  341. end;
  342. end.
  343. {
  344. $Log$
  345. Revision 1.58 1998-10-16 08:50:02 peter
  346. * reset_gdb_info -> reset_global_def becuase it also resets rangenr !
  347. Revision 1.57 1998/10/08 17:17:23 pierre
  348. * current_module old scanner tagged as invalid if unit is recompiled
  349. + added ppheap for better info on tracegetmem of heaptrc
  350. (adds line column and file index)
  351. * several memory leaks removed ith help of heaptrc !!
  352. Revision 1.56 1998/10/08 13:48:45 peter
  353. * fixed memory leaks for do nothing source
  354. * fixed unit interdependency
  355. Revision 1.55 1998/10/06 17:16:53 pierre
  356. * some memory leaks fixed (thanks to Peter for heaptrc !)
  357. Revision 1.54 1998/10/05 21:33:23 peter
  358. * fixed 161,165,166,167,168
  359. Revision 1.53 1998/09/30 16:43:36 peter
  360. * fixed unit interdependency with circular uses
  361. Revision 1.52 1998/09/28 16:57:22 pierre
  362. * changed all length(p^.value_str^) into str_length(p)
  363. to get it work with and without ansistrings
  364. * changed sourcefiles field of tmodule to a pointer
  365. Revision 1.51 1998/09/26 17:45:30 peter
  366. + idtoken and only one token table
  367. Revision 1.50 1998/09/24 23:49:08 peter
  368. + aktmodeswitches
  369. Revision 1.49 1998/09/23 15:39:07 pierre
  370. * browser bugfixes
  371. was adding a reference when looking for the symbol
  372. if -bSYM_NAME was used
  373. Revision 1.48 1998/09/22 17:13:48 pierre
  374. + browsing updated and developed
  375. records and objects fields are also stored
  376. Revision 1.47 1998/09/21 09:00:18 peter
  377. * reset_gdb_info only when debuginfo is set
  378. Revision 1.46 1998/09/21 08:45:12 pierre
  379. + added vmt_offset in tobjectdef.write for fututre use
  380. (first steps to have objects without vmt if no virtual !!)
  381. + added fpu_used field for tabstractprocdef :
  382. sets this level to 2 if the functions return with value in FPU
  383. (is then set to correct value at parsing of implementation)
  384. THIS MIGHT refuse some code with FPU expression too complex
  385. that were accepted before and even in some cases
  386. that don't overflow in fact
  387. ( like if f : float; is a forward that finally in implementation
  388. only uses one fpu register !!)
  389. Nevertheless I think that it will improve security on
  390. FPU operations !!
  391. * most other changes only for UseBrowser code
  392. (added symtable references for record and objects)
  393. local switch for refs to args and local of each function
  394. (static symtable still missing)
  395. UseBrowser still not stable and probably broken by
  396. the definition hash array !!
  397. Revision 1.45 1998/09/18 08:01:35 pierre
  398. + improvement on the usebrowser part
  399. (does not work correctly for now)
  400. Revision 1.44 1998/09/10 15:25:34 daniel
  401. + Added maxheapsize.
  402. * Corrected semi-bug in calling the assembler and the linker
  403. Revision 1.43 1998/09/09 15:33:06 peter
  404. * fixed in_global to allow directives also after interface token
  405. Revision 1.42 1998/09/04 08:41:59 peter
  406. * updated some error messages
  407. Revision 1.41 1998/09/01 12:53:24 peter
  408. + aktpackenum
  409. Revision 1.40 1998/09/01 07:54:19 pierre
  410. * UseBrowser a little updated (might still be buggy !!)
  411. * bug in psub.pas in function specifier removed
  412. * stdcall allowed in interface and in implementation
  413. (FPC will not yet complain if it is missing in either part
  414. because stdcall is only a dummy !!)
  415. Revision 1.39 1998/08/26 10:07:09 peter
  416. * dispose trees is now default for all > 0.99.5 compiles
  417. Revision 1.38 1998/08/18 20:52:20 peter
  418. * renamed in_main to in_global which is more logical
  419. Revision 1.37 1998/08/17 09:17:49 peter
  420. * static/shared linking updates
  421. Revision 1.36 1998/08/14 21:56:36 peter
  422. * setting the outputfile using -o works now to create static libs
  423. Revision 1.35 1998/08/12 19:22:09 peter
  424. * reset also the link* lists when recompiling an existing unit
  425. Revision 1.34 1998/08/10 23:58:56 peter
  426. * fixed asmlist dispose for 0.99.5
  427. Revision 1.33 1998/08/10 14:50:07 peter
  428. + localswitches, moduleswitches, globalswitches splitting
  429. Revision 1.32 1998/08/10 10:18:28 peter
  430. + Compiler,Comphook unit which are the new interface units to the
  431. compiler
  432. Revision 1.31 1998/07/14 21:46:46 peter
  433. * updated messages file
  434. Revision 1.30 1998/07/14 14:46:49 peter
  435. * released NEWINPUT
  436. Revision 1.29 1998/07/07 11:19:59 peter
  437. + NEWINPUT for a better inputfile and scanner object
  438. Revision 1.28 1998/06/25 11:15:33 pierre
  439. * ppu files where not closed in newppu !!
  440. second compilation was impossible due to too many opened files
  441. (not visible in 'make cycle' as we remove all the ppu files)
  442. Revision 1.27 1998/06/17 14:10:15 peter
  443. * small os2 fixes
  444. * fixed interdependent units with newppu (remake3 under linux works now)
  445. Revision 1.26 1998/06/16 08:56:23 peter
  446. + targetcpu
  447. * cleaner pmodules for newppu
  448. Revision 1.25 1998/06/15 15:38:07 pierre
  449. * small bug in systems.pas corrected
  450. + operators in different units better hanlded
  451. Revision 1.24 1998/06/13 00:10:08 peter
  452. * working browser and newppu
  453. * some small fixes against crashes which occured in bp7 (but not in
  454. fpc?!)
  455. Revision 1.23 1998/06/08 22:59:48 peter
  456. * smartlinking works for win32
  457. * some defines to exclude some compiler parts
  458. Revision 1.22 1998/06/05 17:47:28 peter
  459. * some better uses clauses
  460. Revision 1.21 1998/06/04 23:51:49 peter
  461. * m68k compiles
  462. + .def file creation moved to gendef.pas so it could also be used
  463. for win32
  464. Revision 1.20 1998/06/03 22:48:55 peter
  465. + wordbool,longbool
  466. * rename bis,von -> high,low
  467. * moved some systemunit loading/creating to psystem.pas
  468. Revision 1.19 1998/05/27 19:45:04 peter
  469. * symtable.pas splitted into includefiles
  470. * symtable adapted for $ifdef NEWPPU
  471. Revision 1.18 1998/05/23 01:21:15 peter
  472. + aktasmmode, aktoptprocessor, aktoutputformat
  473. + smartlink per module $SMARTLINK-/+ (like MMX) and moved to aktswitches
  474. + $LIBNAME to set the library name where the unit will be put in
  475. * splitted cgi386 a bit (codeseg to large for bp7)
  476. * nasm, tasm works again. nasm moved to ag386nsm.pas
  477. Revision 1.17 1998/05/20 09:42:34 pierre
  478. + UseTokenInfo now default
  479. * unit in interface uses and implementation uses gives error now
  480. * only one error for unknown symbol (uses lastsymknown boolean)
  481. the problem came from the label code !
  482. + first inlined procedures and function work
  483. (warning there might be allowed cases were the result is still wrong !!)
  484. * UseBrower updated gives a global list of all position of all used symbols
  485. with switch -gb
  486. Revision 1.16 1998/05/12 10:47:00 peter
  487. * moved printstatus to verb_def
  488. + V_Normal which is between V_Error and V_Warning and doesn't have a
  489. prefix like error: warning: and is included in V_Default
  490. * fixed some messages
  491. * first time parameter scan is only for -v and -T
  492. - removed old style messages
  493. Revision 1.15 1998/05/11 13:07:54 peter
  494. + $ifdef NEWPPU for the new ppuformat
  495. + $define GDB not longer required
  496. * removed all warnings and stripped some log comments
  497. * no findfirst/findnext anymore to remove smartlink *.o files
  498. Revision 1.14 1998/05/06 18:36:53 peter
  499. * tai_section extended with code,data,bss sections and enumerated type
  500. * ident 'compiled by FPC' moved to pmodules
  501. * small fix for smartlink
  502. Revision 1.13 1998/05/06 08:38:42 pierre
  503. * better position info with UseTokenInfo
  504. UseTokenInfo greatly simplified
  505. + added check for changed tree after first time firstpass
  506. (if we could remove all the cases were it happen
  507. we could skip all firstpass if firstpasscount > 1)
  508. Only with ExtDebug
  509. Revision 1.12 1998/05/04 17:54:28 peter
  510. + smartlinking works (only case jumptable left todo)
  511. * redesign of systems.pas to support assemblers and linkers
  512. + Unitname is now also in the PPU-file, increased version to 14
  513. Revision 1.11 1998/05/01 16:38:45 florian
  514. * handling of private and protected fixed
  515. + change_keywords_to_tp implemented to remove
  516. keywords which aren't supported by tp
  517. * break and continue are now symbols of the system unit
  518. + widestring, longstring and ansistring type released
  519. Revision 1.10 1998/05/01 07:43:56 florian
  520. + basics for rtti implemented
  521. + switch $m (generate rtti for published sections)
  522. Revision 1.9 1998/04/30 15:59:40 pierre
  523. * GDB works again better :
  524. correct type info in one pass
  525. + UseTokenInfo for better source position
  526. * fixed one remaining bug in scanner for line counts
  527. * several little fixes
  528. Revision 1.8 1998/04/29 10:33:55 pierre
  529. + added some code for ansistring (not complete nor working yet)
  530. * corrected operator overloading
  531. * corrected nasm output
  532. + started inline procedures
  533. + added starstarn : use ** for exponentiation (^ gave problems)
  534. + started UseTokenInfo cond to get accurate positions
  535. Revision 1.7 1998/04/27 23:10:28 peter
  536. + new scanner
  537. * $makelib -> if smartlink
  538. * small filename fixes pmodule.setfilename
  539. * moved import from files.pas -> import.pas
  540. Revision 1.6 1998/04/21 10:16:48 peter
  541. * patches from strasbourg
  542. * objects is not used anymore in the fpc compiled version
  543. Revision 1.5 1998/04/10 14:41:43 peter
  544. * removed some Hints
  545. * small speed optimization for AsmLn
  546. Revision 1.4 1998/04/08 16:58:03 pierre
  547. * several bugfixes
  548. ADD ADC and AND are also sign extended
  549. nasm output OK (program still crashes at end
  550. and creates wrong assembler files !!)
  551. procsym types sym in tdef removed !!
  552. Revision 1.3 1998/04/07 22:45:04 florian
  553. * bug0092, bug0115 and bug0121 fixed
  554. + packed object/class/array
  555. }