Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Prepare for separate distribution of ocp-build

  • Loading branch information...
commit f6baf18e5b532a8596d58978d73c60955ef602a6 1 parent 650ff4a
Pierre Chambart authored
Showing with 310 additions and 33,187 deletions.
  1. +18 −59 Makefile
  2. +1 −1  Makefile.config.in
  3. 0  {tools/ocp-build/files → }/README.txt
  4. +0 −39 Readme.txt
  5. +126 −122 configure
  6. +3 −4 configure.ac
  7. 0  {tools/ocp-build/files → docs}/MEETING.raw.txt
  8. 0  {tools/ocp-build/files → docs}/TODO.txt
  9. 0  tools/ocp-build/files/docs/TODO.txt → docs/TODO_2.txt
  10. 0  {tools/ocp-build/files → }/docs/conventions.txt
  11. +162 −55 docs/user-manual/user-manual.tex
  12. 0  libs/{ocamlpro → }/debug/debugVerbosity.ml
  13. 0  libs/{ocamlpro → }/debug/debugVerbosity.mli
  14. 0  libs/{ocamlpro → }/debug/ocplib-debug.ocp
  15. 0  libs/{ocamlpro → }/lang/.gitignore
  16. 0  libs/{ocamlpro → }/lang/intMap.ml
  17. 0  libs/{ocamlpro → }/lang/intSet.ml
  18. 0  libs/{ocamlpro → }/lang/linearToposort.ml
  19. 0  libs/{ocamlpro → }/lang/linearToposort.mli
  20. 0  libs/{ocamlpro → }/lang/ocamllexer.mli
  21. 0  libs/{ocamlpro → }/lang/ocamllexer.mll
  22. 0  libs/{ocamlpro → }/lang/ocpDigest.ml
  23. 0  libs/{ocamlpro → }/lang/ocpDigest.mli
  24. 0  libs/{ocamlpro → }/lang/ocpGenlex.ml
  25. 0  libs/{ocamlpro → }/lang/ocpGenlex.mli
  26. 0  libs/{ocamlpro → }/lang/ocpHashtbl.ml
  27. 0  libs/{ocamlpro → }/lang/ocpHashtbl.mli
  28. 0  libs/{ocamlpro → }/lang/ocpLang.ml
  29. 0  libs/{ocamlpro → }/lang/ocpList.ml
  30. 0  libs/{ocamlpro → }/lang/ocpList.mli
  31. 0  libs/{ocamlpro → }/lang/ocpList_test.ml
  32. 0  libs/{ocamlpro → }/lang/ocpPervasives.ml
  33. 0  libs/{ocamlpro → }/lang/ocpPervasives.mli
  34. 0  libs/{ocamlpro → }/lang/ocpStream.ml
  35. 0  libs/{ocamlpro → }/lang/ocpStream.mli
  36. 0  libs/{ocamlpro → }/lang/ocpString.ml
  37. 0  libs/{ocamlpro → }/lang/ocpString.mli
  38. 0  libs/{ocamlpro → }/lang/ocpString_test.ml
  39. 0  libs/{ocamlpro → }/lang/ocplib-lang.ocp
  40. 0  libs/{ocamlpro → }/lang/option.ml
  41. 0  libs/{ocamlpro → }/lang/option.mli
  42. 0  libs/{ocamlpro → }/lang/stringMap.ml
  43. 0  libs/{ocamlpro → }/lang/stringSet.ml
  44. 0  libs/{ocamlpro → }/lang/test.ml
  45. 0  libs/{ocamlpro → }/lang/test.mli
  46. 0  libs/{ocamlpro → }/lang/toposort.ml
  47. 0  libs/{ocamlpro → }/lang/toposort.mli
  48. 0  libs/{ocamlpro → }/lang/trie.ml
  49. 0  libs/{ocamlpro → }/lang/trie.mli
  50. +0 −1  libs/ocaml-compiler/approx/.gitignore
  51. +0 −27 libs/ocaml-compiler/approx/README.md
  52. +0 −18 libs/ocaml-compiler/approx/approx_common.mli
  53. +0 −52 libs/ocaml-compiler/approx/approx_lexer.mli
  54. +0 −581 libs/ocaml-compiler/approx/approx_lexer.mll
  55. +0 −53 libs/ocaml-compiler/approx/approx_parse.ml
  56. +0 −32 libs/ocaml-compiler/approx/approx_parse.mli
  57. +0 −1,818 libs/ocaml-compiler/approx/approx_parser.mly
  58. +0 −16 libs/ocaml-compiler/approx/approx_parsing.ml
  59. +0 −378 libs/ocaml-compiler/approx/approx_tokens.ml
  60. +0 −53 libs/ocaml-compiler/approx/complib-approx.ocp
  61. +0 −109 libs/ocaml-compiler/ocaml-bincompat/ast_file.ml
  62. +0 −26 libs/ocaml-compiler/ocaml-bincompat/ast_file.mli
  63. +0 −64 libs/ocaml-compiler/ocaml-bincompat/asti_file.ml
  64. +0 −139 libs/ocaml-compiler/ocaml-bincompat/bincompat.ml
  65. +0 −35 libs/ocaml-compiler/ocaml-bincompat/cma_file.ml
  66. +0 −17 libs/ocaml-compiler/ocaml-bincompat/cma_file.mli
  67. +0 −87 libs/ocaml-compiler/ocaml-bincompat/cmi_file.ml
  68. +0 −18 libs/ocaml-compiler/ocaml-bincompat/cmi_file.mli
  69. +0 −35 libs/ocaml-compiler/ocaml-bincompat/cmo_file.ml
  70. +0 −17 libs/ocaml-compiler/ocaml-bincompat/cmo_file.mli
  71. +0 −38 libs/ocaml-compiler/ocaml-bincompat/cmx_file.ml
  72. +0 −17 libs/ocaml-compiler/ocaml-bincompat/cmx_file.mli
  73. +0 −37 libs/ocaml-compiler/ocaml-bincompat/cmxa_file.ml
  74. +0 −17 libs/ocaml-compiler/ocaml-bincompat/cmxa_file.mli
  75. +0 −919 libs/ocaml-compiler/ocaml-bincompat/compTypes.ml
  76. +0 −212 libs/ocaml-compiler/ocaml-bincompat/generate.sh
  77. +0 −1,224 libs/ocaml-compiler/ocaml-bincompat/oCamlTypes.ml
  78. +0 −51 libs/ocaml-compiler/ocaml-bincompat/ocaml-bincompat.ocp
  79. +0 −1,219 libs/ocaml-compiler/ocaml-bincompat/v3112_input.ml
  80. +0 −14 libs/ocaml-compiler/ocaml-bincompat/v3112_input.mli
  81. +0 −516 libs/ocaml-compiler/ocaml-bincompat/v3112_input_ast.ml
  82. +0 −30 libs/ocaml-compiler/ocaml-bincompat/v3112_input_ast.mli
  83. +0 −369 libs/ocaml-compiler/ocaml-bincompat/v3112_input_cmi.ml
  84. +0 −43 libs/ocaml-compiler/ocaml-bincompat/v3112_input_cmi.mli
  85. +0 −268 libs/ocaml-compiler/ocaml-bincompat/v3112_input_cmo.ml
  86. +0 −37 libs/ocaml-compiler/ocaml-bincompat/v3112_input_cmo.mli
  87. +0 −182 libs/ocaml-compiler/ocaml-bincompat/v3112_input_cmx.ml
  88. +0 −18 libs/ocaml-compiler/ocaml-bincompat/v3112_input_cmx.mli
  89. +0 −415 libs/ocaml-compiler/ocaml-bincompat/v3112_output.ml
  90. +0 −536 libs/ocaml-compiler/ocaml-bincompat/v3112_output_ast.ml
  91. +0 −33 libs/ocaml-compiler/ocaml-bincompat/v3112_output_ast.mli
  92. +0 −389 libs/ocaml-compiler/ocaml-bincompat/v3112_output_cmi.ml
  93. +0 −42 libs/ocaml-compiler/ocaml-bincompat/v3112_output_cmi.mli
  94. +0 −274 libs/ocaml-compiler/ocaml-bincompat/v3112_output_cmo.ml
  95. +0 −41 libs/ocaml-compiler/ocaml-bincompat/v3112_output_cmo.mli
  96. +0 −190 libs/ocaml-compiler/ocaml-bincompat/v3112_output_cmx.ml
  97. +0 −18 libs/ocaml-compiler/ocaml-bincompat/v3112_output_cmx.mli
  98. +0 −875 libs/ocaml-compiler/ocaml-bincompat/v3112_types.ml
  99. +0 −3,037 libs/ocaml-compiler/ocaml-bincompat/v3120_camlp4.ml
  100. +0 −25 libs/ocaml-compiler/ocaml-bincompat/v3120_camlp4.mli
  101. +0 −873 libs/ocaml-compiler/ocaml-bincompat/v3120_input.ml
  102. +0 −19 libs/ocaml-compiler/ocaml-bincompat/v3120_input.mli
  103. +0 −139 libs/ocaml-compiler/ocaml-bincompat/v3120_input_ast.ml
  104. +0 −29 libs/ocaml-compiler/ocaml-bincompat/v3120_input_ast.mli
  105. +0 −366 libs/ocaml-compiler/ocaml-bincompat/v3120_input_cmi.ml
  106. +0 −43 libs/ocaml-compiler/ocaml-bincompat/v3120_input_cmi.mli
  107. +0 −267 libs/ocaml-compiler/ocaml-bincompat/v3120_input_cmo.ml
  108. +0 −37 libs/ocaml-compiler/ocaml-bincompat/v3120_input_cmo.mli
  109. +0 −182 libs/ocaml-compiler/ocaml-bincompat/v3120_input_cmx.ml
  110. +0 −18 libs/ocaml-compiler/ocaml-bincompat/v3120_input_cmx.mli
  111. +0 −400 libs/ocaml-compiler/ocaml-bincompat/v3120_output.ml
  112. +0 −589 libs/ocaml-compiler/ocaml-bincompat/v3120_output_ast.ml
  113. +0 −33 libs/ocaml-compiler/ocaml-bincompat/v3120_output_ast.mli
  114. +0 −392 libs/ocaml-compiler/ocaml-bincompat/v3120_output_cmi.ml
  115. +0 −42 libs/ocaml-compiler/ocaml-bincompat/v3120_output_cmi.mli
  116. +0 −272 libs/ocaml-compiler/ocaml-bincompat/v3120_output_cmo.ml
  117. +0 −41 libs/ocaml-compiler/ocaml-bincompat/v3120_output_cmo.mli
  118. +0 −189 libs/ocaml-compiler/ocaml-bincompat/v3120_output_cmx.ml
  119. +0 −18 libs/ocaml-compiler/ocaml-bincompat/v3120_output_cmx.mli
  120. +0 −997 libs/ocaml-compiler/ocaml-bincompat/v3120_types.ml
  121. +0 −898 libs/ocaml-compiler/ocaml-bincompat/v3121_types.ml
  122. +0 −871 libs/ocaml-compiler/ocaml-bincompat/v4000_input.ml
  123. +0 −18 libs/ocaml-compiler/ocaml-bincompat/v4000_input.mli
  124. +0 −1,586 libs/ocaml-compiler/ocaml-bincompat/v4000_types.ml
  125. +0 −50 libs/ocamlpro/debug/debugTyperex.ml
  126. +0 −15 libs/ocamlpro/debug/debugTyperex.mli
  127. +0 −59 libs/ocamlpro/digest/base16.ml
  128. +0 −18 libs/ocamlpro/digest/base16.mli
  129. +0 −92 libs/ocamlpro/digest/base32.ml
  130. +0 −18 libs/ocamlpro/digest/base32.mli
  131. +0 −117 libs/ocamlpro/digest/base64.ml
  132. +0 −22 libs/ocamlpro/digest/base64.mli
  133. +0 −73 libs/ocamlpro/digest/base6427.ml
  134. +0 −17 libs/ocamlpro/digest/base6427.mli
  135. +0 −91 libs/ocamlpro/digest/checksum.ml
  136. +0 −144 libs/ocamlpro/digest/hash_c.h
  137. +0 −275 libs/ocamlpro/digest/makeDigest.ml
  138. +0 −155 libs/ocamlpro/digest/maker.ml
  139. +0 −26 libs/ocamlpro/digest/md4.ml
  140. +0 −14 libs/ocamlpro/digest/md4.mli
  141. +0 −306 libs/ocamlpro/digest/md4_c.c
  142. +0 −86 libs/ocamlpro/digest/md4_c.h
  143. +0 −47 libs/ocamlpro/digest/md5.ml
  144. +0 −14 libs/ocamlpro/digest/md5.mli
  145. +0 −15 libs/ocamlpro/digest/md5HMac.ml
  146. +0 −420 libs/ocamlpro/digest/md5_c.c
  147. +0 −119 libs/ocamlpro/digest/md5_c.h
  148. +0 −38 libs/ocamlpro/digest/ocplib-digest.ocp
  149. +0 −79 libs/ocamlpro/digest/sha1.ml
  150. +0 −14 libs/ocamlpro/digest/sha1.mli
  151. +0 −16 libs/ocamlpro/digest/sha1HMac.ml
  152. +0 −15 libs/ocamlpro/digest/sha1HMac.mli
  153. +0 −463 libs/ocamlpro/digest/sha1_c.c
  154. +0 −90 libs/ocamlpro/digest/sha1_c.h
  155. +0 −107 libs/ocamlpro/digest/unix32_c.h
  156. 0  {tools/ocp-build/files/ocaml → libs}/ocp-standard-ocaml.ocp
  157. 0  libs/{ocamlpro → }/subcmd/ocplib-subcmd.ocp
  158. 0  libs/{ocamlpro → }/subcmd/subcommands.ml
  159. 0  libs/{ocamlpro → }/subcmd/subcommands.mli
  160. 0  libs/{ocamlpro → }/system/configParser.ml
  161. 0  libs/{ocamlpro → }/system/configParser.mli
  162. 0  libs/{ocamlpro → }/system/date.ml
  163. 0  libs/{ocamlpro → }/system/date.mli
  164. 0  libs/{ocamlpro → }/system/debug.ml
  165. 0  libs/{ocamlpro → }/system/debug.mli
  166. 0  libs/{ocamlpro → }/system/file.ml
  167. 0  libs/{ocamlpro → }/system/file.mli
  168. 0  libs/{ocamlpro → }/system/fileLabels.ml
  169. 0  libs/{ocamlpro → }/system/fileLabels.mli
  170. 0  libs/{ocamlpro → }/system/fileLines.ml
  171. 0  libs/{ocamlpro → }/system/fileLines.mli
  172. 0  libs/{ocamlpro → }/system/file_test.ml
  173. 0  libs/{ocamlpro → }/system/ocpFilename.ml
  174. 0  libs/{ocamlpro → }/system/ocpFilename.mli
  175. 0  libs/{ocamlpro → }/system/ocpSystem.ml
  176. 0  libs/{ocamlpro → }/system/ocpUnix.ml
  177. 0  libs/{ocamlpro → }/system/ocpUnix.mli
  178. 0  libs/{ocamlpro → }/system/ocplib-system.ocp
  179. 0  libs/{ocamlpro → }/system/process.ml
  180. 0  libs/{ocamlpro → }/system/process.mli
  181. 0  libs/{ocamlpro → }/system/reentrantBuffers.ml
  182. 0  libs/{ocamlpro → }/system/reentrantBuffers.mli
  183. 0  libs/{ocamlpro → }/system/simpleConfig.ml
  184. 0  libs/{ocamlpro → }/system/simpleConfig.mli
  185. +0 −311 ocaml/.gitignore
  186. +0 −348 ocaml/ocaml.ocp
  187. +0 −159 ocaml/opcodes.ml
  188. +0 −2,160 ocaml/pprintast.ml
  189. +0 −24 ocaml/pprintast.mli
  190. +0 −286 ocaml/runtimedef.ml
  191. 0  {ocp-build → ocp-build-boot}/Makefile
  192. 0  {ocp-build → ocp-build-boot}/README.md
  193. 0  {ocp-build → ocp-build-boot}/ocp-build.boot
  194. 0  {ocp-build → ocp-build-boot}/primitives
  195. 0  {ocp-build → ocp-build-boot}/win32_c.c
  196. 0  {tools/ocp-build → src}/BUGS
  197. 0  {tools/ocp-build → src}/ChangeLog.txt
  198. 0  {tools/ocp-build → src}/Changes.txt
  199. 0  {tools/ocp-build → src}/Makefile
  200. 0  {tools/ocp-build → src}/buildActions.ml
  201. 0  {tools/ocp-build → src}/buildActions.mli
  202. 0  {tools/ocp-build → src}/buildAutogen.ml
  203. 0  {tools/ocp-build → src}/buildAutogen.mli
  204. 0  {tools/ocp-build → src}/buildConfig.ml
  205. 0  {tools/ocp-build → src}/buildConfig.mli
  206. 0  {tools/ocp-build → src}/buildEngine.ml
  207. 0  {tools/ocp-build → src}/buildEngine.mli
  208. 0  {tools/ocp-build → src}/buildEngineContext.ml
  209. 0  {tools/ocp-build → src}/buildEngineContext.mli
  210. 0  {tools/ocp-build → src}/buildEngineGlobals.ml
  211. 0  {tools/ocp-build → src}/buildEngineGlobals.mli
  212. 0  {tools/ocp-build → src}/buildEngineMtime.ml
  213. 0  {tools/ocp-build → src}/buildEngineMtime.mli
  214. 0  {tools/ocp-build → src}/buildEngineRules.ml
  215. 0  {tools/ocp-build → src}/buildEngineTypes.ml
  216. 0  {tools/ocp-build → src}/buildFind.ml
  217. 0  {tools/ocp-build → src}/buildFind.mli
  218. 0  {tools/ocp-build → src}/buildGlobals.ml
  219. 0  {tools/ocp-build → src}/buildLog.ml
  220. 0  {tools/ocp-build → src}/buildMain.ml
  221. 0  {tools/ocp-build → src}/buildMisc.ml
  222. 0  {tools/ocp-build → src}/buildOCFGen.ml
  223. 0  {tools/ocp-build → src}/buildOCFGen.mli
  224. 0  {tools/ocp-build → src}/buildOCP.ml
  225. 0  {tools/ocp-build → src}/buildOCP.mli
  226. 0  {tools/ocp-build → src}/buildOCPInterp.ml
  227. 0  {tools/ocp-build → src}/buildOCPInterp.mli
  228. 0  {tools/ocp-build → src}/buildOCPParse.ml
  229. 0  {tools/ocp-build → src}/buildOCPParse.mli
  230. 0  {tools/ocp-build → src}/buildOCPParser.mly
  231. 0  {tools/ocp-build → src}/buildOCPPrint.ml
  232. 0  {tools/ocp-build → src}/buildOCPPrint.mli
  233. 0  {tools/ocp-build → src}/buildOCPTree.ml
  234. 0  {tools/ocp-build → src}/buildOCPTypes.ml
  235. 0  {tools/ocp-build → src}/buildOCPVariable.ml
  236. 0  {tools/ocp-build → src}/buildOCamlEnv.ml
  237. 0  {tools/ocp-build → src}/buildOCamlMisc.ml
  238. 0  {tools/ocp-build → src}/buildOCamlRules.ml
  239. 0  {tools/ocp-build → src}/buildOCamlRules.mli
  240. 0  {tools/ocp-build → src}/buildOCamlSyntaxes.ml
  241. 0  {tools/ocp-build → src}/buildOCamlSyntaxes.mli
  242. 0  {tools/ocp-build → src}/buildOCamlTypes.ml
  243. 0  {tools/ocp-build → src}/buildOCamlVariables.ml
  244. 0  {tools/ocp-build → src}/buildOCamldep.ml
  245. 0  {tools/ocp-build → src}/buildOCamldep.mli
  246. 0  {tools/ocp-build → src}/buildOasis.ml
  247. 0  {tools/ocp-build → src}/buildObjectInspector.ml
  248. 0  {tools/ocp-build → src}/buildObjectInspector.mli
  249. 0  {tools/ocp-build → src}/buildOptions.ml
  250. 0  {tools/ocp-build → src}/buildOptions.mli
  251. 0  {tools/ocp-build → src}/buildScanner.ml
  252. 0  {tools/ocp-build → src}/buildScanner.mli
  253. 0  {tools/ocp-build → src}/buildSubst.ml
  254. 0  {tools/ocp-build → src}/buildSubst.mli
  255. 0  {tools/ocp-build → src}/buildTypes.ml
  256. 0  {tools/ocp-build → src}/docs/user-manual.tex
  257. 0  {tools/ocp-build → src}/header.txt
  258. 0  {tools/ocp-build → src}/logger.ml
  259. 0  {tools/ocp-build → src}/oasisParser.ml
  260. 0  {tools/ocp-build → src}/oasisParser.mli
  261. 0  {tools/ocp-build → src}/ocp-build.ocp
  262. 0  {tools/ocp-build → src}/projectMain.ml
  263. 0  {tools/ocp-build → src}/remove-primitives.txt
  264. 0  {tools/ocp-build → src}/src/.gitignore
  265. +0 −555 tools/ocp-build/files/ocaml/camlp4.ocp
  266. +0 −162 tools/ocp-build/files/user-manual.tex
  267. +0 −319 tools/ocp-bytecode/byteActions.ml
  268. +0 −50 tools/ocp-bytecode/byteArgs.ml
  269. +0 −929 tools/ocp-bytecode/byteCode.ml
  270. +0 −229 tools/ocp-bytecode/byteCode.mli
  271. +0 −327 tools/ocp-bytecode/byteFile.ml
  272. +0 −64 tools/ocp-bytecode/byteFile.mli
  273. +0 −144 tools/ocp-bytecode/byteMain.ml
  274. +0 −80 tools/ocp-bytecode/byteMisc.ml
  275. +0 −33 tools/ocp-bytecode/ocp-bytecode.ocp
  276. +0 −54 tools/ocp-bytecode/strings.ml
  277. +0 −25 tools/ocp-bytecode/strings.mli
  278. +0 −1  tools/ocp-cvtemit/.gitignore
  279. +0 −90 tools/ocp-cvtemit/cvt_emit.mll
  280. +0 −17 tools/ocp-cvtemit/ocp-cvtemit.ocp
  281. +0 −9 tools/ocp-edit-mode/Makefile
  282. +0 −4 tools/ocp-edit-mode/TODO.md
  283. +0 −36 tools/ocp-edit-mode/docs/user-manual.tex
  284. +0 −293 tools/ocp-edit-mode/editCandidates.ml
  285. +0 −14 tools/ocp-edit-mode/editCandidates.mli
  286. +0 −23 tools/ocp-edit-mode/editConfig.ml
  287. +0 −15 tools/ocp-edit-mode/editConfig.mli
  288. +0 −2  tools/ocp-edit-mode/editConfiguration.mlp
  289. +0 −134 tools/ocp-edit-mode/editDocumentation.ml
  290. +0 −14 tools/ocp-edit-mode/editDocumentation.mli
Sorry, we could not display the entire diff because too many files (407) changed.
77 Makefile
View
@@ -4,9 +4,7 @@
include Makefile.config
-
-
-OCPBUILD=./ocp-build/ocp-build
+OCPBUILD=./ocp-build-boot/ocp-build
OCPBUILD_FLAGS=
all: $(OCPBUILD)
@@ -22,76 +20,42 @@ opt: $(OCPBUILD)
noscan: $(OCPBUILD)
$(OCPBUILD) $(OCPBUILD_FLAGS)
-clone:
- svn checkout http://caml.inria.fr/svn/ocaml/version/4.00 ocaml/ocaml
-
-ocp-build/ocp-build.boot: boot/ocp-build.boot
- cp -f boot/ocp-build.boot ocp-build/ocp-build.boot
+ocp-build-boot/ocp-build.boot: boot/ocp-build.boot
+ cp -f boot/ocp-build.boot ocp-build-boot/ocp-build.boot
WIN32_FILES= \
libs/stubs/win32/win32_waitpids_c.c \
libs/stubs/win32/win32_fileinfo_c.c
-ocp-build/win32_c.c: $(WIN32_FILES)
- cat $(WIN32_FILES) > ocp-build/win32_c.c
+ocp-build-boot/win32_c.c: $(WIN32_FILES)
+ cat $(WIN32_FILES) > ocp-build-boot/win32_c.c
-ocp-build/ocp-build: ocp-build/ocp-build.boot ocp-build/win32_c.c
- $(MAKE) -C ocp-build
+ocp-build-boot/ocp-build: ocp-build-boot/ocp-build.boot ocp-build-boot/win32_c.c
+ $(MAKE) -C ocp-build-boot
scan: $(OCPBUILD)
$(OCPBUILD) -scan
+
sanitize: $(OCPBUILD)
$(OCPBUILD) -sanitize
+
ocpbuild: $(OCPBUILD)
$(OCPBUILD) ocp-build
-clean-temps:
-
-clean: clean-temps $(OCPBUILD)
+clean: $(OCPBUILD)
$(OCPBUILD) -clean
+
distclean: clean $(OCPBUILD)
$(OCPBUILD) -distclean
-
+ $(MAKE) -C ocp-build-boot clean
install:
- mkdir -p $(TYPEREXDIR)
+ mkdir -p $(OCPBUILDDIR)
mkdir -p $(BINDIR)
cp _obuild/ocp-build/ocp-build.asm $(BINDIR)/ocp-build
- cp _obuild/ocp-fix-errors/ocp-fix-errors.asm $(BINDIR)/ocp-fix-errors
- cp _obuild/ocp-edit-mode/ocp-edit-mode.asm $(BINDIR)/ocp-edit-mode
- cp _obuild/ocp-spotter/ocp-spotter.asm $(BINDIR)/ocp-spotter
- cp _obuild/ocp-type-from-loc/ocp-type-from-loc.asm $(BINDIR)/ocp-type-from-loc
- rm -rf $(TYPEREXDIR)/ocp-edit-mode
- cp -dpR tools/ocp-edit-mode/files $(TYPEREXDIR)/ocp-edit-mode
-
-#install-emacs:
-# cp tools/ocp-fix-errors/emacs/ocp-fix-errors.el $(HOME)/.emacs.d/
-
-install-manager:
- sudo cp _obuild/ocaml-manager/ocaml-manager.asm /usr/bin/ocaml-manager
- sudo ocaml-manager -update
-#
-# Building boot/ocp-build.boot is difficult, because it must run
-# with any version of ocamlrun. Currently, we remove dynamic dependencies
-# from ocp-build and remove all unused primitives, using ocp-bytecode.
-#
-
-_obuild/ocp-bytecode/ocp-bytecode.byte \
-_obuild/ocp-build/ocp-build.byte:
- $(OCPBUILD) -byte ocp-bytecode ocp-build
-
-# We are happy with what we have generated, we just want it to be compiled
-# with ocaml-3.12.1
-upgrade-ocp-build:
- mv _obuild/ocp-build/ocp-build.asm boot/
- ocaml-manager -set ocaml-3.12.1
- ./boot/ocp-build.asm -clean
- ./boot/ocp-build.asm -byte ocp-build ocp-bytecode
-
-# update boot/ with and check it works
-bootstrap-ready: \
- _obuild/ocp-bytecode/ocp-bytecode.byte \
- _obuild/ocp-build/ocp-build.byte
+
+uninstall:
+ rm -f $(BINDIR)/ocp-build
old-ocp-build:
OCAML_VERSION=ocaml-3.12.1 ocp-build -arch 3.12.1 ocp-build
@@ -101,7 +65,7 @@ bootstrap: old-ocp-build
mv boot Saved
mkdir boot
mv Saved boot/Saved
- _obuild/ocp-bytecode/ocp-bytecode.byte _obuild/3.12.1/ocp-build/ocp-build.byte \
+ ocp-bytecode _obuild/3.12.1/ocp-build/ocp-build.byte \
-make-static \
-filter-unused-prims \
-remove-prims tools/ocp-build/remove-primitives.txt \
@@ -121,7 +85,7 @@ bootclean:
rm -rf boot/Saved
make-boot:
- ocamlc -o boot/ocp-build.boot -use-runtime boot/ocp-build-runner \
+ ocamlc -o boot/ocp-build.boot -use-runtime boot/ocp-build-runner \
-use-prims boot/prims_needed.txt \
unix.cma \
./_obuild/ocplib-lang/ocplib-lang.cma \
@@ -130,11 +94,6 @@ make-boot:
./_obuild/ocp-build-lib/ocp-build-lib.cma \
./_obuild/ocp-build/buildMain.cmo
-fabrice-upload:
- git checkout fabrice-typerex
- git push origin fabrice-typerex
- git push ocamlpro fabrice-typerex
-
doc:
cd docs/user-manual; $(MAKE)
2  Makefile.config.in
View
@@ -3,4 +3,4 @@ DATADIR=@datarootdir@
BINDIR=@bindir@
LIBDIR=@libdir@
MANDIR=@mandir@
-TYPEREXDIR=@datarootdir@/typerex
+OCPBUILDDIR=@datarootdir@/ocp-build
0  tools/ocp-build/files/README.txt → README.txt
View
File renamed without changes
39 Readme.txt
View
@@ -1,39 +0,0 @@
-
-To clone:
----------
-
-0/
-
- git clone git@github.com:OCamlPro/typerex.git
- cd typerex
- git checkout typerex2
-
-To build:
----------
-
-1/ Install the sources of OCaml 4.00 as subdirectory ocaml/ocaml/
-
- cd ocaml
- svn checkout http://caml.inria.fr/svn/ocaml/version/4.00 ocaml
- cd ..
-
-2/ configure
-
- ./configure -prefix /usr/local
-
-3/ Build with ocp-build. You will need to create an ocp-build.conf file in
- the top directory.
-
- make
-
-4/ Install
-
- make install
-
-5/ Build and read the documentation
-
- make doc
- cd docs/user-manual
- evince user-manual.pdf
-
-
248 configure
View
@@ -1,11 +1,9 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for typerex 0.1.
+# Generated by GNU Autoconf 2.69 for ocp-build 0.1.
#
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -136,6 +134,31 @@ export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -169,7 +192,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -213,21 +237,25 @@ IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- # Preserve -v and -x to the replacement shell.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
- esac
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
if test x$as_have_required = xno; then :
@@ -329,6 +357,14 @@ $as_echo X"$as_dir" |
} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -450,6 +486,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -484,16 +524,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -505,28 +545,8 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -556,10 +576,10 @@ MFLAGS=
MAKEFLAGS=
# Identity of this package.
-PACKAGE_NAME='typerex'
-PACKAGE_TARNAME='typerex'
+PACKAGE_NAME='ocp-build'
+PACKAGE_TARNAME='ocp-build'
PACKAGE_VERSION='0.1'
-PACKAGE_STRING='typerex 0.1'
+PACKAGE_STRING='ocp-build 0.1'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1092,8 +1112,6 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1179,7 +1197,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures typerex 0.1 to adapt to many kinds of systems.
+\`configure' configures ocp-build 0.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1227,7 +1245,7 @@ Fine tuning of the installation directories:
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/typerex]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/ocp-build]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
@@ -1240,7 +1258,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of typerex 0.1:";;
+ short | recursive ) echo "Configuration of ocp-build 0.1:";;
esac
cat <<\_ACEOF
@@ -1325,10 +1343,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-typerex configure 0.1
-generated by GNU Autoconf 2.68
+ocp-build configure 0.1
+generated by GNU Autoconf 2.69
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
@@ -1382,8 +1400,8 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by typerex $as_me 0.1, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+It was created by ocp-build $as_me 0.1, which was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -1755,7 +1773,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -1795,7 +1813,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -1848,7 +1866,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -1889,7 +1907,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -1947,7 +1965,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -1991,7 +2009,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2437,8 +2455,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -2542,7 +2559,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OCAMLC="${ac_tool_prefix}ocamlc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2582,7 +2599,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OCAMLC="ocamlc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2653,7 +2670,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OCAMLOPT="${ac_tool_prefix}ocamlopt"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2693,7 +2710,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OCAMLOPT="ocamlopt"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2763,7 +2780,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OCAMLCDOTOPT="${ac_tool_prefix}ocamlc.opt"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2803,7 +2820,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OCAMLCDOTOPT="ocamlc.opt"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2867,7 +2884,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OCAMLOPTDOTOPT="${ac_tool_prefix}ocamlopt.opt"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2907,7 +2924,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OCAMLOPTDOTOPT="ocamlopt.opt"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2976,7 +2993,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OCAML="${ac_tool_prefix}ocaml"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3016,7 +3033,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OCAML="ocaml"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3070,7 +3087,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OCAMLDEP="${ac_tool_prefix}ocamldep"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3110,7 +3127,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OCAMLDEP="ocamldep"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3164,7 +3181,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OCAMLMKTOP="${ac_tool_prefix}ocamlmktop"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3204,7 +3221,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OCAMLMKTOP="ocamlmktop"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3258,7 +3275,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OCAMLMKLIB="${ac_tool_prefix}ocamlmklib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3298,7 +3315,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OCAMLMKLIB="ocamlmklib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3352,7 +3369,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OCAMLDOC="${ac_tool_prefix}ocamldoc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3392,7 +3409,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OCAMLDOC="ocamldoc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3446,7 +3463,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OCAMLBUILD="${ac_tool_prefix}ocamlbuild"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3486,7 +3503,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OCAMLBUILD="ocamlbuild"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3554,7 +3571,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AWK="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3627,7 +3644,7 @@ libdir="`eval echo ${libdir}`"
datarootdir="`eval echo ${datarootdir}`"
datarootdir="`eval echo ${datarootdir}`"
-ac_config_files="$ac_config_files Makefile.config typerex.config"
+ac_config_files="$ac_config_files Makefile.config"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -4072,16 +4089,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -4141,28 +4158,16 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -4183,8 +4188,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by typerex $as_me 0.1, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+This file was extended by ocp-build $as_me 0.1, which was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -4236,11 +4241,11 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-typerex config.status 0.1
-configured by $0, generated by GNU Autoconf 2.68,
+ocp-build config.status 0.1
+configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -4318,7 +4323,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
@@ -4348,7 +4353,6 @@ for ac_config_target in $ac_config_targets
do
case $ac_config_target in
"Makefile.config") CONFIG_FILES="$CONFIG_FILES Makefile.config" ;;
- "typerex.config") CONFIG_FILES="$CONFIG_FILES typerex.config" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
7 configure.ac
View
@@ -1,4 +1,4 @@
-AC_INIT(typerex,0.1)
+AC_INIT(ocp-build,0.1)
AC_COPYRIGHT(Copyright 2012 OcamlPro SAS)
AC_CONFIG_MACRO_DIR([m4])
@@ -34,7 +34,6 @@ datarootdir="`eval echo ${datarootdir}`"
AC_CONFIG_FILES(
Makefile.config
- typerex.config
)
AC_OUTPUT
@@ -43,6 +42,6 @@ touch ocp-build.root
echo
echo Executables will be installed in ${bindir}
-echo Libraries will be installed in ${libdir} + typerex
-echo Data files will be installed in ${datarootdir} + typerex
+echo Libraries will be installed in ${libdir} + ocp
+echo Data files will be installed in ${datarootdir} + ocp
echo Manual pages will be installed in ${mandir}
0  tools/ocp-build/files/MEETING.raw.txt → docs/MEETING.raw.txt
View
File renamed without changes
0  tools/ocp-build/files/TODO.txt → docs/TODO.txt
View
File renamed without changes
0  tools/ocp-build/files/docs/TODO.txt → docs/TODO_2.txt
View
File renamed without changes
0  tools/ocp-build/files/docs/conventions.txt → docs/conventions.txt
View
File renamed without changes
217 docs/user-manual/user-manual.tex
View
@@ -1,55 +1,162 @@
-\documentclass[12pt]{book}
-
-\usepackage{enumerate}
-\usepackage{color}
-\usepackage{a4wide}
-\usepackage[colorlinks=true,linkcolor=blue] {hyperref}
-%\usepackage{hevea}
-\usepackage{url}
-
-\title{TypeRex User Manual}
-
-\author{OCamlPro \and INRIA}
-\date{\today{}\\
-~\\
-This manual presents \typerex, a development
-environment for OCaml.
-}
-\begin{document}
-
-\newcommand{\typerex}{TypeRex}
-\newcommand{\cmd}[1]{$\texttt{#1}$}
-%\begin{htmlonly}
-%\renewcommand{\paragraph}[1]{{\bf #1}}
-%\end{htmlonly}
-
-%\newenvironment{code}{\footnotesize\verbatim}{\endverbatim}
-%\newenvironment{code}{\small\begin{verbatim}}{\end{verbatim}}
-\newcommand{\verbsize}{%BEGIN LATEX
-\footnotesize%
-%END LATEX
-%HEVEA\color{blue}
-}
-
-%BEGIN LATEX
-\maketitle
-%\thispagestyle{empty}
-%\cleardoublepage
-%\thispagestyle{plain}
-%\input{introduction}
-%\newpage
-\thispagestyle{empty}
-\tableofcontents
-%END LATEX
-
-%HEVEA\input{introduction}
-
-\chapter{TypeRex}
-
-\input{../../tools/ocp-edit-mode/docs/user-manual}
-
-\chapter{The {\tt ocp-build} build tool}
-
-\input{../../tools/ocp-build/docs/user-manual}
-
-\end{document}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% TypeRex OCaml Studio %
+% %
+% Thomas Gazagnaire, Fabrice Le Fessant %
+% %
+% Copyright 2011-2012 OCamlPro %
+% All rights reserved. This file is distributed under the terms of %
+% the GNU Public License version 3.0. %
+% %
+% TypeRex is distributed in the hope that it will be useful, %
+% but WITHOUT ANY WARRANTY; without even the implied warranty of %
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the %
+% GNU General Public License for more details. %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\chapter{Building OCaml Projects with {\tt ocp-build}}
+
+{\tt ocp-build} can be used to compile simple OCaml projects.
+The tool uses simple configuration files to describe the
+packages that need to be compiled, and the dependencies between
+them.
+
+Compared to other OCaml building tools, it provides the following
+particularities:
+\begin{itemize}
+\item {\tt ocp-build} supports complete parallel builds. Its improved
+ understanding of OCaml compilation constraints avoids traditionnal
+ problems, arising from conflicts while compiling interfaces.
+\item {\tt ocp-build} configuration files provide a simple and concise
+ way to handle the complexity of OCaml projects.
+\item {\tt ocp-build} supports complex compilation rules, such as
+ per-file options, packing and C stubs files.
+\item {\tt ocp-build} can use either a set of attributes or a digest
+ of the content of a file to detect files' modifications to decide
+ which files should be rebuilt.
+\end{itemize}
+
+\section{Configuration Files}
+
+ {\tt ocp-build} uses two different kind of files to describe a project:
+\begin{itemize}
+\item Each package (or set of packages) should be described in a file
+ with an {\tt .ocp} extension. When {\tt ocp-build} is run with the
+ {\tt -scan} option, it scans the directory to find all such
+ configuration files, and adds them to the project.
+\item The project should be described in a file {\tt
+ ocp-build.root}. This file should be at the root of the project, and
+ {\tt ocp-build} will try to find it by recursively scanning all the
+ parents directories. If it does not exist, it should be created using
+ the {\tt -init} option.
+\end{itemize}
+
+\section{Compilation Layout}
+
+{\tt ocp-build} generates files both in the source directories and in
+a special {\tt \_obuild} directory, depending on the nature of the
+files:
+\begin{itemize}
+\item Temporary source files and compilation garbage are stored in the
+ source directories. This set includes implementation and interfaces
+ files generated by {\tt ocamllex} and {\tt ocamlyacc}, and other
+ special files such as {\tt .annot} files.
+\item Binary object files are stored in the {\tt \_obuild} directory,
+ where a sub-directory is created for each package.
+\end{itemize}
+
+\section{Format of the package description files ({\tt .ocp})}
+
+\subsection{Description of Simple Packages}
+
+A simple package description looks like this:
+
+\begin{verbatim}
+begin library "ocplib-system"
+ files = [ "file.ml" "process.ml" ]
+ requires = [ "unix" ]
+end
+\end{verbatim}
+
+This description explains to {\tt ocp-build} that a library {\tt
+ ocplib-system} should be built from source files {\tt file.ml} and
+{\tt process.ml} (and possibly {\tt file.mli} and {\tt process.mli}),
+and that this library depends on the {\tt unix} library to be built.
+
+Another simple description is:
+
+\begin{verbatim}
+begin program "file-checker"
+ files = [ "checkFiles.ml" "checkMain.ml" ]
+ requires = [ "ocplib-system" ]
+end
+\end{verbatim}
+
+This description tells {\tt ocp-build} that it should build an
+executable {\tt file-checker} from the provided source files, and with
+a dependency towards {\tt ocplib-system}. {\tt ocp-build} will
+automatically add the dependency towards {\tt unix} required by {\tt
+ ocplib-system}.
+
+\subsection{Advanced options}
+
+\subsubsection{Per-file options}
+
+Options can be specified on a per-file basis:
+
+\begin{verbatim}
+begin library "ocplib-fast"
+ files = [
+ "fastHashtbl.ml" (asmcomp = [ "-inline"; "30" ])
+ "fastString.ml"
+ ]
+end
+\end{verbatim}
+
+They can also be specified for a group of files:
+
+\begin{verbatim}
+begin library "ocplib-fast"
+ files = [
+ begin (asmcomp = [ "-inline"; "30" ])
+ "fastHashtbl.ml"
+ "fastMap.ml"
+ end
+ "fastString.ml"
+ ]
+end
+\end{verbatim}
+
+\subsubsection{Configurations}
+
+\subsubsection{Preprocessor requirements: {\tt pp\_requires}}
+
+The {\tt pp\_requires} option can be used to declare a dependency
+between one or more source files and a preprocessor that should thus
+be built before. The preprocessor must be specified as a program
+package in a projet, plus the target (bytecode {\tt byte} or native
+{\tt asm}):
+
+\begin{verbatim}
+begin library "ocplib-doc"
+ files = [
+ "docHtml.ml" (
+ pp = [ "./_obuild/ocp-pp/ocp-pp.byte ]
+ pp_requires = [ "ocp-pp:byte" ]
+ )
+ "docInfo.ml"
+ ]
+ requires = ["ocp-pp"]
+end
+\end{verbatim}
+
+Note that you still need:
+\begin{itemize}
+\item To specify the package in the {\tt requires} directive, to ensure that
+ this package will be available when your package will need it for processing.
+\item To specify the command {\tt pp} to call the preprocessor
+\end{itemize}
+
+\section{Command line options}
+
0  libs/ocamlpro/debug/debugVerbosity.ml → libs/debug/debugVerbosity.ml
View
File renamed without changes
0  libs/ocamlpro/debug/debugVerbosity.mli → libs/debug/debugVerbosity.mli
View
File renamed without changes
0  libs/ocamlpro/debug/ocplib-debug.ocp → libs/debug/ocplib-debug.ocp
View
File renamed without changes
0  libs/ocamlpro/lang/.gitignore → libs/lang/.gitignore
View
File renamed without changes
0  libs/ocamlpro/lang/intMap.ml → libs/lang/intMap.ml
View
File renamed without changes
0  libs/ocamlpro/lang/intSet.ml → libs/lang/intSet.ml
View
File renamed without changes
0  libs/ocamlpro/lang/linearToposort.ml → libs/lang/linearToposort.ml
View
File renamed without changes
0  libs/ocamlpro/lang/linearToposort.mli → libs/lang/linearToposort.mli
View
File renamed without changes
0  libs/ocamlpro/lang/ocamllexer.mli → libs/lang/ocamllexer.mli
View
File renamed without changes
0  libs/ocamlpro/lang/ocamllexer.mll → libs/lang/ocamllexer.mll
View
File renamed without changes
0  libs/ocamlpro/lang/ocpDigest.ml → libs/lang/ocpDigest.ml
View
File renamed without changes
0  libs/ocamlpro/lang/ocpDigest.mli → libs/lang/ocpDigest.mli
View
File renamed without changes
0  libs/ocamlpro/lang/ocpGenlex.ml → libs/lang/ocpGenlex.ml
View
File renamed without changes
0  libs/ocamlpro/lang/ocpGenlex.mli → libs/lang/ocpGenlex.mli
View
File renamed without changes
0  libs/ocamlpro/lang/ocpHashtbl.ml → libs/lang/ocpHashtbl.ml
View
File renamed without changes
0  libs/ocamlpro/lang/ocpHashtbl.mli → libs/lang/ocpHashtbl.mli
View
File renamed without changes
0  libs/ocamlpro/lang/ocpLang.ml → libs/lang/ocpLang.ml
View
File renamed without changes
0  libs/ocamlpro/lang/ocpList.ml → libs/lang/ocpList.ml
View
File renamed without changes
0  libs/ocamlpro/lang/ocpList.mli → libs/lang/ocpList.mli
View
File renamed without changes
0  libs/ocamlpro/lang/ocpList_test.ml → libs/lang/ocpList_test.ml
View
File renamed without changes
0  libs/ocamlpro/lang/ocpPervasives.ml → libs/lang/ocpPervasives.ml
View
File renamed without changes
0  libs/ocamlpro/lang/ocpPervasives.mli → libs/lang/ocpPervasives.mli
View
File renamed without changes
0  libs/ocamlpro/lang/ocpStream.ml → libs/lang/ocpStream.ml
View
File renamed without changes
0  libs/ocamlpro/lang/ocpStream.mli → libs/lang/ocpStream.mli
View
File renamed without changes
0  libs/ocamlpro/lang/ocpString.ml → libs/lang/ocpString.ml
View
File renamed without changes
0  libs/ocamlpro/lang/ocpString.mli → libs/lang/ocpString.mli
View
File renamed without changes
0  libs/ocamlpro/lang/ocpString_test.ml → libs/lang/ocpString_test.ml
View
File renamed without changes
0  libs/ocamlpro/lang/ocplib-lang.ocp → libs/lang/ocplib-lang.ocp
View
File renamed without changes
0  libs/ocamlpro/lang/option.ml → libs/lang/option.ml
View
File renamed without changes
0  libs/ocamlpro/lang/option.mli → libs/lang/option.mli
View
File renamed without changes
0  libs/ocamlpro/lang/stringMap.ml → libs/lang/stringMap.ml
View
File renamed without changes
0  libs/ocamlpro/lang/stringSet.ml → libs/lang/stringSet.ml
View
File renamed without changes
0  libs/ocamlpro/lang/test.ml → libs/lang/test.ml
View
File renamed without changes
0  libs/ocamlpro/lang/test.mli → libs/lang/test.mli
View
File renamed without changes
0  libs/ocamlpro/lang/toposort.ml → libs/lang/toposort.ml
View
File renamed without changes
0  libs/ocamlpro/lang/toposort.mli → libs/lang/toposort.mli
View
File renamed without changes
0  libs/ocamlpro/lang/trie.ml → libs/lang/trie.ml
View
File renamed without changes
0  libs/ocamlpro/lang/trie.mli → libs/lang/trie.mli
View
File renamed without changes
1  libs/ocaml-compiler/approx/.gitignore
View
@@ -1 +0,0 @@
-oCamlApproxLexer.ml
27 libs/ocaml-compiler/approx/README.md
View
@@ -1,27 +0,0 @@
-**************************************************************************
-* *
-* TypeRex OCaml Studio *
-* Thomas Gazagnaire, Fabrice Le Fessant *
-* *
-* OCaml *
-* Xavier Leroy, projet Cristal, INRIA Rocquencourt *
-* *
-* Copyright 2011-2012 OCamlPro *
-* Copyright 1996-2011 INRIA. *
-* All rights reserved. This file is distributed under the terms of *
-* the GNU Public License version 3.0. *
-* *
-* TypeRex is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-**************************************************************************
-
-To use the approximate parser instead of the standard one in your projects, use :
-
-```
-open Approx_parsing
-```
-
-
18 libs/ocaml-compiler/approx/approx_common.mli
View
@@ -1,18 +0,0 @@
-(******************************************************************************)
-(* *)
-(* TypeRex OCaml Tools *)
-(* *)
-(* OCamlPro *)
-(* *)
-(* Copyright 2011-2012 OCamlPro *)
-(* All rights reserved. See accompanying files for the terms under *)
-(* which this file is distributed. In doubt, contact us at *)
-(* contact@ocamlpro.com (http://www.ocamlpro.com/) *)
-(* *)
-(******************************************************************************)
-
-(* Instead of raising an error when a CHAR, INT, INT32, INT64 or NATIVEINT
-overflows, we just changed the returned value to take that into account. *)
-type 'a overflow =
- | InRange of 'a
- | Overflow of string
52 libs/ocaml-compiler/approx/approx_lexer.mli
View
@@ -1,52 +0,0 @@
-(******************************************************************************)
-(* *)
-(* TypeRex OCaml Tools *)
-(* *)
-(* OCamlPro *)
-(* *)
-(* Copyright 2011-2012 OCamlPro *)
-(* All rights reserved. See accompanying files for the terms under *)
-(* which this file is distributed. In doubt, contact us at *)
-(* contact@ocamlpro.com (http://www.ocamlpro.com/) *)
-(* *)
-(******************************************************************************)
-
-module Make(Tokens : Approx_tokens.Sig) : sig
-
- val init : unit -> unit
- val token : Lexing.lexbuf -> Tokens.token
- val token_with_comments: Lexing.lexbuf -> Tokens.token
- val token_pos : Lexing.lexbuf -> Tokens.token * (int * int)
- val comments : unit -> (int * int) list
- val token_locs : Lexing.lexbuf ->
- Tokens.token * (Lexing.position * Lexing.position)
- val token_locs_and_comments : Lexing.lexbuf ->
- Tokens.token * (Lexing.position * Lexing.position)
- val tokens_of_file :
- string -> (Tokens.token * (int * int)) list
- val tokens_of_string :
- string -> Tokens.token list
- val tokens_with_loc_of_string :
- string -> (Tokens.token * (int * int)) list
- val lines : unit -> (int * int) list
- val string_of_token : Tokens.token -> string
-end
-
-include Approx_tokens.Sig
-
-val string_of_token : token -> string
-
-val init : unit -> unit
-val token : Lexing.lexbuf -> token
-val token_with_comments: Lexing.lexbuf -> token
-val token_pos : Lexing.lexbuf -> token * (int * int)
-val comments : unit -> (int * int) list
-val token_locs : Lexing.lexbuf ->
- token * (Lexing.position * Lexing.position)
-val token_locs_and_comments : Lexing.lexbuf ->
- token * (Lexing.position * Lexing.position)
-val tokens_of_file : string -> (token * (int * int)) list
-val tokens_of_string : string -> token list
- val tokens_with_loc_of_string :
- string -> (token * (int * int)) list
-val lines : unit -> (int * int) list
581 libs/ocaml-compiler/approx/approx_lexer.mll
View
@@ -1,581 +0,0 @@
-(******************************************************************************)
-(* *)
-(* TypeRex OCaml Tools *)
-(* *)
-(* OCamlPro *)
-(* *)
-(* Copyright 2011-2012 OCamlPro *)
-(* All rights reserved. See accompanying files for the terms under *)
-(* which this file is distributed. In doubt, contact us at *)
-(* contact@ocamlpro.com (http://www.ocamlpro.com/) *)
-(* *)
-(******************************************************************************)
-
-(***********************************************************************)
-(* *)
-(* Objective Caml *)
-(* *)
-(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
-(* *)
-(* Copyright 1996 Institut National de Recherche en Informatique et *)
-(* en Automatique. All rights reserved. This file is distributed *)
-(* under the terms of the Q Public License version 1.0. *)
-(* *)
-(***********************************************************************)
-
-{
-
-module Make(Tokens : Approx_tokens.Sig) = struct
-
- open Tokens
- open OcpLang
- open Lexing
- open Approx_common
-
- let comment_stack = ref []
- let lines_starts = ref []
-
- let init () =
- comment_stack := [];
- lines_starts := []
-
- let comments () =
- List.rev !comment_stack
-
-(* The table of keywords *)
-
- let create_hashtable n list =
- let t = Hashtbl.create n in
- List.iter (fun (x,y) -> Hashtbl.add t x y) list;
- t
-
- let keyword_table =
- create_hashtable 149 [
- "and", AND;
- "as", AS;
- "assert", ASSERT;
- "begin", BEGIN;
- "class", CLASS;
- "constraint", CONSTRAINT;
- "do", DO;
- "done", DONE;
- "downto", DOWNTO;
- "else", ELSE;
- "end", END;
- "exception", EXCEPTION;
- "external", EXTERNAL;
- "false", FALSE;
- "for", FOR;
- "fun", FUN;
- "function", FUNCTION;
- "functor", FUNCTOR;
- "if", IF;
- "in", IN;
- "include", INCLUDE;
- "inherit", INHERIT;
- "initializer", INITIALIZER;
- "lazy", LAZY;
- "let", LET;
- "match", MATCH;
- "method", METHOD;
- "module", MODULE;
- "mutable", MUTABLE;
- "new", NEW;
- "object", OBJECT;
- "of", OF;
- "open", OPEN;
- "or", OR;
- (* "parser", PARSER; *)
- "private", PRIVATE;
- "rec", REC;
- "sig", SIG;
- "struct", STRUCT;
- "then", THEN;
- "to", TO;
- "true", TRUE;
- "try", TRY;
- "type", TYPE;
- "val", VAL;
- "virtual", VIRTUAL;
- "when", WHEN;
- "while", WHILE;
- "with", WITH;
-
- "mod", INFIXOP3("mod");
- "land", INFIXOP3("land");
- "lor", INFIXOP3("lor");
- "lxor", INFIXOP3("lxor");
- "lsl", INFIXOP4("lsl");
- "lsr", INFIXOP4("lsr");
- "asr", INFIXOP4("asr")
- ]
-
-(* To buffer string literals *)
-
-
-let initial_string_buffer = String.create 256
-let string_buff = ref initial_string_buffer
-let string_index = ref 0
-
-let reset_string_buffer () =
- string_buff := initial_string_buffer;
- string_index := 0
-
-let store_string_char c =
- if !string_index >= String.length (!string_buff) then begin
- let new_buff = String.create (String.length (!string_buff) * 2) in
- String.blit (!string_buff) 0 new_buff 0 (String.length (!string_buff));
- string_buff := new_buff
- end;
- String.unsafe_set (!string_buff) (!string_index) c;
- incr string_index
-
-let get_stored_string () =
- let s = String.sub (!string_buff) 0 (!string_index) in
- string_buff := initial_string_buffer;
- s
-
-(* To store the position of the beginning of a string and comment *)
-let string_start_loc = ref (-1);;
-let comment_start_loc = ref [];;
-let in_comment () = !comment_start_loc <> [];;
-
-(* To translate escape sequences *)
-
-let char_for_backslash = function
- | 'n' -> '\010'
- | 'r' -> '\013'
- | 'b' -> '\008'
- | 't' -> '\009'
- | c -> c
-
-let can_overflow f lexbuf =
- let s = Lexing.lexeme lexbuf in
- try InRange (f s) with Failure _ -> Overflow s
-
-let char_for_decimal_code i s =
- let c = 100 * (Char.code(s.[i]) - 48) +
- 10 * (Char.code(s.[i+1]) - 48) +
- (Char.code(s.[i+2]) - 48) in
- if (c < 0 || c > 255) then
- failwith "Bad escaped decimal char"
- else Char.chr c
-
-let char_for_hexadecimal_code lexbuf i =
- let d1 = Char.code (Lexing.lexeme_char lexbuf i) in
- let val1 = if d1 >= 97 then d1 - 87
- else if d1 >= 65 then d1 - 55
- else d1 - 48
- in
- let d2 = Char.code (Lexing.lexeme_char lexbuf (i+1)) in
- let val2 = if d2 >= 97 then d2 - 87
- else if d2 >= 65 then d2 - 55
- else d2 - 48
- in
- Char.chr (val1 * 16 + val2)
-
-(* To convert integer literals, allowing max_int + 1 (PR#4210) *)
-
-let cvt_int_literal s =
- - int_of_string ("-" ^ s)
-let cvt_int32_literal s =
- Int32.neg (Int32.of_string ("-" ^ String.sub s 0 (String.length s - 1)))
-let cvt_int64_literal s =
- Int64.neg (Int64.of_string ("-" ^ String.sub s 0 (String.length s - 1)))
-let cvt_nativeint_literal s =
- Nativeint.neg (Nativeint.of_string ("-" ^ String.sub s 0 (String.length s - 1)))
-
-(* Remove underscores from float literals *)
-
-let remove_underscores s =
- let l = String.length s in
- let rec remove src dst =
- if src >= l then
- if dst >= l then s else String.sub s 0 dst
- else
- match s.[src] with
- '_' -> remove (src + 1) dst
- | c -> s.[dst] <- c; remove (src + 1) (dst + 1)
- in remove 0 0
-
-(* Update the current location with file name and line number. *)
-
-let update_loc lexbuf file line absolute chars =
- let pos = lexbuf.lex_curr_p in
- let new_file = match file with
- | None -> pos.pos_fname
- | Some s -> s
- in
- lexbuf.lex_curr_p <- { pos with
- pos_fname = new_file;
- pos_lnum = if absolute then line else pos.pos_lnum + line;
- pos_bol = pos.pos_cnum - chars;
- };
- lines_starts := (lexbuf.lex_curr_p.pos_lnum, lexbuf.lex_curr_p.pos_bol) :: !lines_starts;
-;;
-
-}
-
-let newline = ('\010' | '\013' | "\013\010")
-let blank = [' ' '\009' '\012']
-let lowercase = ['a'-'z' '\223'-'\246' '\248'-'\255' '_']
-let uppercase = ['A'-'Z' '\192'-'\214' '\216'-'\222']
-let identchar =
- ['A'-'Z' 'a'-'z' '_' '\192'-'\214' '\216'-'\246' '\248'-'\255' '\'' '0'-'9']
-let symbolchar =
- ['!' '$' '%' '&' '*' '+' '-' '.' '/' ':' '<' '=' '>' '?' '@' '^' '|' '~']
-let decimal_literal =
- ['0'-'9'] ['0'-'9' '_']*
- let hex_literal =
- '0' ['x' 'X'] ['0'-'9' 'A'-'F' 'a'-'f']['0'-'9' 'A'-'F' 'a'-'f' '_']*
- let oct_literal =
- '0' ['o' 'O'] ['0'-'7'] ['0'-'7' '_']*
- let bin_literal =
- '0' ['b' 'B'] ['0'-'1'] ['0'-'1' '_']*
- let int_literal =
- decimal_literal | hex_literal | oct_literal | bin_literal
-let float_literal =
- ['0'-'9'] ['0'-'9' '_']*
- ('.' ['0'-'9' '_']* )?
- (['e' 'E'] ['+' '-']? ['0'-'9'] ['0'-'9' '_']*)?
-
- rule token = parse
- | newline
- { update_loc lexbuf None 1 false 0;
- token lexbuf
- }
- | blank +
- { token lexbuf }
- | "_"
- { UNDERSCORE }
- | "~"
- { TILDE }
- | "~" lowercase identchar * ':'
- { let s = Lexing.lexeme lexbuf in
- let name = String.sub s 1 (String.length s - 2) in
- (*
- if Hashtbl.mem keyword_table name then
- raise (Error(Keyword_as_label name, Location.curr lexbuf));
- *)
- LABEL name }
- | "?" { QUESTION }
- | "??" { QUESTIONQUESTION }
- | "?" lowercase identchar * ':'
- { let s = Lexing.lexeme lexbuf in
- let name = String.sub s 1 (String.length s - 2) in
- (*
- if Hashtbl.mem keyword_table name then
- raise (Error(Keyword_as_label name, Location.curr lexbuf));
- *)
- OPTLABEL name }
- | lowercase identchar *
- { let s = Lexing.lexeme lexbuf in
- try
- Hashtbl.find keyword_table s
- with Not_found ->
- LIDENT s }
- | uppercase identchar *
- { UIDENT(Lexing.lexeme lexbuf) } (* No capitalized keywords *)
- | int_literal
- { INT (can_overflow cvt_int_literal lexbuf) }
- | float_literal
- { FLOAT (remove_underscores(Lexing.lexeme lexbuf)) }
- | int_literal "l"
- { INT32 (can_overflow cvt_int32_literal lexbuf) }
- | int_literal "L"
- { INT64 (can_overflow cvt_int64_literal lexbuf) }
- | int_literal "n"
- { NATIVEINT (can_overflow cvt_nativeint_literal lexbuf) }
- | "\""
- { reset_string_buffer();
- let string_start = lexbuf.lex_start_p in
- string_start_loc := Lexing.lexeme_start lexbuf;
- let token = string lexbuf in
- lexbuf.lex_start_p <- string_start;
- token }
- | "'" newline "'"
- { update_loc lexbuf None 1 false 1;
- CHAR (InRange (Lexing.lexeme_char lexbuf 1)) }
- | "'" [^ '\\' '\'' '\010' '\013'] "'"
- { CHAR( InRange (Lexing.lexeme_char lexbuf 1)) }
- | "'\\" ['\\' '\'' '"' 'n' 't' 'b' 'r' ' '] "'"
- { CHAR( InRange (char_for_backslash (Lexing.lexeme_char lexbuf 2))) }
- | "'\\" ['0'-'9'] ['0'-'9'] ['0'-'9'] "'"
- { CHAR(can_overflow (char_for_decimal_code 2) lexbuf) }
- | "'\\" 'x' ['0'-'9' 'a'-'f' 'A'-'F'] ['0'-'9' 'a'-'f' 'A'-'F'] "'"
- { CHAR( InRange (char_for_hexadecimal_code lexbuf 3)) }
- | "'\\" _
- { let l = Lexing.lexeme lexbuf in
- CHAR ( Overflow l )
- }
- | "(*"
- {
- let comment_start = lexbuf.lex_start_p in
- comment_start_loc := [Lexing.lexeme_start lexbuf];
- let token= comment lexbuf in
- lexbuf.lex_start_p <- comment_start;
- token
- }
- | "*)"
- {
- (* let loc = Location.curr lexbuf in *)
- (* Location.prerr_warning loc Warnings.Comment_not_end; *)
- lexbuf.Lexing.lex_curr_pos <- lexbuf.Lexing.lex_curr_pos - 1;
- let curpos = lexbuf.lex_curr_p in
- lexbuf.lex_curr_p <- { curpos with pos_cnum = curpos.pos_cnum - 1 };
- STAR
- }
- | "#" [' ' '\t']* (['0'-'9']+ as num) [' ' '\t']*
- ("\"" ([^ '\010' '\013' '"' ] * as name) "\"")?
- [^ '\010' '\013'] * newline
- { update_loc lexbuf name (int_of_string num) true 0;
- token lexbuf
- }
- | "#" { SHARP }
- | "&" { AMPERSAND }
- | "&&" { AMPERAMPER }
- | "`" { BACKQUOTE }
- | "'" { QUOTE }
- | "(" { LPAREN }
- | ")" { RPAREN }
- | "*" { STAR }
- | "," { COMMA }
- | "->" { MINUSGREATER }
- | "." { DOT }
- | ".." { DOTDOT }
- | ":" { COLON }
- | "::" { COLONCOLON }
- | ":=" { COLONEQUAL }
- | ":>" { COLONGREATER }
- | ";" { SEMI }
- | ";;" { SEMISEMI }
- | "<" { LESS }
- | "<-" { LESSMINUS }
- | "=" { EQUAL }
- | "[" { LBRACKET }
- | "[|" { LBRACKETBAR }
- | "[<" { LBRACKETLESS }
- | "[>" { LBRACKETGREATER }
- | "]" { RBRACKET }
- | "{" { LBRACE }
- | "{<" { LBRACELESS }
- | "|" { BAR }
- | "||" { BARBAR }
- | "|]" { BARRBRACKET }
- | ">" { GREATER }
- | ">]" { GREATERRBRACKET }
- | "}" { RBRACE }
- | ">}" { GREATERRBRACE }
- | "!" { BANG }
-
- | "!=" { INFIXOP0 "!=" }
- | "+" { PLUS }
- | "+." { PLUSDOT }
- | "-" { MINUS }
- | "-." { MINUSDOT }
-
- | "!" symbolchar +
- { PREFIXOP(Lexing.lexeme lexbuf) }
- | ['~' '?'] symbolchar +
- { PREFIXOP(Lexing.lexeme lexbuf) }
- | ['=' '<' '>' '|' '&' '$'] symbolchar *
- { INFIXOP0(Lexing.lexeme lexbuf) }
- | ['@' '^'] symbolchar *
- { INFIXOP1(Lexing.lexeme lexbuf) }
- | ['+' '-'] symbolchar *
- { INFIXOP2(Lexing.lexeme lexbuf) }
- | "**" symbolchar *
- { INFIXOP4(Lexing.lexeme lexbuf) }
- | ['*' '/' '%'] symbolchar *
- { INFIXOP3(Lexing.lexeme lexbuf) }
- | eof { EOF }
- | _
- { ILLEGAL_CHAR (Lexing.lexeme_char lexbuf 0) }
-
- and comment = parse
- "(*"
- { comment_start_loc := (Lexing.lexeme_start lexbuf) :: !comment_start_loc;
- comment lexbuf;
- }
- | "*)"
- { match !comment_start_loc with
- | [] -> assert false
- | [x] ->
- comment_start_loc := [];
- comment_stack := (x, Lexing.lexeme_end lexbuf) :: !comment_stack;
- COMMENT (x, Lexing.lexeme_end lexbuf)
- | _ :: l -> comment_start_loc := l;
- comment lexbuf;
- }
- | "\""
- { reset_string_buffer();
- string_start_loc := Lexing.lexeme_start lexbuf;
- let s = string lexbuf in
- reset_string_buffer ();
- match s with
- | EOF_IN_STRING _ ->
- let pos = List.last !comment_start_loc in
- comment_start_loc := [];
- EOF_IN_COMMENT pos
- | STRING _ -> comment lexbuf
- | _ -> assert false
-
- }
- | "''"
- { comment lexbuf }
- | "'" newline "'"
- { update_loc lexbuf None 1 false 1;
- comment lexbuf
- }
- | "'" [^ '\\' '\'' '\010' '\013' ] "'"
- { comment lexbuf }
- | "'\\" ['\\' '"' '\'' 'n' 't' 'b' 'r' ' '] "'"
- { comment lexbuf }
- | "'\\" ['0'-'9'] ['0'-'9'] ['0'-'9'] "'"
- { comment lexbuf }
- | "'\\" 'x' ['0'-'9' 'a'-'f' 'A'-'F'] ['0'-'9' 'a'-'f' 'A'-'F'] "'"
- { comment lexbuf }
- | eof
- {
- let pos = List.last !comment_start_loc in
- comment_start_loc := [];
- EOF_IN_COMMENT pos
- }
- | newline
- { update_loc lexbuf None 1 false 0;
- comment lexbuf
- }
- | _
- { comment lexbuf }
-
- and string = parse
- '"'
- { STRING (get_stored_string ()) }
- | '\\' newline ([' ' '\t'] * as space)
- { update_loc lexbuf None 1 false (String.length space);
- string lexbuf
- }
- | '\\' ['\\' '\'' '"' 'n' 't' 'b' 'r' ' ']
- { store_string_char(char_for_backslash(Lexing.lexeme_char lexbuf 1));
- string lexbuf }
- | '\\' ['0'-'9'] ['0'-'9'] ['0'-'9']
- { store_string_char(char_for_decimal_code 1 (Lexing.lexeme lexbuf));
- string lexbuf }
- | '\\' 'x' ['0'-'9' 'a'-'f' 'A'-'F'] ['0'-'9' 'a'-'f' 'A'-'F']
- { store_string_char(char_for_hexadecimal_code lexbuf 2);
- string lexbuf }
- | '\\' _
- { if in_comment ()
- then string lexbuf
- else begin
- (* Should be an error, but we are very lax.
- raise (Error (Illegal_escape (Lexing.lexeme lexbuf),
- Location.curr lexbuf))
- *)
- store_string_char (Lexing.lexeme_char lexbuf 0);
- store_string_char (Lexing.lexeme_char lexbuf 1);
- string lexbuf
- end
- }
- | newline
- {
- update_loc lexbuf None 1 false 0;
- let s = Lexing.lexeme lexbuf in
- for i = 0 to String.length s - 1 do
- store_string_char s.[i];
- done;
- string lexbuf
- }
- | eof
- { EOF_IN_STRING !string_start_loc }
- | _
- { store_string_char(Lexing.lexeme_char lexbuf 0);
- string lexbuf }
-
- {
-
- let rec token_locs lexbuf =
- match token lexbuf with
- COMMENT _ -> token_locs lexbuf
- | EOF_IN_COMMENT _ ->
- EOF, ( lexbuf.lex_start_p, lexbuf.lex_start_p)
- | EOF_IN_STRING _ ->
- EOF, ( lexbuf.lex_start_p, lexbuf.lex_start_p)
- | token ->
- token, ( lexbuf.lex_start_p, lexbuf.lex_curr_p)
-
- let rec token_pos lexbuf =
- match token lexbuf with
- COMMENT _ -> token_pos lexbuf
- | EOF_IN_COMMENT _ ->
- EOF, ( lexbuf.lex_start_p.pos_cnum, lexbuf.lex_start_p.pos_cnum)
- | EOF_IN_STRING _ ->
- EOF, ( lexbuf.lex_start_p.pos_cnum, lexbuf.lex_start_p.pos_cnum)
- | token ->
- token, ( lexbuf.lex_start_p.pos_cnum, lexbuf.lex_curr_p.pos_cnum)
-
-
- let token_locs_and_comments lexbuf =
- let token = token lexbuf in
- token, ( lexbuf.lex_start_p, lexbuf.lex_curr_p)
-
- let get_token = token
-
- let token_with_comments = get_token
-
- let rec token lexbuf =
- match get_token lexbuf with
- COMMENT _ -> token lexbuf
- | EOF_IN_COMMENT _
- | EOF_IN_STRING _ -> EOF