Permalink
Browse files

first commit

  • Loading branch information...
0 parents commit 8d56ba1adb67927af22fee747c483552db68e9e5 @alavrik committed Jul 6, 2010
Showing with 23,424 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +105 −0 INSTALL
  3. +178 −0 LICENSE
  4. +29 −0 Makefile
  5. +55 −0 NOTICE
  6. +65 −0 README
  7. +1 −0 VERSION
  8. +1 −0 bin/piqi
  9. +1 −0 bin/piqic
  10. +1 −0 bin/piqicc
  11. +5 −0 camlp4/META.templ
  12. +28 −0 camlp4/Makefile
  13. +95 −0 camlp4/pa_labelscope.ml
  14. +34 −0 camlp4/pa_openin.ml
  15. +33 −0 deps/Makefile
  16. +21 −0 deps/easy-format-1.0.0/Changes
  17. +24 −0 deps/easy-format-1.0.0/LICENSE
  18. +5 −0 deps/easy-format-1.0.0/META
  19. +4 −0 deps/easy-format-1.0.0/META.tpl
  20. +87 −0 deps/easy-format-1.0.0/Makefile
  21. +25 −0 deps/easy-format-1.0.0/README
  22. +3 −0 deps/easy-format-1.0.0/TODO
  23. +555 −0 deps/easy-format-1.0.0/easy_format.ml
  24. +225 −0 deps/easy-format-1.0.0/easy_format.mli
  25. +6 −0 deps/easy-format-1.0.0/examples/Makefile
  26. +164 −0 deps/easy-format-1.0.0/examples/jsonpp.ml
  27. +224 −0 deps/easy-format-1.0.0/examples/sample.json
  28. +122 −0 deps/easy-format-1.0.0/lambda_example.ml
  29. +237 −0 deps/easy-format-1.0.0/simple_example.ml
  30. +111 −0 deps/easy-format-1.0.0/test_easy_format.ml
  31. +55 −0 deps/easy-format-1.0.0/test_format.ml
  32. +854 −0 deps/ocaml-make-release-6.29.3/Changelog
  33. +502 −0 deps/ocaml-make-release-6.29.3/LICENSE
  34. +1,277 −0 deps/ocaml-make-release-6.29.3/OCamlMakefile
  35. +640 −0 deps/ocaml-make-release-6.29.3/README.txt
  36. +37 −0 deps/ulex-1.1/CHANGES
  37. +22 −0 deps/ulex-1.1/LICENSE
  38. +7 −0 deps/ulex-1.1/META
  39. +59 −0 deps/ulex-1.1/Makefile
  40. +161 −0 deps/ulex-1.1/README
  41. +3 −0 deps/ulex-1.1/_tags
  42. +404 −0 deps/ulex-1.1/cset.ml
  43. +48 −0 deps/ulex-1.1/custom_ulexing.ml
  44. +9 −0 deps/ulex-1.1/myocamlbuild.ml
  45. +270 −0 deps/ulex-1.1/pa_ulex.ml
  46. +31 −0 deps/ulex-1.1/test.ml
  47. +134 −0 deps/ulex-1.1/ulex.ml
  48. +11 −0 deps/ulex-1.1/ulex.mli
  49. +203 −0 deps/ulex-1.1/ulexing.ml
  50. +203 −0 deps/ulex-1.1/ulexing.mli
  51. +146 −0 deps/ulex-1.1/utf16.ml
  52. +100 −0 deps/ulex-1.1/utf16.mli
  53. +139 −0 deps/ulex-1.1/utf8.ml
  54. +13 −0 deps/ulex-1.1/utf8.mli
  55. +18 −0 deps/ulex-1.1/utf8_test.ml
  56. +16 −0 editors/vim/piq.vim
  57. +37 −0 examples/Makefile
  58. +19 −0 examples/addressbook/Makefile
  59. +42 −0 examples/addressbook/Makefile.ocaml
  60. +26 −0 examples/addressbook/README
  61. +107 −0 examples/addressbook/add_person.ml
  62. +54 −0 examples/addressbook/addressbook.piq
  63. +33 −0 examples/addressbook/addressbook.proto
  64. +84 −0 examples/addressbook/addressbook.proto.piqi
  65. +32 −0 examples/addressbook/addressbook.proto.piqi.proto
  66. +50 −0 examples/addressbook/list_people.ml
  67. +58 −0 examples/addressbook/test_ocaml
  68. +4 −0 examples/bool.piq
  69. +11 −0 examples/comment.piq
  70. +12 −0 examples/complex.piq
  71. +30 −0 examples/complex.piqi
  72. +151 −0 examples/def.piqi
  73. 0 examples/empty.piq
  74. +6 −0 examples/flag.piq
  75. +45 −0 examples/float.piq
  76. +60 −0 examples/int.piq
  77. +9 −0 examples/list.piq
  78. +19 −0 examples/person.piq
  79. +43 −0 examples/person.piqi
  80. +33 −0 examples/piq-text.piq
  81. +8 −0 examples/piq-word.piq
  82. +43 −0 examples/proto/def.piqi.proto
  83. +14 −0 examples/record-variant-list.piq
  84. +16 −0 examples/record-variant-list.piqi
  85. +28 −0 examples/string.piq
  86. +38 −0 examples/test_piq
  87. +38 −0 examples/test_piqi
  88. +21 −0 examples/test_piqi_proto
  89. +20 −0 make/Makefile.dirs
  90. +3 −0 make/Makefile.ocaml
  91. +1 −0 make/OCamlMakefile
  92. +48 −0 piqi.org/Makefile
  93. +121 −0 piqi.org/piqast.piqi
  94. +85 −0 piqi.org/piqi-base.piqi
  95. +135 −0 piqi.org/piqi-boot.piqi
  96. +46 −0 piqi.org/piqi-proto.piqi
  97. +23 −0 piqi.org/piqi.piqi
  98. +109 −0 piqi.org/piqtype-core.piqi
  99. +49 −0 piqi.org/piqtype-wire.piqi
  100. +148 −0 piqi.org/piqtype.piqi
  101. +61 −0 piqi/Makefile
  102. +74 −0 piqi/Makefile.piqi_common
  103. +631 −0 piqi/descriptor.piqi
  104. +263 −0 piqi/piq.ml
  105. +332 −0 piqi/piq_gen.ml
  106. +379 −0 piqi/piq_lexer.ml
  107. +553 −0 piqi/piq_parser.ml
  108. +45 −0 piqi/piqi-impl.piqi
  109. +1,138 −0 piqi/piqi.ml
  110. +1 −0 piqi/piqi_c.idl
  111. +6 −0 piqi/piqi_c.ml
  112. +6 −0 piqi/piqi_c.mli
  113. +60 −0 piqi/piqi_c_impl.c
  114. +65 −0 piqi/piqi_check.ml
  115. +261 −0 piqi/piqi_common.ml
  116. +61 −0 piqi/piqi_config.ml
  117. +202 −0 piqi/piqi_convert.ml
  118. +106 −0 piqi/piqi_db.ml
  119. +143 −0 piqi/piqi_expand.ml
  120. +64 −0 piqi/piqi_file.ml
  121. +94 −0 piqi/piqi_iolist.ml
  122. +283 −0 piqi/piqi_main.ml
  123. +104 −0 piqi/piqi_name.ml
  124. +682 −0 piqi/piqi_of_proto.ml
  125. +188 −0 piqi/piqi_pp.ml
  126. +21 −0 piqi/piqi_run.ml
  127. +487 −0 piqi/piqi_to_proto.ml
  128. +222 −0 piqi/piqi_wire.ml
  129. +133 −0 piqi/piqloc.ml
  130. +124 −0 piqi/piqobj.ml.m4
  131. +142 −0 piqi/piqobj.piqi
  132. +89 −0 piqi/piqobj_common.ml
  133. +652 −0 piqi/piqobj_of_piq.ml
  134. +336 −0 piqi/piqobj_of_wire.ml
  135. +158 −0 piqi/piqobj_to_piq.ml
  136. +255 −0 piqi/piqobj_to_wire.ml
  137. +41 −0 piqic/Makefile
  138. +22 −0 piqic/piqi-boot-ocaml.piqi
  139. +37 −0 piqic/piqi-ocaml.piqi
  140. +3 −0 piqic/piqic-boot.piqi
  141. +8 −0 piqic/piqic.piqi
  142. +19 −0 piqic/piqic_common.ml
  143. +268 −0 piqic/piqic_ocaml.ml
  144. +302 −0 piqic/piqic_ocaml_in.ml
  145. +283 −0 piqic/piqic_ocaml_out.ml
  146. +343 −0 piqic/piqic_ocaml_types.ml
  147. +21 −0 piqic/piqic_run.ml
  148. +51 −0 piqicc/Makefile
  149. +17 −0 piqicc/Makefile.boot
  150. +24 −0 piqicc/Makefile.boot2
  151. +23 −0 piqicc/Makefile.piqicc_common
  152. +26 −0 piqicc/Makefile.reboot
  153. +94 −0 piqicc/boot.ml
  154. +102 −0 piqicc/boot/piqast.ml.m4
  155. +588 −0 piqicc/boot/piqdefs.ml
  156. +146 −0 piqicc/boot/piqi-boot.piqi
  157. +218 −0 piqicc/boot/piqtype.ml.m4
  158. +3 −0 piqicc/piqicc-boot.piqi
  159. +178 −0 piqicc/piqicc.ml
  160. +8 −0 piqicc/piqicc.piqi
  161. +19 −0 piqicc/piqicc_run.ml
  162. +4 −0 piqirun-ocaml/META.templ
  163. +57 −0 piqirun-ocaml/Makefile
  164. +354 −0 piqirun-ocaml/piqirun_gen.ml
  165. +561 −0 piqirun-ocaml/piqirun_parser.ml
  166. +124 −0 piqirun-ocaml/test.ml
  167. +19 −0 piqirun-ocaml/test.ocaml
  168. +26 −0 setenv.sh
  169. +15 −0 tests/Makefile
  170. +21 −0 tests/README
  171. +1 −0 tests/addressbook
  172. +34 −0 tests/boot_proto2piqi/Makefile
  173. +10 −0 tests/boot_proto2piqi/README
  174. +433 −0 tests/boot_proto2piqi/descriptor.proto
  175. +79 −0 tests/boot_proto2piqi/main.cc
  176. +378 −0 tests/boot_proto2piqi/proto2piqi.cc
  177. +38 −0 tests/boot_proto2piqi/proto2piqi.h
  178. +23 −0 tests/cpp/Makefile
  179. +5 −0 tests/cpp/Makefile.cpp
  180. +7 −0 tests/cpp/README
  181. +31 −0 tests/cpp/test.cpp
  182. +1 −0 tests/examples
  183. +24 −0 tests/ocaml/Makefile
  184. +16 −0 tests/ocaml/Makefile.ocaml
  185. +13 −0 tests/ocaml/README
  186. +16 −0 tests/ocaml/test.ml
  187. +1 −0 tests/piqi.org
  188. +1 −0 tests/piqi_proto/.gitignore
  189. +8 −0 tests/piqi_proto/Makefile
  190. +9 −0 tests/piqi_proto/README
  191. +84 −0 tests/piqi_proto/test
@@ -0,0 +1 @@
+build
105 INSTALL
@@ -0,0 +1,105 @@
+SUPPORTED PLATFORMS
+===================
+
+Piqi is written in Objective Caml language so theoretically it should work on
+platforms and hardware architectures supported by Objective Caml. See the page
+below for the list of supported platforms:
+
+ http://caml.inria.fr/ocaml/portability.en.html
+
+
+So far, Piqi has been tested only on Debian Linux (Lenny and Squeeze, i386 and
+amd64 architectures).
+
+Current build procedure is likely not going to work on Windows out of the box,
+but it shouldn't be hard to adapt it.
+
+
+PREREQUISITES
+=============
+
+* Objective Caml compiler and standard library
+
+ Recommended (tested) version is 3.11.2. Older versions may not work
+ properly.
+
+ OCaml is available in most Linux distributions. It can also be
+ downloaded from here:
+
+ http://caml.inria.fr/download.en.html
+
+
+* CamlP4 -- Caml Preprocessor and Pretty Printer
+
+ It comes as a part of OCaml source distribution. It should be
+ prepackaged in major Linux distributions as well.
+
+
+* Ocamlfind/Findlib -- library manager for Objective Caml
+
+ If installed separately form prepackaged OCaml distribution, it is
+ recommended to build it from sources after you build/install OCaml. It
+ can be downloaded from here:
+
+ http://projects.camlcity.org/projects/findlib.html
+
+* C compiler
+
+ GCC works. Other compilers should work if they are able to build OCaml.
+
+
+* GNU make, m4, sed and probably some other tools.
+
+
+On Debian Squeeze, the above dependencies can be installed using the following
+command:
+
+ apt-get install ocaml camlp4-extra ocaml-findlib gcc m4 make sed
+
+
+INSTALLATION INSTRUCTIONS
+=========================
+
+NOTE: these instruction are applicable only to Unix/Linux systems.
+
+
+1. Edit setenv.sh file to set build configuration variables if necessary.
+
+2. Apply build configuration by running
+
+ . setenv.sh
+
+ or
+
+ source setenv.sh
+
+3. Make sure that "ocamlfind" program is in PATH
+
+4. Build third-party components
+
+ cd deps
+ make
+ cd ..
+
+5. Build piqi
+
+ make
+
+6. Install "piqi" and "piqic" binaries (optional)
+
+ make install
+
+
+The following steps are necessary only is you are going to use piqi interface
+compiler (piqic) for OCaml.
+
+7. Install piqi runtime library and piqi camlp4 extensions
+
+ make libinstall
+
+
+RUNNING TESTS
+=============
+
+See tests/README for instructions.
+
178 LICENSE
@@ -0,0 +1,178 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
@@ -0,0 +1,29 @@
+include $(PIQI_ROOT)/make/Makefile.dirs
+
+
+DIRS = \
+ camlp4 \
+ piqirun-ocaml \
+ piqicc piqic piqi \
+
+
+install:
+ -install -d $(PIQI_PREFIX)/bin
+ install piqi/piqi $(PIQI_PREFIX)/bin
+ install piqic/piqic $(PIQI_PREFIX)/bin
+
+
+libinstall:
+ $(MAKE) -C piqirun-ocaml libinstall
+ $(MAKE) -C camlp4 libinstall
+
+
+libuninstall:
+ $(MAKE) -C piqirun-ocaml libuninstall
+ $(MAKE) -C camlp4 libuninstall
+
+
+clean::
+ $(MAKE) -C deps clean
+ $(MAKE) -C tests clean
+
55 NOTICE
@@ -0,0 +1,55 @@
+
+Piq interfaces and tools
+Copyright 2009, 2010 Anton Lavrik
+
+This distribution includes software originally developed by Anton Lavrik as a
+part of the Piqi project (http://piqi.org).
+
+Except where otherwise noted, content of this distribution is licensed under the
+terms of Apache License Version 2 (see "LICENSE" file).
+
+Current distribution includes several third-party components which are used by
+Piqi implementation. They are provided as a part of the distribution for the
+convenience of Piqi users.
+
+Below is the list of the third-party components with their descriptions and
+locations in the directory tree. Look for their license terms in correspondent
+directories.
+
+
+ulex
+====
+ Unicode lexer generator for OCaml written by Alain Frisch.
+
+ Location: deps/ulex-1.1/
+ Homepage: http://alain.frisch.fr/soft.html
+ License: MIT
+
+
+open-in
+=======
+ Camlp4 syntax extension implementing locally open modules written by
+ Alain Frisch.
+
+ Location: camlp4/pa_openin.ml
+ Homepage: http://alain.frisch.fr/soft.html
+ License: Public Domain
+
+
+ocaml-make
+==========
+ Automated compilation of complex OCaml-projects written by Markus Mottl.
+
+ Location: deps/ocaml-make-release-6.29.3
+ Homepage: http://www.ocaml.info/home/ocaml_sources.html
+ License: LGPL
+
+
+easy-format
+===========
+ Pretty-printing library for OCaml written by Martin Jambon.
+
+ Location: deps/easy-format-1.0.0/
+ Homepage: http://martin.jambon.free.fr/easy-format.html
+ License: BSD
+
Oops, something went wrong.

0 comments on commit 8d56ba1

Please sign in to comment.