├── .classpath ├── .gitignore ├── .project ├── README.md ├── bin ├── ozastc ├── ozma └── ozmac ├── build.xml ├── docs └── examples │ ├── .gitignore │ ├── boundedbuffer │ └── BoundedBuffer.scala │ ├── digitallogic │ ├── DigitalClock.scala │ ├── TestDigitalLogic.scala │ ├── Utils.scala │ └── digitallogic │ │ ├── Bit.scala │ │ ├── Gates.scala │ │ ├── Signal.scala │ │ ├── SignalOps.scala │ │ └── package.scala │ ├── echo │ └── Echo.scala │ ├── exceptions │ └── calculator.scala │ ├── helloworld │ └── helloworld │ │ └── HelloWorld.scala │ ├── josephus │ └── Josephus.scala │ ├── mergesort │ └── MergeSort.scala │ ├── ports │ └── TestPort.scala │ ├── primes │ └── PrimeNumbers.scala │ ├── serverport │ └── ServerPort.scala │ ├── tokenring │ └── TokenRing.scala │ ├── tossingtheball │ └── TossingTheBall.scala │ ├── trees │ └── BinaryTrees.scala │ └── trivialthread │ └── TrivialThread.scala └── src ├── compiler └── scala │ └── tools │ └── nsc │ ├── backend │ ├── MozartPlatform.scala │ ├── mozart │ │ ├── GenMozart.scala │ │ └── GenOzCode.scala │ └── ozcode │ │ ├── ASTs.scala │ │ ├── Members.scala │ │ ├── Natives.scala │ │ ├── OzCodes.scala │ │ ├── TypeKinds.scala │ │ └── opt │ │ └── TailCalls.scala │ └── ozma │ ├── CaseClassTailCalls.scala │ ├── Main.scala │ ├── OzmaGlobal.scala │ ├── OzmaLambdaLift.scala │ ├── OzmaSubComponent.scala │ ├── OzmaTrees.scala │ ├── SingleAssignVals.scala │ └── WhileLoopRecovering.scala ├── engine ├── ObjectMonitor.oz ├── OzmaEngine.oz └── OzmaRuntime.oz ├── javalib └── java │ ├── io │ ├── Appendable.scala │ ├── Closeable.scala │ ├── FilterOutputStream.scala │ ├── Flushable.scala │ ├── OutputStream.scala │ ├── PrintStream.scala │ └── Serializable.scala │ ├── lang │ ├── Array.oz │ ├── Boolean.scala │ ├── Character.scala │ ├── Class.oz │ ├── InheritableThreadLocal.scala │ ├── Numbers.scala │ ├── Object.oz │ ├── Runtime.scala │ ├── String.oz │ ├── System.scala │ ├── ThreadLocal.scala │ ├── Throwables.scala │ ├── Void.scala │ └── reflect │ │ └── Array.scala │ └── util │ └── Throwables.scala ├── library ├── ozma │ ├── Port.scala │ ├── Random.scala │ └── ResultPort.scala └── scala │ └── ozma │ ├── LazyList.scala │ ├── ListAgent.scala │ ├── ListWrapper.scala │ ├── package.scala │ ├── singleAssignment.scala │ └── tailcall.scala ├── ozastc ├── ASTFrontEnd.oz ├── ASTPatch.oz └── Compile.oz └── scalalib └── scala ├── AnyVal.scala ├── AnyValCompanion.scala ├── App.scala ├── Application.scala ├── Array.scala ├── Boolean.scala ├── Byte.scala ├── Cell.scala ├── Char.scala ├── Console.scala ├── CountedIterator.scala ├── DelayedInit.scala ├── Double.scala ├── Dynamic.scala ├── Either.scala ├── Enumeration.scala ├── Equals.scala ├── Float.scala ├── Function.scala ├── Function0.scala ├── Function1.scala ├── Function10.scala ├── Function11.scala ├── Function12.scala ├── Function13.scala ├── Function14.scala ├── Function15.scala ├── Function16.scala ├── Function17.scala ├── Function18.scala ├── Function19.scala ├── Function2.scala ├── Function20.scala ├── Function21.scala ├── Function22.scala ├── Function3.scala ├── Function4.scala ├── Function5.scala ├── Function6.scala ├── Function7.scala ├── Function8.scala ├── Function9.scala ├── Immutable.scala ├── Int.scala ├── Long.scala ├── LowPriorityImplicits.scala ├── MatchError.scala ├── Math.scala ├── MathCommon.scala ├── Mutable.scala ├── NotDefinedError.scala ├── NotNull.scala ├── Option.scala ├── PartialFunction.scala ├── Predef.scala ├── Product.scala ├── Product1.scala ├── Product10.scala ├── Product11.scala ├── Product12.scala ├── Product13.scala ├── Product14.scala ├── Product15.scala ├── Product16.scala ├── Product17.scala ├── Product18.scala ├── Product19.scala ├── Product2.scala ├── Product20.scala ├── Product21.scala ├── Product22.scala ├── Product3.scala ├── Product4.scala ├── Product5.scala ├── Product6.scala ├── Product7.scala ├── Product8.scala ├── Product9.scala ├── Proxy.scala ├── Responder.scala ├── ScalaObject.scala ├── SerialVersionUID.scala ├── Serializable.scala ├── Short.scala ├── SpecializableCompanion.scala ├── Symbol.scala ├── Tuple1.scala ├── Tuple10.scala ├── Tuple11.scala ├── Tuple12.scala ├── Tuple13.scala ├── Tuple14.scala ├── Tuple15.scala ├── Tuple16.scala ├── Tuple17.scala ├── Tuple18.scala ├── Tuple19.scala ├── Tuple2.scala ├── Tuple20.scala ├── Tuple21.scala ├── Tuple22.scala ├── Tuple3.scala ├── Tuple4.scala ├── Tuple5.scala ├── Tuple6.scala ├── Tuple7.scala ├── Tuple8.scala ├── Tuple9.scala ├── UninitializedError.scala ├── UninitializedFieldError.scala ├── Unit.scala ├── annotation ├── Annotation.scala ├── ClassfileAnnotation.scala ├── StaticAnnotation.scala ├── TypeConstraint.scala ├── bridge.scala ├── elidable.scala ├── implicitNotFound.scala ├── migration.scala ├── serializable.scala ├── strictfp.scala ├── switch.scala ├── tailrec.scala ├── target │ ├── beanGetter.scala │ ├── beanSetter.scala │ ├── field.scala │ ├── getter.scala │ ├── package.scala │ ├── param.scala │ └── setter.scala ├── unchecked │ ├── uncheckedStable.scala │ └── uncheckedVariance.scala └── varargs.scala ├── cloneable.scala ├── collection ├── BitSet.scala ├── BitSetLike.scala ├── BufferedIterator.scala ├── CustomParallelizable.scala ├── DefaultMap.scala ├── GenIterable.scala ├── GenIterableLike.scala ├── GenIterableView.scala ├── GenIterableViewLike.scala ├── GenMap.scala ├── GenMapLike.scala ├── GenSeq.scala ├── GenSeqLike.scala ├── GenSeqView.scala ├── GenSeqViewLike.scala ├── GenSet.scala ├── GenSetLike.scala ├── GenTraversable.scala ├── GenTraversableLike.scala ├── GenTraversableOnce.scala ├── GenTraversableView.scala ├── GenTraversableViewLike.scala ├── IndexedSeq.scala ├── IndexedSeqLike.scala ├── IndexedSeqOptimized.scala ├── Iterable.scala ├── IterableLike.scala ├── IterableProxy.scala ├── IterableProxyLike.scala ├── IterableView.scala ├── IterableViewLike.scala ├── Iterator.scala ├── JavaConversions.scala ├── JavaConverters.scala ├── LinearSeq.scala ├── LinearSeqLike.scala ├── LinearSeqOptimized.scala ├── Map.scala ├── MapLike.scala ├── MapProxy.scala ├── MapProxyLike.scala ├── Parallel.scala ├── Parallelizable.scala ├── Seq.scala ├── SeqLike.scala ├── SeqProxy.scala ├── SeqProxyLike.scala ├── SeqView.scala ├── SeqViewLike.scala ├── Sequentializable.scala.disabled ├── Set.scala ├── SetLike.scala ├── SetProxy.scala ├── SetProxyLike.scala ├── SortedMap.scala ├── SortedMapLike.scala ├── SortedSet.scala ├── SortedSetLike.scala ├── Traversable.scala ├── TraversableLike.scala ├── TraversableOnce.scala ├── TraversableProxy.scala ├── TraversableProxyLike.scala ├── TraversableView.scala ├── TraversableViewLike.scala ├── generic │ ├── Addable.scala │ ├── BitOperations.scala │ ├── BitSetFactory.scala │ ├── CanBuildFrom.scala │ ├── CanCombineFrom.scala │ ├── ClassManifestTraversableFactory.scala │ ├── FilterMonadic.scala │ ├── GenMapFactory.scala │ ├── GenSeqFactory.scala │ ├── GenSetFactory.scala │ ├── GenTraversableFactory.scala │ ├── GenericClassManifestCompanion.scala │ ├── GenericClassManifestTraversableTemplate.scala │ ├── GenericCompanion.scala │ ├── GenericOrderedCompanion.scala │ ├── GenericOrderedTraversableTemplate.scala │ ├── GenericParCompanion.scala │ ├── GenericParTemplate.scala │ ├── GenericSeqCompanion.scala │ ├── GenericSetTemplate.scala │ ├── GenericTraversableTemplate.scala │ ├── Growable.scala │ ├── HasNewBuilder.scala │ ├── HasNewCombiner.scala │ ├── ImmutableMapFactory.scala │ ├── ImmutableSetFactory.scala │ ├── ImmutableSortedMapFactory.scala │ ├── ImmutableSortedSetFactory.scala │ ├── IterableForwarder.scala │ ├── MapFactory.scala │ ├── MutableMapFactory.scala │ ├── MutableSetFactory.scala │ ├── OrderedTraversableFactory.scala │ ├── ParFactory.scala │ ├── ParMapFactory.scala │ ├── ParSetFactory.scala │ ├── SeqFactory.scala │ ├── SeqForwarder.scala │ ├── SetFactory.scala │ ├── Shrinkable.scala │ ├── Signalling.scala │ ├── Sizing.scala │ ├── SliceInterval.scala │ ├── Sorted.scala │ ├── SortedMapFactory.scala │ ├── SortedSetFactory.scala │ ├── Subtractable.scala │ ├── TraversableFactory.scala │ ├── TraversableForwarder.scala │ └── package.scala ├── immutable │ ├── BitSet.scala │ ├── DefaultMap.scala │ ├── GenIterable.scala.disabled │ ├── GenMap.scala.disabled │ ├── GenSeq.scala.disabled │ ├── GenSet.scala.disabled │ ├── GenTraversable.scala.disabled │ ├── HashMap.scala │ ├── HashSet.scala │ ├── IndexedSeq.scala │ ├── IntMap.scala │ ├── Iterable.scala │ ├── LinearSeq.scala │ ├── List.scala │ ├── ListMap.scala │ ├── ListSet.scala │ ├── LongMap.scala │ ├── Map.scala │ ├── MapLike.scala │ ├── MapProxy.scala │ ├── NumericRange.scala │ ├── PagedSeq.scala │ ├── Queue.scala │ ├── Range.scala │ ├── RedBlack.scala │ ├── Seq.scala │ ├── Set.scala │ ├── SetProxy.scala │ ├── SortedMap.scala │ ├── SortedSet.scala │ ├── Stack.scala │ ├── Stream.scala │ ├── StreamView.scala │ ├── StreamViewLike.scala │ ├── StringLike.scala │ ├── StringOps.scala │ ├── Traversable.scala │ ├── TreeMap.scala │ ├── TreeSet.scala │ ├── TrieIterator.scala │ ├── Vector.scala │ ├── WrappedString.scala │ └── package.scala ├── interfaces │ ├── IterableMethods.scala │ ├── MapMethods.scala │ ├── SeqMethods.scala │ ├── SetMethods.scala │ ├── TraversableMethods.scala │ └── TraversableOnceMethods.scala ├── mutable │ ├── AddingBuilder.scala │ ├── ArrayBuffer.scala │ ├── ArrayBuilder.scala │ ├── ArrayLike.scala │ ├── ArrayOps.scala │ ├── ArraySeq.scala │ ├── ArrayStack.scala │ ├── BitSet.scala │ ├── Buffer.scala │ ├── BufferLike.scala │ ├── BufferProxy.scala │ ├── Builder.scala │ ├── Cloneable.scala │ ├── ConcurrentMap.scala │ ├── DefaultEntry.scala │ ├── DefaultMapModel.scala │ ├── DoubleLinkedList.scala │ ├── DoubleLinkedListLike.scala │ ├── FlatHashTable.scala │ ├── GenIterable.scala.disabled │ ├── GenMap.scala.disabled │ ├── GenSeq.scala.disabled │ ├── GenSet.scala.disabled │ ├── GenTraversable.scala.disabled │ ├── GrowingBuilder.scala │ ├── HashEntry.scala │ ├── HashMap.scala │ ├── HashSet.scala │ ├── HashTable.scala │ ├── History.scala │ ├── ImmutableMapAdaptor.scala │ ├── ImmutableSetAdaptor.scala │ ├── IndexedSeq.scala │ ├── IndexedSeqLike.scala │ ├── IndexedSeqOptimized.scala │ ├── IndexedSeqView.scala │ ├── Iterable.scala │ ├── LazyBuilder.scala │ ├── LinearSeq.scala │ ├── LinkedEntry.scala │ ├── LinkedHashMap.scala │ ├── LinkedHashSet.scala │ ├── LinkedList.scala │ ├── LinkedListLike.scala │ ├── ListBuffer.scala │ ├── ListMap.scala │ ├── Map.scala │ ├── MapBuilder.scala │ ├── MapLike.scala │ ├── MapProxy.scala │ ├── MultiMap.scala │ ├── MutableList.scala │ ├── ObservableBuffer.scala │ ├── ObservableMap.scala │ ├── ObservableSet.scala │ ├── OpenHashMap.scala │ ├── PriorityQueue.scala │ ├── PriorityQueueProxy.scala │ ├── Publisher.scala │ ├── Queue.scala │ ├── QueueProxy.scala │ ├── ResizableArray.scala │ ├── RevertibleHistory.scala │ ├── Seq.scala │ ├── SeqLike.scala │ ├── Set.scala │ ├── SetBuilder.scala │ ├── SetLike.scala │ ├── SetProxy.scala │ ├── Stack.scala │ ├── StackProxy.scala │ ├── StringBuilder.scala │ ├── Subscriber.scala │ ├── SynchronizedBuffer.scala │ ├── SynchronizedMap.scala │ ├── SynchronizedPriorityQueue.scala │ ├── SynchronizedQueue.scala │ ├── SynchronizedSet.scala │ ├── SynchronizedStack.scala │ ├── Traversable.scala │ ├── Undoable.scala │ ├── UnrolledBuffer.scala │ ├── WeakHashMap.scala │ ├── WrappedArray.scala │ └── WrappedArrayBuilder.scala ├── package.scala ├── parallel │ ├── Combiner.scala │ ├── ParIterable.scala │ ├── ParIterableLike.scala │ ├── ParIterableView.scala │ ├── ParIterableViewLike.scala │ ├── ParMap.scala │ ├── ParMapLike.scala │ ├── ParSeq.scala │ ├── ParSeqLike.scala │ ├── ParSeqView.scala │ ├── ParSeqViewLike.scala │ ├── ParSet.scala │ ├── ParSetLike.scala │ ├── PreciseSplitter.scala │ ├── RemainsIterator.scala │ ├── Splitter.scala │ ├── TaskSupport.scala │ ├── Tasks.scala │ ├── immutable │ │ ├── ParHashMap.scala │ │ ├── ParHashSet.scala │ │ ├── ParIterable.scala │ │ ├── ParMap.scala │ │ ├── ParNumericRange.scala.disabled │ │ ├── ParRange.scala │ │ ├── ParSeq.scala │ │ ├── ParSet.scala │ │ ├── ParVector.scala │ │ └── package.scala │ ├── mutable │ │ ├── LazyCombiner.scala │ │ ├── ParArray.scala │ │ ├── ParFlatHashTable.scala │ │ ├── ParHashMap.scala │ │ ├── ParHashSet.scala │ │ ├── ParHashTable.scala │ │ ├── ParIterable.scala │ │ ├── ParMap.scala │ │ ├── ParMapLike.scala │ │ ├── ParSeq.scala │ │ ├── ParSet.scala │ │ ├── ParSetLike.scala │ │ ├── ResizableParArrayCombiner.scala │ │ ├── UnrolledParArrayCombiner.scala │ │ └── package.scala │ └── package.scala ├── readme-if-you-want-to-add-something.txt └── script │ ├── Location.scala │ ├── Message.scala │ └── Scriptable.scala ├── compat └── Platform.scala ├── concurrent ├── Channel.scala ├── DelayedLazyVal.scala ├── FutureTaskRunner.scala ├── JavaConversions.scala ├── Lock.scala ├── MailBox.scala ├── ManagedBlocker.scala ├── SyncChannel.scala ├── SyncVar.scala ├── TIMEOUT.scala ├── TaskRunner.scala ├── TaskRunners.scala ├── ThreadPoolRunner.scala ├── ThreadRunner.scala ├── ops.scala ├── package.scala.disabled └── pilib.scala ├── deprecated.scala ├── deprecatedName.scala ├── inline.scala ├── io ├── BufferedSource.scala ├── BytePickle.scala ├── Codec.scala ├── Position.scala ├── Source.scala └── UTF8Codec.scala ├── math ├── BigDecimal.scala ├── BigInt.scala ├── Equiv.scala ├── Fractional.scala ├── Integral.scala ├── Numeric.scala ├── Ordered.scala ├── Ordering.scala ├── PartialOrdering.scala ├── PartiallyOrdered.scala ├── ScalaNumber.scala ├── ScalaNumericConversions.scala └── package.scala ├── native.scala ├── noinline.scala ├── package.scala ├── parallel ├── Future.scala └── package.scala.disabled ├── ref ├── PhantomReference.scala ├── Reference.scala ├── ReferenceQueue.scala ├── ReferenceWrapper.scala ├── SoftReference.scala └── WeakReference.scala ├── reflect ├── BeanDescription.scala ├── BeanDisplayName.scala ├── BeanInfo.scala ├── BeanInfoSkip.scala ├── BeanProperty.scala ├── BooleanBeanProperty.scala ├── ClassManifest.scala ├── Code.scala ├── Manifest.scala ├── NameTransformer.scala ├── NoManifest.scala ├── OptManifest.scala ├── Print.scala ├── ScalaBeanInfo.scala ├── ScalaLongSignature.java ├── ScalaSignature.java ├── Symbol.scala ├── Tree.scala ├── Type.scala └── generic │ ├── AnnotationInfos.scala │ ├── ByteCodecs.scala │ ├── Constants.scala │ ├── Flags.scala │ ├── HasFlags.scala │ ├── Names.scala │ ├── PickleBuffer.scala │ ├── PickleFormat.scala │ ├── Scopes.scala │ ├── StandardDefinitions.scala │ ├── StdNames.scala │ ├── Symbols.scala │ ├── Trees.scala │ ├── Types.scala │ ├── UnPickler.scala │ └── Universe.scala ├── remote.scala ├── runtime ├── AbstractFunction0.scala ├── AbstractFunction1.scala ├── AbstractFunction10.scala ├── AbstractFunction11.scala ├── AbstractFunction12.scala ├── AbstractFunction13.scala ├── AbstractFunction14.scala ├── AbstractFunction15.scala ├── AbstractFunction16.scala ├── AbstractFunction17.scala ├── AbstractFunction18.scala ├── AbstractFunction19.scala ├── AbstractFunction2.scala ├── AbstractFunction20.scala ├── AbstractFunction21.scala ├── AbstractFunction22.scala ├── AbstractFunction3.scala ├── AbstractFunction4.scala ├── AbstractFunction5.scala ├── AbstractFunction6.scala ├── AbstractFunction7.scala ├── AbstractFunction8.scala ├── AbstractFunction9.scala ├── AnyValCompanion.scala ├── BooleanRef.oz ├── Boxed.scala ├── BoxedUnit.scala ├── BoxesRunTime.scala ├── ByteRef.oz ├── CharRef.oz ├── DoubleRef.oz ├── FloatRef.oz ├── IntRef.oz ├── LongRef.oz ├── NonLocalReturnControl.scala ├── Nothing$.scala ├── Null$.scala ├── ObjectRef.oz ├── RichBoolean.scala ├── RichByte.scala ├── RichChar.scala ├── RichDouble.scala ├── RichException.scala ├── RichFloat.scala ├── RichInt.scala ├── RichLong.scala ├── RichShort.scala ├── ScalaNumberProxy.scala ├── ScalaRunTime.scala ├── ShortRef.oz ├── StringAdd.scala ├── TraitSetter.java ├── ValueRef.oz ├── VolatileBooleanRef.oz ├── VolatileByteRef.oz ├── VolatileCharRef.oz ├── VolatileDoubleRef.oz ├── VolatileFloatRef.oz ├── VolatileIntRef.oz ├── VolatileLongRef.oz ├── VolatileObjectRef.oz ├── VolatileShortRef.oz └── package.scala ├── specialized.scala ├── sys ├── BooleanProp.scala ├── Prop.scala ├── PropImpl.scala ├── ShutdownHookThread.scala ├── SystemProperties.scala ├── package.scala └── process │ ├── BasicIO.scala │ ├── Process.scala │ ├── ProcessBuilder.scala │ ├── ProcessBuilderImpl.scala │ ├── ProcessIO.scala │ ├── ProcessImpl.scala │ ├── ProcessLogger.scala │ └── package.scala ├── testing ├── Benchmark.scala ├── SUnit.scala └── Show.scala ├── text └── Document.scala ├── throws.scala ├── transient.scala ├── unchecked.scala ├── util ├── DynamicVariable.scala ├── Marshal.scala ├── MurmurHash.scala ├── Properties.scala ├── Random.scala ├── Sorting.scala ├── automata │ ├── BaseBerrySethi.scala │ ├── DetWordAutom.scala │ ├── Inclusion.scala │ ├── NondetWordAutom.scala │ ├── SubsetConstruction.scala │ └── WordBerrySethi.scala ├── control │ ├── Breaks.scala │ ├── ControlThrowable.scala │ ├── Exception.scala │ ├── NoStackTrace.scala │ └── TailCalls.scala ├── grammar │ ├── HedgeRHS.scala │ └── TreeRHS.scala ├── logging │ ├── ConsoleLogger.scala │ └── Logged.scala ├── matching │ └── Regex.scala ├── parsing │ ├── ast │ │ ├── AbstractSyntax.scala │ │ └── Binders.scala │ ├── combinator │ │ ├── ImplicitConversions.scala │ │ ├── JavaTokenParsers.scala │ │ ├── PackratParsers.scala │ │ ├── Parsers.scala │ │ ├── RegexParsers.scala │ │ ├── lexical │ │ │ ├── Lexical.scala │ │ │ ├── Scanners.scala │ │ │ └── StdLexical.scala │ │ ├── syntactical │ │ │ ├── StandardTokenParsers.scala │ │ │ ├── StdTokenParsers.scala │ │ │ └── TokenParsers.scala │ │ ├── testing │ │ │ ├── RegexTest.scala │ │ │ └── Tester.scala │ │ └── token │ │ │ ├── StdTokens.scala │ │ │ └── Tokens.scala │ ├── input │ │ ├── CharArrayReader.scala │ │ ├── CharSequenceReader.scala │ │ ├── NoPosition.scala │ │ ├── OffsetPosition.scala │ │ ├── PagedSeqReader.scala │ │ ├── Position.scala │ │ ├── Positional.scala │ │ ├── Reader.scala │ │ └── StreamReader.scala │ ├── json │ │ ├── JSON.scala │ │ ├── Lexer.scala │ │ └── Parser.scala │ └── syntax │ │ └── package.scala └── regexp │ ├── Base.scala │ ├── PointedHedgeExp.scala │ ├── SyntaxError.scala │ └── WordExp.scala ├── volatile.scala └── xml ├── Atom.scala ├── Attribute.scala ├── Comment.scala ├── Document.scala ├── Elem.scala ├── EntityRef.scala ├── Equality.scala ├── Group.scala ├── HasKeyValue.scala ├── MalformedAttributeException.scala ├── MetaData.scala ├── NamespaceBinding.scala ├── Node.scala ├── NodeBuffer.scala ├── NodeSeq.scala ├── Null.scala ├── PCData.scala ├── PrefixedAttribute.scala ├── PrettyPrinter.scala ├── ProcInstr.scala ├── QNode.scala ├── SpecialNode.scala ├── Text.scala ├── TextBuffer.scala ├── TopScope.scala ├── TypeSymbol.scala ├── Unparsed.scala ├── UnprefixedAttribute.scala ├── Utility.scala ├── XML.scala ├── Xhtml.scala ├── dtd ├── ContentModel.scala ├── ContentModelParser.scala ├── DTD.scala ├── Decl.scala ├── DocType.scala ├── ElementValidator.scala ├── ExternalID.scala ├── Scanner.scala ├── Tokens.scala └── ValidationException.scala ├── factory ├── Binder.scala ├── LoggedNodeFactory.scala ├── NodeFactory.scala └── XMLLoader.scala ├── include ├── CircularIncludeException.scala ├── UnavailableResourceException.scala ├── XIncludeException.scala └── sax │ ├── EncodingHeuristics.scala │ ├── Main.scala │ ├── XIncludeFilter.scala │ └── XIncluder.scala ├── package.scala ├── parsing ├── ConstructingHandler.scala ├── ConstructingParser.scala ├── DefaultMarkupHandler.scala ├── ExternalSources.scala ├── FactoryAdapter.scala ├── FatalError.scala ├── MarkupHandler.scala ├── MarkupParser.scala ├── MarkupParserCommon.scala ├── NoBindingFactoryAdapter.scala ├── TokenTests.scala ├── ValidatingMarkupHandler.scala ├── XhtmlEntities.scala └── XhtmlParser.scala ├── persistent ├── CachedFileStorage.scala ├── Index.scala └── SetStorage.scala ├── pull ├── XMLEvent.scala ├── XMLEventReader.scala └── package.scala └── transform ├── BasicTransformer.scala ├── RewriteRule.scala └── RuleTransformer.scala /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .scala_dependencies 2 | .settings 3 | build 4 | *~ 5 | *.ozf 6 | /.cache 7 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | ozma 4 | 5 | 6 | 7 | 8 | 9 | org.scala-ide.sdt.core.scalabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.scala-ide.sdt.core.scalanature 16 | org.eclipse.jdt.core.javanature 17 | 18 | 19 | -------------------------------------------------------------------------------- /bin/ozastc: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Finding the root folder for this Ozma distribution 4 | SOURCE=$0; 5 | SCRIPT=`basename "$SOURCE"`; 6 | while [ -h "$SOURCE" ]; do 7 | SCRIPT=`basename "$SOURCE"`; 8 | LOOKUP=`ls -ld "$SOURCE"`; 9 | TARGET=`expr "$LOOKUP" : '.*-> \(.*\)$'`; 10 | if expr "${TARGET:-.}/" : '/.*/$' > /dev/null; then 11 | SOURCE=${TARGET:-.}; 12 | else 13 | SOURCE=`dirname "$SOURCE"`/${TARGET:-.}; 14 | fi; 15 | done; 16 | 17 | # see #2092 from Scala 18 | OZMA_HOME=`dirname "$SOURCE"` 19 | OZMA_HOME=`cd "$OZMA_HOME"; pwd -P` 20 | OZMA_HOME=`cd "$OZMA_HOME"/..; pwd` 21 | 22 | # run the compiler 23 | ozengine "$OZMA_HOME/build/ozastc/Compile.ozf" "$@" 24 | -------------------------------------------------------------------------------- /bin/ozma: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Finding the root folder for this Ozma distribution 4 | SOURCE=$0; 5 | SCRIPT=`basename "$SOURCE"`; 6 | while [ -h "$SOURCE" ]; do 7 | SCRIPT=`basename "$SOURCE"`; 8 | LOOKUP=`ls -ld "$SOURCE"`; 9 | TARGET=`expr "$LOOKUP" : '.*-> \(.*\)$'`; 10 | if expr "${TARGET:-.}/" : '/.*/$' > /dev/null; then 11 | SOURCE=${TARGET:-.}; 12 | else 13 | SOURCE=`dirname "$SOURCE"`/${TARGET:-.}; 14 | fi; 15 | done; 16 | 17 | # see #2092 from Scala 18 | OZMA_HOME=`dirname "$SOURCE"` 19 | OZMA_HOME=`cd "$OZMA_HOME"; pwd -P` 20 | OZMA_HOME=`cd "$OZMA_HOME"/..; pwd` 21 | 22 | # run the compiler 23 | SYSTEM_PATH="$OZMA_HOME/build/engine/" 24 | BOOT_CP="$OZMA_HOME/build/runtime/" 25 | ozengine "$OZMA_HOME/build/engine/OzmaEngine.ozf" "--systempath=$SYSTEM_PATH" "--bootclasspath=$BOOT_CP" "$@" 26 | -------------------------------------------------------------------------------- /bin/ozmac: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Finding the root folder for this Ozma distribution 4 | SOURCE=$0; 5 | SCRIPT=`basename "$SOURCE"`; 6 | while [ -h "$SOURCE" ]; do 7 | SCRIPT=`basename "$SOURCE"`; 8 | LOOKUP=`ls -ld "$SOURCE"`; 9 | TARGET=`expr "$LOOKUP" : '.*-> \(.*\)$'`; 10 | if expr "${TARGET:-.}/" : '/.*/$' > /dev/null; then 11 | SOURCE=${TARGET:-.}; 12 | else 13 | SOURCE=`dirname "$SOURCE"`/${TARGET:-.}; 14 | fi; 15 | done; 16 | 17 | # see #2092 from Scala 18 | OZMA_HOME=`dirname "$SOURCE"` 19 | OZMA_HOME=`cd "$OZMA_HOME"; pwd -P` 20 | OZMA_HOME=`cd "$OZMA_HOME"/..; pwd` 21 | 22 | # build tool classpath 23 | TOOLCP=$OZMA_HOME/build/classes/library/:$OZMA_HOME/build/classes/compiler/ 24 | 25 | # run the compiler 26 | export OZMA_HOME 27 | scala -toolcp "$TOOLCP" scala.tools.nsc.ozma.Main "$@" 28 | -------------------------------------------------------------------------------- /docs/examples/.gitignore: -------------------------------------------------------------------------------- 1 | *.oz 2 | *.ozast 3 | *.ozf 4 | -------------------------------------------------------------------------------- /docs/examples/boundedbuffer/BoundedBuffer.scala: -------------------------------------------------------------------------------- 1 | import scala.ozma._ 2 | 3 | object BoundedBuffer { 4 | val TimeUnit = 500 5 | 6 | def main(args: Array[String]) { 7 | val produced = generate(1) 8 | val buffered = thread(boundedBuffer(produced, 5)) 9 | 10 | println(buffered(0)) 11 | 12 | sleep(8*TimeUnit) 13 | for (i <- 1 to 10) 14 | println(buffered(i)) 15 | } 16 | 17 | def generate(from: Int): List[Int] = byNeedFuture { 18 | sleep(TimeUnit) 19 | from :: generate(from+1) 20 | } 21 | 22 | def boundedBuffer[A](input: List[A], capacity: Int): List[A] = { 23 | def loop(input: List[A], inputAhead: List[A]): List[A] = byNeedFuture { 24 | input.head :: loop(input.tail, thread(inputAhead.tail)) 25 | } 26 | 27 | val inputAhead = thread(input drop capacity) 28 | loop(input, inputAhead) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/examples/digitallogic/DigitalClock.scala: -------------------------------------------------------------------------------- 1 | import scala.ozma._ 2 | import ozma._ 3 | 4 | import digitallogic._ 5 | 6 | import Utils._ 7 | 8 | object DigitalClock { 9 | def main(args: Array[String]) { 10 | val count = args.headOption map (_.toInt) getOrElse 8 11 | val clock = Signal.clock() 12 | val zeros = Signal.generator(clock)(i => Zero) 13 | 14 | def makeOutputs(i: Int, carry: Signal): List[Signal] = { 15 | if (i == count) Nil 16 | else { 17 | val prev: Signal 18 | val result = prev ^^ carry 19 | val nextCarry = prev && carry 20 | prev = Gates.delay(result) 21 | result :: makeOutputs(i+1, nextCarry) 22 | } 23 | } 24 | 25 | val outputs = makeOutputs(0, clock) reverse 26 | 27 | val params = outputs map (' ' -> _) 28 | display(params:_*) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/examples/digitallogic/Utils.scala: -------------------------------------------------------------------------------- 1 | import scala.ozma._ 2 | import ozma._ 3 | 4 | import digitallogic._ 5 | 6 | object Utils { 7 | /** 8 | * Display a set of digital signal 9 | * Each given signal is a column on the standard output. 10 | * It begins with the header and then its values at each 11 | * point of time. 12 | */ 13 | def display(signals: (Char, Signal)*) { 14 | def loop(signals: List[Signal]) { 15 | val next = for (signal <- signals) yield { 16 | if (signal.isEmpty) 17 | return 18 | 19 | print(signal.head + " ") 20 | signal.tail 21 | } 22 | 23 | println() 24 | loop(next) 25 | } 26 | 27 | val sigs = signals toList 28 | 29 | for (header <- sigs.map(_._1)) 30 | print(header + " ") 31 | 32 | println() 33 | println() 34 | 35 | loop(sigs.map(_._2)) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /docs/examples/digitallogic/digitallogic/Bit.scala: -------------------------------------------------------------------------------- 1 | package digitallogic 2 | 3 | import scala.ozma._ 4 | 5 | sealed abstract class Bit(bool: Boolean) { 6 | val toBool = bool 7 | val toInt = if (bool) 1 else 0 8 | val name = toInt.toString 9 | 10 | override def toString() = name 11 | 12 | def unary_~() = 13 | if (this eq One) Zero else One 14 | 15 | def | (right: Bit) = 16 | if ((this eq One) || (right eq One)) One else Zero 17 | 18 | def & (right: Bit) = 19 | if ((this eq One) && (right eq One)) One else Zero 20 | 21 | def ^ (right: Bit) = 22 | if (this eq right) Zero else One 23 | 24 | def ~& (right: Bit) = ~(this & right) 25 | def ~| (right: Bit) = ~(this | right) 26 | def ~^ (right: Bit) = ~(this ^ right) 27 | } 28 | 29 | case object Zero extends Bit(false) 30 | case object One extends Bit(true) 31 | -------------------------------------------------------------------------------- /docs/examples/digitallogic/digitallogic/Gates.scala: -------------------------------------------------------------------------------- 1 | package digitallogic 2 | 3 | import scala.ozma._ 4 | 5 | object Gates { 6 | def not(input: Signal): Signal = 7 | thread(input.toAgent map (~_)) 8 | 9 | private def makeGate(combination: (Bit, Bit) => Bit)( 10 | left: Signal, right: Signal): Signal = { 11 | thread(left.toAgent.zipMap(right)(combination)) 12 | } 13 | 14 | val and = makeGate(_ & _) _ 15 | val or = makeGate(_ | _) _ 16 | val nand = makeGate(_ ~& _) _ 17 | val nor = makeGate(_ ~| _) _ 18 | val xor = makeGate(_ ^ _) _ 19 | def xnor = makeGate(_ ~^ _) _ 20 | 21 | def delay(input: Signal) = Zero :: input 22 | 23 | def delay(input: Signal, count: Int): Signal = 24 | if (count <= 0) input 25 | else delay(delay(input), count-1) 26 | } 27 | -------------------------------------------------------------------------------- /docs/examples/digitallogic/digitallogic/Signal.scala: -------------------------------------------------------------------------------- 1 | package digitallogic 2 | 3 | import scala.ozma._ 4 | 5 | object Signal { 6 | type Signal = List[Bit] 7 | 8 | def apply(bits: Bit*): Signal = List(bits:_*) 9 | def unapplySeq(signal: Signal): Some[List[Bit]] = Some(signal) 10 | 11 | def clock(delay: Int = 1000, value: Bit = One) = { 12 | def loop(): Signal = { 13 | sleep(delay) 14 | value :: loop() 15 | } 16 | 17 | thread(loop()) 18 | } 19 | 20 | def generator(clock: Signal)(value: Int => Bit) = { 21 | def loop(clock: Signal, i: Int): Signal = { 22 | waitBound(clock) 23 | value(i) :: loop(clock.tail, i+1) 24 | } 25 | 26 | thread(loop(clock, 0)) 27 | } 28 | 29 | def cycle(clock: Signal, values: Bit*) = { 30 | generator(clock) { 31 | i => values(i % values.length) 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /docs/examples/digitallogic/digitallogic/SignalOps.scala: -------------------------------------------------------------------------------- 1 | package digitallogic 2 | 3 | class SignalOps(signal: Signal) { 4 | import Gates._ 5 | 6 | def unary_!() = not(signal) 7 | 8 | def && (right: Signal) = and(signal, right) 9 | def || (right: Signal) = or(signal, right) 10 | def !&& (right: Signal) = nand(signal, right) 11 | def !|| (right: Signal) = nor(signal, right) 12 | def ^^ (right: Signal) = xor(signal, right) 13 | def !^^ (right: Signal) = xnor(signal, right) 14 | } 15 | -------------------------------------------------------------------------------- /docs/examples/digitallogic/digitallogic/package.scala: -------------------------------------------------------------------------------- 1 | import scala.ozma._ 2 | 3 | package object digitallogic { 4 | type Signal = Signal.Signal 5 | 6 | implicit def int2bit(i: Int) = if (i == 0) Zero else One 7 | 8 | implicit def signal2ops(signal: Signal) = new SignalOps(signal) 9 | 10 | implicit def intList2signal(list: List[Int]): Signal = 11 | list.toAgent map int2bit 12 | } 13 | -------------------------------------------------------------------------------- /docs/examples/echo/Echo.scala: -------------------------------------------------------------------------------- 1 | object Echo { 2 | def main(args: Array[String]) { 3 | var i = 0 4 | while (i < args.length) { 5 | Console.println(args(i)) 6 | i += 1 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /docs/examples/exceptions/calculator.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * This program expects the following input: 3 | * ozma Calculator +|-|*|/ 4 | * Il will compute and display the result. 5 | * 6 | * Note that it is buggy on purpose: if less than three parameters are given, 7 | * it will "crash" with an ArrayIndexOutOfBoundException. 8 | * 9 | * If it is given a wrong float number, it will display a nice error message. 10 | * It will also do the same if given a wrong operator. 11 | */ 12 | 13 | object Calculator { 14 | def main(args: Array[String]) { 15 | try { 16 | val left = java.lang.Float.parseFloat(args(0)) 17 | val op = args(1) 18 | val right = java.lang.Float.parseFloat(args(2)) 19 | 20 | val result = op match { 21 | case "+" => left + right 22 | case "-" => left - right 23 | case "*" => left * right 24 | case "/" => left / right 25 | } 26 | 27 | Console.println(result) 28 | } catch { 29 | case error: NumberFormatException => 30 | Console.println("The arguments must be floats") 31 | Console.println(error) 32 | case _: MatchError => 33 | Console.println("Allowed operators are + - * /") 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /docs/examples/helloworld/helloworld/HelloWorld.scala: -------------------------------------------------------------------------------- 1 | package helloworld 2 | 3 | object HelloWorld { 4 | def main(args: Array[String]) { 5 | Console.println("Hello world!") 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /docs/examples/mergesort/MergeSort.scala: -------------------------------------------------------------------------------- 1 | object MergeSort { 2 | def main(args: Array[String]) { 3 | val list = args.toList map (_.toInt) 4 | val sorted = mergeSort(list) 5 | sorted foreach println 6 | } 7 | 8 | def mergeSort[A](list: List[A])( 9 | implicit cmp: Ordering[_ >: A]): List[A] = { 10 | list match { 11 | case Nil => Nil 12 | case head :: Nil => list 13 | case _ => 14 | val (left, right) = split(list) 15 | merge(mergeSort(left), mergeSort(right)) 16 | } 17 | } 18 | 19 | def split[A](list: List[A], leftAcc: List[A] = Nil, 20 | rightAcc: List[A] = Nil): (List[A], List[A]) = { 21 | if (list.isEmpty) (leftAcc, rightAcc) 22 | else split(list.tail, list.head :: rightAcc, leftAcc) 23 | } 24 | 25 | def merge[A](left: List[A], right: List[A])( 26 | implicit cmp: Ordering[_ >: A]): List[A] = { 27 | if (left.isEmpty) right 28 | else if (right.isEmpty) left 29 | else { 30 | if (cmp.lteq(left.head, right.head)) 31 | left.head :: merge(left.tail, right) 32 | else 33 | right.head :: merge(left, right.tail) 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /docs/examples/ports/TestPort.scala: -------------------------------------------------------------------------------- 1 | import ozma._ 2 | import scala.ozma._ 3 | 4 | object TestPort { 5 | def main(args: Array[String]) { 6 | // Create a port whose handler will display every arriving element 7 | val port = Port.newStatelessPortObject(Console.println) 8 | 9 | // Now 3 threads that send different ranges of integers to the port 10 | val X1: Unit 11 | val X2: Unit 12 | val X3: Unit 13 | 14 | thread { generator(port, 1, 10); X1 = () } 15 | thread { generator(port, 11, 20); X2 = X1 } 16 | thread { generator(port, 21, 30); X3 = X2 } 17 | 18 | waitBound(X3) 19 | } 20 | 21 | /** 22 | * Generate the integers between 'from' and 'to' included, and send them in 23 | * ascending order into the given 'port' 24 | */ 25 | def generator(port: Port[Int], from: Int, to: Int) { 26 | if (from <= to) { 27 | port.send(from) 28 | sleep(300) // delay to be able to observe the interleaving of threads 29 | generator(port, from + 1, to) 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /docs/examples/primes/PrimeNumbers.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * This program must be given an integer N as command line parameter. 3 | * It will display the N first prime numbers. 4 | * It computes them using the sieve of Eratosthenes, with lazy functions 5 | * working with lists. 6 | * Note that all this does work because :: is tail-recursive. 7 | */ 8 | 9 | import scala.ozma._ 10 | 11 | object PrimeNumbers { 12 | def main(args: Array[String]) { 13 | val count = args(0).toInt 14 | val result = sieve(generateFrom(2)) 15 | (result.lazified take count) foreach println 16 | } 17 | 18 | def generateFrom(from: Int): List[Int] = byNeedFuture { 19 | from :: generateFrom(from + 1) 20 | } 21 | 22 | def sieve(list: List[Int]): List[Int] = byNeedFuture { 23 | list match { 24 | case Nil => Nil 25 | case head :: tail => 26 | head :: sieve(tail.lazified filter (_ % head != 0)) 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /docs/examples/serverport/ServerPort.scala: -------------------------------------------------------------------------------- 1 | import scala.ozma._ 2 | import ozma._ 3 | 4 | object ServerPort { 5 | def makeSecondDegreeServer(a: Int, b: Int, c: Int) = { 6 | ResultPort.newStatelessPortObject { 7 | x: Int => a*x*x + b*x + c 8 | } 9 | } 10 | 11 | def main(args: Array[String]) { 12 | val ports = List( 13 | makeSecondDegreeServer(3, 2, -4), 14 | makeSecondDegreeServer(1, 2, 3), 15 | makeSecondDegreeServer(5, -4, -4), 16 | makeSecondDegreeServer(0, 0, 3), 17 | makeSecondDegreeServer(3, 2, 1), 18 | makeSecondDegreeServer(-1, -1, -1) 19 | ) 20 | 21 | val results = ports map (_ send 3) 22 | results foreach println 23 | 24 | println("max: " + results.max) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /docs/examples/tokenring/TokenRing.scala: -------------------------------------------------------------------------------- 1 | import scala.ozma._ 2 | 3 | object TokenRing { 4 | def main(args: Array[String]) { 5 | val count = args(0).toInt 6 | createTokenAgents(count) 7 | 8 | while (true) sleep(1000) 9 | } 10 | 11 | def createTokenAgents(count: Int) { 12 | def loop(id: Int, input: List[Unit]): List[Unit] = { 13 | if (id > count) input 14 | else loop(id+1, thread(tokenAgent(id, input))) 15 | } 16 | 17 | val bootstrap: List[Unit] 18 | val output = loop(1, bootstrap) 19 | bootstrap = () :: output 20 | } 21 | 22 | def tokenAgent(id: Any, inTokens: List[Unit]): List[Unit] = { 23 | if (inTokens.isEmpty) Nil 24 | else { 25 | println(id + " has the token") 26 | sleep(1000) 27 | inTokens.head :: tokenAgent(id, inTokens.tail) 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/examples/tossingtheball/TossingTheBall.scala: -------------------------------------------------------------------------------- 1 | import scala.ozma._ 2 | import ozma._ 3 | 4 | object TossingTheBall { 5 | val TimeUnit = 1000 6 | 7 | type Ball = Unit 8 | val ball: Ball = () 9 | 10 | type Player = Port[Ball] 11 | 12 | def main(args: Array[String]) { 13 | val player1: Player 14 | val player2: Player 15 | val player3: Player 16 | 17 | player1 = makePlayer("Player 1", Seq(player2, player3)) 18 | player2 = makePlayer("Player 2", Seq(player3, player1)) 19 | player3 = makePlayer("Player 3", Seq(player1, player2)) 20 | 21 | player1.send(ball) 22 | 23 | while (true) sleep(TimeUnit) 24 | } 25 | 26 | def makePlayer(id: Any, others: Seq[Player]): Player = { 27 | Port.newStatelessPortObject { ball => 28 | println(id + " received the ball") 29 | sleep(TimeUnit) 30 | Random.rand(others).send(ball) 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /docs/examples/trees/BinaryTrees.scala: -------------------------------------------------------------------------------- 1 | abstract class Tree[+A] 2 | case object Leaf extends Tree[Nothing] 3 | case class Node[+A](value: A, left: Tree[A] = Leaf, 4 | right: Tree[A] = Leaf) extends Tree[A] 5 | 6 | object BinaryTrees { 7 | type Comparer[-A] = (A, A) => Boolean 8 | 9 | def insert[A](smaller: Comparer[A])(tree: Tree[A], value: A): Tree[A] = tree match { 10 | case Leaf => Node(value) 11 | 12 | case Node(v, left, right) => 13 | if (smaller(value, v)) 14 | Node(v, insert(smaller)(left, value), right) // this is tail-recursive 15 | else 16 | Node(v, left, insert(smaller)(right, value)) // this is tail-recursive 17 | } 18 | 19 | def displayTree(tree: Tree[Any]) { 20 | tree match { 21 | case Leaf => () 22 | case Node(value, left, right) => 23 | displayTree(left) 24 | println(value) 25 | displayTree(right) 26 | } 27 | } 28 | 29 | def insertMany[A](smaller: Comparer[A])(tree: Tree[A], values: TraversableOnce[A]) = 30 | values.foldLeft(tree)(insert(smaller)) 31 | 32 | def main(args: Array[String]) { 33 | val tree = insertMany((_:Int) < (_:Int))(Leaf, List(5, 1, 9, 8, 9, 6, 2, 10)) 34 | displayTree(tree) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /docs/examples/trivialthread/TrivialThread.scala: -------------------------------------------------------------------------------- 1 | import scala.ozma.thread 2 | 3 | object TrivialThread { 4 | def main(args: Array[String]) { 5 | Console.println("Start program") 6 | val result = thread(fibonacci(35)) 7 | Console.println("Continuing main method while computation is running") 8 | Console.println("The next statement will block because 'result' is needed") 9 | Console.println("Fib(35) = " + result) 10 | } 11 | 12 | def fibonacci(arg: Int): Int = arg match { 13 | case 0 | 1 => 1 14 | case _ => fibonacci(arg-1) + fibonacci(arg-2) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/compiler/scala/tools/nsc/backend/MozartPlatform.scala: -------------------------------------------------------------------------------- 1 | /* NSC -- new Scala compiler 2 | * Copyright 2005-2011 LAMP/EPFL 3 | * @author Sébastien Doeraene 4 | */ 5 | 6 | package scala.tools.nsc 7 | package backend 8 | 9 | import mozart.GenMozart 10 | 11 | import ozma.OzmaGlobal 12 | 13 | trait MozartPlatform extends JavaPlatform { 14 | val global: OzmaGlobal 15 | 16 | import global._ 17 | 18 | object genMozart extends { 19 | val global: MozartPlatform.this.global.type = MozartPlatform.this.global 20 | val runsAfter = List[String]("ozcode", "tailcalls") 21 | val runsRightAfter = None 22 | } with GenMozart 23 | 24 | override def platformPhases = List(genMozart) 25 | } 26 | -------------------------------------------------------------------------------- /src/compiler/scala/tools/nsc/ozma/OzmaSubComponent.scala: -------------------------------------------------------------------------------- 1 | package scala.tools.nsc 2 | package ozma 3 | 4 | abstract class OzmaSubComponent extends SubComponent { 5 | val global: OzmaGlobal 6 | } 7 | -------------------------------------------------------------------------------- /src/compiler/scala/tools/nsc/ozma/OzmaTrees.scala: -------------------------------------------------------------------------------- 1 | package scala.tools.nsc 2 | package ozma 3 | 4 | import ast.Trees 5 | 6 | trait OzmaTrees extends Trees { self: OzmaGlobal => 7 | case class OzCodeClasses(classes: List[ozcodes.OzClass]) extends Tree 8 | } 9 | -------------------------------------------------------------------------------- /src/javalib/java/io/Appendable.scala: -------------------------------------------------------------------------------- 1 | package java.io 2 | 3 | trait Appendable { 4 | def append(c: Char): Appendable 5 | def append(csq: CharSequence): Appendable 6 | def append(csq: CharSequence, start: Int, end: Int): Appendable 7 | } 8 | -------------------------------------------------------------------------------- /src/javalib/java/io/Closeable.scala: -------------------------------------------------------------------------------- 1 | package java.io 2 | 3 | trait Closeable { 4 | def close(): Unit 5 | } 6 | -------------------------------------------------------------------------------- /src/javalib/java/io/FilterOutputStream.scala: -------------------------------------------------------------------------------- 1 | package java.io 2 | 3 | class FilterOutputStream(out: OutputStream) extends OutputStream { 4 | override def close() = out.close() 5 | override def flush() = out.flush() 6 | override def write(b: Int) = out.write(b) 7 | } 8 | -------------------------------------------------------------------------------- /src/javalib/java/io/Flushable.scala: -------------------------------------------------------------------------------- 1 | package java.io 2 | 3 | trait Flushable { 4 | def flush(): Unit 5 | } 6 | -------------------------------------------------------------------------------- /src/javalib/java/io/OutputStream.scala: -------------------------------------------------------------------------------- 1 | package java.io 2 | 3 | abstract class OutputStream extends Object with Closeable with Flushable { 4 | def close() {} 5 | 6 | def flush() {} 7 | 8 | def write(b: Array[Byte]) { 9 | write(b, 0, b.length) 10 | } 11 | 12 | def write(b: Array[Byte], off: Int, len: Int) { 13 | var n = off; 14 | val stop = off+len 15 | while (n < stop) { 16 | write(b(n)) 17 | n = n+1 18 | } 19 | } 20 | 21 | def write(b: Int): Unit 22 | } 23 | -------------------------------------------------------------------------------- /src/javalib/java/io/Serializable.scala: -------------------------------------------------------------------------------- 1 | package java.io 2 | 3 | trait Serializable 4 | -------------------------------------------------------------------------------- /src/javalib/java/lang/Boolean.scala: -------------------------------------------------------------------------------- 1 | package java.lang 2 | 3 | class Boolean(private val value: scala.Boolean) { 4 | def booleanValue(): scala.Boolean = value 5 | 6 | override def equals(that: Any) = 7 | that.isInstanceOf[Boolean] && (value == that.asInstanceOf[Boolean].value) 8 | 9 | override def toString: String = if (value) "true" else "false" 10 | 11 | override def hashCode = if (value) 1231 else 1237 12 | } 13 | 14 | object Boolean { 15 | val TYPE = classOf[scala.Boolean] 16 | val TRUE = new Boolean(true) 17 | val FALSE = new Boolean(false) 18 | 19 | def valueOf(booleanValue: scala.Boolean) = if (booleanValue) TRUE else FALSE 20 | 21 | def toString(b: scala.Boolean) = if (b) "true" else "false" 22 | } 23 | -------------------------------------------------------------------------------- /src/javalib/java/lang/InheritableThreadLocal.scala: -------------------------------------------------------------------------------- 1 | package java.lang 2 | 3 | class InheritableThreadLocal[T] extends ThreadLocal[T] { 4 | } 5 | -------------------------------------------------------------------------------- /src/javalib/java/lang/Runtime.scala: -------------------------------------------------------------------------------- 1 | package java 2 | package lang 3 | 4 | class Runtime private { 5 | def exit(status: Int) { 6 | halt0(status) 7 | } 8 | 9 | def addShutdownHook(hook: Thread) {} 10 | def removeShutdownHook(hook: Thread) {} 11 | 12 | def halt(status: Int) { 13 | halt0(status) 14 | } 15 | 16 | @native private def halt0(status: Int): Unit 17 | 18 | def availableProcessors() = 1 19 | def freeMemory(): scala.Long = sys.error("Runtime.freeMemory() not implemented") 20 | def totalMemory(): scala.Long = sys.error("Runtime.totalMemory() not implemented") 21 | def maxMemory(): scala.Long = Long.MAX_VALUE 22 | 23 | @native def gc(): Unit 24 | 25 | def runFinalization() {} 26 | def traceInstructions(on: scala.Boolean) {} 27 | def traceMethodCalls(on: scala.Boolean) {} 28 | 29 | def load(filename: String): Unit = sys.error("Runtime.load() not implemented") 30 | def loadLibrary(filename: String): Unit = sys.error("Runtime.loadLibrary() not implemented") 31 | } 32 | 33 | object Runtime { 34 | private val currentRuntime = new Runtime 35 | 36 | def getRuntime() = currentRuntime 37 | } 38 | -------------------------------------------------------------------------------- /src/javalib/java/lang/ThreadLocal.scala: -------------------------------------------------------------------------------- 1 | package java.lang 2 | 3 | class ThreadLocal[T] { 4 | private final var hasValue = false 5 | private final var i: T = _ 6 | private final var v: T = _ 7 | private final var m: ThreadLocal.ThreadLocalMap = new ThreadLocal.ThreadLocalMap() 8 | 9 | protected def initialValue(): T = i 10 | 11 | def get(): T = { 12 | if (!hasValue) 13 | set(initialValue) 14 | v 15 | } 16 | 17 | def remove() { 18 | hasValue = false 19 | } 20 | 21 | def set(o: T) { 22 | v = o 23 | hasValue = true 24 | } 25 | 26 | def childValue(parentValue: T): T = parentValue 27 | 28 | def createMap(t: Thread, firstValue: T) {} 29 | def getMap(t: Thread) = m 30 | } 31 | 32 | object ThreadLocal { 33 | class ThreadLocalMap 34 | } 35 | -------------------------------------------------------------------------------- /src/javalib/java/lang/Void.scala: -------------------------------------------------------------------------------- 1 | package java.lang 2 | 3 | class Void private { 4 | } 5 | 6 | object Void { 7 | val TYPE = classOf[scala.Unit] 8 | } 9 | -------------------------------------------------------------------------------- /src/javalib/java/util/Throwables.scala: -------------------------------------------------------------------------------- 1 | package java.util 2 | 3 | class NoSuchElementException(message: String, cause: Throwable) extends RuntimeException(message, cause) { 4 | def this() = this(null, null) 5 | def this(message: String) = this(message, null) 6 | def this(cause: Throwable) = this(null, cause) 7 | } 8 | -------------------------------------------------------------------------------- /src/library/ozma/Port.scala: -------------------------------------------------------------------------------- 1 | package ozma 2 | 3 | import scala.ozma._ 4 | 5 | class Port[-A] private (private val rawPort: Any) { 6 | @native def send(element: A): Unit = sys.error("stub") 7 | } 8 | 9 | object Port { 10 | @native def newPort[A]: (List[A], Port[A]) = sys.error("stub") 11 | 12 | def make[A](handler: List[A] => Unit) = { 13 | val (stream, port) = newPort[A] 14 | thread { 15 | handler(stream) 16 | } 17 | port 18 | } 19 | 20 | def newStatelessPortObject[A, U](handler: A => U) = 21 | make[A](_.toAgent foreach handler) 22 | 23 | def newPortObject[A, B](init: B)(handler: (B, A) => B) = 24 | make[A](_.toAgent.foldLeft(init)(handler)) 25 | } 26 | -------------------------------------------------------------------------------- /src/library/ozma/Random.scala: -------------------------------------------------------------------------------- 1 | package ozma 2 | 3 | object Random { 4 | @native def rand(): Int = sys.error("stub") 5 | 6 | def rand(upper: Int): Int = rand() % upper 7 | 8 | def rand[A](choices: Seq[A]): A = choices(rand(choices.length)) 9 | } 10 | -------------------------------------------------------------------------------- /src/library/ozma/ResultPort.scala: -------------------------------------------------------------------------------- 1 | package ozma 2 | 3 | import scala.ozma._ 4 | 5 | class ResultPort[-A, +R] private (private val rawPort: Any) { 6 | @native def send(element: A): R = sys.error("stub") 7 | } 8 | 9 | object ResultPort { 10 | @native def newPort[A, R]: (List[Item[A, R]], ResultPort[A, R]) = sys.error("stub") 11 | 12 | def make[A, R](handler: List[Item[A, R]] => Unit) = { 13 | val (stream, port) = newPort[A, R] 14 | thread { 15 | handler(stream) 16 | } 17 | port 18 | } 19 | 20 | def newStatelessPortObject[A, R](handler: A => R) = 21 | make[A, R](_.toAgent foreach { 22 | item => item.output = handler(item.input) 23 | }) 24 | 25 | def newPortObject[A, B, R](init: B)(handler: (B, A) => (R, B)) = 26 | make[A, R](_.toAgent.foldLeft(init) { (prevState, item) => 27 | val (result, newState) = handler(prevState, item.input) 28 | item.output = result 29 | newState 30 | }) 31 | 32 | @native def newActiveObject[A <: AnyRef](obj: A): A = sys.error("stub") 33 | 34 | class Item[+A, R] private (val input: A, _output: R) { 35 | @singleAssignment var output = _output 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/library/scala/ozma/ListWrapper.scala: -------------------------------------------------------------------------------- 1 | package scala.ozma 2 | 3 | class ListWrapper[A](list: List[A]) { 4 | def toAgent = new ListAgent(list) 5 | 6 | def lazified = new LazyList(list) 7 | } 8 | -------------------------------------------------------------------------------- /src/library/scala/ozma/singleAssignment.scala: -------------------------------------------------------------------------------- 1 | package scala.ozma 2 | 3 | import annotation._ 4 | 5 | final class singleAssignment extends StaticAnnotation 6 | -------------------------------------------------------------------------------- /src/library/scala/ozma/tailcall.scala: -------------------------------------------------------------------------------- 1 | package scala.ozma 2 | 3 | import annotation._ 4 | 5 | final class tailcall extends StaticAnnotation 6 | -------------------------------------------------------------------------------- /src/ozastc/ASTPatch.oz: -------------------------------------------------------------------------------- 1 | % Context: 2 | % BatchCompiler: the Compiler object 3 | % ReadFile: FileName => FileContents 4 | 5 | {BatchCompiler enqueue(setFrontEnd(ParseASTFile ParseASTVirtualString))} 6 | -------------------------------------------------------------------------------- /src/scalalib/scala/AnyValCompanion.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala 10 | 11 | /** A common supertype for companion classes of primitive types. 12 | * 13 | * A common trait for /companion/ objects of primitive types comes handy 14 | * when parameterizing code on types. For instance, the specialized 15 | * annotation is passed a sequence of types on which to specialize: 16 | * {{{ 17 | * class Tuple1[@specialized(Unit, Int, Double) T] 18 | * }}} 19 | * 20 | */ 21 | private[scala] trait AnyValCompanion extends SpecializableCompanion { } 22 | -------------------------------------------------------------------------------- /src/scalalib/scala/Cell.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala 12 | 13 | /** A Cell is a generic wrapper which completely 14 | * hides the functionality of the wrapped object. The wrapped 15 | * object is accessible via the elem accessor method. 16 | * 17 | * @author Martin Odersky 18 | * @version 1.0, 08/08/2003 19 | */ 20 | @deprecated("use `scala.Option` or `scala.Some` instead", "2.9.0") 21 | case class Cell[+T](elem: T) 22 | -------------------------------------------------------------------------------- /src/scalalib/scala/CountedIterator.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala 12 | 13 | /** Counted iterators keep track of the number of elements seen so far 14 | * 15 | * @since 2.0 16 | */ 17 | @deprecated("use iterator.zipWithIndex instead", "2.8.0") 18 | trait CountedIterator[+A] extends Iterator[A] { 19 | /** counts the elements in this iterator; counts start at 0 20 | */ 21 | def count: Int 22 | 23 | override def counted : this.type = this 24 | } 25 | -------------------------------------------------------------------------------- /src/scalalib/scala/DelayedInit.scala: -------------------------------------------------------------------------------- 1 | package scala 2 | 3 | /** Classes and traits inheriting the `DelayedInit` marker trait 4 | * will have their initialization code rewritten as follows. 5 | * becomes delayedInit() 6 | * Initialization code comprises all statements and all value definitions 7 | * that are executed during initialization. 8 | */ 9 | trait DelayedInit { 10 | def delayedInit(x: => Unit): Unit 11 | } 12 | 13 | -------------------------------------------------------------------------------- /src/scalalib/scala/Dynamic.scala: -------------------------------------------------------------------------------- 1 | package scala 2 | 3 | /** A marker trait that enables dynamic invocations. Instances `x` of this trait 4 | * allow calls `x.meth(args)` for arbitrary method names `meth` and argument lists 5 | * `args`. If a call is not natively supported by `x`, it is rewritten to 6 | * `x.applyDynamic("meth", args)`. 7 | * 8 | * As of scala 2.9, scalac must receive the -Xexperimental optional for Dynamic 9 | * to receive this treatment. 10 | */ 11 | trait Dynamic 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/scalalib/scala/Equals.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala 10 | 11 | /** An interface containing operations for equality. 12 | * The only method not already present in class `AnyRef` is `canEqual`. 13 | */ 14 | trait Equals { 15 | /** A method that should be called from every well-designed equals method 16 | * that is open to be overridden in a subclass. See Programming in Scala, 17 | * Chapter 28 for discussion and design. 18 | * 19 | * @param that the value being probed for possible equality 20 | * @return true if this instance can possibly equal `that`, otherwise false 21 | */ 22 | def canEqual(that: Any): Boolean 23 | 24 | /** The universal equality method defined in `AnyRef`. 25 | */ 26 | def equals(that: Any): Boolean 27 | } 28 | -------------------------------------------------------------------------------- /src/scalalib/scala/Immutable.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala 12 | 13 | /** A marker trait for all immutable datastructures such as immutable 14 | * collections. 15 | * 16 | * @since 2.8 17 | */ 18 | trait Immutable 19 | -------------------------------------------------------------------------------- /src/scalalib/scala/Mutable.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala 12 | 13 | /** 14 | * A marker trait for mutable datatructures such as mutable collections 15 | * 16 | * @since 2.8 17 | */ 18 | trait Mutable 19 | -------------------------------------------------------------------------------- /src/scalalib/scala/NotDefinedError.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala 12 | 13 | /** 14 | * @since 2.0 15 | */ 16 | @deprecated("Use a custom Error class instead", "2.8.0") 17 | final class NotDefinedError(msg: String) extends Error("not defined: " + msg) 18 | -------------------------------------------------------------------------------- /src/scalalib/scala/NotNull.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala 12 | 13 | /** 14 | * A marker trait for things that are not allowed to be null 15 | * @since 2.5 16 | */ 17 | trait NotNull {} 18 | -------------------------------------------------------------------------------- /src/scalalib/scala/ScalaObject.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala 12 | 13 | trait ScalaObject extends java.lang.Object 14 | -------------------------------------------------------------------------------- /src/scalalib/scala/SerialVersionUID.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | */ 8 | 9 | 10 | 11 | package scala 12 | 13 | 14 | /** 15 | * Annotation for specifying the static SerialVersionUID field 16 | * of a serializable class. 17 | */ 18 | class SerialVersionUID(uid: Long) extends annotation.StaticAnnotation 19 | -------------------------------------------------------------------------------- /src/scalalib/scala/Serializable.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala 10 | 11 | /** 12 | * Classes extending this trait are serializable across platforms (Java, .NET). 13 | */ 14 | trait Serializable extends java.io.Serializable 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/SpecializableCompanion.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala 10 | 11 | /** A common supertype for companion classes which specialization takes into account. 12 | */ 13 | private[scala] trait SpecializableCompanion 14 | -------------------------------------------------------------------------------- /src/scalalib/scala/Tuple1.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | // GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. 9 | 10 | package scala 11 | 12 | 13 | /** A tuple of 1 elements; the canonical representation of a [[scala.Product1]]. 14 | * 15 | * @constructor Create a new tuple with 1 elements. 16 | * @param _1 Element 1 of this Tuple1 17 | */ 18 | case class Tuple1[@specialized(Int, Long, Double) +T1](_1: T1) 19 | extends Product1[T1] 20 | { 21 | override def toString() = "(" + _1 + ")" 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/scalalib/scala/UninitializedError.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala 12 | 13 | /** This class represents uninitialized variable/value errors. 14 | * 15 | * @author Martin Odersky 16 | * @since 2.5 17 | */ 18 | final class UninitializedError extends RuntimeException("uninitialized value") 19 | -------------------------------------------------------------------------------- /src/scalalib/scala/UninitializedFieldError.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala 12 | 13 | /** This class implements errors which are thrown whenever a 14 | * field is used before it has been initialized. 15 | * 16 | * Such runtime checks are not emitted by default. See the 17 | * compiler documentation for knowing how to turn them on. 18 | * 19 | * Note: This check requires the initialization order 20 | * first implemented in scala 2.8. 21 | * 22 | * @since 2.7 23 | */ 24 | final case class UninitializedFieldError(msg: String) 25 | extends RuntimeException(msg) { 26 | def this(obj: Any) = 27 | this(if (null != obj) obj.toString() else "null") 28 | } 29 | -------------------------------------------------------------------------------- /src/scalalib/scala/annotation/Annotation.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2006-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.annotation 10 | 11 | /**

12 | * A base class for annotations. Annotations extending this class directly 13 | * are not preserved for the Scala type checker and are also not stored 14 | * as Java annotations in classfiles. To enable either or both of these, 15 | * one needs to inherit from 16 | * StaticAnnotation or/and 17 | * ClassfileAnnotation. 18 | *

19 | * 20 | * @author Martin Odersky 21 | * @version 1.1, 2/02/2007 22 | * @since 2.4 23 | */ 24 | abstract class Annotation {} 25 | -------------------------------------------------------------------------------- /src/scalalib/scala/annotation/ClassfileAnnotation.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2006-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.annotation 10 | 11 | /**

12 | * A base class for classfile annotations. These are stored as 13 | * Java annotations in classfiles. 15 | *

16 | * 17 | * @author Martin Odersky 18 | * @version 1.1, 2/02/2007 19 | * @since 2.4 20 | */ 21 | trait ClassfileAnnotation extends StaticAnnotation 22 | -------------------------------------------------------------------------------- /src/scalalib/scala/annotation/StaticAnnotation.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2006-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.annotation 10 | 11 | /**

12 | * A base class for static annotations. These are available 13 | * to the Scala type checker, even across different compilation units. 14 | *

15 | * 16 | * @author Martin Odersky 17 | * @version 1.1, 2/02/2007 18 | * @since 2.4 19 | */ 20 | trait StaticAnnotation extends Annotation 21 | -------------------------------------------------------------------------------- /src/scalalib/scala/annotation/bridge.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.annotation 10 | 11 | /** If this annotation is present on a method, it will be treated as a bridge method. 12 | */ 13 | private[scala] class bridge extends annotation.StaticAnnotation 14 | -------------------------------------------------------------------------------- /src/scalalib/scala/annotation/implicitNotFound.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.annotation 10 | 11 | /** 12 | * An annotation that specifies the error message that is emitted when the compiler 13 | * cannot find an implicit value of the annotated type. 14 | * 15 | * @author Adriaan Moors 16 | * @since 2.8.1 17 | */ 18 | final class implicitNotFound(msg: String) extends annotation.StaticAnnotation {} -------------------------------------------------------------------------------- /src/scalalib/scala/annotation/serializable.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.annotation 10 | 11 | /** 12 | * An annotation that designates the class to which it is applied as serializable 13 | */ 14 | @deprecated("instead of `@serializable class C`, use `class C extends Serializable`", "2.9.0") 15 | class serializable extends annotation.StaticAnnotation 16 | -------------------------------------------------------------------------------- /src/scalalib/scala/annotation/strictfp.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.annotation 10 | 11 | /** If this annotation is present on a method or its enclosing class, 12 | * the strictfp flag will be emitted. 13 | * 14 | * @author Paul Phillips 15 | * @version 2.9 16 | * @since 2.9 17 | */ 18 | class strictfp extends annotation.StaticAnnotation 19 | -------------------------------------------------------------------------------- /src/scalalib/scala/annotation/tailrec.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | package scala.annotation 9 | 10 | /**

11 | * A method annotation which verifies that the method will be compiled 12 | * with tail call optimization. If it is present, the compiler will 13 | * issue an error if the method cannot be optimized into a loop. 14 | *

15 | * 16 | * @since 2.8 17 | */ 18 | final class tailrec extends annotation.StaticAnnotation 19 | -------------------------------------------------------------------------------- /src/scalalib/scala/annotation/target/beanGetter.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | package scala.annotation.target 9 | 10 | /** 11 | * Consult the documentation in package [[scala.annotation.target]]. 12 | */ 13 | final class beanGetter extends annotation.StaticAnnotation 14 | -------------------------------------------------------------------------------- /src/scalalib/scala/annotation/target/beanSetter.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | package scala.annotation.target 9 | 10 | /** 11 | * Consult the documentation in package [[scala.annotation.target]]. 12 | */ 13 | final class beanSetter extends annotation.StaticAnnotation 14 | -------------------------------------------------------------------------------- /src/scalalib/scala/annotation/target/field.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | package scala.annotation.target 9 | 10 | /** 11 | * Consult the documentation in package [[scala.annotation.target]]. 12 | */ 13 | final class field extends annotation.StaticAnnotation 14 | -------------------------------------------------------------------------------- /src/scalalib/scala/annotation/target/getter.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | package scala.annotation.target 9 | 10 | /** 11 | * Consult the documentation in package [[scala.annotation.target]]. 12 | */ 13 | final class getter extends annotation.StaticAnnotation 14 | -------------------------------------------------------------------------------- /src/scalalib/scala/annotation/target/param.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | package scala.annotation.target 9 | 10 | /** 11 | * Consult the documentation in package [[scala.annotation.target]]. 12 | */ 13 | final class param extends annotation.StaticAnnotation 14 | -------------------------------------------------------------------------------- /src/scalalib/scala/annotation/target/setter.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | package scala.annotation.target 9 | 10 | /** 11 | * Consult the documentation in package [[scala.annotation.target]]. 12 | */ 13 | final class setter extends annotation.StaticAnnotation 14 | -------------------------------------------------------------------------------- /src/scalalib/scala/annotation/unchecked/uncheckedStable.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | package scala.annotation.unchecked 9 | 10 | /** An annotation for values that are assumed to be stable even though their 11 | * types are volatile. 12 | * 13 | * @since 2.7 14 | */ 15 | final class uncheckedStable extends annotation.StaticAnnotation {} 16 | -------------------------------------------------------------------------------- /src/scalalib/scala/annotation/unchecked/uncheckedVariance.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | package scala.annotation.unchecked 9 | 10 | /** An annotation for type arguments for which one wants to suppress variance checking 11 | * types are volatile. 12 | * 13 | * @since 2.7 14 | */ 15 | final class uncheckedVariance extends annotation.StaticAnnotation {} 16 | -------------------------------------------------------------------------------- /src/scalalib/scala/annotation/varargs.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | package scala.annotation 9 | 10 | /**

11 | * A method annotation which instructs the compiler to generate a 12 | * Java varargs-style forwarder method for interop. This annotation can 13 | * only be applied to methods with repeated parameters. 14 | *

15 | * 16 | * @since 2.9 17 | */ 18 | final class varargs extends annotation.StaticAnnotation 19 | -------------------------------------------------------------------------------- /src/scalalib/scala/cloneable.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala 12 | 13 | /** 14 | * An annotation that designates the class to which it is applied as cloneable 15 | */ 16 | class cloneable extends annotation.StaticAnnotation 17 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/BitSet.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.collection 12 | 13 | import generic._ 14 | 15 | /** A common base class for mutable and immutable bitsets. 16 | * $bitsetinfo 17 | */ 18 | trait BitSet extends Set[Int] 19 | with BitSetLike[BitSet] { 20 | override def empty: BitSet = BitSet.empty 21 | } 22 | 23 | /** $factoryInfo 24 | * @define coll bitset 25 | * @define Coll BitSet 26 | */ 27 | object BitSet extends BitSetFactory[BitSet] { 28 | val empty: BitSet = immutable.BitSet.empty 29 | def newBuilder = immutable.BitSet.newBuilder 30 | 31 | /** $canBuildFromInfo */ 32 | implicit def canBuildFrom: CanBuildFrom[BitSet, Int, BitSet] = bitsetCanBuildFrom 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/BufferedIterator.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.collection 12 | 13 | /** Buffered iterators are iterators which provide a method `head` 14 | * that inspects the next element without discarding it. 15 | * 16 | * @author Martin Odersky 17 | * @version 2.8 18 | * @since 2.8 19 | */ 20 | trait BufferedIterator[+A] extends Iterator[A] { 21 | 22 | /** Returns next element of iterator without advancing beyond it. 23 | */ 24 | def head: A 25 | 26 | override def buffered: this.type = this 27 | } 28 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/CustomParallelizable.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.collection 10 | 11 | import parallel.Combiner 12 | 13 | trait CustomParallelizable[+A, +ParRepr <: Parallel] extends Parallelizable[A, ParRepr] { 14 | override def par: ParRepr 15 | override protected[this] def parCombiner: Combiner[A, ParRepr] = throw new UnsupportedOperationException("") 16 | } 17 | 18 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/GenIterableView.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.collection 10 | 11 | 12 | import generic._ 13 | 14 | 15 | 16 | trait GenIterableView[+A, +Coll] extends GenIterableViewLike[A, Coll, GenIterableView[A, Coll]] { } 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/GenSeqView.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.collection 10 | 11 | 12 | import generic._ 13 | 14 | 15 | 16 | trait GenSeqView[+A, +Coll] extends GenSeqViewLike[A, Coll, GenSeqView[A, Coll]] { } 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/GenSet.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | package scala.collection 11 | 12 | 13 | import generic._ 14 | 15 | 16 | /** A trait for sets which may possibly 17 | * have their operations implemented in parallel. 18 | * 19 | * @author Martin Odersky 20 | * @author Aleksandar Prokopec 21 | * @since 2.9 22 | */ 23 | trait GenSet[A] 24 | extends GenSetLike[A, GenSet[A]] 25 | with GenIterable[A] 26 | with GenericSetTemplate[A, GenSet] 27 | { 28 | override def companion: GenericCompanion[GenSet] = GenSet 29 | def seq: Set[A] 30 | } 31 | 32 | 33 | object GenSet extends GenTraversableFactory[GenSet] { 34 | implicit def canBuildFrom[A] = new GenericCanBuildFrom[A] 35 | def newBuilder[A] = Set.newBuilder 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/GenTraversableView.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.collection 10 | 11 | 12 | import generic._ 13 | 14 | 15 | 16 | trait GenTraversableView[+A, +Coll] extends GenTraversableViewLike[A, Coll, GenTraversableView[A, Coll]] { } 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/IterableProxy.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.collection 12 | 13 | import generic._ 14 | 15 | /**

16 | * This trait implements a proxy for iterable objects. It forwards 17 | * all calls to a different iterable object. 18 | *

19 | * 20 | * @author Martin Odersky 21 | * @version 2.8 22 | * @since 2.8 23 | */ 24 | trait IterableProxy[+A] extends Iterable[A] with IterableProxyLike[A, Iterable[A]] 25 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/MapProxy.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.collection 12 | 13 | /** This is a simple wrapper class for scala.collection.Map. 15 | * It is most useful for assembling customized map abstractions 16 | * dynamically using object composition and forwarding. 17 | * 18 | * @author Matthias Zenger 19 | * @version 1.0, 21/07/2003 20 | * @since 1 21 | */ 22 | trait MapProxy[A, +B] extends Map[A, B] with MapProxyLike[A, B, Map[A, B]] 23 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/Parallel.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.collection 10 | 11 | /** A marker trait for collections which have their operations parallelised. 12 | * 13 | * @since 2.9 14 | * @author Aleksandar Prokopec 15 | */ 16 | trait Parallel 17 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/SeqProxy.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.collection 12 | 13 | /** This trait implements a proxy for sequence objects. It forwards 14 | * all calls to a different sequence object. 15 | * 16 | * @author Martin Odersky 17 | * @version 2.8 18 | * @since 2.8 19 | */ 20 | trait SeqProxy[+A] extends Seq[A] with SeqProxyLike[A, Seq[A]] 21 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/Sequentializable.scala.disabled: -------------------------------------------------------------------------------- 1 | package scala.collection 2 | 3 | 4 | 5 | 6 | trait Sequentializable[+T, +Repr] { 7 | 8 | def seq: Repr 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/SetProxy.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.collection 12 | 13 | /** This is a simple wrapper class for scala.collection.Set. 15 | * It is most useful for assembling customized set abstractions 16 | * dynamically using object composition and forwarding. 17 | * 18 | * @author Matthias Zenger 19 | * @author Martin Odersky 20 | * @version 2.0, 01/01/2007 21 | */ 22 | 23 | trait SetProxy[A] extends Set[A] with SetProxyLike[A, Set[A]] 24 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/TraversableProxy.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.collection 12 | 13 | // Methods could be printed by cat TraversableLike.scala | egrep '^ (override )?def' 14 | 15 | 16 | /** This trait implements a proxy for traversable objects. It forwards 17 | * all calls to a different traversable object 18 | * 19 | * @author Martin Odersky 20 | * @version 2.8 21 | * @since 2.8 22 | */ 23 | trait TraversableProxy[+A] extends Traversable[A] with TraversableProxyLike[A, Traversable[A]] 24 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/generic/CanCombineFrom.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.collection 10 | package generic 11 | 12 | import scala.collection.parallel._ 13 | 14 | /** 15 | * A base trait for parallel builder factories. 16 | * 17 | * @tparam From the type of the underlying collection that requests a builder to be created 18 | * @tparam Elem the element type of the collection to be created 19 | * @tparam To the type of the collection to be created 20 | */ 21 | trait CanCombineFrom[-From, -Elem, +To] extends CanBuildFrom[From, Elem, To] with Parallel { 22 | def apply(from: From): Combiner[Elem, To] 23 | def apply(): Combiner[Elem, To] 24 | } 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/generic/ClassManifestTraversableFactory.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2006-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.collection 10 | package generic 11 | 12 | abstract class ClassManifestTraversableFactory[CC[X] <: Traversable[X] with GenericClassManifestTraversableTemplate[X, CC]] 13 | extends GenericClassManifestCompanion[CC] { 14 | 15 | class GenericCanBuildFrom[A](implicit manif: ClassManifest[A]) extends CanBuildFrom[CC[_], A, CC[A]] { 16 | def apply(from: CC[_]) = from.genericClassManifestBuilder[A] 17 | def apply = newBuilder[A] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/generic/FilterMonadic.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.collection.generic 10 | 11 | 12 | /** A template trait that contains just the `map`, `flatMap`, `foreach` and `withFilter` methods 13 | * of trait `TraversableLike`. 14 | */ 15 | trait FilterMonadic[+A, +Repr] { 16 | def map[B, That](f: A => B)(implicit bf: CanBuildFrom[Repr, B, That]): That 17 | def flatMap[B, That](f: A => collection.GenTraversableOnce[B])(implicit bf: CanBuildFrom[Repr, B, That]): That 18 | def foreach[U](f: A => U): Unit 19 | def withFilter(p: A => Boolean): FilterMonadic[A, Repr] 20 | } 21 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/generic/GenSeqFactory.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.collection 12 | package generic 13 | 14 | /** A template for companion objects of Seq and subclasses thereof. 15 | * 16 | * @since 2.8 17 | */ 18 | abstract class GenSeqFactory[CC[X] <: GenSeq[X] with GenericTraversableTemplate[X, CC]] extends GenTraversableFactory[CC] { 19 | 20 | /** This method is called in a pattern match { case Seq(...) => }. 21 | * 22 | * @param x the selector value 23 | * @return sequence wrapped in an option, if this is a Seq, otherwise none 24 | */ 25 | def unapplySeq[A](x: CC[A]): Some[CC[A]] = Some(x) 26 | } 27 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/generic/GenericClassManifestCompanion.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.collection 10 | package generic 11 | 12 | import mutable.Builder 13 | 14 | /** This class represents companions of classes which require ClassManifests 15 | * for their element types. 16 | * 17 | * @author Aleksandar Prokopec 18 | */ 19 | abstract class GenericClassManifestCompanion[+CC[X] <: Traversable[X]] { 20 | type Coll = CC[_] 21 | 22 | def newBuilder[A](implicit ord: ClassManifest[A]): Builder[A, CC[A]] 23 | 24 | def empty[A: ClassManifest]: CC[A] = newBuilder[A].result 25 | 26 | def apply[A](elems: A*)(implicit ord: ClassManifest[A]): CC[A] = { 27 | val b = newBuilder[A] 28 | b ++= elems 29 | b.result 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/generic/GenericOrderedTraversableTemplate.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.collection 12 | package generic 13 | 14 | import mutable.Builder 15 | import annotation.unchecked.uncheckedVariance 16 | 17 | 18 | 19 | /** This trait represents collections classes which require 20 | * ordered element types. 21 | * 22 | * @author Aleksandar Prokopec 23 | */ 24 | trait GenericOrderedTraversableTemplate[+A, +CC[X] <: Traversable[X]] extends HasNewBuilder[A, CC[A] @uncheckedVariance] { 25 | implicit protected[this] val ord: Ordering[A] 26 | def orderedCompanion: GenericOrderedCompanion[CC] 27 | def genericOrderedBuilder[B](implicit ord: Ordering[B]): Builder[B, CC[B]] = orderedCompanion.newBuilder[B] 28 | } 29 | 30 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/generic/GenericSeqCompanion.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2006-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | package scala.collection 11 | package generic 12 | 13 | import annotation.bridge 14 | 15 | trait GenericSeqCompanion[CC[X] <: Traversable[X]] 16 | extends GenericCompanion[CC] { 17 | 18 | @bridge 19 | override def empty[A]: CC[A] = super.empty[A] 20 | 21 | @bridge 22 | override def apply[A](elems: A*): CC[A] = super.apply(elems: _*) 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/generic/GenericSetTemplate.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.collection 12 | package generic 13 | 14 | /** 15 | * @since 2.8 16 | */ 17 | trait GenericSetTemplate[A, +CC[X] <: GenSet[X]] extends GenericTraversableTemplate[A, CC] { 18 | def empty: CC[A] = companion.empty[A] 19 | } 20 | 21 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/generic/HasNewBuilder.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | package scala.collection 9 | package generic 10 | 11 | import mutable.Builder 12 | 13 | trait HasNewBuilder[+A, +Repr] { 14 | /** The builder that builds instances of Repr */ 15 | protected[this] def newBuilder: Builder[A, Repr] 16 | } 17 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/generic/HasNewCombiner.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.collection.generic 10 | 11 | 12 | 13 | import scala.collection.parallel.Combiner 14 | 15 | 16 | 17 | trait HasNewCombiner[+T, +Repr] { 18 | protected[this] def newCombiner: Combiner[T, Repr] 19 | } 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/generic/ImmutableMapFactory.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | package scala.collection 11 | package generic 12 | 13 | /** A template for companion objects of `immutable.Map` and subclasses thereof. 14 | * @author Martin Odersky 15 | * @version 2.8 16 | * @since 2.8 17 | */ 18 | abstract class ImmutableMapFactory[CC[A, +B] <: immutable.Map[A, B] with immutable.MapLike[A, B, CC[A, B]]] extends MapFactory[CC] 19 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/generic/ImmutableSetFactory.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.collection 10 | package generic 11 | 12 | import mutable.{ Builder, SetBuilder } 13 | 14 | abstract class ImmutableSetFactory[CC[X] <: immutable.Set[X] with SetLike[X, CC[X]]] 15 | extends SetFactory[CC] { 16 | 17 | def newBuilder[A]: Builder[A, CC[A]] = new SetBuilder[A, CC[A]](empty[A]) 18 | } 19 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/generic/ImmutableSortedMapFactory.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.collection 12 | package generic 13 | 14 | /** A template for companion objects of `SortedMap` and subclasses thereof. 15 | * 16 | * @since 2.8 17 | * @define Coll SortedMap 18 | * @define coll sorted map 19 | * @define factoryInfo 20 | * This object provides a set of operations needed to create sorted maps of type `$Coll`. 21 | * @author Martin Odersky 22 | * @version 2.8 23 | * @define sortedMapCanBuildFromInfo 24 | * The standard `CanBuildFrom` instance for sorted maps 25 | */ 26 | abstract class ImmutableSortedMapFactory[CC[A, B] <: immutable.SortedMap[A, B] with SortedMapLike[A, B, CC[A, B]]] extends SortedMapFactory[CC] 27 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/generic/ImmutableSortedSetFactory.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.collection 12 | package generic 13 | 14 | /** A template for companion objects of `SortedSet` and subclasses thereof. 15 | * 16 | * @since 2.8 17 | * @define Coll immutable.SortedSet 18 | * @define coll immutable sorted 19 | * @define factoryInfo 20 | * This object provides a set of operations needed to create sorted sets of type `$Coll`. 21 | * @author Martin Odersky 22 | * @version 2.8 23 | * @define sortedSetCanBuildFromInfo 24 | * The standard `CanBuildFrom` instance for sorted sets 25 | */ 26 | abstract class ImmutableSortedSetFactory[CC[A] <: immutable.SortedSet[A] with SortedSetLike[A, CC[A]]] extends SortedSetFactory[CC] -------------------------------------------------------------------------------- /src/scalalib/scala/collection/generic/MutableMapFactory.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.collection 12 | package generic 13 | 14 | import mutable.Builder 15 | 16 | /** A template for companion objects of `mutable.Map` and subclasses thereof. 17 | * @author Martin Odersky 18 | * @version 2.8 19 | * @since 2.8 20 | */ 21 | abstract class MutableMapFactory[CC[A, B] <: mutable.Map[A, B] with mutable.MapLike[A, B, CC[A, B]]] 22 | extends MapFactory[CC] { 23 | 24 | /** The default builder for $Coll objects. 25 | * @tparam A the type of the keys 26 | * @tparam B the type of the associated values 27 | */ 28 | override def newBuilder[A, B]: Builder[(A, B), CC[A, B]] = empty[A, B] 29 | } 30 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/generic/MutableSetFactory.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.collection 10 | package generic 11 | 12 | import mutable.{ Builder, GrowingBuilder } 13 | 14 | abstract class MutableSetFactory[CC[X] <: mutable.Set[X] with mutable.SetLike[X, CC[X]]] 15 | extends SetFactory[CC] { 16 | 17 | def newBuilder[A]: Builder[A, CC[A]] = new GrowingBuilder[A, CC[A]](empty[A]) 18 | } 19 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/generic/OrderedTraversableFactory.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2006-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | package scala.collection 11 | package generic 12 | 13 | 14 | 15 | 16 | 17 | abstract class OrderedTraversableFactory[CC[X] <: Traversable[X] with GenericOrderedTraversableTemplate[X, CC]] 18 | extends GenericOrderedCompanion[CC] { 19 | 20 | class GenericCanBuildFrom[A](implicit ord: Ordering[A]) extends CanBuildFrom[CC[_], A, CC[A]] { 21 | def apply(from: CC[_]) = from.genericOrderedBuilder[A] 22 | def apply = newBuilder[A] 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/generic/SeqFactory.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.collection 12 | package generic 13 | 14 | import annotation.bridge 15 | 16 | /** A template for companion objects of Seq and subclasses thereof. 17 | * 18 | * @since 2.8 19 | */ 20 | abstract class SeqFactory[CC[X] <: Seq[X] with GenericTraversableTemplate[X, CC]] 21 | extends GenSeqFactory[CC] with TraversableFactory[CC] 22 | 23 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/generic/SetFactory.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.collection 12 | package generic 13 | 14 | import mutable.Builder 15 | import annotation.bridge 16 | 17 | abstract class SetFactory[CC[X] <: Set[X] with SetLike[X, CC[X]]] 18 | extends GenSetFactory[CC] with GenericSeqCompanion[CC] { 19 | 20 | @bridge 21 | override def empty[A]: CC[A] = super.empty[A] 22 | 23 | @bridge 24 | override def apply[A](elems: A*): CC[A] = super.apply(elems: _*) 25 | } 26 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/generic/Sizing.scala: -------------------------------------------------------------------------------- 1 | package scala.collection.generic 2 | 3 | /** A trait for objects which have a size. 4 | */ 5 | trait Sizing { 6 | def size: Int 7 | } 8 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/generic/package.scala: -------------------------------------------------------------------------------- 1 | package scala.collection 2 | import generic.CanBuildFrom 3 | 4 | package object generic { 5 | type CanBuild[-Elem, +To] = CanBuildFrom[Nothing, Elem, To] 6 | } -------------------------------------------------------------------------------- /src/scalalib/scala/collection/immutable/StreamView.scala: -------------------------------------------------------------------------------- 1 | package scala.collection 2 | package immutable 3 | 4 | trait StreamView[+A, +Coll] extends StreamViewLike[A, Coll, StreamView[A, Coll]] { } 5 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/mutable/Cloneable.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.collection 12 | package mutable 13 | 14 | /** A trait for cloneable collections. 15 | * 16 | * @since 2.8 17 | * 18 | * @tparam A Type of the elements contained in the collection, covariant and with reference types as upperbound. 19 | */ 20 | @cloneable 21 | trait Cloneable[+A <: AnyRef] { 22 | // !!! why doesn't this extend java.lang.Cloneable? 23 | // because neither did @serializable, then we changed it to Serializable 24 | override def clone: A = super.clone().asInstanceOf[A] 25 | } 26 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/mutable/DefaultEntry.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.collection 12 | package mutable 13 | 14 | 15 | 16 | /** Class used internally for default map model. 17 | * @since 2.3 18 | */ 19 | final class DefaultEntry[A, B](val key: A, var value: B) 20 | extends HashEntry[A, DefaultEntry[A, B]] with Serializable 21 | { 22 | override def toString = chainString 23 | 24 | def chainString = { 25 | "(kv: " + key + ", " + value + ")" + (if (next != null) " -> " + next.toString else "") 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/mutable/GrowingBuilder.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.collection 10 | package mutable 11 | 12 | import generic._ 13 | 14 | /** The canonical builder for collections that are growable, i.e. that support an 15 | * efficient `+=` method which adds an element to the collection. 16 | * 17 | * @author Paul Phillips 18 | * @version 2.8 19 | * @since 2.8 20 | * 21 | * @define Coll GrowingBuilder 22 | * @define coll growing builder 23 | */ 24 | class GrowingBuilder[Elem, To <: Growable[Elem]](empty: To) extends Builder[Elem, To] { 25 | protected var elems: To = empty 26 | def +=(x: Elem): this.type = { elems += x; this } 27 | def clear() { elems = empty } 28 | def result: To = elems 29 | } 30 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/mutable/HashEntry.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://www.scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | package scala.collection 9 | package mutable 10 | 11 | /** Class used internally. 12 | * @since 2.8 13 | */ 14 | trait HashEntry [A, E] { 15 | val key: A 16 | var next: E = _ 17 | } 18 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/mutable/IndexedSeqOptimized.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.collection 12 | package mutable 13 | import generic._ 14 | 15 | /** A subtrait of scala.collection.IndexedSeq which represents sequences 16 | * that can be mutated. 17 | * 18 | * @since 2.8 19 | */ 20 | trait IndexedSeqOptimized[A, +Repr] extends IndexedSeqLike[A, Repr] with scala.collection.IndexedSeqOptimized[A, Repr] 21 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/mutable/LinkedEntry.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.collection 12 | package mutable 13 | 14 | /** Class for the linked hash map entry, used internally. 15 | * @since 2.8 16 | */ 17 | final class LinkedEntry[A, B](val key: A, var value: B) 18 | extends HashEntry[A, LinkedEntry[A, B]] with Serializable { 19 | var earlier: LinkedEntry[A, B] = null 20 | var later: LinkedEntry[A, B] = null 21 | } 22 | 23 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/mutable/SetBuilder.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | package scala.collection 11 | package mutable 12 | 13 | import generic._ 14 | 15 | /** The canonical builder for mutable Sets. 16 | * 17 | * @tparam A The type of the elements that will be contained in this set. 18 | * @tparam Coll The type of the actual collection this set builds. 19 | * @param empty The empty element of the collection. 20 | * @since 2.8 21 | */ 22 | class SetBuilder[A, Coll <: collection.Set[A] with collection.SetLike[A, Coll]](empty: Coll) extends Builder[A, Coll] { 23 | protected var elems: Coll = empty 24 | def +=(x: A): this.type = { elems = elems + x; this } 25 | def clear() { elems = empty } 26 | def result: Coll = elems 27 | } 28 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/mutable/Subscriber.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.collection 12 | package mutable 13 | 14 | 15 | /** Subscriber[A, B] objects may subscribe to events of 16 | * type A published by an object of type B. 17 | * B is typically a subtype of Publisher. 19 | * 20 | * @author Matthias Zenger 21 | * @author Martin Odersky 22 | * @version 2.8 23 | * @since 1 24 | */ 25 | trait Subscriber[-Evt, -Pub] { 26 | def notify(pub: Pub, event: Evt): Unit 27 | } 28 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/mutable/Undoable.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.collection 12 | package mutable 13 | 14 | 15 | /** Classes that mix in the `Undoable` class provide an operation 16 | * `undo` which can be used to undo the last operation. 17 | * 18 | * @author Matthias Zenger 19 | * @version 1.0, 08/07/2003 20 | * @since 1 21 | */ 22 | trait Undoable { 23 | /** Undo the last operation. 24 | */ 25 | def undo(): Unit 26 | } 27 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/parallel/TaskSupport.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | package scala.collection.parallel 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | trait TaskSupport extends Tasks 19 | 20 | private[collection] class ForkJoinTaskSupport extends TaskSupport with AdaptiveWorkStealingForkJoinTasks 21 | 22 | private[collection] class ThreadPoolTaskSupport extends TaskSupport with AdaptiveWorkStealingThreadPoolTasks 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/script/Location.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.collection 12 | package script 13 | 14 | 15 | /** Class Location describes locations in messages implemented by 16 | * class Message. 17 | * 18 | * @author Matthias Zenger 19 | * @version 1.0, 10/05/2004 20 | * @since 2.8 21 | */ 22 | 23 | sealed abstract class Location 24 | case object Start extends Location 25 | case object End extends Location 26 | case object NoLo extends Location 27 | case class Index(n: Int) extends Location 28 | -------------------------------------------------------------------------------- /src/scalalib/scala/collection/script/Scriptable.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.collection 12 | package script 13 | 14 | 15 | /** Classes that mix in the Scriptable class allow 16 | * messages to be sent to objects of that class. 17 | * 18 | * @author Matthias Zenger 19 | * @version 1.0, 09/05/2004 20 | * @since 2.8 21 | */ 22 | trait Scriptable[A] { 23 | /** Send a message to this scriptable object. 24 | */ 25 | def <<(cmd: Message[A]): Unit 26 | } 27 | -------------------------------------------------------------------------------- /src/scalalib/scala/concurrent/FutureTaskRunner.scala: -------------------------------------------------------------------------------- 1 | package scala.concurrent 2 | 3 | /** The FutureTaskRunner trait is a base trait of task runners 4 | * that provide some sort of future abstraction. 5 | * 6 | * @author Philipp Haller 7 | */ 8 | trait FutureTaskRunner extends TaskRunner { 9 | 10 | /** The type of the futures that the underlying task runner supports. 11 | */ 12 | type Future[T] 13 | 14 | /** An implicit conversion from futures to zero-parameter functions. 15 | */ 16 | implicit def futureAsFunction[S](x: Future[S]): () => S 17 | 18 | /** Submits a task to run which returns its result in a future. 19 | */ 20 | def submit[S](task: Task[S]): Future[S] 21 | 22 | /* Possibly blocks the current thread, for example, waiting for 23 | * a lock or condition. 24 | */ 25 | def managedBlock(blocker: ManagedBlocker): Unit 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/scalalib/scala/concurrent/Lock.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.concurrent 12 | 13 | /** This class ... 14 | * 15 | * @author Martin Odersky 16 | * @version 1.0, 10/03/2003 17 | */ 18 | class Lock { 19 | var available = true 20 | 21 | def acquire() = synchronized { 22 | while (!available) wait() 23 | available = false 24 | } 25 | 26 | def release() = synchronized { 27 | available = true 28 | notify() 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/scalalib/scala/concurrent/ManagedBlocker.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.concurrent 12 | 13 | /** The ManagedBlocker trait... 14 | * 15 | * @author Philipp Haller 16 | */ 17 | trait ManagedBlocker { 18 | 19 | /** 20 | * Possibly blocks the current thread, for example waiting for 21 | * a lock or condition. 22 | * @return true if no additional blocking is necessary (i.e., 23 | * if isReleasable would return true). 24 | * @throws InterruptedException if interrupted while waiting 25 | * (the method is not required to do so, but is allowed to). 26 | */ 27 | def block(): Boolean 28 | 29 | /** 30 | * Returns true if blocking is unnecessary. 31 | */ 32 | def isReleasable: Boolean 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/scalalib/scala/concurrent/TIMEOUT.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.concurrent 12 | 13 | /** 14 | * The message sent to a message box when the period specified in 15 | * receiveWithin expires. 16 | * 17 | * @author Martin Odersky 18 | * @version 1.0, 10/03/2003 19 | */ 20 | @deprecated("use actors instead", "2.8.0") 21 | case object TIMEOUT 22 | -------------------------------------------------------------------------------- /src/scalalib/scala/concurrent/TaskRunner.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.concurrent 12 | 13 | /** The TaskRunner trait... 14 | * 15 | * @author Philipp Haller 16 | */ 17 | trait TaskRunner { 18 | 19 | type Task[T] 20 | 21 | implicit def functionAsTask[S](fun: () => S): Task[S] 22 | 23 | def execute[S](task: Task[S]): Unit 24 | 25 | def shutdown(): Unit 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/scalalib/scala/deprecated.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala 10 | 11 | import annotation.target._ 12 | 13 | /** An annotation that designates that a definition is deprecated. 14 | * Access to the member then generates a deprecated warning. 15 | * 16 | * @param message the message to print during compilation if the definition is accessed 17 | * @param since a string identifying the first version in which the definition was deprecated 18 | * @since 2.3 19 | */ 20 | @getter @setter @beanGetter @beanSetter 21 | class deprecated(message: String = "", since: String = "") extends annotation.StaticAnnotation 22 | -------------------------------------------------------------------------------- /src/scalalib/scala/deprecatedName.scala: -------------------------------------------------------------------------------- 1 | package scala 2 | 3 | import annotation.target._ 4 | 5 | /** 6 | * An annotation that designates the name of the parameter to which it is 7 | * applied as deprecated. Using that name in a named argument generates 8 | * a deprecation warning. 9 | * 10 | * @since 2.8.1 11 | */ 12 | @param 13 | class deprecatedName(name: Symbol) extends annotation.StaticAnnotation 14 | -------------------------------------------------------------------------------- /src/scalalib/scala/inline.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala 12 | 13 | /** 14 | * An annotation on methods that requests that the compiler should 15 | * try especially hard to inline the annotated method. 16 | * 17 | * @author Lex Spoon 18 | * @version 1.0, 2007-5-21 19 | */ 20 | class inline extends annotation.StaticAnnotation 21 | -------------------------------------------------------------------------------- /src/scalalib/scala/math/Fractional.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.math 10 | 11 | /** 12 | * @since 2.8 13 | */ 14 | trait Fractional[T] extends Numeric[T] { 15 | def div(x: T, y: T): T 16 | 17 | class FractionalOps(lhs: T) extends Ops(lhs) { 18 | def /(rhs: T) = div(lhs, rhs) 19 | } 20 | override implicit def mkNumericOps(lhs: T): FractionalOps = 21 | new FractionalOps(lhs) 22 | } 23 | 24 | object Fractional { 25 | trait ExtraImplicits { 26 | implicit def infixFractionalOps[T](x: T)(implicit num: Fractional[T]): Fractional[T]#FractionalOps = new num.FractionalOps(x) 27 | } 28 | object Implicits extends ExtraImplicits 29 | } -------------------------------------------------------------------------------- /src/scalalib/scala/math/ScalaNumber.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2006-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.math 12 | 13 | /** A marker class for Number types introduced by Scala 14 | * @author Martin Odersky, Paul Phillips 15 | * @version 2.8 16 | * @since 2.8 17 | */ 18 | abstract class ScalaNumber extends java.lang.Number { 19 | protected def isWhole(): Boolean 20 | def underlying(): Object 21 | } 22 | -------------------------------------------------------------------------------- /src/scalalib/scala/native.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala 12 | 13 | /** Marker for native methods. 14 | * 15 | * {{{ 16 | * @native def f(x: Int, y: List[Long]): String = ... 17 | * }}} 18 | * 19 | * Method body is not generated if method is marked with `@native`, 20 | * but it is type checked when present. 21 | * 22 | * @since 2.6 */ 23 | class native extends annotation.StaticAnnotation {} 24 | -------------------------------------------------------------------------------- /src/scalalib/scala/noinline.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala 12 | 13 | /** 14 | * An annotation on methods that forbids the compiler to inline the 15 | * method, no matter how safe the inlining appears to be. 16 | * 17 | * @author Lex Spoon 18 | * @version 1.0, 2007-5-21 19 | * @since 2.5 20 | */ 21 | class noinline extends annotation.StaticAnnotation 22 | -------------------------------------------------------------------------------- /src/scalalib/scala/parallel/Future.scala: -------------------------------------------------------------------------------- 1 | package scala.parallel 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | /** A future is a function without parameters that will block the caller if the 10 | * parallel computation associated with the function is not completed. 11 | * 12 | * @since 2.9 13 | */ 14 | trait Future[@specialized +R] extends (() => R) { 15 | /** Returns a result once the parallel computation completes. If the computation 16 | * produced an exception, an exception is forwarded. 17 | * 18 | * '''Note:''' creating a circular dependency between futures by calling this method will 19 | * result in a deadlock. 20 | * 21 | * @tparam R the type of the result 22 | * @return the result 23 | * @throws the exception that was thrown during a parallel computation 24 | */ 25 | def apply(): R 26 | 27 | /** Returns `true` if the parallel computation is completed. 28 | * 29 | * @return `true` if the parallel computation is completed, `false` otherwise 30 | */ 31 | def isDone(): Boolean 32 | } 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/scalalib/scala/ref/PhantomReference.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2006-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | package scala.ref 11 | 12 | /** 13 | * @author Sean McDirmid 14 | */ 15 | class PhantomReference[+T <: AnyRef](value: T, queue: ReferenceQueue[T]) extends ReferenceWrapper[T] { 16 | val underlying: java.lang.ref.PhantomReference[_ <: T] = 17 | new PhantomReferenceWithWrapper[T](value, queue, this) 18 | } 19 | 20 | /** 21 | * @author Philipp Haller 22 | */ 23 | private class PhantomReferenceWithWrapper[T <: AnyRef](value: T, queue: ReferenceQueue[T], val wrapper: PhantomReference[T]) 24 | extends java.lang.ref.PhantomReference[T](value, queue.underlying.asInstanceOf[java.lang.ref.ReferenceQueue[T]]) with ReferenceWithWrapper[T] 25 | -------------------------------------------------------------------------------- /src/scalalib/scala/ref/Reference.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2006-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | package scala.ref 11 | 12 | /** 13 | * @see java.lang.ref.Reference 14 | * @author Sean McDirmid 15 | */ 16 | trait Reference[+T <: AnyRef] extends Function0[T] { 17 | /** return the underlying value */ 18 | def apply(): T 19 | /** return Some underlying if it hasn't been collected, otherwise None */ 20 | def get: Option[T] 21 | override def toString = get.map(_.toString).getOrElse("") 22 | def clear(): Unit 23 | def enqueue(): Boolean 24 | def isEnqueued(): Boolean 25 | } 26 | -------------------------------------------------------------------------------- /src/scalalib/scala/ref/SoftReference.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2006-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | package scala.ref 11 | 12 | /** 13 | * @author Sean McDirmid 14 | */ 15 | class SoftReference[+T <: AnyRef](value : T, queue : ReferenceQueue[T]) extends ReferenceWrapper[T] { 16 | def this(value : T) = this(value, null); 17 | val underlying: java.lang.ref.SoftReference[_ <: T] = 18 | new SoftReferenceWithWrapper[T](value, queue, this) 19 | } 20 | 21 | /** 22 | * @author Philipp Haller 23 | */ 24 | private class SoftReferenceWithWrapper[T <: AnyRef](value: T, queue: ReferenceQueue[T], val wrapper: SoftReference[T]) 25 | extends java.lang.ref.SoftReference[T](value, if (queue == null) null else queue.underlying.asInstanceOf[java.lang.ref.ReferenceQueue[T]]) with ReferenceWithWrapper[T] 26 | -------------------------------------------------------------------------------- /src/scalalib/scala/ref/WeakReference.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2006-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | package scala.ref 11 | 12 | /** 13 | * @author Sean McDirmid 14 | */ 15 | class WeakReference[+T <: AnyRef](value: T, queue: ReferenceQueue[T]) extends ReferenceWrapper[T] { 16 | def this(value: T) = this(value, null) 17 | val underlying: java.lang.ref.WeakReference[_ <: T] = 18 | new WeakReferenceWithWrapper[T](value, queue, this) 19 | } 20 | 21 | /** 22 | * @author Philipp Haller 23 | */ 24 | private class WeakReferenceWithWrapper[T <: AnyRef](value: T, queue: ReferenceQueue[T], val wrapper: WeakReference[T]) 25 | extends java.lang.ref.WeakReference[T](value, if (queue == null) null else queue.underlying.asInstanceOf[java.lang.ref.ReferenceQueue[T]]) with ReferenceWithWrapper[T] 26 | -------------------------------------------------------------------------------- /src/scalalib/scala/reflect/BeanDescription.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | package scala.reflect 11 | 12 | /** Provides a short description that will be included when generating 13 | * bean information. This annotation can be attached to the bean itself, 14 | * or to any member. 15 | * 16 | * @author Ross Judson (rjudson@managedobjects.com) 17 | */ 18 | class BeanDescription(val description: String) extends annotation.Annotation 19 | 20 | -------------------------------------------------------------------------------- /src/scalalib/scala/reflect/BeanDisplayName.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | package scala.reflect 11 | 12 | /** Provides a display name when generating bean information. This 13 | * annotation can be attached to the bean itself, or to any member. 14 | * 15 | * @author Ross Judson (rjudson@managedobjects.com) 16 | */ 17 | class BeanDisplayName(val name: String) extends annotation.Annotation 18 | 19 | -------------------------------------------------------------------------------- /src/scalalib/scala/reflect/BeanInfo.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | package scala.reflect 11 | 12 | /**

13 | * This annotation indicates that a JavaBean-compliant BeanInfo 14 | * class should be generated for this annotated Scala class. 15 | * A val becomes a read-only property. A var becomes a read-write 16 | * property. A def becomes a method. 17 | *

18 | * 19 | * @author Ross Judson (rjudson@managedobjects.com) 20 | */ 21 | class BeanInfo extends annotation.Annotation 22 | -------------------------------------------------------------------------------- /src/scalalib/scala/reflect/BeanInfoSkip.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | package scala.reflect 11 | 12 | /** This annotation indicates that bean information should 13 | * not be generated for the val, var, or def that it is 14 | * attached to. 15 | * 16 | * @author Ross Judson (rjudson@managedobjects.com) 17 | */ 18 | class BeanInfoSkip extends annotation.Annotation 19 | -------------------------------------------------------------------------------- /src/scalalib/scala/reflect/BooleanBeanProperty.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.reflect 12 | 13 | import annotation.target._ 14 | 15 | /**

16 | * This annotation has the same functionality as 17 | * scala.reflect.BeanProperty, but the generated 18 | * Bean getter will be named isFieldName instead 19 | * of getFieldName. 20 | *

21 | */ 22 | @field 23 | class BooleanBeanProperty extends annotation.StaticAnnotation 24 | -------------------------------------------------------------------------------- /src/scalalib/scala/reflect/Code.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.reflect 12 | 13 | /** This type is required by the compiler and should not be used in client code. */ 14 | class Code[T](val tree: Tree) 15 | 16 | /** This type is required by the compiler and should not be used in client code. */ 17 | object Code { 18 | def lift[A](tree: A): Code[A] = 19 | throw new Error("Code was not lifted by compiler") 20 | } 21 | -------------------------------------------------------------------------------- /src/scalalib/scala/reflect/NoManifest.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2007-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.reflect 12 | 13 | /**

One of the branches of an OptManifest 14 | */ 15 | object NoManifest extends OptManifest[Nothing] with Serializable { 16 | override def toString = "" 17 | } 18 | -------------------------------------------------------------------------------- /src/scalalib/scala/reflect/OptManifest.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2007-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.reflect 12 | 13 | /**

14 | * A OptManifest[T] is an optional Manifest.
16 | * It is either a Manifest or the value NoManifest. 17 | *

18 | * 19 | * @author Martin Odersky 20 | */ 21 | trait OptManifest[+T] extends Serializable 22 | -------------------------------------------------------------------------------- /src/scalalib/scala/reflect/ScalaLongSignature.java: -------------------------------------------------------------------------------- 1 | package scala.reflect; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** */ 9 | @Retention(RetentionPolicy.RUNTIME) 10 | @Target(ElementType.TYPE) 11 | public @interface ScalaLongSignature { 12 | public String[] bytes(); 13 | } 14 | -------------------------------------------------------------------------------- /src/scalalib/scala/reflect/ScalaSignature.java: -------------------------------------------------------------------------------- 1 | package scala.reflect; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** */ 9 | @Retention(RetentionPolicy.RUNTIME) 10 | @Target(ElementType.TYPE) 11 | public @interface ScalaSignature { 12 | public String bytes(); 13 | } 14 | -------------------------------------------------------------------------------- /src/scalalib/scala/reflect/generic/Names.scala: -------------------------------------------------------------------------------- 1 | package scala.reflect 2 | package generic 3 | 4 | trait Names { 5 | type Name >: Null <: AnyRef 6 | type TypeName <: Name 7 | type TermName <: Name 8 | 9 | def newTermName(cs: Array[Char], offset: Int, len: Int): TermName 10 | def newTermName(cs: Array[Byte], offset: Int, len: Int): TermName 11 | def newTermName(s: String): TermName 12 | def mkTermName(name: Name): TermName 13 | 14 | def newTypeName(cs: Array[Char], offset: Int, len: Int): TypeName 15 | def newTypeName(cs: Array[Byte], offset: Int, len: Int): TypeName 16 | def newTypeName(s: String): TypeName 17 | def mkTypeName(name: Name): TypeName 18 | 19 | def isTermName(name: Name): Boolean 20 | def isTypeName(name: Name): Boolean 21 | 22 | implicit def promoteTermNamesAsNecessary(name: Name): TermName = mkTermName(name) 23 | } 24 | 25 | -------------------------------------------------------------------------------- /src/scalalib/scala/reflect/generic/Scopes.scala: -------------------------------------------------------------------------------- 1 | package scala.reflect 2 | package generic 3 | 4 | trait Scopes { self: Universe => 5 | 6 | abstract class AbsScope extends Iterable[Symbol] { 7 | private[reflect] def enter(sym: Symbol): Symbol 8 | } 9 | 10 | type Scope <: AbsScope 11 | 12 | def newScope(): Scope 13 | } 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/scalalib/scala/reflect/generic/Universe.scala: -------------------------------------------------------------------------------- 1 | package scala.reflect 2 | package generic 3 | 4 | abstract class Universe extends Symbols 5 | with Types 6 | with Constants 7 | with Scopes 8 | with Names 9 | with StdNames 10 | with Trees 11 | with AnnotationInfos 12 | with StandardDefinitions { 13 | type Position 14 | val NoPosition: Position 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/scalalib/scala/remote.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala 12 | 13 | /** 14 | * An annotation that designates the class to which it is applied as remotable. 15 | */ 16 | class remote extends annotation.StaticAnnotation {} 17 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/AbstractFunction0.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | // GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. 9 | 10 | package scala.runtime 11 | 12 | abstract class AbstractFunction0[@specialized +R] extends Function0[R] { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/AbstractFunction1.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | // GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. 9 | 10 | package scala.runtime 11 | 12 | abstract class AbstractFunction1[@specialized(scala.Int, scala.Long, scala.Float, scala.Double) -T1, @specialized(scala.Unit, scala.Boolean, scala.Int, scala.Float, scala.Long, scala.Double) +R] extends Function1[T1, R] { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/AbstractFunction10.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | // GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. 9 | 10 | package scala.runtime 11 | 12 | abstract class AbstractFunction10[-T1, -T2, -T3, -T4, -T5, -T6, -T7, -T8, -T9, -T10, +R] extends Function10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, R] { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/AbstractFunction11.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | // GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. 9 | 10 | package scala.runtime 11 | 12 | abstract class AbstractFunction11[-T1, -T2, -T3, -T4, -T5, -T6, -T7, -T8, -T9, -T10, -T11, +R] extends Function11[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, R] { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/AbstractFunction12.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | // GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. 9 | 10 | package scala.runtime 11 | 12 | abstract class AbstractFunction12[-T1, -T2, -T3, -T4, -T5, -T6, -T7, -T8, -T9, -T10, -T11, -T12, +R] extends Function12[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, R] { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/AbstractFunction13.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | // GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. 9 | 10 | package scala.runtime 11 | 12 | abstract class AbstractFunction13[-T1, -T2, -T3, -T4, -T5, -T6, -T7, -T8, -T9, -T10, -T11, -T12, -T13, +R] extends Function13[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, R] { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/AbstractFunction14.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | // GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. 9 | 10 | package scala.runtime 11 | 12 | abstract class AbstractFunction14[-T1, -T2, -T3, -T4, -T5, -T6, -T7, -T8, -T9, -T10, -T11, -T12, -T13, -T14, +R] extends Function14[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, R] { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/AbstractFunction15.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | // GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. 9 | 10 | package scala.runtime 11 | 12 | abstract class AbstractFunction15[-T1, -T2, -T3, -T4, -T5, -T6, -T7, -T8, -T9, -T10, -T11, -T12, -T13, -T14, -T15, +R] extends Function15[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, R] { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/AbstractFunction16.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | // GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. 9 | 10 | package scala.runtime 11 | 12 | abstract class AbstractFunction16[-T1, -T2, -T3, -T4, -T5, -T6, -T7, -T8, -T9, -T10, -T11, -T12, -T13, -T14, -T15, -T16, +R] extends Function16[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, R] { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/AbstractFunction17.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | // GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. 9 | 10 | package scala.runtime 11 | 12 | abstract class AbstractFunction17[-T1, -T2, -T3, -T4, -T5, -T6, -T7, -T8, -T9, -T10, -T11, -T12, -T13, -T14, -T15, -T16, -T17, +R] extends Function17[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, R] { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/AbstractFunction18.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | // GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. 9 | 10 | package scala.runtime 11 | 12 | abstract class AbstractFunction18[-T1, -T2, -T3, -T4, -T5, -T6, -T7, -T8, -T9, -T10, -T11, -T12, -T13, -T14, -T15, -T16, -T17, -T18, +R] extends Function18[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, R] { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/AbstractFunction19.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | // GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. 9 | 10 | package scala.runtime 11 | 12 | abstract class AbstractFunction19[-T1, -T2, -T3, -T4, -T5, -T6, -T7, -T8, -T9, -T10, -T11, -T12, -T13, -T14, -T15, -T16, -T17, -T18, -T19, +R] extends Function19[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, R] { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/AbstractFunction2.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | // GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. 9 | 10 | package scala.runtime 11 | 12 | abstract class AbstractFunction2[@specialized(scala.Int, scala.Long, scala.Double) -T1, @specialized(scala.Int, scala.Long, scala.Double) -T2, @specialized(scala.Unit, scala.Boolean, scala.Int, scala.Float, scala.Long, scala.Double) +R] extends Function2[T1, T2, R] { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/AbstractFunction20.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | // GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. 9 | 10 | package scala.runtime 11 | 12 | abstract class AbstractFunction20[-T1, -T2, -T3, -T4, -T5, -T6, -T7, -T8, -T9, -T10, -T11, -T12, -T13, -T14, -T15, -T16, -T17, -T18, -T19, -T20, +R] extends Function20[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, R] { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/AbstractFunction21.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | // GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. 9 | 10 | package scala.runtime 11 | 12 | abstract class AbstractFunction21[-T1, -T2, -T3, -T4, -T5, -T6, -T7, -T8, -T9, -T10, -T11, -T12, -T13, -T14, -T15, -T16, -T17, -T18, -T19, -T20, -T21, +R] extends Function21[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, R] { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/AbstractFunction22.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | // GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. 9 | 10 | package scala.runtime 11 | 12 | abstract class AbstractFunction22[-T1, -T2, -T3, -T4, -T5, -T6, -T7, -T8, -T9, -T10, -T11, -T12, -T13, -T14, -T15, -T16, -T17, -T18, -T19, -T20, -T21, -T22, +R] extends Function22[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, R] { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/AbstractFunction3.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | // GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. 9 | 10 | package scala.runtime 11 | 12 | abstract class AbstractFunction3[-T1, -T2, -T3, +R] extends Function3[T1, T2, T3, R] { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/AbstractFunction4.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | // GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. 9 | 10 | package scala.runtime 11 | 12 | abstract class AbstractFunction4[-T1, -T2, -T3, -T4, +R] extends Function4[T1, T2, T3, T4, R] { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/AbstractFunction5.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | // GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. 9 | 10 | package scala.runtime 11 | 12 | abstract class AbstractFunction5[-T1, -T2, -T3, -T4, -T5, +R] extends Function5[T1, T2, T3, T4, T5, R] { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/AbstractFunction6.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | // GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. 9 | 10 | package scala.runtime 11 | 12 | abstract class AbstractFunction6[-T1, -T2, -T3, -T4, -T5, -T6, +R] extends Function6[T1, T2, T3, T4, T5, T6, R] { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/AbstractFunction7.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | // GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. 9 | 10 | package scala.runtime 11 | 12 | abstract class AbstractFunction7[-T1, -T2, -T3, -T4, -T5, -T6, -T7, +R] extends Function7[T1, T2, T3, T4, T5, T6, T7, R] { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/AbstractFunction8.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | // GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. 9 | 10 | package scala.runtime 11 | 12 | abstract class AbstractFunction8[-T1, -T2, -T3, -T4, -T5, -T6, -T7, -T8, +R] extends Function8[T1, T2, T3, T4, T5, T6, T7, T8, R] { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/AbstractFunction9.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | // GENERATED CODE: DO NOT EDIT. See scala.Function0 for timestamp. 9 | 10 | package scala.runtime 11 | 12 | abstract class AbstractFunction9[-T1, -T2, -T3, -T4, -T5, -T6, -T7, -T8, -T9, +R] extends Function9[T1, T2, T3, T4, T5, T6, T7, T8, T9, R] { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/AnyValCompanion.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.runtime 10 | 11 | /** See scala.AnyValCompanion. 12 | */ 13 | @deprecated("Use scala.AnyValCompanion instead", "2.8.0") 14 | private[scala] trait AnyValCompanion extends scala.AnyValCompanion { } -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/BooleanRef.oz: -------------------------------------------------------------------------------- 1 | functor 2 | 3 | import 4 | ValueRef(makeValueRefClass) at 'x-ozma://root/scala/runtime/ValueRef.ozf' 5 | ModFunctor('module:java.lang.Boolean$':Module) at 'x-ozma://root/java/lang/Boolean.ozf' 6 | 7 | export 8 | 'type:scala.runtime.BooleanRef':Type 9 | 'class:scala.runtime.BooleanRef':Class 10 | 11 | define 12 | Type Class 13 | in 14 | {ValueRef.makeValueRefClass "Boolean" false Module Type Class} 15 | end 16 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/Boxed.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.runtime 12 | 13 | trait Boxed { 14 | 15 | } 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/BoxedUnit.scala: -------------------------------------------------------------------------------- 1 | package scala.runtime 2 | 3 | class BoxedUnit private { 4 | override def equals(that: Any) = this eq that.asInstanceOf[AnyRef] 5 | 6 | override def hashCode() = 0 7 | 8 | override def toString() = "()" 9 | } 10 | 11 | object BoxedUnit { 12 | val UNIT = new BoxedUnit 13 | val TYPE = java.lang.Void.TYPE 14 | } 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/ByteRef.oz: -------------------------------------------------------------------------------- 1 | functor 2 | 3 | import 4 | ValueRef(makeValueRefClass) at 'x-ozma://root/scala/runtime/ValueRef.ozf' 5 | ModFunctor('module:java.lang.Byte$':Module) at 'x-ozma://root/java/lang/Byte.ozf' 6 | 7 | export 8 | 'type:scala.runtime.ByteRef':Type 9 | 'class:scala.runtime.ByteRef':Class 10 | 11 | define 12 | Type Class 13 | in 14 | {ValueRef.makeValueRefClass "Byte" false Module Type Class} 15 | end 16 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/CharRef.oz: -------------------------------------------------------------------------------- 1 | functor 2 | 3 | import 4 | ValueRef(makeValueRefClass) at 'x-ozma://root/scala/runtime/ValueRef.ozf' 5 | ModFunctor('module:java.lang.Character$':Module) at 'x-ozma://root/java/lang/Character.ozf' 6 | 7 | export 8 | 'type:scala.runtime.CharRef':Type 9 | 'class:scala.runtime.CharRef':Class 10 | 11 | define 12 | Type Class 13 | in 14 | {ValueRef.makeValueRefClass "Char" false Module Type Class} 15 | end 16 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/DoubleRef.oz: -------------------------------------------------------------------------------- 1 | functor 2 | 3 | import 4 | ValueRef(makeValueRefClass) at 'x-ozma://root/scala/runtime/ValueRef.ozf' 5 | ModFunctor('module:java.lang.Double$':Module) at 'x-ozma://root/java/lang/Double.ozf' 6 | 7 | export 8 | 'type:scala.runtime.DoubleRef':Type 9 | 'class:scala.runtime.DoubleRef':Class 10 | 11 | define 12 | Type Class 13 | in 14 | {ValueRef.makeValueRefClass "Double" false Module Type Class} 15 | end 16 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/FloatRef.oz: -------------------------------------------------------------------------------- 1 | functor 2 | 3 | import 4 | ValueRef(makeValueRefClass) at 'x-ozma://root/scala/runtime/ValueRef.ozf' 5 | ModFunctor('module:java.lang.Float$':Module) at 'x-ozma://root/java/lang/Float.ozf' 6 | 7 | export 8 | 'type:scala.runtime.FloatRef':Type 9 | 'class:scala.runtime.FloatRef':Class 10 | 11 | define 12 | Type Class 13 | in 14 | {ValueRef.makeValueRefClass "Float" false Module Type Class} 15 | end 16 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/IntRef.oz: -------------------------------------------------------------------------------- 1 | functor 2 | 3 | import 4 | ValueRef(makeValueRefClass) at 'x-ozma://root/scala/runtime/ValueRef.ozf' 5 | ModFunctor('module:java.lang.Integer$':Module) at 'x-ozma://root/java/lang/Integer.ozf' 6 | 7 | export 8 | 'type:scala.runtime.IntRef':Type 9 | 'class:scala.runtime.IntRef':Class 10 | 11 | define 12 | Type Class 13 | in 14 | {ValueRef.makeValueRefClass "Int" false Module Type Class} 15 | end 16 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/LongRef.oz: -------------------------------------------------------------------------------- 1 | functor 2 | 3 | import 4 | ValueRef(makeValueRefClass) at 'x-ozma://root/scala/runtime/ValueRef.ozf' 5 | ModFunctor('module:java.lang.Long$':Module) at 'x-ozma://root/java/lang/Long.ozf' 6 | 7 | export 8 | 'type:scala.runtime.LongRef':Type 9 | 'class:scala.runtime.LongRef':Class 10 | 11 | define 12 | Type Class 13 | in 14 | {ValueRef.makeValueRefClass "Long" false Module Type Class} 15 | end 16 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/NonLocalReturnControl.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.runtime 12 | 13 | import scala.util.control.ControlThrowable 14 | 15 | class NonLocalReturnControl[T](val key: AnyRef, val value: T) extends ControlThrowable 16 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/Nothing$.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.runtime 12 | 13 | 14 | /** 15 | * Dummy class which exist only to satisfy the JVM. It corresponds 16 | * to scala.Nothing. If such type appears in method 17 | * signatures, it is erased to this one. 18 | */ 19 | 20 | sealed abstract class Nothing$ extends Throwable 21 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/Null$.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.runtime 12 | 13 | 14 | /** 15 | * Dummy class which exist only to satisfy the JVM. It corresponds 16 | * to scala.Null. If such type appears in method 17 | * signatures, it is erased to this one. 18 | */ 19 | 20 | sealed abstract class Null$ 21 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/RichBoolean.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.runtime 10 | 11 | final class RichBoolean(val self: Boolean) extends OrderedProxy[Boolean] { 12 | protected val ord = math.Ordering[Boolean] 13 | } 14 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/RichByte.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.runtime 10 | 11 | final class RichByte(val self: Byte) extends ScalaWholeNumberProxy[Byte] { } 12 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/RichException.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.runtime 12 | 13 | import compat.Platform.EOL 14 | 15 | final class RichException(exc: Throwable) { 16 | def getStackTraceString = exc.getStackTrace().mkString("", EOL, EOL) 17 | } 18 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/RichLong.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.runtime 10 | 11 | final class RichLong(val self: Long) extends IntegralProxy[Long] { 12 | def toBinaryString: String = java.lang.Long.toBinaryString(self) 13 | def toHexString: String = java.lang.Long.toHexString(self) 14 | def toOctalString: String = java.lang.Long.toOctalString(self) 15 | } 16 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/RichShort.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.runtime 10 | 11 | final class RichShort(val self: Short) extends ScalaWholeNumberProxy[Short] { } 12 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/ShortRef.oz: -------------------------------------------------------------------------------- 1 | functor 2 | 3 | import 4 | ValueRef(makeValueRefClass) at 'x-ozma://root/scala/runtime/ValueRef.ozf' 5 | ModFunctor('module:java.lang.Short$':Module) at 'x-ozma://root/java/lang/Short.ozf' 6 | 7 | export 8 | 'type:scala.runtime.ShortRef':Type 9 | 'class:scala.runtime.ShortRef':Class 10 | 11 | define 12 | Type Class 13 | in 14 | {ValueRef.makeValueRefClass "Short" false Module Type Class} 15 | end 16 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/StringAdd.scala: -------------------------------------------------------------------------------- 1 | /* *\ 2 | ** ________ ___ __ ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ |_| ** 6 | ** ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.runtime 12 | 13 | 14 | final class StringAdd(self: Any) { 15 | 16 | def +(other: String) = String.valueOf(self) + other 17 | 18 | /* 19 | /** Returns string formatted according to given format string. 20 | * Format strings are as for String.format 21 | * (@see java.lang.String.format). 22 | */ 23 | def formatted(fmtstr: String): String = fmtstr format self 24 | */ 25 | } 26 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/TraitSetter.java: -------------------------------------------------------------------------------- 1 | package scala.runtime; 2 | 3 | /** A marker annotation to tag a setter of a mutable variable in a trait 4 | */ 5 | public @interface TraitSetter { 6 | } -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/VolatileBooleanRef.oz: -------------------------------------------------------------------------------- 1 | functor 2 | 3 | import 4 | ValueRef(makeValueRefClass) at 'x-ozma://root/scala/runtime/ValueRef.ozf' 5 | ModFunctor('module:java.lang.Boolean$':Module) at 'x-ozma://root/java/lang/Boolean.ozf' 6 | 7 | export 8 | 'type:scala.runtime.VolatileBooleanRef':Type 9 | 'class:scala.runtime.VolatileBooleanRef':Class 10 | 11 | define 12 | Type Class 13 | in 14 | {ValueRef.makeValueRefClass "Boolean" true Module Type Class} 15 | end 16 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/VolatileByteRef.oz: -------------------------------------------------------------------------------- 1 | functor 2 | 3 | import 4 | ValueRef(makeValueRefClass) at 'x-ozma://root/scala/runtime/ValueRef.ozf' 5 | ModFunctor('module:java.lang.Byte$':Module) at 'x-ozma://root/java/lang/Byte.ozf' 6 | 7 | export 8 | 'type:scala.runtime.VolatileByteRef':Type 9 | 'class:scala.runtime.VolatileByteRef':Class 10 | 11 | define 12 | Type Class 13 | in 14 | {ValueRef.makeValueRefClass "Byte" true Module Type Class} 15 | end 16 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/VolatileCharRef.oz: -------------------------------------------------------------------------------- 1 | functor 2 | 3 | import 4 | ValueRef(makeValueRefClass) at 'x-ozma://root/scala/runtime/ValueRef.ozf' 5 | ModFunctor('module:java.lang.Character$':Module) at 'x-ozma://root/java/lang/Character.ozf' 6 | 7 | export 8 | 'type:scala.runtime.VolatileCharRef':Type 9 | 'class:scala.runtime.VolatileCharRef':Class 10 | 11 | define 12 | Type Class 13 | in 14 | {ValueRef.makeValueRefClass "Char" true Module Type Class} 15 | end 16 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/VolatileDoubleRef.oz: -------------------------------------------------------------------------------- 1 | functor 2 | 3 | import 4 | ValueRef(makeValueRefClass) at 'x-ozma://root/scala/runtime/ValueRef.ozf' 5 | ModFunctor('module:java.lang.Double$':Module) at 'x-ozma://root/java/lang/Double.ozf' 6 | 7 | export 8 | 'type:scala.runtime.VolatileDoubleRef':Type 9 | 'class:scala.runtime.VolatileDoubleRef':Class 10 | 11 | define 12 | Type Class 13 | in 14 | {ValueRef.makeValueRefClass "Double" true Module Type Class} 15 | end 16 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/VolatileFloatRef.oz: -------------------------------------------------------------------------------- 1 | functor 2 | 3 | import 4 | ValueRef(makeValueRefClass) at 'x-ozma://root/scala/runtime/ValueRef.ozf' 5 | ModFunctor('module:java.lang.Float$':Module) at 'x-ozma://root/java/lang/Float.ozf' 6 | 7 | export 8 | 'type:scala.runtime.VolatileFloatRef':Type 9 | 'class:scala.runtime.VolatileFloatRef':Class 10 | 11 | define 12 | Type Class 13 | in 14 | {ValueRef.makeValueRefClass "Float" true Module Type Class} 15 | end 16 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/VolatileIntRef.oz: -------------------------------------------------------------------------------- 1 | functor 2 | 3 | import 4 | ValueRef(makeValueRefClass) at 'x-ozma://root/scala/runtime/ValueRef.ozf' 5 | ModFunctor('module:java.lang.Integer$':Module) at 'x-ozma://root/java/lang/Integer.ozf' 6 | 7 | export 8 | 'type:scala.runtime.VolatileIntRef':Type 9 | 'class:scala.runtime.VolatileIntRef':Class 10 | 11 | define 12 | Type Class 13 | in 14 | {ValueRef.makeValueRefClass "Int" true Module Type Class} 15 | end 16 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/VolatileLongRef.oz: -------------------------------------------------------------------------------- 1 | functor 2 | 3 | import 4 | ValueRef(makeValueRefClass) at 'x-ozma://root/scala/runtime/ValueRef.ozf' 5 | ModFunctor('module:java.lang.Long$':Module) at 'x-ozma://root/java/lang/Long.ozf' 6 | 7 | export 8 | 'type:scala.runtime.VolatileLongRef':Type 9 | 'class:scala.runtime.VolatileLongRef':Class 10 | 11 | define 12 | Type Class 13 | in 14 | {ValueRef.makeValueRefClass "Long" true Module Type Class} 15 | end 16 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/VolatileShortRef.oz: -------------------------------------------------------------------------------- 1 | functor 2 | 3 | import 4 | ValueRef(makeValueRefClass) at 'x-ozma://root/scala/runtime/ValueRef.ozf' 5 | ModFunctor('module:java.lang.Short$':Module) at 'x-ozma://root/java/lang/Short.ozf' 6 | 7 | export 8 | 'type:scala.runtime.VolatileShortRef':Type 9 | 'class:scala.runtime.VolatileShortRef':Class 10 | 11 | define 12 | Type Class 13 | in 14 | {ValueRef.makeValueRefClass "Short" true Module Type Class} 15 | end 16 | -------------------------------------------------------------------------------- /src/scalalib/scala/runtime/package.scala: -------------------------------------------------------------------------------- 1 | package scala 2 | 3 | package object runtime { 4 | @deprecated("Use `scala.Unit` instead.", "2.9.0") val Unit = scala.Unit 5 | @deprecated("Use `scala.Boolean` instead.", "2.9.0") val Boolean = scala.Boolean 6 | @deprecated("Use `scala.Byte` instead.", "2.9.0") val Byte = scala.Byte 7 | @deprecated("Use `scala.Short` instead.", "2.9.0") val Short = scala.Short 8 | @deprecated("Use `scala.Char` instead.", "2.9.0") val Char = scala.Char 9 | @deprecated("Use `scala.Int` instead.", "2.9.0") val Int = scala.Int 10 | @deprecated("Use `scala.Long` instead.", "2.9.0") val Long = scala.Long 11 | @deprecated("Use `scala.Float` instead.", "2.9.0") val Float = scala.Float 12 | @deprecated("Use `scala.Double` instead.", "2.9.0") val Double = scala.Double 13 | } 14 | -------------------------------------------------------------------------------- /src/scalalib/scala/specialized.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala 12 | 13 | /** Annotate type parameters on which code should be automatically 14 | * specialized. For example: 15 | * 16 | * class MyList[@specialized T] ... 17 | * 18 | * 19 | * Type T can be specialized on a subset of the primitive types by 20 | * specifying a list of primitive types to specialize at: 21 | * 22 | * 23 | * class MyList[@specialized(Int, Double, Boolean) T] .. 24 | * 25 | * 26 | * @since 2.8 27 | */ 28 | class specialized(types: SpecializableCompanion*) extends annotation.StaticAnnotation { 29 | def this() { 30 | this(Unit, Boolean, Byte, Short, Char, Int, Long, Float, Double) 31 | } 32 | } 33 | 34 | -------------------------------------------------------------------------------- /src/scalalib/scala/throws.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala 12 | 13 | /**

14 | * Annotation for specifying the exceptions thrown by a method. 15 | * For example: 16 | * {{{ 17 | * class Reader(fname: String) { 18 | * private val in = new BufferedReader(new FileReader(fname)) 19 | * @throws(classOf[IOException]) 20 | * def read() = in.read() 21 | * } 22 | * }}} 23 | * 24 | * @author Nikolay Mihaylov 25 | * @version 1.0, 19/05/2006 26 | * @since 2.1 27 | */ 28 | class throws(clazz: Class[_]) extends annotation.StaticAnnotation 29 | -------------------------------------------------------------------------------- /src/scalalib/scala/transient.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala 12 | 13 | import annotation.target._ 14 | 15 | @field 16 | class transient extends annotation.StaticAnnotation 17 | -------------------------------------------------------------------------------- /src/scalalib/scala/util/control/NoStackTrace.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.util.control 10 | 11 | /** A trait for exceptions which, for efficiency reasons, do not 12 | * fill in the stack trace. Stack trace suppression can be disabled 13 | * on a global basis via a system property wrapper in 14 | * [[ scala.sys.SystemProperties ]]. 15 | * 16 | * @author Paul Phillips 17 | * @since 2.8 18 | */ 19 | trait NoStackTrace extends Throwable { 20 | override def fillInStackTrace(): Throwable = this 21 | /*if (sys.SystemProperties.noTraceSupression) super.fillInStackTrace() 22 | else this*/ 23 | } 24 | -------------------------------------------------------------------------------- /src/scalalib/scala/util/grammar/HedgeRHS.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.util.grammar 12 | 13 | abstract class HedgeRHS 14 | 15 | /** right hand side of a hedge production, deriving a single tree */ 16 | case class ConsRHS(tnt: Int, hnt: Int) extends HedgeRHS 17 | 18 | /** right hand side of a hedge production, deriving any hedge */ 19 | case object AnyHedgeRHS extends HedgeRHS 20 | 21 | /** right hand side of a hedge production, deriving the empty hedge */ 22 | case object EmptyHedgeRHS extends HedgeRHS 23 | -------------------------------------------------------------------------------- /src/scalalib/scala/util/grammar/TreeRHS.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.util.grammar 12 | 13 | /** right hand side of a tree production */ 14 | abstract class TreeRHS 15 | 16 | /** right hand side of a tree production, labelled with a letter from an alphabet */ 17 | case class LabelledRHS[A](label: A, hnt: Int) extends TreeRHS 18 | 19 | case object AnyTreeRHS extends TreeRHS 20 | -------------------------------------------------------------------------------- /src/scalalib/scala/util/logging/ConsoleLogger.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.util.logging 12 | 13 | /** 14 | * The trait ConsoleLogger is mixed into a concrete class who 15 | * has class Logged among its base classes. 16 | * 17 | * @author Burak Emir 18 | * @version 1.0 19 | */ 20 | trait ConsoleLogger extends Logged { 21 | 22 | /** logs argument to Console using Console.println 23 | */ 24 | override def log(msg: String): Unit = Console.println(msg) 25 | } 26 | -------------------------------------------------------------------------------- /src/scalalib/scala/util/logging/Logged.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.util.logging 10 | 11 | /** Mixing in Logged indicates that a class provides support for logging. 12 | * For instance: 13 | {{{ 14 | // The developer of the library writes: 15 | class MyClass extends Logged { 16 | // do stuff, call log 17 | } 18 | // The user of the library instantiates: 19 | val x = new MyClass() with ConsoleLogger 20 | }}} 21 | * and the logging is sent to the [[scala.util.logging.ConsoleLogger]] object. 22 | */ 23 | trait Logged { 24 | /** This method should log the message given as argument somewhere 25 | * as a side-effect. 26 | * 27 | * @param msg message to be logged 28 | */ 29 | def log(msg: String): Unit = {} 30 | } 31 | -------------------------------------------------------------------------------- /src/scalalib/scala/util/parsing/combinator/JavaTokenParsers.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2006-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | package scala.util.parsing.combinator 11 | 12 | trait JavaTokenParsers extends RegexParsers { 13 | def ident: Parser[String] = 14 | """[a-zA-Z_]\w*""".r 15 | def wholeNumber: Parser[String] = 16 | """-?\d+""".r 17 | def decimalNumber: Parser[String] = 18 | """(\d+(\.\d*)?|\d*\.\d+)""".r 19 | def stringLiteral: Parser[String] = 20 | ("\""+"""([^"\p{Cntrl}\\]|\\[\\/bfnrt]|\\u[a-fA-F0-9]{4})*"""+"\"").r 21 | def floatingPointNumber: Parser[String] = 22 | """-?(\d+(\.\d*)?|\d*\.\d+)([eE][+-]?\d+)?[fFdD]?""".r 23 | } 24 | -------------------------------------------------------------------------------- /src/scalalib/scala/util/parsing/combinator/testing/RegexTest.scala: -------------------------------------------------------------------------------- 1 | 2 | package scala.util.parsing.combinator.testing 3 | 4 | import scala.util.parsing.combinator._ 5 | import scala.util.parsing.input._ 6 | 7 | case class Ident(s: String) 8 | case class Number(n: Int) 9 | case class Str(s: String) 10 | 11 | object RegexTest extends RegexParsers { 12 | val ident: Parser[Any] = """[a-zA-Z_]\w*""".r ^^ (s => Ident(s)) 13 | val number: Parser[Any] = """\d\d*""".r ^^ (s => Number(s.toInt)) 14 | val string: Parser[Any] = "\".*\"".r ^^ (s => Str(s.substring(1, s.length - 1))) 15 | val parser = (ident | number | string)* 16 | 17 | def main(args: Array[String]) = { 18 | val in = args mkString " " 19 | println("\nin : "+in) 20 | println(phrase[Any](parser)(new CharSequenceReader(in))) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/scalalib/scala/util/parsing/input/NoPosition.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2006-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.util.parsing.input 12 | 13 | /** Undefined position 14 | * 15 | * @author Martin Odersky, Adriaan Moors 16 | */ 17 | object NoPosition extends Position { 18 | def line = 0 19 | def column = 0 20 | override def toString = "" 21 | override def longString = toString 22 | def lineContents = "" 23 | } 24 | -------------------------------------------------------------------------------- /src/scalalib/scala/util/parsing/input/Positional.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2006-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.util.parsing.input 10 | 11 | /** A trait for objects that have a source position. 12 | * 13 | * @author Martin Odersky, Adriaan Moors 14 | */ 15 | trait Positional { 16 | 17 | /** The source position of this object, initially set to undefined. */ 18 | var pos: Position = NoPosition 19 | 20 | /** If current source position is undefined, update it with given position `newpos' 21 | * @return the object itself 22 | */ 23 | def setPos(newpos: Position): this.type = { 24 | if (pos eq NoPosition) pos = newpos 25 | this 26 | } 27 | } 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/scalalib/scala/util/parsing/syntax/package.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2006-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | package scala.util.parsing 10 | 11 | import scala.util.parsing.combinator.token 12 | 13 | /** If deprecating the whole package worked, that's what would best 14 | * be done, but it doesn't (yet) so it isn't. 15 | */ 16 | package object syntax { 17 | @deprecated("Moved to scala.util.parsing.combinator.token", "2.8.0") 18 | type Tokens = token.Tokens 19 | @deprecated("Moved to scala.util.parsing.combinator.token", "2.8.0") 20 | type StdTokens = token.StdTokens 21 | } 22 | -------------------------------------------------------------------------------- /src/scalalib/scala/util/regexp/PointedHedgeExp.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.util.regexp 12 | 13 | /** pointed regular hedge expressions, a useful subclass of 14 | * regular hedge expressions. 15 | * 16 | * @author Burak Emir 17 | * @version 1.0 18 | */ 19 | abstract class PointedHedgeExp extends Base { 20 | 21 | type _regexpT <: RegExp 22 | type _labelT 23 | 24 | case class Node(label: _labelT, r: _regexpT) extends RegExp { 25 | final val isNullable = false 26 | } 27 | 28 | case class TopIter(r1: _regexpT, r2: _regexpT) extends RegExp { 29 | final val isNullable = r1.isNullable && r2.isNullable //? 30 | } 31 | 32 | case object Point extends RegExp { 33 | final val isNullable = false 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/scalalib/scala/util/regexp/SyntaxError.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.util.regexp 12 | 13 | /** This runtime exception is thrown if an attempt to instantiate a 14 | * syntactically incorrect expression is detected. 15 | * 16 | * @author Burak Emir 17 | * @version 1.0 18 | */ 19 | class SyntaxError(e: String) extends RuntimeException(e) 20 | -------------------------------------------------------------------------------- /src/scalalib/scala/volatile.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala 12 | 13 | import annotation.target._ 14 | 15 | @field 16 | class volatile extends annotation.StaticAnnotation 17 | -------------------------------------------------------------------------------- /src/scalalib/scala/xml/HasKeyValue.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | package scala.xml 11 | 12 | /**

13 | * Use this class to match on (unprefixed) attribute values 14 | *

15 |  *  val hasName = new HasKeyValue("name")
16 |  *  node match {
17 |  *    case Node("foo", hasName(x), _*) => x // foo had attribute with key "name" and with value x
18 |  *  }
19 | * 20 | * @author Burak Emir 21 | */ 22 | @deprecated("Use UnprefixedAttribute's extractor", "2.8.0") 23 | class HasKeyValue(key: String) { 24 | def unapplySeq(x: MetaData): Option[Seq[Node]] = x.get(key) 25 | } 26 | -------------------------------------------------------------------------------- /src/scalalib/scala/xml/MalformedAttributeException.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.xml 12 | 13 | 14 | case class MalformedAttributeException(msg: String) extends RuntimeException(msg) 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/xml/PCData.scala: -------------------------------------------------------------------------------- 1 | 2 | package scala.xml 3 | 4 | /** This class (which is not used by all XML parsers, but always used by the XHTML one) 5 | * represents parseable character data, which appeared as CDATA sections in the input 6 | * and is to be preserved as CDATA section in the output. 7 | */ 8 | case class PCData(_data: String) extends Atom[String](_data) { 9 | if (null == data) 10 | throw new IllegalArgumentException("tried to construct PCData with null") 11 | 12 | /** Returns text, with some characters escaped according to the XML 13 | * specification. 14 | * 15 | * @param sb ... 16 | * @return ... 17 | */ 18 | override def buildString(sb: StringBuilder) = 19 | sb append "".format(data) 20 | } 21 | -------------------------------------------------------------------------------- /src/scalalib/scala/xml/QNode.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.xml 12 | 13 | /** 14 | * This object provides an extractor method to match a qualified node with its namespace URI 15 | * 16 | * @author Burak Emir 17 | * @version 1.0 18 | */ 19 | object QNode { 20 | def unapplySeq(n: Node) = Some((n.scope.getURI(n.prefix), n.label, n.attributes, n.child)) 21 | } 22 | -------------------------------------------------------------------------------- /src/scalalib/scala/xml/TypeSymbol.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.xml 12 | 13 | 14 | abstract class TypeSymbol 15 | -------------------------------------------------------------------------------- /src/scalalib/scala/xml/include/CircularIncludeException.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | package scala.xml 11 | package include 12 | 13 | /** 14 | *

15 | * A CircularIncludeException is thrown when 16 | * an included document attempts to include itself or 17 | * one of its ancestor documents. 18 | *

19 | */ 20 | class CircularIncludeException(message: String) extends XIncludeException { 21 | 22 | /** 23 | * Constructs a CircularIncludeException with null 24 | * as its error detail message. 25 | */ 26 | def this() = this(null); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/scalalib/scala/xml/include/UnavailableResourceException.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | package scala.xml 11 | package include 12 | 13 | /** 14 | *

15 | * An UnavailableResourceException is thrown when 16 | * an included document cannot be found or loaded. 17 | *

18 | * 19 | */ 20 | class UnavailableResourceException(message: String) 21 | extends XIncludeException(message) { 22 | def this() = this(null) 23 | } 24 | -------------------------------------------------------------------------------- /src/scalalib/scala/xml/package.scala: -------------------------------------------------------------------------------- 1 | package scala 2 | 3 | package object xml { 4 | val XercesClassName = "org.apache.xerces.parsers.SAXParser" 5 | 6 | type SAXException = org.xml.sax.SAXException 7 | type SAXParseException = org.xml.sax.SAXParseException 8 | type EntityResolver = org.xml.sax.EntityResolver 9 | type InputSource = org.xml.sax.InputSource 10 | type SAXParser = javax.xml.parsers.SAXParser 11 | } -------------------------------------------------------------------------------- /src/scalalib/scala/xml/parsing/DefaultMarkupHandler.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.xml 12 | package parsing 13 | 14 | 15 | /** default implementation of markup handler always returns NodeSeq.Empty */ 16 | abstract class DefaultMarkupHandler extends MarkupHandler { 17 | 18 | def elem(pos: Int, pre: String, label: String, attrs: MetaData, 19 | scope:NamespaceBinding, args: NodeSeq) = NodeSeq.Empty 20 | 21 | def procInstr(pos: Int, target: String, txt: String) = NodeSeq.Empty 22 | 23 | def comment(pos: Int, comment: String ): NodeSeq = NodeSeq.Empty 24 | 25 | def entityRef(pos: Int, n: String) = NodeSeq.Empty 26 | 27 | def text(pos: Int, txt:String) = NodeSeq.Empty 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/scalalib/scala/xml/parsing/FatalError.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.xml 12 | package parsing 13 | 14 | /** !!! This is poorly named, but I guess it's in the API. 15 | */ 16 | case class FatalError(msg: String) extends java.lang.RuntimeException(msg) 17 | -------------------------------------------------------------------------------- /src/scalalib/scala/xml/persistent/Index.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.xml 12 | package persistent 13 | 14 | /** an Index returns some unique key that is part of a node 15 | */ 16 | abstract class Index[A] extends Function1[Node,A] {} 17 | -------------------------------------------------------------------------------- /src/scalalib/scala/xml/transform/RewriteRule.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.xml 12 | package transform 13 | 14 | /** a RewriteRule, when applied to a term, yields either 15 | * the resulting of rewriting or the term itself it the rule 16 | * is not applied. 17 | * 18 | * @author Burak Emir 19 | * @version 1.0 20 | */ 21 | abstract class RewriteRule extends BasicTransformer { 22 | /** a name for this rewrite rule */ 23 | val name = this.toString() 24 | override def transform(ns: Seq[Node]): Seq[Node] = super.transform(ns) 25 | override def transform(n: Node): Seq[Node] = n 26 | } 27 | 28 | -------------------------------------------------------------------------------- /src/scalalib/scala/xml/transform/RuleTransformer.scala: -------------------------------------------------------------------------------- 1 | /* __ *\ 2 | ** ________ ___ / / ___ Scala API ** 3 | ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** 4 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 5 | ** /____/\___/_/ |_/____/_/ | | ** 6 | ** |/ ** 7 | \* */ 8 | 9 | 10 | 11 | package scala.xml 12 | package transform 13 | 14 | class RuleTransformer(rules: RewriteRule*) extends BasicTransformer { 15 | override def transform(n: Node): Seq[Node] = 16 | rules.foldLeft(super.transform(n)) { (res, rule) => rule transform res } 17 | } 18 | --------------------------------------------------------------------------------