A MiniC++ (C++ subset) compiler for a course.

main.annot 22KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367
  1. "main.ml" 13 379 383 "main.ml" 13 379 393
  2. type(
  3. bool ref
  4. )
  5. ident(
  6. def parse_only "main.ml" 14 406 406 "main.ml" 1 0 -1
  7. )
  8. "main.ml" 13 379 396 "main.ml" 13 379 399
  9. type(
  10. bool -> bool ref
  11. )
  12. ident(
  13. ext_ref Pervasives.ref
  14. )
  15. "main.ml" 13 379 400 "main.ml" 13 379 405
  16. type(
  17. bool
  18. )
  19. "main.ml" 13 379 396 "main.ml" 13 379 405
  20. type(
  21. bool ref
  22. )
  23. "main.ml" 14 406 410 "main.ml" 14 406 419
  24. type(
  25. bool ref
  26. )
  27. ident(
  28. def type_only "main.ml" 17 479 479 "main.ml" 1 0 -1
  29. )
  30. "main.ml" 14 406 422 "main.ml" 14 406 425
  31. type(
  32. bool -> bool ref
  33. )
  34. ident(
  35. ext_ref Pervasives.ref
  36. )
  37. "main.ml" 14 406 426 "main.ml" 14 406 431
  38. type(
  39. bool
  40. )
  41. "main.ml" 14 406 422 "main.ml" 14 406 431
  42. type(
  43. bool ref
  44. )
  45. "main.ml" 17 479 483 "main.ml" 17 479 488
  46. type(
  47. string ref
  48. )
  49. ident(
  50. def ifile "main.ml" 18 498 498 "main.ml" 1 0 -1
  51. )
  52. "main.ml" 17 479 491 "main.ml" 17 479 494
  53. type(
  54. string -> string ref
  55. )
  56. ident(
  57. ext_ref Pervasives.ref
  58. )
  59. "main.ml" 17 479 495 "main.ml" 17 479 497
  60. type(
  61. string
  62. )
  63. "main.ml" 17 479 491 "main.ml" 17 479 497
  64. type(
  65. string ref
  66. )
  67. "main.ml" 18 498 502 "main.ml" 18 498 507
  68. type(
  69. string ref
  70. )
  71. ident(
  72. def ofile "main.ml" 20 518 518 "main.ml" 1 0 -1
  73. )
  74. "main.ml" 18 498 510 "main.ml" 18 498 513
  75. type(
  76. string -> string ref
  77. )
  78. ident(
  79. ext_ref Pervasives.ref
  80. )
  81. "main.ml" 18 498 514 "main.ml" 18 498 516
  82. type(
  83. string
  84. )
  85. "main.ml" 18 498 510 "main.ml" 18 498 516
  86. type(
  87. string ref
  88. )
  89. "main.ml" 20 518 522 "main.ml" 20 518 530
  90. type(
  91. 'a ref -> 'a -> unit
  92. )
  93. ident(
  94. def set_file "main.ml" 23 620 620 "main.ml" 1 0 -1
  95. )
  96. "main.ml" 20 518 531 "main.ml" 20 518 532
  97. type(
  98. 'a ref
  99. )
  100. ident(
  101. def f "main.ml" 20 518 533 "main.ml" 20 518 543
  102. )
  103. "main.ml" 20 518 533 "main.ml" 20 518 534
  104. type(
  105. 'a
  106. )
  107. ident(
  108. def s "main.ml" 20 518 537 "main.ml" 20 518 543
  109. )
  110. "main.ml" 20 518 537 "main.ml" 20 518 538
  111. type(
  112. 'a ref
  113. )
  114. ident(
  115. int_ref f "main.ml" 20 518 531 "main.ml" 20 518 532
  116. )
  117. "main.ml" 20 518 539 "main.ml" 20 518 541
  118. type(
  119. 'a ref -> 'a -> unit
  120. )
  121. ident(
  122. ext_ref Pervasives.( := )
  123. )
  124. "main.ml" 20 518 542 "main.ml" 20 518 543
  125. type(
  126. 'a
  127. )
  128. ident(
  129. int_ref s "main.ml" 20 518 533 "main.ml" 20 518 534
  130. )
  131. "main.ml" 20 518 537 "main.ml" 20 518 543
  132. type(
  133. unit
  134. )
  135. "main.ml" 23 620 624 "main.ml" 23 620 631
  136. type(
  137. (string * Arg.spec * string) list
  138. )
  139. ident(
  140. def options "main.ml" 29 842 842 "main.ml" 1 0 -1
  141. )
  142. "main.ml" 24 634 638 "main.ml" 24 634 652
  143. type(
  144. string
  145. )
  146. "main.ml" 24 634 662 "main.ml" 24 634 672
  147. type(
  148. bool ref
  149. )
  150. ident(
  151. int_ref parse_only "main.ml" 13 379 383 "main.ml" 13 379 393
  152. )
  153. "main.ml" 24 634 654 "main.ml" 24 634 672
  154. type(
  155. Arg.spec
  156. )
  157. "main.ml" 25 674 694 "main.ml" 25 674 745
  158. type(
  159. string
  160. )
  161. "main.ml" 24 634 637 "main.ml" 25 674 746
  162. type(
  163. string * Arg.spec * string
  164. )
  165. "main.ml" 26 748 752 "main.ml" 26 748 765
  166. type(
  167. string
  168. )
  169. "main.ml" 26 748 775 "main.ml" 26 748 784
  170. type(
  171. bool ref
  172. )
  173. ident(
  174. int_ref type_only "main.ml" 14 406 410 "main.ml" 14 406 419
  175. )
  176. "main.ml" 26 748 767 "main.ml" 26 748 784
  177. type(
  178. Arg.spec
  179. )
  180. "main.ml" 26 748 786 "main.ml" 26 748 835
  181. type(
  182. string
  183. )
  184. "main.ml" 26 748 751 "main.ml" 26 748 836
  185. type(
  186. string * Arg.spec * string
  187. )
  188. "main.ml" 24 634 636 "main.ml" 27 837 840
  189. type(
  190. (string * Arg.spec * string) list
  191. )
  192. "main.ml" 29 842 846 "main.ml" 29 842 851
  193. type(
  194. string
  195. )
  196. ident(
  197. def usage "main.ml" 32 952 952 "main.ml" 1 0 -1
  198. )
  199. "main.ml" 29 842 854 "main.ml" 29 842 888
  200. type(
  201. string
  202. )
  203. "main.ml" 32 952 956 "main.ml" 32 952 968
  204. type(
  205. Lexing.position -> unit
  206. )
  207. ident(
  208. def localisation "main.ml" 37 1117 1117 "main.ml" 1 0 -1
  209. )
  210. "main.ml" 32 952 969 "main.ml" 32 952 972
  211. type(
  212. Lexing.position
  213. )
  214. ident(
  215. def pos "main.ml" 33 975 977 "main.ml" 35 1045 1115
  216. )
  217. "main.ml" 33 975 981 "main.ml" 33 975 982
  218. type(
  219. int
  220. )
  221. ident(
  222. def l "main.ml" 34 1001 1003 "main.ml" 35 1045 1115
  223. )
  224. "main.ml" 33 975 985 "main.ml" 33 975 988
  225. type(
  226. Lexing.position
  227. )
  228. ident(
  229. int_ref pos "main.ml" 32 952 969 "main.ml" 32 952 972
  230. )
  231. "main.ml" 33 975 985 "main.ml" 33 975 997
  232. type(
  233. int
  234. )
  235. "main.ml" 34 1001 1007 "main.ml" 34 1001 1008
  236. type(
  237. int
  238. )
  239. ident(
  240. def c "main.ml" 35 1045 1047 "main.ml" 35 1045 1115
  241. )
  242. "main.ml" 34 1001 1011 "main.ml" 34 1001 1014
  243. type(
  244. Lexing.position
  245. )
  246. ident(
  247. int_ref pos "main.ml" 32 952 969 "main.ml" 32 952 972
  248. )
  249. "main.ml" 34 1001 1011 "main.ml" 34 1001 1023
  250. type(
  251. int
  252. )
  253. "main.ml" 34 1001 1024 "main.ml" 34 1001 1025
  254. type(
  255. int -> int -> int
  256. )
  257. ident(
  258. ext_ref Pervasives.( - )
  259. )
  260. "main.ml" 34 1001 1026 "main.ml" 34 1001 1029
  261. type(
  262. Lexing.position
  263. )
  264. ident(
  265. int_ref pos "main.ml" 32 952 969 "main.ml" 32 952 972
  266. )
  267. "main.ml" 34 1001 1026 "main.ml" 34 1001 1037
  268. type(
  269. int
  270. )
  271. "main.ml" 34 1001 1011 "main.ml" 34 1001 1037
  272. type(
  273. int
  274. )
  275. "main.ml" 34 1001 1038 "main.ml" 34 1001 1039
  276. type(
  277. int -> int -> int
  278. )
  279. ident(
  280. ext_ref Pervasives.( + )
  281. )
  282. "main.ml" 34 1001 1040 "main.ml" 34 1001 1041
  283. type(
  284. int
  285. )
  286. "main.ml" 34 1001 1011 "main.ml" 34 1001 1041
  287. type(
  288. int
  289. )
  290. "main.ml" 35 1045 1047 "main.ml" 35 1045 1054
  291. type(
  292. (string -> int -> int -> int -> unit, Format.formatter, unit) format ->
  293. string -> int -> int -> int -> unit
  294. )
  295. ident(
  296. ext_ref Format.eprintf
  297. )
  298. "main.ml" 35 1045 1055 "main.ml" 35 1045 1098
  299. type(
  300. (string -> int -> int -> int -> unit, Format.formatter, unit) format
  301. )
  302. "main.ml" 35 1045 1099 "main.ml" 35 1045 1100
  303. type(
  304. string ref -> string
  305. )
  306. ident(
  307. ext_ref Pervasives.( ! )
  308. )
  309. "main.ml" 35 1045 1100 "main.ml" 35 1045 1105
  310. type(
  311. string ref
  312. )
  313. ident(
  314. int_ref ifile "main.ml" 17 479 483 "main.ml" 17 479 488
  315. )
  316. "main.ml" 35 1045 1099 "main.ml" 35 1045 1105
  317. type(
  318. string
  319. )
  320. "main.ml" 35 1045 1106 "main.ml" 35 1045 1107
  321. type(
  322. int
  323. )
  324. ident(
  325. int_ref l "main.ml" 33 975 981 "main.ml" 33 975 982
  326. )
  327. "main.ml" 35 1045 1109 "main.ml" 35 1045 1110
  328. type(
  329. int
  330. )
  331. ident(
  332. int_ref c "main.ml" 34 1001 1007 "main.ml" 34 1001 1008
  333. )
  334. "main.ml" 35 1045 1110 "main.ml" 35 1045 1111
  335. type(
  336. int -> int -> int
  337. )
  338. ident(
  339. ext_ref Pervasives.( - )
  340. )
  341. "main.ml" 35 1045 1111 "main.ml" 35 1045 1112
  342. type(
  343. int
  344. )
  345. "main.ml" 35 1045 1108 "main.ml" 35 1045 1113
  346. type(
  347. int
  348. )
  349. "main.ml" 35 1045 1114 "main.ml" 35 1045 1115
  350. type(
  351. int
  352. )
  353. ident(
  354. int_ref c "main.ml" 34 1001 1007 "main.ml" 34 1001 1008
  355. )
  356. "main.ml" 35 1045 1047 "main.ml" 35 1045 1115
  357. call(
  358. tail
  359. )
  360. type(
  361. unit
  362. )
  363. "main.ml" 34 1001 1003 "main.ml" 35 1045 1115
  364. type(
  365. unit
  366. )
  367. "main.ml" 33 975 977 "main.ml" 35 1045 1115
  368. type(
  369. unit
  370. )
  371. "main.ml" 37 1117 1121 "main.ml" 37 1117 1123
  372. type(
  373. unit
  374. )
  375. "main.ml" 39 1166 1168 "main.ml" 39 1166 1177
  376. type(
  377. (Arg.key * Arg.spec * Arg.doc) list ->
  378. Arg.anon_fun -> Arg.usage_msg -> unit
  379. )
  380. ident(
  381. ext_ref Arg.parse
  382. )
  383. "main.ml" 39 1166 1178 "main.ml" 39 1166 1185
  384. type(
  385. (Arg.key * Arg.spec * Arg.doc) list
  386. )
  387. ident(
  388. int_ref options "main.ml" 23 620 624 "main.ml" 23 620 631
  389. )
  390. "main.ml" 39 1166 1187 "main.ml" 39 1166 1195
  391. type(
  392. string ref -> Arg.anon_fun
  393. )
  394. ident(
  395. int_ref set_file "main.ml" 20 518 522 "main.ml" 20 518 530
  396. )
  397. "main.ml" 39 1166 1196 "main.ml" 39 1166 1201
  398. type(
  399. string ref
  400. )
  401. ident(
  402. int_ref ifile "main.ml" 17 479 483 "main.ml" 17 479 488
  403. )
  404. "main.ml" 39 1166 1186 "main.ml" 39 1166 1202
  405. call(
  406. stack
  407. )
  408. type(
  409. Arg.anon_fun
  410. )
  411. "main.ml" 39 1166 1203 "main.ml" 39 1166 1208
  412. type(
  413. Arg.usage_msg
  414. )
  415. ident(
  416. int_ref usage "main.ml" 29 842 846 "main.ml" 29 842 851
  417. )
  418. "main.ml" 39 1166 1168 "main.ml" 39 1166 1208
  419. call(
  420. stack
  421. )
  422. type(
  423. unit
  424. )
  425. "main.ml" 42 1278 1283 "main.ml" 42 1278 1284
  426. type(
  427. string ref -> string
  428. )
  429. ident(
  430. ext_ref Pervasives.( ! )
  431. )
  432. "main.ml" 42 1278 1284 "main.ml" 42 1278 1289
  433. type(
  434. string ref
  435. )
  436. ident(
  437. int_ref ifile "main.ml" 17 479 483 "main.ml" 17 479 488
  438. )
  439. "main.ml" 42 1278 1283 "main.ml" 42 1278 1289
  440. type(
  441. string
  442. )
  443. "main.ml" 42 1278 1290 "main.ml" 42 1278 1291
  444. type(
  445. string -> string -> bool
  446. )
  447. ident(
  448. ext_ref Pervasives.( = )
  449. )
  450. "main.ml" 42 1278 1292 "main.ml" 42 1278 1294
  451. type(
  452. string
  453. )
  454. "main.ml" 42 1278 1283 "main.ml" 42 1278 1294
  455. type(
  456. bool
  457. )
  458. "main.ml" 42 1278 1306 "main.ml" 42 1278 1313
  459. type(
  460. (unit, Format.formatter, unit) format -> unit
  461. )
  462. ident(
  463. ext_ref Format.eprintf
  464. )
  465. "main.ml" 42 1278 1314 "main.ml" 42 1278 1344
  466. type(
  467. (unit, Format.formatter, unit) format
  468. )
  469. "main.ml" 42 1278 1306 "main.ml" 42 1278 1344
  470. call(
  471. stack
  472. )
  473. type(
  474. unit
  475. )
  476. "main.ml" 42 1278 1346 "main.ml" 42 1278 1350
  477. type(
  478. int -> unit
  479. )
  480. ident(
  481. ext_ref Pervasives.exit
  482. )
  483. "main.ml" 42 1278 1351 "main.ml" 42 1278 1352
  484. type(
  485. int
  486. )
  487. "main.ml" 42 1278 1346 "main.ml" 42 1278 1352
  488. call(
  489. stack
  490. )
  491. type(
  492. unit
  493. )
  494. "main.ml" 42 1278 1300 "main.ml" 42 1278 1356
  495. type(
  496. unit
  497. )
  498. "main.ml" 42 1278 1280 "main.ml" 42 1278 1356
  499. type(
  500. unit
  501. )
  502. "main.ml" 45 1406 1411 "main.ml" 45 1406 1414
  503. type(
  504. bool -> bool
  505. )
  506. ident(
  507. ext_ref Pervasives.not
  508. )
  509. "main.ml" 45 1406 1416 "main.ml" 45 1406 1437
  510. type(
  511. string -> string -> bool
  512. )
  513. ident(
  514. ext_ref Filename.check_suffix
  515. )
  516. "main.ml" 45 1406 1438 "main.ml" 45 1406 1439
  517. type(
  518. string ref -> string
  519. )
  520. ident(
  521. ext_ref Pervasives.( ! )
  522. )
  523. "main.ml" 45 1406 1439 "main.ml" 45 1406 1444
  524. type(
  525. string ref
  526. )
  527. ident(
  528. int_ref ifile "main.ml" 17 479 483 "main.ml" 17 479 488
  529. )
  530. "main.ml" 45 1406 1438 "main.ml" 45 1406 1444
  531. type(
  532. string
  533. )
  534. "main.ml" 45 1406 1445 "main.ml" 45 1406 1451
  535. type(
  536. string
  537. )
  538. "main.ml" 45 1406 1415 "main.ml" 45 1406 1452
  539. call(
  540. stack
  541. )
  542. type(
  543. bool
  544. )
  545. "main.ml" 45 1406 1411 "main.ml" 45 1406 1452
  546. type(
  547. bool
  548. )
  549. "main.ml" 46 1464 1468 "main.ml" 46 1464 1475
  550. type(
  551. (string -> unit, Format.formatter, unit) format -> string -> unit
  552. )
  553. ident(
  554. ext_ref Format.eprintf
  555. )
  556. "main.ml" 46 1464 1476 "main.ml" 46 1464 1532
  557. type(
  558. (string -> unit, Format.formatter, unit) format
  559. )
  560. "main.ml" 46 1464 1533 "main.ml" 46 1464 1534
  561. type(
  562. string ref -> string
  563. )
  564. ident(
  565. ext_ref Pervasives.( ! )
  566. )
  567. "main.ml" 46 1464 1534 "main.ml" 46 1464 1539
  568. type(
  569. string ref
  570. )
  571. ident(
  572. int_ref ifile "main.ml" 17 479 483 "main.ml" 17 479 488
  573. )
  574. "main.ml" 46 1464 1533 "main.ml" 46 1464 1539
  575. type(
  576. string
  577. )
  578. "main.ml" 46 1464 1468 "main.ml" 46 1464 1539
  579. call(
  580. stack
  581. )
  582. type(
  583. unit
  584. )
  585. "main.ml" 47 1541 1545 "main.ml" 47 1541 1554
  586. type(
  587. (Arg.key * Arg.spec * Arg.doc) list -> Arg.usage_msg -> unit
  588. )
  589. ident(
  590. ext_ref Arg.usage
  591. )
  592. "main.ml" 47 1541 1555 "main.ml" 47 1541 1562
  593. type(
  594. (Arg.key * Arg.spec * Arg.doc) list
  595. )
  596. ident(
  597. int_ref options "main.ml" 23 620 624 "main.ml" 23 620 631
  598. )
  599. "main.ml" 47 1541 1563 "main.ml" 47 1541 1568
  600. type(
  601. Arg.usage_msg
  602. )
  603. ident(
  604. int_ref usage "main.ml" 29 842 846 "main.ml" 29 842 851
  605. )
  606. "main.ml" 47 1541 1545 "main.ml" 47 1541 1568
  607. call(
  608. stack
  609. )
  610. type(
  611. unit
  612. )
  613. "main.ml" 48 1570 1574 "main.ml" 48 1570 1578
  614. type(
  615. int -> unit
  616. )
  617. ident(
  618. ext_ref Pervasives.exit
  619. )
  620. "main.ml" 48 1570 1579 "main.ml" 48 1570 1580
  621. type(
  622. int
  623. )
  624. "main.ml" 48 1570 1574 "main.ml" 48 1570 1580
  625. call(
  626. stack
  627. )
  628. type(
  629. unit
  630. )
  631. "main.ml" 47 1541 1545 "main.ml" 48 1570 1580
  632. type(
  633. unit
  634. )
  635. "main.ml" 45 1406 1458 "main.ml" 49 1581 1586
  636. type(
  637. unit
  638. )
  639. "main.ml" 45 1406 1408 "main.ml" 49 1581 1586
  640. type(
  641. unit
  642. )
  643. "main.ml" 52 1636 1642 "main.ml" 52 1636 1643
  644. type(
  645. in_channel
  646. )
  647. ident(
  648. def f "main.ml" 55 1803 1805 "main.ml" 97 3366 3380
  649. )
  650. "main.ml" 52 1636 1650 "main.ml" 52 1636 1657
  651. type(
  652. string -> in_channel
  653. )
  654. ident(
  655. ext_ref Pervasives.open_in
  656. )
  657. "main.ml" 52 1636 1658 "main.ml" 52 1636 1659
  658. type(
  659. string ref -> string
  660. )
  661. ident(
  662. ext_ref Pervasives.( ! )
  663. )
  664. "main.ml" 52 1636 1659 "main.ml" 52 1636 1664
  665. type(
  666. string ref
  667. )
  668. ident(
  669. int_ref ifile "main.ml" 17 479 483 "main.ml" 17 479 488
  670. )
  671. "main.ml" 52 1636 1658 "main.ml" 52 1636 1664
  672. type(
  673. string
  674. )
  675. "main.ml" 52 1636 1650 "main.ml" 52 1636 1664
  676. call(
  677. stack
  678. )
  679. type(
  680. in_channel
  681. )
  682. "main.ml" 52 1636 1680 "main.ml" 52 1636 1683
  683. type(
  684. string
  685. )
  686. ident(
  687. def msg "main.ml" 52 1636 1687 "main.ml" 52 1636 1750
  688. )
  689. "main.ml" 52 1636 1670 "main.ml" 52 1636 1683
  690. type(
  691. exn
  692. )
  693. "main.ml" 52 1636 1687 "main.ml" 52 1636 1694
  694. type(
  695. (string -> unit, Format.formatter, unit) format -> string -> unit
  696. )
  697. ident(
  698. ext_ref Format.eprintf
  699. )
  700. "main.ml" 52 1636 1695 "main.ml" 52 1636 1735
  701. type(
  702. (string -> unit, Format.formatter, unit) format
  703. )
  704. "main.ml" 52 1636 1736 "main.ml" 52 1636 1737
  705. type(
  706. string ref -> string
  707. )
  708. ident(
  709. ext_ref Pervasives.( ! )
  710. )
  711. "main.ml" 52 1636 1737 "main.ml" 52 1636 1742
  712. type(
  713. string ref
  714. )
  715. ident(
  716. int_ref ifile "main.ml" 17 479 483 "main.ml" 17 479 488
  717. )
  718. "main.ml" 52 1636 1736 "main.ml" 52 1636 1742
  719. type(
  720. string
  721. )
  722. "main.ml" 52 1636 1687 "main.ml" 52 1636 1742
  723. call(
  724. stack
  725. )
  726. type(
  727. unit
  728. )
  729. "main.ml" 52 1636 1744 "main.ml" 52 1636 1748
  730. type(
  731. int -> in_channel
  732. )
  733. ident(
  734. ext_ref Pervasives.exit
  735. )
  736. "main.ml" 52 1636 1749 "main.ml" 52 1636 1750
  737. type(
  738. int
  739. )
  740. "main.ml" 52 1636 1744 "main.ml" 52 1636 1750
  741. call(
  742. stack
  743. )
  744. type(
  745. in_channel
  746. )
  747. "main.ml" 52 1636 1687 "main.ml" 52 1636 1750
  748. type(
  749. in_channel
  750. )
  751. "main.ml" 52 1636 1646 "main.ml" 52 1636 1750
  752. type(
  753. in_channel
  754. )
  755. "main.ml" 55 1803 1809 "main.ml" 55 1803 1812
  756. type(
  757. Lexing.lexbuf
  758. )
  759. ident(
  760. def buf "main.ml" 57 1841 1843 "main.ml" 97 3366 3380
  761. )
  762. "main.ml" 55 1803 1815 "main.ml" 55 1803 1834
  763. type(
  764. in_channel -> Lexing.lexbuf
  765. )
  766. ident(
  767. ext_ref Lexing.from_channel
  768. )
  769. "main.ml" 55 1803 1835 "main.ml" 55 1803 1836
  770. type(
  771. in_channel
  772. )
  773. ident(
  774. int_ref f "main.ml" 52 1636 1642 "main.ml" 52 1636 1643
  775. )
  776. "main.ml" 55 1803 1815 "main.ml" 55 1803 1836
  777. call(
  778. stack
  779. )
  780. type(
  781. Lexing.lexbuf
  782. )
  783. "main.ml" 63 2143 2153 "main.ml" 63 2143 2154
  784. type(
  785. Ast.program
  786. )
  787. ident(
  788. def p "main.ml" 64 2191 2197 "main.ml" 78 2539 2612
  789. )
  790. "main.ml" 63 2143 2157 "main.ml" 63 2143 2171
  791. type(
  792. (Lexing.lexbuf -> Parser.token) -> Lexing.lexbuf -> Ast.program
  793. )
  794. ident(
  795. ext_ref Parser.fichier
  796. )
  797. "main.ml" 63 2143 2172 "main.ml" 63 2143 2183
  798. type(
  799. Lexing.lexbuf -> Parser.token
  800. )
  801. ident(
  802. ext_ref Lexer.token
  803. )
  804. "main.ml" 63 2143 2184 "main.ml" 63 2143 2187
  805. type(
  806. Lexing.lexbuf
  807. )
  808. ident(
  809. int_ref buf "main.ml" 55 1803 1809 "main.ml" 55 1803 1812
  810. )
  811. "main.ml" 63 2143 2157 "main.ml" 63 2143 2187
  812. call(
  813. stack
  814. )
  815. type(
  816. Ast.program
  817. )
  818. "main.ml" 64 2191 2197 "main.ml" 64 2191 2205
  819. type(
  820. in_channel -> unit
  821. )
  822. ident(
  823. ext_ref Pervasives.close_in
  824. )
  825. "main.ml" 64 2191 2206 "main.ml" 64 2191 2207
  826. type(
  827. in_channel
  828. )
  829. ident(
  830. int_ref f "main.ml" 52 1636 1642 "main.ml" 52 1636 1643
  831. )
  832. "main.ml" 64 2191 2197 "main.ml" 64 2191 2207
  833. call(
  834. stack
  835. )
  836. type(
  837. unit
  838. )
  839. "main.ml" 67 2273 2282 "main.ml" 67 2273 2283
  840. type(
  841. bool ref -> bool
  842. )
  843. ident(
  844. ext_ref Pervasives.( ! )
  845. )
  846. "main.ml" 67 2273 2283 "main.ml" 67 2273 2293
  847. type(
  848. bool ref
  849. )
  850. ident(
  851. int_ref parse_only "main.ml" 13 379 383 "main.ml" 13 379 393
  852. )
  853. "main.ml" 67 2273 2282 "main.ml" 67 2273 2293
  854. type(
  855. bool
  856. )
  857. "main.ml" 67 2273 2299 "main.ml" 67 2273 2303
  858. type(
  859. int -> unit
  860. )
  861. ident(
  862. ext_ref Pervasives.exit
  863. )
  864. "main.ml" 67 2273 2304 "main.ml" 67 2273 2305
  865. type(
  866. int
  867. )
  868. "main.ml" 67 2273 2299 "main.ml" 67 2273 2305
  869. call(
  870. stack
  871. )
  872. type(
  873. unit
  874. )
  875. "main.ml" 67 2273 2279 "main.ml" 67 2273 2305
  876. type(
  877. unit
  878. )
  879. "main.ml" 70 2327 2337 "main.ml" 70 2327 2343
  880. type(
  881. Ast_typing.at_decl list
  882. )
  883. ident(
  884. def p_type "main.ml" 73 2429 2435 "main.ml" 78 2539 2612
  885. )
  886. "main.ml" 70 2327 2346 "main.ml" 70 2327 2360
  887. type(
  888. Ast.program -> Ast_typing.at_decl list
  889. )
  890. ident(
  891. ext_ref Typer.type_ast
  892. )
  893. "main.ml" 70 2327 2361 "main.ml" 70 2327 2362
  894. type(
  895. Ast.program
  896. )
  897. ident(
  898. int_ref p "main.ml" 63 2143 2153 "main.ml" 63 2143 2154
  899. )
  900. "main.ml" 70 2327 2346 "main.ml" 70 2327 2362
  901. call(
  902. stack
  903. )
  904. type(
  905. Ast_typing.at_decl list
  906. )
  907. "main.ml" 73 2429 2438 "main.ml" 73 2429 2439
  908. type(
  909. bool ref -> bool
  910. )
  911. ident(
  912. ext_ref Pervasives.( ! )
  913. )
  914. "main.ml" 73 2429 2439 "main.ml" 73 2429 2448
  915. type(
  916. bool ref
  917. )
  918. ident(
  919. int_ref type_only "main.ml" 14 406 410 "main.ml" 14 406 419
  920. )
  921. "main.ml" 73 2429 2438 "main.ml" 73 2429 2448
  922. type(
  923. bool
  924. )
  925. "main.ml" 73 2429 2454 "main.ml" 73 2429 2458
  926. type(
  927. int -> unit
  928. )
  929. ident(
  930. ext_ref Pervasives.exit
  931. )
  932. "main.ml" 73 2429 2459 "main.ml" 73 2429 2460
  933. type(
  934. int
  935. )
  936. "main.ml" 73 2429 2454 "main.ml" 73 2429 2460
  937. call(
  938. stack
  939. )
  940. type(
  941. unit
  942. )
  943. "main.ml" 73 2429 2435 "main.ml" 73 2429 2460
  944. type(
  945. unit
  946. )
  947. "main.ml" 76 2494 2504 "main.ml" 76 2494 2508
  948. type(
  949. Mips.program
  950. )
  951. ident(
  952. def mips "main.ml" 78 2539 2545 "main.ml" 78 2539 2612
  953. )
  954. "main.ml" 76 2494 2511 "main.ml" 76 2494 2527
  955. type(
  956. Ast_typing.at_decl list -> Mips.program
  957. )
  958. ident(
  959. ext_ref Compiler.program
  960. )
  961. "main.ml" 76 2494 2528 "main.ml" 76 2494 2534
  962. type(
  963. Ast_typing.at_decl list
  964. )
  965. ident(
  966. int_ref p_type "main.ml" 70 2327 2337 "main.ml" 70 2327 2343
  967. )
  968. "main.ml" 76 2494 2511 "main.ml" 76 2494 2534
  969. call(
  970. stack
  971. )
  972. type(
  973. Mips.program
  974. )
  975. "main.ml" 78 2539 2545 "main.ml" 78 2539 2563
  976. type(
  977. file:string -> Mips.program -> unit
  978. )
  979. ident(
  980. ext_ref Mips.print_in_file
  981. )
  982. "main.ml" 78 2539 2566 "main.ml" 78 2539 2586
  983. type(
  984. string -> string -> string
  985. )
  986. ident(
  987. ext_ref Filename.chop_suffix
  988. )
  989. "main.ml" 78 2539 2587 "main.ml" 78 2539 2588
  990. type(
  991. string ref -> string
  992. )
  993. ident(
  994. ext_ref Pervasives.( ! )
  995. )
  996. "main.ml" 78 2539 2588 "main.ml" 78 2539 2593
  997. type(
  998. string ref
  999. )
  1000. ident(
  1001. int_ref ifile "main.ml" 17 479 483 "main.ml" 17 479 488
  1002. )
  1003. "main.ml" 78 2539 2587 "main.ml" 78 2539 2593
  1004. type(
  1005. string
  1006. )
  1007. "main.ml" 78 2539 2594 "main.ml" 78 2539 2600
  1008. type(
  1009. string
  1010. )
  1011. "main.ml" 78 2539 2565 "main.ml" 78 2539 2601
  1012. call(
  1013. stack
  1014. )
  1015. type(
  1016. string
  1017. )
  1018. "main.ml" 78 2539 2601 "main.ml" 78 2539 2602
  1019. type(
  1020. string -> string -> string
  1021. )
  1022. ident(
  1023. ext_ref Pervasives.( ^ )
  1024. )
  1025. "main.ml" 78 2539 2602 "main.ml" 78 2539 2606
  1026. type(
  1027. string
  1028. )
  1029. "main.ml" 78 2539 2564 "main.ml" 78 2539 2607
  1030. call(
  1031. stack
  1032. )
  1033. type(
  1034. string
  1035. )
  1036. "main.ml" 78 2539 2608 "main.ml" 78 2539 2612
  1037. type(
  1038. Mips.program
  1039. )
  1040. ident(
  1041. int_ref mips "main.ml" 76 2494 2504 "main.ml" 76 2494 2508
  1042. )
  1043. "main.ml" 78 2539 2545 "main.ml" 78 2539 2612
  1044. call(
  1045. stack
  1046. )
  1047. type(
  1048. unit
  1049. )
  1050. "main.ml" 76 2494 2500 "main.ml" 78 2539 2612
  1051. type(
  1052. unit
  1053. )
  1054. "main.ml" 73 2429 2435 "main.ml" 78 2539 2612
  1055. type(
  1056. unit
  1057. )
  1058. "main.ml" 70 2327 2333 "main.ml" 78 2539 2612
  1059. type(
  1060. unit
  1061. )
  1062. "main.ml" 67 2273 2279 "main.ml" 78 2539 2612
  1063. type(
  1064. unit
  1065. )
  1066. "main.ml" 64 2191 2197 "main.ml" 78 2539 2612
  1067. type(
  1068. unit
  1069. )
  1070. "main.ml" 63 2143 2149 "main.ml" 78 2539 2612
  1071. type(
  1072. unit
  1073. )
  1074. "main.ml" 80 2620 2645 "main.ml" 80 2620 2646
  1075. type(
  1076. string
  1077. )
  1078. ident(
  1079. def c "main.ml" 83 2764 2772 "main.ml" 85 2873 2887
  1080. )
  1081. "main.ml" 80 2620 2626 "main.ml" 80 2620 2646
  1082. type(
  1083. exn
  1084. )
  1085. "main.ml" 83 2764 2772 "main.ml" 83 2764 2784
  1086. type(
  1087. Lexing.position -> unit
  1088. )
  1089. ident(
  1090. int_ref localisation "main.ml" 32 952 956 "main.ml" 32 952 968
  1091. )
  1092. "main.ml" 83 2764 2786 "main.ml" 83 2764 2807
  1093. type(
  1094. Lexing.lexbuf -> Lexing.position
  1095. )
  1096. ident(
  1097. ext_ref Lexing.lexeme_start_p
  1098. )
  1099. "main.ml" 83 2764 2808 "main.ml" 83 2764 2811
  1100. type(
  1101. Lexing.lexbuf
  1102. )
  1103. ident(
  1104. int_ref buf "main.ml" 55 1803 1809 "main.ml" 55 1803 1812
  1105. )
  1106. "main.ml" 83 2764 2785 "main.ml" 83 2764 2812
  1107. call(
  1108. stack
  1109. )
  1110. type(
  1111. Lexing.position
  1112. )
  1113. "main.ml" 83 2764 2772 "main.ml" 83 2764 2812
  1114. call(
  1115. stack
  1116. )
  1117. type(
  1118. unit
  1119. )
  1120. "main.ml" 84 2814 2822 "main.ml" 84 2814 2829
  1121. type(
  1122. (string -> unit, Format.formatter, unit) format -> string -> unit
  1123. )
  1124. ident(
  1125. ext_ref Format.eprintf
  1126. )
  1127. "main.ml" 84 2814 2830 "main.ml" 84 2814 2869
  1128. type(
  1129. (string -> unit, Format.formatter, unit) format
  1130. )
  1131. "main.ml" 84 2814 2870 "main.ml" 84 2814 2871
  1132. type(
  1133. string
  1134. )
  1135. ident(
  1136. int_ref c "main.ml" 80 2620 2645 "main.ml" 80 2620 2646
  1137. )
  1138. "main.ml" 84 2814 2822 "main.ml" 84 2814 2871
  1139. call(
  1140. stack
  1141. )
  1142. type(
  1143. unit
  1144. )
  1145. "main.ml" 85 2873 2881 "main.ml" 85 2873 2885
  1146. type(
  1147. int -> unit
  1148. )
  1149. ident(
  1150. ext_ref Pervasives.exit
  1151. )
  1152. "main.ml" 85 2873 2886 "main.ml" 85 2873 2887
  1153. type(
  1154. int
  1155. )
  1156. "main.ml" 85 2873 2881 "main.ml" 85 2873 2887
  1157. call(
  1158. stack
  1159. )
  1160. type(
  1161. unit
  1162. )
  1163. "main.ml" 84 2814 2822 "main.ml" 85 2873 2887
  1164. type(
  1165. unit
  1166. )
  1167. "main.ml" 83 2764 2772 "main.ml" 85 2873 2887
  1168. type(
  1169. unit
  1170. )
  1171. "main.ml" 86 2888 2894 "main.ml" 86 2888 2906
  1172. type(
  1173. exn
  1174. )
  1175. "main.ml" 89 3026 3034 "main.ml" 89 3026 3046
  1176. type(
  1177. Lexing.position -> unit
  1178. )
  1179. ident(
  1180. int_ref localisation "main.ml" 32 952 956 "main.ml" 32 952 968
  1181. )
  1182. "main.ml" 89 3026 3048 "main.ml" 89 3026 3069
  1183. type(
  1184. Lexing.lexbuf -> Lexing.position
  1185. )
  1186. ident(
  1187. ext_ref Lexing.lexeme_start_p
  1188. )
  1189. "main.ml" 89 3026 3070 "main.ml" 89 3026 3073
  1190. type(
  1191. Lexing.lexbuf
  1192. )
  1193. ident(
  1194. int_ref buf "main.ml" 55 1803 1809 "main.ml" 55 1803 1812
  1195. )
  1196. "main.ml" 89 3026 3047 "main.ml" 89 3026 3074
  1197. call(
  1198. stack
  1199. )
  1200. type(
  1201. Lexing.position
  1202. )
  1203. "main.ml" 89 3026 3034 "main.ml" 89 3026 3074
  1204. call(
  1205. stack
  1206. )
  1207. type(
  1208. unit
  1209. )
  1210. "main.ml" 90 3076 3084 "main.ml" 90 3076 3091
  1211. type(
  1212. (unit, Format.formatter, unit) format -> unit
  1213. )
  1214. ident(
  1215. ext_ref Format.eprintf
  1216. )
  1217. "main.ml" 90 3076 3092 "main.ml" 90 3076 3128
  1218. type(
  1219. (unit, Format.formatter, unit) format
  1220. )
  1221. "main.ml" 90 3076 3084 "main.ml" 90 3076 3128
  1222. call(
  1223. stack
  1224. )
  1225. type(
  1226. unit
  1227. )
  1228. "main.ml" 91 3130 3138 "main.ml" 91 3130 3142
  1229. type(
  1230. int -> unit
  1231. )
  1232. ident(
  1233. ext_ref Pervasives.exit
  1234. )
  1235. "main.ml" 91 3130 3143 "main.ml" 91 3130 3144
  1236. type(
  1237. int
  1238. )
  1239. "main.ml" 91 3130 3138 "main.ml" 91 3130 3144
  1240. call(
  1241. stack
  1242. )
  1243. type(
  1244. unit
  1245. )
  1246. "main.ml" 90 3076 3084 "main.ml" 91 3130 3144
  1247. type(
  1248. unit
  1249. )
  1250. "main.ml" 89 3026 3034 "main.ml" 91 3130 3144
  1251. type(
  1252. unit
  1253. )
  1254. "main.ml" 92 3145 3164 "main.ml" 92 3145 3165
  1255. type(
  1256. string
  1257. )
  1258. ident(
  1259. def e "main.ml" 95 3288 3296 "main.ml" 97 3366 3380
  1260. )
  1261. "main.ml" 92 3145 3167 "main.ml" 92 3145 3170
  1262. type(
  1263. Lexing.position
  1264. )
  1265. ident(
  1266. def pos "main.ml" 95 3288 3296 "main.ml" 97 3366 3380
  1267. )
  1268. "main.ml" 92 3145 3151 "main.ml" 92 3145 3171
  1269. type(
  1270. exn
  1271. )
  1272. "main.ml" 95 3288 3296 "main.ml" 95 3288 3308
  1273. type(
  1274. Lexing.position -> unit
  1275. )
  1276. ident(
  1277. int_ref localisation "main.ml" 32 952 956 "main.ml" 32 952 968
  1278. )
  1279. "main.ml" 95 3288 3309 "main.ml" 95 3288 3312
  1280. type(
  1281. Lexing.position
  1282. )
  1283. ident(
  1284. int_ref pos "main.ml" 92 3145 3167 "main.ml" 92 3145 3170
  1285. )
  1286. "main.ml" 95 3288 3296 "main.ml" 95 3288 3312
  1287. call(
  1288. stack
  1289. )
  1290. type(
  1291. unit
  1292. )
  1293. "main.ml" 96 3314 3322 "main.ml" 96 3314 3329
  1294. type(
  1295. (string -> unit, Format.formatter, unit) format -> string -> unit
  1296. )
  1297. ident(
  1298. ext_ref Format.eprintf
  1299. )
  1300. "main.ml" 96 3314 3330 "main.ml" 96 3314 3362
  1301. type(
  1302. (string -> unit, Format.formatter, unit) format
  1303. )
  1304. "main.ml" 96 3314 3363 "main.ml" 96 3314 3364
  1305. type(
  1306. string
  1307. )
  1308. ident(
  1309. int_ref e "main.ml" 92 3145 3164 "main.ml" 92 3145 3165
  1310. )
  1311. "main.ml" 96 3314 3322 "main.ml" 96 3314 3364
  1312. call(
  1313. stack
  1314. )
  1315. type(
  1316. unit
  1317. )
  1318. "main.ml" 97 3366 3374 "main.ml" 97 3366 3378
  1319. type(
  1320. int -> unit
  1321. )
  1322. ident(
  1323. ext_ref Pervasives.exit
  1324. )
  1325. "main.ml" 97 3366 3379 "main.ml" 97 3366 3380
  1326. type(
  1327. int
  1328. )
  1329. "main.ml" 97 3366 3374 "main.ml" 97 3366 3380
  1330. call(
  1331. stack
  1332. )
  1333. type(
  1334. unit
  1335. )
  1336. "main.ml" 96 3314 3322 "main.ml" 97 3366 3380
  1337. type(
  1338. unit
  1339. )
  1340. "main.ml" 95 3288 3296 "main.ml" 97 3366 3380
  1341. type(
  1342. unit
  1343. )
  1344. "main.ml" 57 1841 1843 "main.ml" 97 3366 3380
  1345. type(
  1346. unit
  1347. )
  1348. "main.ml" 55 1803 1805 "main.ml" 97 3366 3380
  1349. type(
  1350. unit
  1351. )
  1352. "main.ml" 52 1636 1638 "main.ml" 97 3366 3380
  1353. type(
  1354. unit
  1355. )
  1356. "main.ml" 45 1406 1408 "main.ml" 97 3366 3380
  1357. type(
  1358. unit
  1359. )
  1360. "main.ml" 42 1278 1280 "main.ml" 97 3366 3380
  1361. type(
  1362. unit
  1363. )
  1364. "main.ml" 39 1166 1168 "main.ml" 97 3366 3380
  1365. type(
  1366. unit
  1367. )