Added TSourceReader to allow reading source files. Initial work on T environment...
authorJan Vrany <jan.vrany@fit.cvut.cz>
Mon, 31 Aug 2015 18:37:31 +0100
changeset 5 976f21e29d37
parent 4 3d80069ea3e2
child 6 0c806a7f1888
Added TSourceReader to allow reading source files. Initial work on T environment...
compiler/Make.proto
compiler/Make.spec
compiler/TClassDefinition.st
compiler/TMetaDefinition.st
compiler/TMethodDefinition.st
compiler/TSourceReader.st
compiler/TSourceReaderTests.st
compiler/TUniverseDefinition.st
compiler/abbrev.stc
compiler/bc.mak
compiler/jv_tea_compiler.st
compiler/libInit.cc
--- a/compiler/Make.proto	Mon Aug 31 13:53:40 2015 +0100
+++ b/compiler/Make.proto	Mon Aug 31 18:37:31 2015 +0100
@@ -34,7 +34,7 @@
 # add the path(es) here:,
 # ********** OPTIONAL: MODIFY the next lines ***
 # LOCALINCLUDES=-Ifoo -Ibar
-LOCALINCLUDES= -I$(INCLUDE_TOP)/jv/llvm_s -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser -I$(INCLUDE_TOP)/stx/goodies/ring -I$(INCLUDE_TOP)/stx/goodies/sunit -I$(INCLUDE_TOP)/stx/libbasic
+LOCALINCLUDES= -I$(INCLUDE_TOP)/jv/llvm_s -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser -I$(INCLUDE_TOP)/stx/goodies/ring -I$(INCLUDE_TOP)/stx/goodies/sunit -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libbasic3
 
 
 # if you need any additional defines for embedded C code,
@@ -137,9 +137,11 @@
 $(OUTDIR)TParser.$(O) TParser.$(H): TParser.st $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBParser.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)TProgramNodeVisitor.$(O) TProgramNodeVisitor.$(H): TProgramNodeVisitor.st $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBProgramNodeVisitor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)TScope.$(O) TScope.$(H): TScope.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)TSourceReader.$(O) TSourceReader.$(H): TSourceReader.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)TType.$(O) TType.$(H): TType.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)TTypeNode.$(O) TTypeNode.$(H): TTypeNode.st $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBProgramNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)TTypeSpecNode.$(O) TTypeSpecNode.$(H): TTypeSpecNode.st $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBProgramNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)TUniverseDefinition.$(O) TUniverseDefinition.$(H): TUniverseDefinition.st $(INCLUDE_TOP)/stx/goodies/ring/RGAbstractContainer.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGContainer.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGNamespace.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)jv_tea_compiler.$(O) jv_tea_compiler.$(H): jv_tea_compiler.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(STCHDR)
 $(OUTDIR)TClassBinding.$(O) TClassBinding.$(H): TClassBinding.st $(INCLUDE_TOP)/jv/tea/compiler/TBinding.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)TCompilerPass.$(O) TCompilerPass.$(H): TCompilerPass.st $(INCLUDE_TOP)/jv/tea/compiler/TProgramNodeVisitor.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBProgramNodeVisitor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
--- a/compiler/Make.spec	Mon Aug 31 13:53:40 2015 +0100
+++ b/compiler/Make.spec	Mon Aug 31 18:37:31 2015 +0100
@@ -61,9 +61,11 @@
 	TParser \
 	TProgramNodeVisitor \
 	TScope \
+	TSourceReader \
 	TType \
 	TTypeNode \
 	TTypeSpecNode \
+	TUniverseDefinition \
 	jv_tea_compiler \
 	TClassBinding \
 	TCompilerPass \
@@ -100,9 +102,11 @@
     $(OUTDIR_SLASH)TParser.$(O) \
     $(OUTDIR_SLASH)TProgramNodeVisitor.$(O) \
     $(OUTDIR_SLASH)TScope.$(O) \
+    $(OUTDIR_SLASH)TSourceReader.$(O) \
     $(OUTDIR_SLASH)TType.$(O) \
     $(OUTDIR_SLASH)TTypeNode.$(O) \
     $(OUTDIR_SLASH)TTypeSpecNode.$(O) \
+    $(OUTDIR_SLASH)TUniverseDefinition.$(O) \
     $(OUTDIR_SLASH)jv_tea_compiler.$(O) \
     $(OUTDIR_SLASH)TClassBinding.$(O) \
     $(OUTDIR_SLASH)TCompilerPass.$(O) \
--- a/compiler/TClassDefinition.st	Mon Aug 31 13:53:40 2015 +0100
+++ b/compiler/TClassDefinition.st	Mon Aug 31 18:37:31 2015 +0100
@@ -29,3 +29,47 @@
     "Modified: / 31-08-2015 / 11:53:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!TClassDefinition methodsFor:'class variables'!
+
+addClassVarNamed: aString
+    self shouldNotImplement
+
+    "Created: / 31-08-2015 / 15:40:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+addClassVariables: aCollection
+    self shouldNotImplement
+
+    "Created: / 31-08-2015 / 15:38:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!TClassDefinition methodsFor:'instance variables'!
+
+addInstVarNamed: aString
+    self shouldNotImplement
+
+    "Created: / 31-08-2015 / 15:40:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+addInstanceVariables: aCollection
+    self shouldNotImplement
+
+    "Created: / 31-08-2015 / 15:40:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+classVariableNames: aStringOrCollection
+    aStringOrCollection isEmptyOrNil ifTrue:[ ^ self ].
+
+    self notYetImplemented
+
+    "Created: / 31-08-2015 / 15:41:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+instanceVariableNames: aStringOrCollection
+    aStringOrCollection isEmptyOrNil ifTrue:[ ^ self ].
+
+    self notYetImplemented
+
+    "Created: / 31-08-2015 / 15:40:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- a/compiler/TMetaDefinition.st	Mon Aug 31 13:53:40 2015 +0100
+++ b/compiler/TMetaDefinition.st	Mon Aug 31 18:37:31 2015 +0100
@@ -19,3 +19,25 @@
     binding := aTClassBinding.
 ! !
 
+!TMetaDefinition methodsFor:'instance variables'!
+
+addInstVarNamed: aString
+    self shouldNotImplement
+
+    "Created: / 31-08-2015 / 15:40:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+addInstanceVariables: aCollection
+    self shouldNotImplement
+
+    "Created: / 31-08-2015 / 15:40:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+instanceVariableNames: aStringOrCollection
+    aStringOrCollection isEmptyOrNil ifTrue:[ ^ self ].
+
+    self notYetImplemented
+
+    "Created: / 31-08-2015 / 15:40:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- a/compiler/TMethodDefinition.st	Mon Aug 31 13:53:40 2015 +0100
+++ b/compiler/TMethodDefinition.st	Mon Aug 31 18:37:31 2015 +0100
@@ -9,6 +9,7 @@
 	category:'Languages-Tea-Compiler-Model'
 !
 
+
 !TMethodDefinition methodsFor:'accessing'!
 
 binding
@@ -43,3 +44,10 @@
     "Created: / 29-08-2015 / 11:36:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!TMethodDefinition class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/TSourceReader.st	Mon Aug 31 18:37:31 2015 +0100
@@ -0,0 +1,168 @@
+"{ Package: 'jv:tea/compiler' }"
+
+"{ NameSpace: Smalltalk }"
+
+Object subclass:#TSourceReader
+	instanceVariableNames:'stream definitions currentChunk currentChunkTree'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Languages-Tea-Compiler-Model'
+!
+
+!TSourceReader class methodsFor:'reading'!
+
+read: aStringOrFilenameOrStream
+    ^ self new read: aStringOrFilenameOrStream
+
+    "Created: / 31-08-2015 / 15:26:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!TSourceReader methodsFor:'processing'!
+
+process
+    "raise an error: this method should be implemented (TODO)"
+
+    currentChunkTree isMessage ifTrue:[ 
+        | handler |
+
+        handler := ('process_' , (currentChunkTree selector copyReplaceAll: $: with: $_)) asSymbolIfInterned.
+        (handler notNil and:[ self respondsTo: handler ]) ifTrue:[ 
+            self perform: handler.
+            ^ self.
+        ].
+    ].
+    self error: 'Unknown chunk'
+
+    "Created: / 28-08-2015 / 07:12:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 31-08-2015 / 15:49:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+process_methodsFor_
+    self processMethodDefinitions
+
+    "Created: / 31-08-2015 / 15:57:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+process_subclass_category_
+    self processClassDefinition
+
+    "Created: / 31-08-2015 / 15:50:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+process_subclass_instanceVariableNames_classVariableNames_poolDictionaries_category_
+    self processClassDefinition
+
+    "Created: / 28-08-2015 / 07:15:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!TSourceReader methodsFor:'processing-helpers'!
+
+processClassDefinition
+    | superName className class |
+
+    superName := currentChunkTree receiver name.
+    className := currentChunkTree arguments first value.
+    class := TClassDefinition new.
+    class superclassName: superName.
+    class name: className.
+    2 to: currentChunkTree selectorParts size do:[:i | 
+        | property value |
+
+        property := (currentChunkTree selectorParts at: i) value.
+        value    := (currentChunkTree arguments at: i) value.
+
+        property = 'instanceVariableNames:' ifTrue:[ 
+            class instanceVariableNamed: value.
+        ] ifFalse:[ 
+        property = 'classVariableNames:' ifTrue:[ 
+            class classVariableNames: value.
+        ] ifFalse:[
+        property = 'poolDictionaries:' ifTrue:[ 
+            class poolDictionaryNames: value.
+        ] ifFalse:[
+        property = 'category:' ifTrue:[ 
+            class category: value.
+        ]]]].
+    ].
+
+    definitions add: class.
+
+    "Created: / 28-08-2015 / 07:16:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 31-08-2015 / 16:53:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+processMethodDefinitions
+    | className classIsMeta category source |
+
+    currentChunkTree receiver isVariable ifTrue:[ 
+        className := currentChunkTree receiver name.
+        classIsMeta := false.
+    ] ifFalse:[ 
+        currentChunkTree receiver isMessage ifTrue:[ 
+            currentChunkTree receiver receiver isVariable ifTrue:[ 
+                currentChunkTree receiver selector = #class ifTrue:[ 
+                    className := currentChunkTree receiver receiver name.
+                    classIsMeta := true.
+                ] ifFalse:[ 
+                    self error: 'Invalid class name'
+                ].
+            ] ifFalse:[ 
+                self error: 'Invalid class name'
+            ].
+        ] ifFalse:[ 
+            self error: 'Invalid class name'
+        ].
+    ].
+    currentChunkTree arguments first isLiteralNode ifTrue:[ 
+        category := currentChunkTree arguments first value.
+    ] ifFalse:[ 
+        self error: 'Invalid category name'.
+    ].
+
+    [ source := stream nextChunk. source notEmptyOrNil ] whileTrue:[ 
+        | method |
+        method := TMethodDefinition new.
+        method source: source.
+        method category: category.
+        classIsMeta ifTrue:[
+            method className: className , ' class'.
+        ] ifFalse:[ 
+            method className: className.
+        ].
+        definitions add: method
+    ].
+
+    "Created: / 31-08-2015 / 16:02:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!TSourceReader methodsFor:'reading'!
+
+read: aStringOrFilenameOrStream
+    "Read Tea source from source and return a list of definitions found in the file"
+
+    definitions := OrderedCollection new.
+    stream := aStringOrFilenameOrStream readStream.
+    stream isEncodedStream ifFalse:[
+        "/ By default, Tea sources are UTF8 encoded...
+        stream := EncodedStream stream: stream encoder:(CharacterEncoder encoderToEncodeFrom:#utf8 into:#unicode). 
+    ].
+
+    [ stream atEnd ] whileFalse:[ 
+        currentChunk := nil.
+        currentChunkTree := nil.
+        [ currentChunk isEmptyOrNil and:[ stream atEnd not ] ] whileTrue:[  
+            currentChunk := stream nextChunk
+        ].
+        currentChunk notEmptyOrNil ifTrue:[
+            currentChunkTree := TParser 
+                        parseExpression: currentChunk 
+                        onError: [:msg :pos | ChangeSet invalidChangeChunkError raiseRequestErrorString: ('Invalid chunk: %1 at %2' bindWith: msg with: pos) ].
+            self process
+        ].
+    ].
+    ^ definitions
+
+    "Created: / 31-08-2015 / 15:23:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 31-08-2015 / 16:47:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/TSourceReaderTests.st	Mon Aug 31 18:37:31 2015 +0100
@@ -0,0 +1,116 @@
+"{ Package: 'jv:tea/compiler' }"
+
+"{ NameSpace: Smalltalk }"
+
+TestCase subclass:#TSourceReaderTests
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Languages-Tea-Compiler-Model-Tests'
+!
+
+!TSourceReaderTests methodsFor:'tests'!
+
+test_01
+    | defs |
+
+    defs := TSourceReader read:'
+tObject subclass: #tMachineInteger
+    category: ''tKernel''
+'.
+    self assert: defs size == 1.
+    self assert: defs anElement isClass.
+    self assert: (defs anElement superclassName =  'tObject').
+    self assert: (defs anElement name ='tMachineInteger').
+    self assert: (defs anElement category ='tKernel').
+
+    "Created: / 31-08-2015 / 15:48:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_02
+    | defs |
+
+    defs := TSourceReader read:'
+!!tMachineInteger class methodsFor: ''tests''!!
+foo <tMachineInteger>
+    ^ 1
+'.
+    self assert: defs size == 1.
+    self assert: defs anElement isMethod.
+    self assert: (defs anElement className ='tMachineInteger class').
+    self assert: (defs anElement category ='tests').
+
+    "Created: / 31-08-2015 / 16:34:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_03
+    | defs |
+
+    defs := TSourceReader read:'
+!!tMachineInteger class methodsFor: ''tests''!!
+foo <tMachineInteger>
+    ^ 1
+!!
+bar <tMachineInteger>
+    ^ 2
+'.
+    self assert: defs size == 2.
+    self assert: defs first isMethod.
+    self assert: (defs first className ='tMachineInteger class').
+    self assert: (defs first category ='tests').
+    self assert: defs second isMethod.
+    self assert: (defs second className ='tMachineInteger class').
+    self assert: (defs second category ='tests').
+
+    "Created: / 31-08-2015 / 16:39:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_04
+    | defs |
+
+    defs := TSourceReader read:'
+!!tMachineInteger class methodsFor: ''tests''!!
+foo <tMachineInteger>
+    ^ 1
+!! !!
+
+!!tMachineInteger class methodsFor: ''more tests''!!
+bar <tMachineInteger>
+    ^ 2
+'.
+    self assert: defs size == 2.
+    self assert: defs first isMethod.
+    self assert: (defs first className ='tMachineInteger class').
+    self assert: (defs first category ='tests').
+    self assert: defs second isMethod.
+    self assert: (defs second className ='tMachineInteger class').
+    self assert: (defs second category ='more tests').
+
+    "Created: / 31-08-2015 / 16:40:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_05
+    | defs |
+
+    defs := TSourceReader read:'
+tObject subclass: #tMachineInteger
+    category: ''tKernel''   
+!!
+
+!!tMachineInteger class methodsFor: ''tests''!!
+foo <tMachineInteger>
+    ^ 1
+!! !!
+
+'.
+    self assert: defs size == 2.
+    self assert: defs first isClass.
+    self assert: (defs first name ='tMachineInteger').
+    self assert: (defs first category ='tKernel').
+    self assert: defs second isMethod.
+    self assert: (defs second className ='tMachineInteger class').
+    self assert: (defs second category ='tests').
+
+    "Created: / 31-08-2015 / 16:43:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/TUniverseDefinition.st	Mon Aug 31 18:37:31 2015 +0100
@@ -0,0 +1,32 @@
+"{ Package: 'jv:tea/compiler' }"
+
+"{ NameSpace: Smalltalk }"
+
+RGNamespace subclass:#TUniverseDefinition
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Languages-Tea-Compiler-Model'
+!
+
+!TUniverseDefinition methodsFor:'adding elements'!
+
+addMethod: method
+    | mclassName mclassIsMeta mclass |
+
+    mclassName := method className.
+    (mclassName endsWith: ' class') ifTrue:[ 
+        mclassName := mclassName copyTo: mclassName size - 6.
+        mclassIsMeta := true.
+    ] ifFalse:[ 
+        mclassIsMeta := false.
+    ].
+    mclass := self classNamed: mclassName.
+    mclassIsMeta ifTrue:[ 
+        mclass := mclass theMetaclass.
+    ].
+    mclass addMethod: method.
+
+    "Created: / 31-08-2015 / 17:10:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- a/compiler/abbrev.stc	Mon Aug 31 13:53:40 2015 +0100
+++ b/compiler/abbrev.stc	Mon Aug 31 18:37:31 2015 +0100
@@ -11,13 +11,14 @@
 TMethodDefinition TMethodDefinition jv:tea/compiler 'Languages-Tea-Compiler-Model' 0
 TMethodDefinitionTests TMethodDefinitionTests jv:tea/compiler 'Languages-Tea-Compiler-Model-Tests' 1
 TParser TParser jv:tea/compiler 'Languages-Tea-Compiler-AST' 0
-TParserTests TParserTests jv:tea/compiler 'Languages-Tea-Compiler-AST-Tests' 1
 TProgramNodeVisitor TProgramNodeVisitor jv:tea/compiler 'Languages-Tea-Compiler-AST' 0
 TScope TScope jv:tea/compiler 'Languages-Tea-Compiler-Bindings' 0
-TSemanticAnalysisPassTests TSemanticAnalysisPassTests jv:tea/compiler 'Languages-Tea-Compiler-Tests' 1
+TSourceReader TSourceReader jv:tea/compiler 'Languages-Tea-Compiler-Model' 0
+TSourceReaderTests TSourceReaderTests jv:tea/compiler 'Languages-Tea-Compiler-Model-Tests' 1
 TType TType jv:tea/compiler 'Languages-Tea-Compiler-Types' 0
 TTypeNode TTypeNode jv:tea/compiler 'Languages-Tea-Compiler-AST' 0
 TTypeSpecNode TTypeSpecNode jv:tea/compiler 'Languages-Tea-Compiler-AST' 0
+TUniverseDefinition TUniverseDefinition jv:tea/compiler 'Languages-Tea-Compiler-Model' 0
 jv_tea_compiler jv_tea_compiler jv:tea/compiler '* Projects & Packages *' 3
 TClassBinding TClassBinding jv:tea/compiler 'Languages-Tea-Compiler-Bindings' 0
 TCompilerPass TCompilerPass jv:tea/compiler 'Languages-Tea-Compiler' 0
@@ -39,3 +40,5 @@
 TVariableBinding TVariableBinding jv:tea/compiler 'Languages-Tea-Compiler-Bindings' 0
 TArgumentBinding TArgumentBinding jv:tea/compiler 'Languages-Tea-Compiler-Bindings' 0
 TLocalBinding TLocalBinding jv:tea/compiler 'Languages-Tea-Compiler-Bindings' 0
+TParserTests TParserTests jv:tea/compiler 'Languages-Tea-Compiler-AST-Tests' 1
+TSemanticAnalysisPassTests TSemanticAnalysisPassTests jv:tea/compiler 'Languages-Tea-Compiler-Tests' 1
--- a/compiler/bc.mak	Mon Aug 31 13:53:40 2015 +0100
+++ b/compiler/bc.mak	Mon Aug 31 18:37:31 2015 +0100
@@ -35,7 +35,7 @@
 
 
 
-LOCALINCLUDES= -I$(INCLUDE_TOP)\jv\llvm_s -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser -I$(INCLUDE_TOP)\stx\goodies\ring -I$(INCLUDE_TOP)\stx\goodies\sunit -I$(INCLUDE_TOP)\stx\libbasic
+LOCALINCLUDES= -I$(INCLUDE_TOP)\jv\llvm_s -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser -I$(INCLUDE_TOP)\stx\goodies\ring -I$(INCLUDE_TOP)\stx\goodies\sunit -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\libbasic3
 LOCALDEFINES=
 
 STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) -headerDir=. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES)  -varPrefix=$(LIBNAME)
@@ -84,9 +84,11 @@
 $(OUTDIR)TParser.$(O) TParser.$(H): TParser.st $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBParser.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)TProgramNodeVisitor.$(O) TProgramNodeVisitor.$(H): TProgramNodeVisitor.st $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBProgramNodeVisitor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)TScope.$(O) TScope.$(H): TScope.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)TSourceReader.$(O) TSourceReader.$(H): TSourceReader.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)TType.$(O) TType.$(H): TType.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)TTypeNode.$(O) TTypeNode.$(H): TTypeNode.st $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBProgramNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)TTypeSpecNode.$(O) TTypeSpecNode.$(H): TTypeSpecNode.st $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBProgramNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)TUniverseDefinition.$(O) TUniverseDefinition.$(H): TUniverseDefinition.st $(INCLUDE_TOP)\stx\goodies\ring\RGAbstractContainer.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGContainer.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGNamespace.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)jv_tea_compiler.$(O) jv_tea_compiler.$(H): jv_tea_compiler.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(STCHDR)
 $(OUTDIR)TClassBinding.$(O) TClassBinding.$(H): TClassBinding.st $(INCLUDE_TOP)\jv\tea\compiler\TBinding.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)TCompilerPass.$(O) TCompilerPass.$(H): TCompilerPass.st $(INCLUDE_TOP)\jv\tea\compiler\TProgramNodeVisitor.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBProgramNodeVisitor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
--- a/compiler/jv_tea_compiler.st	Mon Aug 31 13:53:40 2015 +0100
+++ b/compiler/jv_tea_compiler.st	Mon Aug 31 18:37:31 2015 +0100
@@ -31,9 +31,9 @@
 
     ^ #(
         #'stx:goodies/refactoryBrowser/parser'    "RBBlockNode - extended"
-        #'stx:goodies/ring'    "RGBehaviorDefinition - extended"
+        #'stx:goodies/ring'    "RGAbstractContainer - superclass of TUniverseDefinition"
         #'stx:goodies/sunit'    "TestAsserter - superclass of TCompilerTests"
-        #'stx:libbasic'    "LibraryDefinition - superclass of jv_tea_compiler"
+        #'stx:libbasic'    "Autoload - superclass of TParserTests"
     )
 !
 
@@ -49,6 +49,7 @@
 
     ^ #(
         #'jv:llvm_s'    "LLVMConstant - referenced by TConstantBinding>>asLLVMValueInModule:"
+        #'stx:libbasic3'    "ChangeSet - referenced by TSourceReader>>read:"
     )
 !
 
@@ -82,13 +83,14 @@
         TMethodDefinition
         (TMethodDefinitionTests autoload)
         TParser
-        (TParserTests autoload)
         TProgramNodeVisitor
         TScope
-        (TSemanticAnalysisPassTests autoload)
+        TSourceReader
+        (TSourceReaderTests autoload)
         TType
         TTypeNode
         TTypeSpecNode
+        TUniverseDefinition
         #'jv_tea_compiler'
         TClassBinding
         TCompilerPass
@@ -110,6 +112,8 @@
         TVariableBinding
         TArgumentBinding
         TLocalBinding
+        (TParserTests autoload)
+        (TSemanticAnalysisPassTests autoload)
     )
 !
 
--- a/compiler/libInit.cc	Mon Aug 31 13:53:40 2015 +0100
+++ b/compiler/libInit.cc	Mon Aug 31 18:37:31 2015 +0100
@@ -37,9 +37,11 @@
 _TParser_Init(pass,__pRT__,snd);
 _TProgramNodeVisitor_Init(pass,__pRT__,snd);
 _TScope_Init(pass,__pRT__,snd);
+_TSourceReader_Init(pass,__pRT__,snd);
 _TType_Init(pass,__pRT__,snd);
 _TTypeNode_Init(pass,__pRT__,snd);
 _TTypeSpecNode_Init(pass,__pRT__,snd);
+_TUniverseDefinition_Init(pass,__pRT__,snd);
 _jv_137tea_137compiler_Init(pass,__pRT__,snd);
 _TClassBinding_Init(pass,__pRT__,snd);
 _TCompilerPass_Init(pass,__pRT__,snd);