Permalink
Browse files

Merge ioke-clr

  • Loading branch information...
olabini committed Apr 21, 2009
1 parent aedf7d6 commit 83dfbe50b947692add528eb8f155d1e51b71c523
Showing with 34,476 additions and 35 deletions.
  1. +6 −0 COPYING
  2. +13 −0 LICENSE.icu4j
  3. +3,734 −0 bin/Antlr3.Runtime.xml
  4. +61 −0 bin/Antlr3.Utility.XML
  5. BIN bin/FSharp.Core.dll
  6. +235 −0 ioke-ikc.build
  7. +3 −3 src/builtin/A05_conditions.ik
  8. +2 −0 src/ikc/builtin/D50_runtime.ik
  9. +299 −0 src/ikc/grammar/ioke.g
  10. +62 −0 src/ikc/main/Ioke.Lang/AliasMethod.cs
  11. +149 −0 src/ikc/main/Ioke.Lang/Arity.cs
  12. +333 −0 src/ikc/main/Ioke.Lang/AssignmentBehavior.cs
  13. +7 −0 src/ikc/main/Ioke.Lang/AssociatedCode.cs
  14. +315 −0 src/ikc/main/Ioke.Lang/Base.cs
  15. +18 −0 src/ikc/main/Ioke.Lang/Builtin.cs
  16. +140 −0 src/ikc/main/Ioke.Lang/Call.cs
  17. +69 −0 src/ikc/main/Ioke.Lang/CaseBehavior.cs
  18. +27 −0 src/ikc/main/Ioke.Lang/Condition.cs
  19. +469 −0 src/ikc/main/Ioke.Lang/ConditionsBehavior.cs
  20. +86 −0 src/ikc/main/Ioke.Lang/ControlFlow.cs
  21. +89 −0 src/ikc/main/Ioke.Lang/DateTime.cs
  22. +249 −0 src/ikc/main/Ioke.Lang/Decimal.cs
  23. +580 −0 src/ikc/main/Ioke.Lang/DefaultArgumentsDefinition.cs
  24. +110 −0 src/ikc/main/Ioke.Lang/DefaultBehavior.cs
  25. +298 −0 src/ikc/main/Ioke.Lang/DefaultMacro.cs
  26. +308 −0 src/ikc/main/Ioke.Lang/DefaultMethod.cs
  27. +340 −0 src/ikc/main/Ioke.Lang/DefaultSyntax.cs
  28. +213 −0 src/ikc/main/Ioke.Lang/DefinitionsBehavior.cs
  29. +285 −0 src/ikc/main/Ioke.Lang/Dict.cs
  30. +10 −0 src/ikc/main/Ioke.Lang/DokgenMain.cs
  31. +58 −0 src/ikc/main/Ioke.Lang/Extensions/Benchmark/Benchmark.cs
  32. +100 −0 src/ikc/main/Ioke.Lang/Extensions/Readline/Readline.cs
  33. +384 −0 src/ikc/main/Ioke.Lang/FileSystem.cs
  34. +323 −0 src/ikc/main/Ioke.Lang/FlowControlBehavior.cs
  35. +8 −0 src/ikc/main/Ioke.Lang/Globber.cs
  36. +58 −0 src/ikc/main/Ioke.Lang/Ground.cs
  37. +7 −0 src/ikc/main/Ioke.Lang/Handler.cs
  38. +10 −0 src/ikc/main/Ioke.Lang/ISpecMain.cs
  39. +26 −0 src/ikc/main/Ioke.Lang/IdentityHashTable.cs
  40. +6 −0 src/ikc/main/Ioke.Lang/Inspectable.cs
  41. +213 −0 src/ikc/main/Ioke.Lang/InternalBehavior.cs
  42. +387 −0 src/ikc/main/Ioke.Lang/IokeData.cs
  43. +138 −0 src/ikc/main/Ioke.Lang/IokeIO.cs
  44. +829 −0 src/ikc/main/Ioke.Lang/IokeList.cs
  45. +886 −0 src/ikc/main/Ioke.Lang/IokeObject.cs
  46. +199 −0 src/ikc/main/Ioke.Lang/IokeSet.cs
  47. +459 −0 src/ikc/main/Ioke.Lang/IokeSystem.cs
  48. +199 −0 src/ikc/main/Ioke.Lang/LexicalBlock.cs
  49. +70 −0 src/ikc/main/Ioke.Lang/LexicalContext.cs
  50. +261 −0 src/ikc/main/Ioke.Lang/LexicalMacro.cs
  51. +108 −0 src/ikc/main/Ioke.Lang/LiteralsBehavior.cs
  52. +93 −0 src/ikc/main/Ioke.Lang/Locals.cs
  53. +223 −0 src/ikc/main/Ioke.Lang/Main.cs
  54. +1,404 −0 src/ikc/main/Ioke.Lang/Message.cs
  55. +101 −0 src/ikc/main/Ioke.Lang/Method.cs
  56. +40 −0 src/ikc/main/Ioke.Lang/Mixins.cs
  57. +5 −0 src/ikc/main/Ioke.Lang/Named.cs
  58. +74 −0 src/ikc/main/Ioke.Lang/NativeMethod.cs
  59. +15 −0 src/ikc/main/Ioke.Lang/NullObject.cs
  60. +496 −0 src/ikc/main/Ioke.Lang/Number.cs
  61. +18 −0 src/ikc/main/Ioke.Lang/Origin.cs
  62. +122 −0 src/ikc/main/Ioke.Lang/Pair.cs
  63. +523 −0 src/ikc/main/Ioke.Lang/Parser/FunctionalOperatorShuffler.fs
  64. +14 −0 src/ikc/main/Ioke.Lang/Parser/IOperatorShuffler.cs
  65. +586 −0 src/ikc/main/Ioke.Lang/Parser/Levels.cs
  66. +87 −0 src/ikc/main/Ioke.Lang/Parser/Lexer.cs
  67. +25 −0 src/ikc/main/Ioke.Lang/Parser/Parser.cs
  68. +325 −0 src/ikc/main/Ioke.Lang/Range.cs
  69. +203 −0 src/ikc/main/Ioke.Lang/ReflectionBehavior.cs
  70. +183 −0 src/ikc/main/Ioke.Lang/Regexp.cs
  71. +325 −0 src/ikc/main/Ioke.Lang/RegexpMatch.cs
  72. +7 −0 src/ikc/main/Ioke.Lang/Rescue.cs
  73. +66 −0 src/ikc/main/Ioke.Lang/Restart.cs
  74. +1,007 −0 src/ikc/main/Ioke.Lang/Runtime.cs
  75. +20 −0 src/ikc/main/Ioke.Lang/SpaceshipComparator.cs
  76. +110 −0 src/ikc/main/Ioke.Lang/Symbol.cs
  77. +714 −0 src/ikc/main/Ioke.Lang/Text.cs
  78. +46 −0 src/ikc/main/Ioke.Lang/TypeChecker.cs
  79. +156 −0 src/ikc/main/Ioke.Lang/TypeCheckingArgumentsDefinition.cs
  80. +25 −0 src/ikc/main/Ioke.Lang/TypeCheckingNativeMethod.cs
  81. +613 −0 src/ikc/main/Ioke.Lang/Util/Dir.cs
  82. +69 −0 src/ikc/main/Ioke.Lang/Util/SaneArrayList.cs
  83. +32 −0 src/ikc/main/Ioke.Lang/Util/SaneDictionary.cs
  84. +29 −0 src/ikc/main/Ioke.Lang/Util/SaneHashSet.cs
  85. +37 −0 src/ikc/main/Ioke.Lang/Util/SaneHashtable.cs
  86. +36 −0 src/ikc/main/Ioke.Lang/Util/SaneList.cs
  87. +36 −0 src/ikc/main/Ioke.Lang/Util/SaneOrderedDictionary.cs
  88. +433 −0 src/ikc/main/Ioke.Lang/Util/StringUtils.cs
  89. +2,221 −0 src/ikc/main/Ioke.Math/BigDecimal.cs
  90. +412 −0 src/ikc/main/Ioke.Math/BitOps.cs
  91. +5 −0 src/ikc/main/Ioke.Math/Complex.cs
  92. +138 −0 src/ikc/main/Ioke.Math/IntFraction.cs
  93. +1,573 −0 src/ikc/main/Ioke.Math/IntNum.cs
  94. +687 −0 src/ikc/main/Ioke.Math/MPN.cs
  95. +108 −0 src/ikc/main/Ioke.Math/MathContext.cs
  96. +127 −0 src/ikc/main/Ioke.Math/Numeric.cs
  97. +48 −0 src/ikc/main/Ioke.Math/Quantity.cs
  98. +156 −0 src/ikc/main/Ioke.Math/RatNum.cs
  99. +283 −0 src/ikc/main/Ioke.Math/RealNum.cs
  100. +492 −0 src/ikc/main/NRegex/Bitset.cs
  101. +719 −0 src/ikc/main/NRegex/CharacterClass.cs
  102. +13 −0 src/ikc/main/NRegex/MatchIterator.cs
  103. +37 −0 src/ikc/main/NRegex/MatchResult.cs
  104. +1,753 −0 src/ikc/main/NRegex/Matcher.cs
  105. +127 −0 src/ikc/main/NRegex/Optimizer.cs
  106. +261 −0 src/ikc/main/NRegex/Pattern.cs
  107. +6 −0 src/ikc/main/NRegex/PatternSyntaxException.cs
  108. +121 −0 src/ikc/main/NRegex/PerlSubstitution.cs
  109. +114 −0 src/ikc/main/NRegex/RETokenizer.cs
  110. +313 −0 src/ikc/main/NRegex/Replacer.cs
  111. +6 −0 src/ikc/main/NRegex/Substitution.cs
  112. +1,965 −0 src/ikc/main/NRegex/Term.cs
  113. +8 −0 src/ikc/main/NRegex/TextBuffer.cs
  114. +43 −0 src/ikc/main/NRegex/UnicodeConstants.cs
  115. +65 −0 src/ikc/main/NRegex/WildcardPattern.cs
  116. +1,084 −0 src/ikc/main/getline.cs
  117. +1 −1 src/ikj/main/ioke/lang/JavaFieldGetterNativeMethod.java
  118. +1 −1 src/ikj/main/ioke/lang/JavaFieldSetterNativeMethod.java
  119. +1 −1 src/ikj/main/ioke/lang/JavaGround.java
  120. +2 −2 src/ikj/main/ioke/lang/JavaMethodNativeMethod.java
  121. +1 −1 src/ikj/main/ioke/lang/Message.java
  122. +5 −5 src/ikj/main/ioke/lang/Runtime.java
  123. +3 −3 test/base_spec.ik
  124. +1 −1 test/boolean_spec.ik
  125. +2 −2 test/conditions_spec.ik
  126. +4 −3 test/ground_spec.ik
  127. +2 −1 test/ispec_spec.ik
  128. +2 −0 test/java_ground_spec.ik
  129. +2 −0 test/java_integrate_spec.ik
  130. +3 −3 test/nil_spec.ik
  131. +4 −4 test/parsing_spec.ik
  132. +20 −4 test/runtime_spec.ik
View
@@ -1,7 +1,13 @@
Different parts of Ioke is covered by different licences and copyrights:
+ikj:
The package ioke.lang is covered by the file LICENSE.
The package gnu.math is covered by the file LICENSE.kawa.
The package org.jregex and subpackages contains their own licensing information in the source files.
+ikc:
+The namepsace Ioke.Lang is covered by the file LICENSE.
+The namespace Ioke.Math is covered by the file LICENSE.kawa.
+The class Ioke.Math.BigDecimal and Ioke.Math.MathContext is covered by the file LICENSE.icu4j
+
Everything else is covered by the file LICENSE, unless noted.
View
@@ -0,0 +1,13 @@
+
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright (c) 1995-2009 International Business Machines Corporation and others
+
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Software and that both the above copyright notice(s) and this permission notice appear in supporting documentation.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder.
+
View

Large diffs are not rendered by default.

Oops, something went wrong.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
Binary file not shown.
View
@@ -0,0 +1,235 @@
+<?xml version="1.0"?>
+
+<project name="ioke" default="build" basedir=".">
+ <description>
+ ioke is a next generation language, based on Io, Self, Smalltalk, Ruby and Lisp
+ </description>
+
+ <property name="src.raw.dir" value="src"/>
+ <property name="src.dir" value="src/ikc/main"/>
+ <property name="src.generated.dir" value="src/ikc/generated/Ioke.Lang.Parser"/>
+ <property name="src.generated.dir.relative" value="../generated/Ioke.Lang.Parser"/>
+ <property name="antlr.grammar.dir" value="src/ikc/grammar"/>
+ <property name="antlr.grammar.file" value="ioke.g"/>
+ <property name="lib.dir" value="lib"/>
+ <property name="lib.build.dir" value="${lib.dir}/build"/>
+ <property name="bin.dir" value="bin"/>
+ <property name="release.dir" value="rels"/>
+ <property name="build.dir" value="build"/>
+ <property name="build.filtered.dir" value="${build.dir}/filtered"/>
+
+ <target name="prepare" description="Creates the directories needed for building">
+ <mkdir dir="${src.generated.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${build.filtered.dir}"/>
+ <mkdir dir="${release.dir}"/>
+
+ <uptodate property="grammar.notUpdated">
+ <sourcefiles>
+ <include name="${antlr.grammar.dir}/${antlr.grammar.file}" />
+ </sourcefiles>
+ <targetfiles>
+ <include name="${src.generated.dir}/iokeLexer.cs" />
+ </targetfiles>
+ </uptodate>
+ </target>
+
+ <target name="generate.antlr" depends="prepare" description="Generates source files from the ANTLR definitions" unless="${grammar.notUpdated}">
+ <exec program="java" workingdir="${antlr.grammar.dir}">
+ <arg value="-Xmx256m"/>
+ <arg value="-cp"/>
+ <arg file="lib/build/antlr-3.1.2.jar"/>
+ <arg value="org.antlr.Tool"/>
+ <arg value="-Xconversiontimeout"/>
+ <arg value="100000"/>
+ <arg line="-o ${src.generated.dir.relative} ${antlr.grammar.file}"/>
+ </exec>
+ </target>
+
+ <target name="generate_filters" depends="generate.antlr" description="Generates source files from the ANTLR definitions">
+ <exec program="ruby" failonerror="false">
+ <arg value="generate_filter_data.rb"/>
+ </exec>
+ </target>
+
+ <target name="compile" depends="generate_filters" description="Compile the source files for the project.">
+ <csc target="library" output="${bin.dir}/NRegex.dll" debug="true">
+ <sources>
+ <include name="${src.dir}/NRegex/**/*.cs" />
+ </sources>
+ </csc>
+
+ <csc target="library" output="${bin.dir}/Ioke.Math.dll" debug="true">
+ <sources>
+ <include name="${src.dir}/Ioke.Math/**/*.cs" />
+ </sources>
+ </csc>
+
+ <script language="C#" prefix="version">
+ <code>
+ <![CDATA[
+ [Function("extract-date")]
+ public static string ExtractDate() {
+ try {
+ string outp = System.IO.File.ReadAllText("version_data.properties");
+ string[] pieces = outp.Split('\n');
+ return pieces[0].Split('=')[1];
+ } catch(System.Exception) { return "???"; }
+ }
+
+ [Function("extract-commit")]
+ public static string ExtractCommit() {
+ try {
+ string outp = System.IO.File.ReadAllText("version_data.properties");
+ string[] pieces = outp.Split('\n');
+ return pieces[1].Split('=')[1];
+ } catch(System.Exception) { return "???"; }
+ }
+ ]]>
+ </code>
+ </script>
+
+ <echo file="${build.filtered.dir}/Ioke.Lang.version.properties">ioke.build.version=E
+ioke.build.runtimeVersion=0.1.0-snapshot
+ioke.build.versionString=Ioke E ikc 0.1.0-snapshot
+ioke.build.date=${version::extract-date()}
+ioke.build.commit=${version::extract-commit()}
+ </echo>
+
+ <csc target="library" output="${bin.dir}/Ioke.Lang.dll" debug="true">
+ <sources>
+ <include name="${src.dir}/getline.cs" />
+ <include name="${src.dir}/Ioke.Lang/**/*.cs" />
+ <include name="${src.generated.dir}/**/*.cs" />
+ <exclude name="${src.dir}/Ioke.Lang/Main.cs"/>
+ <exclude name="${src.dir}/Ioke.Lang/ISpecMain.cs"/>
+ <exclude name="${src.dir}/Ioke.Lang/DokgenMain.cs"/>
+ </sources>
+ <references basedir="${bin.dir}">
+ <include name="*.dll" />
+ <exclude name="Ioke.Lang.dll" />
+ </references>
+ <resources basedir="${src.raw.dir}" dynamicprefix="true">
+ <include name="builtin/**/*.ik" />
+ </resources>
+ <resources basedir="${src.raw.dir}/ikc" dynamicprefix="true">
+ <include name="builtin/**/*.ik" />
+ </resources>
+ <resources basedir="${build.filtered.dir}" dynamicprefix="true">
+ <include name="*.properties" />
+ </resources>
+ </csc>
+
+ <exec program="fsc">
+ <arg line="-a -o ${bin.dir}/Ioke.Lang.Parser.Functional.dll"/>
+ <arg line="-r ${bin.dir}/Ioke.Lang.dll"/>
+ <arg line="-r ${bin.dir}/Ioke.Math.dll"/>
+ <arg line="-r ${bin.dir}/FSharp.Core.dll"/>
+ <arg value="${src.dir}/Ioke.Lang/Parser/FunctionalOperatorShuffler.fs"/>
+ </exec>
+
+ <csc target="exe" output="${bin.dir}/ioke.exe" debug="true">
+ <sources>
+ <include name="${src.dir}/Ioke.Lang/Main.cs"/>
+ </sources>
+ <references basedir="${bin.dir}">
+ <include name="Ioke.Lang.dll" />
+ <include name="FSharp.Core.dll" />
+ <include name="Ioke.Lang.Parser.Functional.dll" />
+ </references>
+ </csc>
+
+ <csc target="exe" output="${bin.dir}/ispec.exe" debug="true">
+ <sources>
+ <include name="${src.dir}/Ioke.Lang/ISpecMain.cs"/>
+ </sources>
+ <references basedir="${bin.dir}">
+ <include name="ioke.exe" />
+ </references>
+ </csc>
+
+ <csc target="exe" output="${bin.dir}/dokgen.exe" debug="true">
+ <sources>
+ <include name="${src.dir}/Ioke.Lang/DokgenMain.cs"/>
+ </sources>
+ <references basedir="${bin.dir}">
+ <include name="ioke.exe" />
+ </references>
+ </csc>
+ </target>
+
+ <target name="test" depends="compile" description="Runs all ISpec tests">
+ <exec program="bin/ispec.exe">
+ <arg line="test -fs"/>
+ </exec>
+ </target>
+
+ <target name="build" depends="test" description="Builds everything">
+ </target>
+
+ <target name="dist-bin">
+ <tar destfile="${release.dir}/ioke-E-ikc-0.1.0-snapshot.tar.gz" compression="GZip">
+ <fileset filemode="755" basedir="." prefix="ioke">
+ <include name="bin/*.dll"/>
+ <include name="bin/*.exe"/>
+ <include name="bin/ispec"/>
+ <include name="bin/dokgen"/>
+ </fileset>
+
+ <fileset basedir="." prefix="ioke">
+ <include name="lib/ioke/**"/>
+ <include name="dok/**"/>
+ <include name="share/**"/>
+ <include name="COPYING"/>
+ <include name="LICENSE"/>
+ <include name="LICENSE.kawa"/>
+ <include name="LICENSE.icu4j"/>
+ <include name="README"/>
+ </fileset>
+ </tar>
+
+ <zip zipfile="${release.dir}/ioke-E-ikc-0.1.0-snapshot.zip">
+ <fileset basedir="." prefix="ioke">
+ <include name="bin/*.dll"/>
+ <include name="bin/*.exe"/>
+ <include name="bin/ispec"/>
+ <include name="bin/dokgen"/>
+ </fileset>
+
+ <fileset basedir="." prefix="ioke">
+ <include name="lib/ioke/**"/>
+ <include name="dok/**"/>
+ <include name="share/**"/>
+ <include name="COPYING"/>
+ <include name="LICENSE"/>
+ <include name="LICENSE.kawa"/>
+ <include name="LICENSE.icu4j"/>
+ <include name="README"/>
+ </fileset>
+ </zip>
+ </target>
+
+ <target name="dist" depends="build, dist-bin"/>
+ <target name="dist-notest" depends="compile, dist-bin"/>
+
+ <target name="clean" description="clean almost everything">
+ <delete file="${bin.dir}/ioke.dll"/>
+ <delete file="${bin.dir}/ioke.dll.mdb"/>
+ <delete file="${bin.dir}/ioke.exe"/>
+ <delete file="${bin.dir}/ioke.exe.mdb"/>
+ <delete file="${bin.dir}/ispec.exe"/>
+ <delete file="${bin.dir}/ispec.exe.mdb"/>
+ <delete file="${bin.dir}/dokgen.exe"/>
+ <delete file="${bin.dir}/dokgen.exe.mdb"/>
+ <delete file="${bin.dir}/Ioke.Lang.dll"/>
+ <delete file="${bin.dir}/Ioke.Lang.dll.mdb"/>
+ <delete file="${bin.dir}/Ioke.Lang.Parser.Functional.dll"/>
+ <delete file="${bin.dir}/Ioke.Lang.Parser.Functional.dll.mdb"/>
+ <delete file="${bin.dir}/Ioke.Math.dll"/>
+ <delete file="${bin.dir}/Ioke.Math.dll.mdb"/>
+ <delete file="${bin.dir}/NRegex.dll"/>
+ <delete file="${bin.dir}/NRegex.dll.mdb"/>
+ <delete dir="${src.generated.dir}"/>
+ </target>
+</project>
+
@@ -12,7 +12,7 @@ Condition Error Type = Condition Error mimic
Condition Error Index = Condition Error mimic
Condition Error RestartNotActive = Condition Error mimic
Condition Error CommandLine = Condition Error mimic
-Condition Error JavaException = Condition Error mimic
+Condition Error NativeException = Condition Error mimic
Condition Error Parser = Condition Error mimic
@@ -43,8 +43,8 @@ Condition report = method(
#{context stackTraceAsText}")
-Condition Error JavaException report = method(
- "returns a representation of this error, showing some information about the java exception",
+Condition Error NativeException report = method(
+ "returns a representation of this error, showing some information about the native exception",
stackTrace = "%[ %s\n%]" format(self exceptionStackTrace)
@@ -0,0 +1,2 @@
+
+Runtime version = Origin with(machine: "ikc", versionNumber: [0,1,0])
Oops, something went wrong.

0 comments on commit 83dfbe5

Please sign in to comment.