Initial shot: parser, type nodes, types and little bit of a support.
authorJan Vrany <jan.vrany@fit.cvut.cz>
Sat, 22 Aug 2015 00:17:35 +0100
changeset 0 db69a8d8b368
child 1 18b4a3b98e96
Initial shot: parser, type nodes, types and little bit of a support.
.hgignore
Make.proto
Make.spec
Makefile.init
TCompiler.st
TFormatter.st
THostProtoObject.st
TLanguage.st
TMethod.st
TParser.st
TParserTests.st
TSimpleType.st
TSimpleTypeNode.st
TType.st
TTypeNode.st
TTypeSpecNode.st
TUnionType.st
TUnionTypeNode.st
abbrev.stc
bc.mak
bmake.bat
extensions.st
jv_tea.st
libInit.cc
mingwmake.bat
tea.rc
vcmake.bat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,16 @@
+
+syntax: glob
+*Init.c   
+makefile
+*.so
+*.H
+*.o
+*.STH
+*.sc
+objbc
+objvc
+*.class
+java/libs/*.jar
+java/libs-src/*.jar
+*-Test.xml
+st.chg
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Make.proto	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,146 @@
+# $Header$
+#
+# DO NOT EDIT
+# automagically generated from the projectDefinition: jv_tea.
+#
+# Warning: once you modify this file, do not rerun
+# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
+#
+# The Makefile as generated by this Make.proto supports the following targets:
+#    make         - compile all st-files to a classLib
+#    make clean   - clean all temp files
+#    make clobber - clean all
+#
+# This file contains definitions for Unix based platforms.
+# It shares common definitions with the win32-make in Make.spec.
+
+#
+# position (of this package) in directory hierarchy:
+# (must point to ST/X top directory, for tools and includes)
+TOP=../../stx
+INCLUDE_TOP=$(TOP)/..
+
+# subdirectories where targets are to be made:
+SUBDIRS=
+
+
+# subdirectories where Makefiles are to be made:
+# (only define if different from SUBDIRS)
+# ALLSUBDIRS=
+
+REQUIRED_SUPPORT_DIRS=
+
+# if your embedded C code requires any system includes,
+# add the path(es) here:,
+# ********** OPTIONAL: MODIFY the next lines ***
+# LOCALINCLUDES=-Ifoo -Ibar
+LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser -I$(INCLUDE_TOP)/stx/goodies/sunit -I$(INCLUDE_TOP)/stx/libbasic
+
+
+# if you need any additional defines for embedded C code,
+# add them here:,
+# ********** OPTIONAL: MODIFY the next lines ***
+# LOCALDEFINES=-Dfoo -Dbar -DDEBUG
+LOCALDEFINES=
+
+LIBNAME=libjv_tea
+STCLOCALOPT='-package=$(PACKAGE)' -I. $(LOCALINCLUDES) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -headerDir=.  -varPrefix=$(LIBNAME)
+
+
+# ********** OPTIONAL: MODIFY the next line ***
+# additional C-libraries that should be pre-linked with the class-objects
+LD_OBJ_LIBS=
+LOCAL_SHARED_LIBS=
+
+
+# ********** OPTIONAL: MODIFY the next line ***
+# additional C targets or libraries should be added below
+LOCAL_EXTRA_TARGETS=
+
+OBJS= $(COMMON_OBJS) $(UNIX_OBJS)
+
+
+
+all:: preMake classLibRule postMake
+
+pre_objs::  
+
+
+
+
+
+
+# Enforce recompilation of package definition class if Mercurial working
+# copy state changes. Together with --guessVersion it ensures that package
+# definition class always contains correct binary revision string.
+ifneq (**NOHG**, $(shell hg root 2> /dev/null || echo -n '**NOHG**'))
+jv_tea.$(O): $(shell hg root)/.hg/dirstate
+endif
+
+
+
+
+# run default testsuite for this package
+test: $(TOP)/goodies/builder/reports
+	$(MAKE) -C $(TOP)/goodies/builder/reports -f Makefile.init
+	$(TOP)/goodies/builder/reports/report-runner.sh -D . -r Builder::TestReport -p $(PACKAGE)
+
+
+
+# add more install actions here
+install::
+
+# add more install actions for aux-files (resources) here
+installAux::
+
+# add more preMake actions here
+preMake::
+
+# add more postMake actions here
+postMake:: cleanjunk
+
+# build all mandatory prerequisite packages (containing superclasses) for this package
+prereq:
+	cd $(TOP)/libbasic && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+	cd $(TOP)/goodies/refactoryBrowser/parser && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+	cd $(TOP)/libbasic2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+	cd $(TOP)/libview && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+	cd $(TOP)/libview2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+	cd $(TOP)/goodies/sunit && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+
+
+
+# build all packages containing referenced classes for this package
+# they are not needed to compile the package (but later, to load it)
+references:
+
+
+cleanjunk::
+	-rm -f *.s *.s2
+
+clean::
+	-rm -f *.o *.H
+
+clobber:: clean
+	-rm -f *.so *.dll
+
+
+# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
+$(OUTDIR)TCompiler.$(O) TCompiler.$(H): TCompiler.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)TFormatter.$(O) TFormatter.$(H): TFormatter.st $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBFormatter.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBProgramNodeVisitor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)THostProtoObject.$(O) THostProtoObject.$(H): THostProtoObject.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)TLanguage.$(O) TLanguage.$(H): TLanguage.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProgrammingLanguage.$(H) $(STCHDR)
+$(OUTDIR)TMethod.$(O) TMethod.$(H): TMethod.st $(INCLUDE_TOP)/stx/libbasic/CompiledCode.$(H) $(INCLUDE_TOP)/stx/libbasic/ExecutableFunction.$(H) $(INCLUDE_TOP)/stx/libbasic/Method.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)TParser.$(O) TParser.$(H): TParser.st $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBParser.$(H) $(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)jv_tea.$(O) jv_tea.$(H): jv_tea.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(STCHDR)
+$(OUTDIR)TSimpleType.$(O) TSimpleType.$(H): TSimpleType.st $(INCLUDE_TOP)/jv/tea/TType.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)TSimpleTypeNode.$(O) TSimpleTypeNode.$(H): TSimpleTypeNode.st $(INCLUDE_TOP)/jv/tea/TTypeNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBProgramNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)TUnionType.$(O) TUnionType.$(H): TUnionType.st $(INCLUDE_TOP)/jv/tea/TType.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)TUnionTypeNode.$(O) TUnionTypeNode.$(H): TUnionTypeNode.st $(INCLUDE_TOP)/jv/tea/TTypeNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBProgramNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBBlockNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBMethodNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBProgramNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBStatementNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBValueNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBVariableNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+
+# ENDMAKEDEPEND --- do not remove this line
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Make.spec	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,90 @@
+# $Header$
+#
+# DO NOT EDIT
+# automagically generated from the projectDefinition: jv_tea.
+#
+# Warning: once you modify this file, do not rerun
+# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
+#
+# This file contains specifications which are common to all platforms.
+#
+
+# Do NOT CHANGE THESE DEFINITIONS
+# (otherwise, ST/X will have a hard time to find out the packages location from its packageID,
+#  to find the source code of a class and to find the library for a package)
+MODULE=jv
+MODULE_DIR=tea
+PACKAGE=$(MODULE):$(MODULE_DIR)
+
+
+# Argument(s) to the stc compiler (stc --usage).
+#  -headerDir=. : create header files locally
+#                (if removed, they will be created as common
+#  -Pxxx       : defines the package
+#  -Zxxx       : a prefix for variables within the classLib
+#  -Dxxx       : defines passed to to CC for inline C-code
+#  -Ixxx       : include path passed to CC for inline C-code
+#  +optspace   : optimized for space
+#  +optspace2  : optimized more for space
+#  +optspace3  : optimized even more for space
+#  +optinline  : generate inline code for some ST constructs
+#  +inlineNew  : additionally inline new
+#  +inlineMath : additionally inline some floatPnt math stuff
+#
+# ********** OPTIONAL: MODIFY the next line(s) ***
+# STCLOCALOPTIMIZATIONS=+optinline +inlineNew
+# STCLOCALOPTIMIZATIONS=+optspace3
+STCLOCALOPTIMIZATIONS=+optspace3
+
+
+# Argument(s) to the stc compiler (stc --usage).
+#  -warn            : no warnings
+#  -warnNonStandard : no warnings about ST/X extensions
+#  -warnEOLComments : no warnings about EOL comment extension
+#  -warnPrivacy     : no warnings about privateClass extension
+#  -warnUnused      : no warnings about unused variables
+#
+# ********** OPTIONAL: MODIFY the next line(s) ***
+# STCWARNINGS=-warn
+# STCWARNINGS=-warnNonStandard
+# STCWARNINGS=-warnEOLComments
+STCWARNINGS=-warnNonStandard
+
+COMMON_CLASSES= \
+	TCompiler \
+	TFormatter \
+	THostProtoObject \
+	TLanguage \
+	TMethod \
+	TParser \
+	TType \
+	TTypeNode \
+	TTypeSpecNode \
+	jv_tea \
+	TSimpleType \
+	TSimpleTypeNode \
+	TUnionType \
+	TUnionTypeNode \
+
+
+
+
+COMMON_OBJS= \
+    $(OUTDIR_SLASH)TCompiler.$(O) \
+    $(OUTDIR_SLASH)TFormatter.$(O) \
+    $(OUTDIR_SLASH)THostProtoObject.$(O) \
+    $(OUTDIR_SLASH)TLanguage.$(O) \
+    $(OUTDIR_SLASH)TMethod.$(O) \
+    $(OUTDIR_SLASH)TParser.$(O) \
+    $(OUTDIR_SLASH)TType.$(O) \
+    $(OUTDIR_SLASH)TTypeNode.$(O) \
+    $(OUTDIR_SLASH)TTypeSpecNode.$(O) \
+    $(OUTDIR_SLASH)jv_tea.$(O) \
+    $(OUTDIR_SLASH)TSimpleType.$(O) \
+    $(OUTDIR_SLASH)TSimpleTypeNode.$(O) \
+    $(OUTDIR_SLASH)TUnionType.$(O) \
+    $(OUTDIR_SLASH)TUnionTypeNode.$(O) \
+    $(OUTDIR_SLASH)extensions.$(O) \
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile.init	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,27 @@
+#
+# DO NOT EDIT
+#
+# make uses this file (Makefile) only, if there is no
+# file named "makefile" (lower-case m) in the same directory.
+# My only task is to generate the real makefile and call make again.
+# Thereafter, I am no longer used and needed.
+#
+# MACOSX caveat:
+#   as filenames are not case sensitive (in a default setup),
+#   we cannot use the above trick. Therefore, this file is now named
+#   "Makefile.init", and you have to execute "make -f Makefile.init" to
+#   get the initial makefile.  This is now also done by the toplevel CONFIG
+#   script.
+
+.PHONY: run
+
+run: makefile
+	$(MAKE) -f makefile
+
+#only needed for the definition of $(TOP)
+include Make.proto
+
+makefile: mf
+
+mf:
+	$(TOP)/rules/stmkmf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TCompiler.st	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,11 @@
+"{ Package: 'jv:tea' }"
+
+"{ NameSpace: Smalltalk }"
+
+Object subclass:#TCompiler
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Languages-Tea-Compiler'
+!
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TFormatter.st	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,37 @@
+"{ Package: 'jv:tea' }"
+
+"{ NameSpace: Smalltalk }"
+
+RBFormatter subclass:#TFormatter
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Languages-Tea-AST'
+!
+
+!TFormatter methodsFor:'visitor-double dispatching'!
+
+acceptSimpleTypeNode: aTSimpleTypeNode
+    codeStream nextPutAll: aTSimpleTypeNode name
+
+    "Created: / 21-08-2015 / 22:20:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+acceptTypeSpecNode: aTTypeSpecNode
+    codeStream nextPut:$<; space.
+    self visitNode: aTTypeSpecNode type.
+    codeStream space; nextPut:$>.
+
+    "Created: / 21-08-2015 / 22:18:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+acceptUnionTypeNode: aTUnionTypeNode
+    aTUnionTypeNode types do:[:type | 
+        self visitNode: type
+    ] separatedBy:[ 
+        codeStream space; nextPut: $|; space
+    ].
+
+    "Created: / 21-08-2015 / 22:21:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/THostProtoObject.st	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,11 @@
+"{ Package: 'jv:tea' }"
+
+"{ NameSpace: Smalltalk }"
+
+Object subclass:#THostProtoObject
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Languages-Tea-Support'
+!
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TLanguage.st	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,55 @@
+"{ Package: 'jv:tea' }"
+
+"{ NameSpace: Smalltalk }"
+
+ProgrammingLanguage subclass:#TLanguage
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Languages-Tea-Support'
+!
+
+!TLanguage methodsFor:'accessing'!
+
+name
+    "Answers a human-readable name of myself:
+     'Smalltalk' for SmalltalkLanguage,
+     'Ruby' for RubyLanguage
+     ...
+    "
+
+    ^ 'Tea'
+
+    "Created: / 21-08-2015 / 13:08:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+sourceFileSuffix
+    "Answers a default suffix for source files, i.e. 'st' for Smalltalk, 
+     'js' for JavaScript or 'rb' for Ruby', etc."
+
+    ^'tea'
+
+    "Created: / 22-08-2015 / 00:07:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!TLanguage methodsFor:'accessing-classes'!
+
+compilerClass
+    "Answer a class suitable for compiling a source code in 'my' language"
+
+    ^ TCompiler
+
+    "Created: / 22-08-2015 / 00:07:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!TLanguage methodsFor:'queries'!
+
+supportsExtensionMethods
+
+    "Answer true iff this language supports extension methods"
+
+    ^ false
+
+    "Created: / 21-08-2015 / 13:11:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TMethod.st	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,47 @@
+"{ Package: 'jv:tea' }"
+
+"{ NameSpace: Smalltalk }"
+
+Method variableSubclass:#TMethod
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Languages-Tea-Support'
+!
+
+!TMethod class methodsFor:'initialization'!
+
+initialize
+    self makeMetaMethod
+
+    "Created: / 21-08-2015 / 09:00:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+makeBytecodeMethod
+
+    self flags:((self flags
+                 bitOr:Behavior flagMethod)
+                 bitClear:Behavior flagMetaMethod)
+    "
+        THostMethod makeMetaMethod
+        THostMethod makeBytecodeMethod
+    "
+
+    "Created: / 21-08-2015 / 09:00:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+makeMetaMethod
+
+    self flags:((self flags
+                 bitOr:Behavior flagMetaMethod)
+                 bitClear:Behavior flagMethod)
+    "
+        THostMethod makeMetaMethod
+        THostMethod makeBytecodeMethod
+    "
+
+    "Created: / 21-08-2015 / 08:59:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+
+TMethod initialize!
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TParser.st	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,140 @@
+"{ Package: 'jv:tea' }"
+
+"{ NameSpace: Smalltalk }"
+
+RBParser subclass:#TParser
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Languages-Tea-AST'
+!
+
+!TParser class methodsFor:'parsing'!
+
+parseMethod: aString 
+    ^ self parseMethod: aString onError: [:msg :pos | self error: msg , ' at ', pos printString ]
+
+    "Created: / 20-08-2015 / 17:04:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!TParser methodsFor:'private-parsing'!
+
+parseArgOrLocal
+    "Parse either method/block argument or a local (inside | | )"
+
+    | variable |
+
+    variable := self parseVariableNode.
+    variable typeSpec: (self parseTypeSpec: false).
+    ^ variable
+
+    "Created: / 20-08-2015 / 16:57:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-08-2015 / 21:20:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+parseBinaryPattern
+    | method |
+
+    method := super parseBinaryPattern.
+    method returnTypeSpec: (self parseTypeSpec: true).
+    ^ method
+
+    "Created: / 21-08-2015 / 22:55:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+parseKeywordPattern
+    | method |
+
+    method := super parseKeywordPattern.
+    method returnTypeSpec: (self parseTypeSpec: true).
+    ^ method
+
+    "Created: / 20-08-2015 / 17:33:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-08-2015 / 22:50:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+parseType
+    "
+    type ::= type_simple ( '|' type )*
+    "
+
+    | types |
+    types := OrderedCollection with: self parseTypeSimple.
+    [ currentToken isBinary and:[ currentToken value == #| ] ] whileTrue:[ 
+
+        self step. "/ eat bar.
+        types add: self parseTypeSimple.
+    ].
+    ^ types size == 1 ifTrue:[ types anElement ] ifFalse:[ TUnionTypeNode new types: types ]
+
+    "Created: / 20-08-2015 / 17:18:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-08-2015 / 21:12:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+parseTypeSimple
+    "
+    type_simple::= identifier ('[' type_parameters ']')?
+    "
+    | type |
+        
+    currentToken isIdentifier ifTrue:[ 
+        type  := TSimpleTypeNode new.
+        type name: currentToken value.
+    ] ifFalse:[ 
+        (currentToken isLiteral and:[ currentToken value isNil ]) ifFalse:[
+            self parserError: 'type identifier expected'.
+        ].
+        type := TSimpleTypeNode new.
+        type name: 'nil'.
+    ].
+    type
+        start: currentToken start;
+        stop: currentToken stop;
+        lineNumber: currentToken lineNumber.  
+    self step. "/ eat identifier.
+    ^ type
+
+    "Created: / 20-08-2015 / 17:20:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-08-2015 / 21:13:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+parseTypeSpec: forReturn
+    (currentToken isBinary and: [currentToken value == #<]) ifTrue: [
+        | start stop type |    
+        start := currentToken start.
+        self step.
+        forReturn ifTrue:[ 
+            (currentToken isSpecial and:[ currentToken value == $^ ]) ifFalse:[ 
+                self parserError: '''^'' expected'.
+            ].
+            self step.
+        ].          
+
+        type := self parseType.
+
+        (currentToken isBinary and: [currentToken value == #>]) 
+                ifFalse: [self parserError: '''>'' expected'].
+        stop := currentToken stop.
+        self step.
+        ^ TTypeSpecNode new
+            type: type;
+            start: start;
+            stop: stop.
+    ] ifFalse:[ 
+        self parserError: 'type specification expected'
+    ].
+
+    "Created: / 20-08-2015 / 17:13:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-08-2015 / 21:18:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+parseUnaryPattern
+    | method |
+
+    method := super parseUnaryPattern.
+    method returnTypeSpec: (self parseTypeSpec: true).
+    ^ method
+
+    "Created: / 21-08-2015 / 22:54:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TParserTests.st	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,64 @@
+"{ Package: 'jv:tea' }"
+
+"{ NameSpace: Smalltalk }"
+
+TestCase subclass:#TParserTests
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Languages-Tea-AST-Tests'
+!
+
+!TParserTests methodsFor:'tests'!
+
+test_blockargs
+    | method |    
+
+    method := TParser parseMethod: 'foo <^ Float> self select:[ :e <Float> | e = NaN ]'
+
+    "Created: / 21-08-2015 / 07:10:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-08-2015 / 23:04:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_locals
+    | method |    
+
+    method := TParser parseMethod: 'foo <^ Float> | local1 <Integer> local2 <Float | Double> | ^ local1'.
+
+    method := TParser parseMethod: 'foo <^ Float> self something ifTrue:[ | local1 <Float | Double > | local + instvar ]'.
+
+    "Created: / 21-08-2015 / 07:06:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-08-2015 / 23:05:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_method_pattern_01
+    | method |    
+
+    method := TParser parseMethod: 'foo < ^ Integer >'.
+    self assert: method returnTypeSpec notNil.
+    self assert: method returnTypeSpec type name = 'Integer'.
+
+    method := TParser parseMethod: 'foo: foo <Integer> < ^ Integer >'.
+
+    self assert: method returnTypeSpec notNil.
+    self assert: method returnTypeSpec type name = 'Integer'.
+    self assert: method arguments first typeSpec notNil.
+    self assert: method arguments first typeSpec type name = 'Integer'.
+
+    method := TParser parseMethod: '+ anObject <Integer> < ^ Integer >'.
+    self assert: method returnTypeSpec notNil.
+    self assert: method returnTypeSpec type name = 'Integer'.
+    self assert: method arguments first typeSpec notNil.
+    self assert: method arguments first typeSpec type name = 'Integer'.
+
+    self should: [ TParser parseMethod: '+ anObject ' ] raise: Error.
+    self should: [ TParser parseMethod: '+ anObject < >' ] raise: Error.
+    self should: [ TParser parseMethod: '+ anObject < i32 >' ] raise: Error.
+    self should: [ TParser parseMethod: '+ anObject < i32 > < i32 >' ] raise: Error.
+    self should: [ TParser parseMethod: '+ anObject < i32 > < ^  >' ] raise: Error.
+    self should: [ TParser parseMethod: '+ anObject < i32 > < ^ i32 ' ] raise: Error.
+
+    "Created: / 20-08-2015 / 17:01:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-08-2015 / 23:00:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TSimpleType.st	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,55 @@
+"{ Package: 'jv:tea' }"
+
+"{ NameSpace: Smalltalk }"
+
+TType subclass:#TSimpleType
+	instanceVariableNames:'name'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Languages-Tea-Type System'
+!
+
+
+!TSimpleType class methodsFor:'instance creation'!
+
+named: aString
+    ^ self new initializeWithName: aString
+
+    "Created: / 21-08-2015 / 19:24:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!TSimpleType methodsFor:'accessing'!
+
+name
+    ^ name
+! !
+
+!TSimpleType methodsFor:'initialization'!
+
+initializeWithName: aString
+    name := aString
+
+    "Created: / 21-08-2015 / 19:23:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!TSimpleType methodsFor:'printing & storing'!
+
+printWithoutAnglesOn:aStream
+    aStream nextPutAll: name
+
+    "Modified: / 21-08-2015 / 17:08:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!TSimpleType methodsFor:'testing'!
+
+isSimpleType
+    ^ true
+! !
+
+!TSimpleType class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TSimpleTypeNode.st	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,45 @@
+"{ Package: 'jv:tea' }"
+
+"{ NameSpace: Smalltalk }"
+
+TTypeNode subclass:#TSimpleTypeNode
+	instanceVariableNames:'name start stop'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Languages-Tea-AST'
+!
+
+!TSimpleTypeNode methodsFor:'accessing'!
+
+name
+    ^ name
+!
+
+name:aString
+    name := aString.
+!
+
+start
+    ^ start
+!
+
+start:anInteger
+    start := anInteger.
+!
+
+stop
+    ^ stop
+!
+
+stop:anInteger
+    stop := anInteger.
+! !
+
+!TSimpleTypeNode methodsFor:'visitor'!
+
+acceptVisitor: aProgramNodeVisitor 
+    ^ aProgramNodeVisitor acceptSimpleTypeNode: self
+
+    "Created: / 21-08-2015 / 22:15:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TType.st	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,45 @@
+"{ Package: 'jv:tea' }"
+
+"{ NameSpace: Smalltalk }"
+
+Object subclass:#TType
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Languages-Tea-Type System'
+!
+
+!TType methodsFor:'operations'!
+
+union: aTType
+    TUnionType with: self with: aTType
+
+    "Created: / 21-08-2015 / 18:36:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!TType methodsFor:'printing & storing'!
+
+printOn:aStream
+    aStream nextPut: $<; space.
+    self printWithoutAnglesOn:aStream.
+    aStream nextPut: $>; space.
+
+    "Modified: / 21-08-2015 / 13:46:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+printWithoutAnglesOn:aStream
+    self subclassResponsibility
+
+    "Created: / 21-08-2015 / 13:46:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!TType methodsFor:'testing'!
+
+isSimpleType
+    ^ false
+!
+
+isUnionType
+    ^ false
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TTypeNode.st	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,29 @@
+"{ Package: 'jv:tea' }"
+
+"{ NameSpace: Smalltalk }"
+
+RBProgramNode subclass:#TTypeNode
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Languages-Tea-AST'
+!
+
+!TTypeNode class methodsFor:'accessing'!
+
+formatterClass
+    ^ FormatterClass isNil ifTrue: [TFormatter] ifFalse: [FormatterClass]
+
+    "Created: / 21-08-2015 / 22:16:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!TTypeNode class methodsFor:'queries'!
+
+isAbstract
+    "Return if this class is an abstract class.
+     True is returned here for myself only; false for subclasses.
+     Abstract subclasses must redefine again."
+
+    ^ self == TTypeNode.
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TTypeSpecNode.st	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,53 @@
+"{ Package: 'jv:tea' }"
+
+"{ NameSpace: Smalltalk }"
+
+RBProgramNode subclass:#TTypeSpecNode
+	instanceVariableNames:'start stop type'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Languages-Tea-AST'
+!
+
+!TTypeSpecNode class methodsFor:'accessing'!
+
+formatterClass
+        ^FormatterClass isNil ifTrue: [TFormatter] ifFalse: [FormatterClass]
+
+    "Created: / 21-08-2015 / 22:16:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!TTypeSpecNode methodsFor:'accessing'!
+
+start
+    ^ start
+!
+
+start:anInteger
+    start := anInteger.
+!
+
+stop
+    ^ stop
+!
+
+stop:anInteger
+    stop := anInteger.
+!
+
+type
+    ^ type
+!
+
+type:aTTypeNode
+    type := aTTypeNode.
+! !
+
+!TTypeSpecNode methodsFor:'visitor'!
+
+acceptVisitor: aProgramNodeVisitor 
+    ^ aProgramNodeVisitor acceptTypeSpecNode: self
+
+    "Created: / 21-08-2015 / 22:14:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TUnionType.st	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,44 @@
+"{ Package: 'jv:tea' }"
+
+"{ NameSpace: Smalltalk }"
+
+TType subclass:#TUnionType
+	instanceVariableNames:'types'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Languages-Tea-Type System'
+!
+
+!TUnionType class methodsFor:'instance creation'!
+
+with: type1 with: type2
+    ^ self new initializeWith: type1 and: type2
+
+    "Created: / 21-08-2015 / 18:38:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!TUnionType methodsFor:'accessing'!
+
+types
+    ^ types
+! !
+
+!TUnionType methodsFor:'initialization'!
+
+initializeWith: type1 with: type2
+    type1 isUnionType 
+        ifTrue: [ types := type1 types copy  ]
+        ifFalse:[ types := Array with: type1 ].
+    type2 isUnionType 
+        ifTrue: [ types := types , type2 types ]
+        ifFalse:[ types := types copyWith: type2 ].
+
+    "Created: / 21-08-2015 / 18:39:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!TUnionType methodsFor:'testing'!
+
+isUnionType
+    ^ true
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TUnionTypeNode.st	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,49 @@
+"{ Package: 'jv:tea' }"
+
+"{ NameSpace: Smalltalk }"
+
+TTypeNode subclass:#TUnionTypeNode
+	instanceVariableNames:'types'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Languages-Tea-AST'
+!
+
+!TUnionTypeNode class methodsFor:'instance creation'!
+
+new
+    "return an initialized instance"
+
+    ^ self basicNew initialize.
+! !
+
+!TUnionTypeNode methodsFor:'accessing'!
+
+start
+    ^ types first start
+
+    "Created: / 21-08-2015 / 21:08:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+stop
+    ^ types last stop
+
+    "Created: / 21-08-2015 / 21:08:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+types
+    ^ types
+!
+
+types:something
+    types := something.
+! !
+
+!TUnionTypeNode methodsFor:'visitor'!
+
+acceptVisitor: aProgramNodeVisitor 
+    ^ aProgramNodeVisitor acceptUnionTypeNode: self
+
+    "Created: / 21-08-2015 / 22:15:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/abbrev.stc	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,18 @@
+# automagically generated by the project definition
+# this file is needed for stc to be able to compile modules independently.
+# it provides information about a classes filename, category and especially namespace.
+TCompiler TCompiler jv:tea 'Languages-Tea-Compiler' 0
+TFormatter TFormatter jv:tea 'Languages-Tea-AST' 0
+THostProtoObject THostProtoObject jv:tea 'Languages-Tea-Support' 0
+TLanguage TLanguage jv:tea 'Languages-Tea-Support' 1
+TMethod TMethod jv:tea 'Languages-Tea-Support' 0
+TParser TParser jv:tea 'Languages-Tea-AST' 0
+TParserTests TParserTests jv:tea 'Languages-Tea-AST-Tests' 1
+TType TType jv:tea 'Languages-Tea-Type System' 0
+TTypeNode TTypeNode jv:tea 'Languages-Tea-AST' 0
+TTypeSpecNode TTypeSpecNode jv:tea 'Languages-Tea-AST' 0
+jv_tea jv_tea jv:tea '* Projects & Packages *' 3
+TSimpleType TSimpleType jv:tea 'Languages-Tea-Type System' 0
+TSimpleTypeNode TSimpleTypeNode jv:tea 'Languages-Tea-AST' 0
+TUnionType TUnionType jv:tea 'Languages-Tea-Type System' 0
+TUnionTypeNode TUnionTypeNode jv:tea 'Languages-Tea-AST' 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bc.mak	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,101 @@
+# $Header$
+#
+# DO NOT EDIT
+# automagically generated from the projectDefinition: jv_tea.
+#
+# Warning: once you modify this file, do not rerun
+# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
+#
+# Notice, that the name bc.mak is historical (from times, when only borland c was supported).
+# This file contains make rules for the win32 platform using either borland-bcc or visual-c.
+# It shares common definitions with the unix-make in Make.spec.
+# The bc.mak supports the following targets:
+#    bmake         - compile all st-files to a classLib (dll)
+#    bmake clean   - clean all temp files
+#    bmake clobber - clean all
+#
+# Historic Note:
+#  this used to contain only rules to make with borland
+#    (called via bmake, by "make.exe -f bc.mak")
+#  this has changed; it is now also possible to build using microsoft visual c
+#    (called via vcmake, by "make.exe -f bc.mak -DUSEVC")
+#
+TOP=..\..\stx
+INCLUDE_TOP=$(TOP)\..
+
+
+
+!INCLUDE $(TOP)\rules\stdHeader_bc
+
+!INCLUDE Make.spec
+
+LIBNAME=libjv_tea
+MODULE_PATH=tea
+RESFILES=tea.$(RES)
+
+
+
+LOCALINCLUDES= -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser -I$(INCLUDE_TOP)\stx\goodies\sunit -I$(INCLUDE_TOP)\stx\libbasic
+LOCALDEFINES=
+
+STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) -headerDir=. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES)  -varPrefix=$(LIBNAME)
+LOCALLIBS=
+
+OBJS= $(COMMON_OBJS) $(WIN32_OBJS)
+
+ALL::  classLibRule
+
+classLibRule: $(OUTDIR) $(OUTDIR)$(LIBNAME).dll
+
+!INCLUDE $(TOP)\rules\stdRules_bc
+
+# build all mandatory prerequisite packages (containing superclasses) for this package
+prereq:
+	pushd ..\..\stx\libbasic & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+	pushd ..\..\stx\goodies\refactoryBrowser\parser & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+	pushd ..\..\stx\libbasic2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+	pushd ..\..\stx\libview & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+	pushd ..\..\stx\libview2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+	pushd ..\..\stx\goodies\sunit & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+
+
+
+
+
+
+
+test: $(TOP)\goodies\builder\reports\NUL
+	pushd $(TOP)\goodies\builder\reports & $(MAKE_BAT)
+	$(TOP)\goodies\builder\reports\report-runner.bat -D . -r Builder::TestReport -p $(PACKAGE)
+        
+clean::
+	del *.$(CSUFFIX)
+
+
+# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
+$(OUTDIR)TCompiler.$(O) TCompiler.$(H): TCompiler.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)TFormatter.$(O) TFormatter.$(H): TFormatter.st $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBFormatter.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBProgramNodeVisitor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)THostProtoObject.$(O) THostProtoObject.$(H): THostProtoObject.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)TLanguage.$(O) TLanguage.$(H): TLanguage.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProgrammingLanguage.$(H) $(STCHDR)
+$(OUTDIR)TMethod.$(O) TMethod.$(H): TMethod.st $(INCLUDE_TOP)\stx\libbasic\CompiledCode.$(H) $(INCLUDE_TOP)\stx\libbasic\ExecutableFunction.$(H) $(INCLUDE_TOP)\stx\libbasic\Method.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)TParser.$(O) TParser.$(H): TParser.st $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBParser.$(H) $(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)jv_tea.$(O) jv_tea.$(H): jv_tea.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(STCHDR)
+$(OUTDIR)TSimpleType.$(O) TSimpleType.$(H): TSimpleType.st $(INCLUDE_TOP)\jv\tea\TType.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)TSimpleTypeNode.$(O) TSimpleTypeNode.$(H): TSimpleTypeNode.st $(INCLUDE_TOP)\jv\tea\TTypeNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBProgramNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)TUnionType.$(O) TUnionType.$(H): TUnionType.st $(INCLUDE_TOP)\jv\tea\TType.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)TUnionTypeNode.$(O) TUnionTypeNode.$(H): TUnionTypeNode.st $(INCLUDE_TOP)\jv\tea\TTypeNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBProgramNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBBlockNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBMethodNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBProgramNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBStatementNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBValueNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBVariableNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+
+# ENDMAKEDEPEND --- do not remove this line
+
+# **Must be at end**
+
+# Enforce recompilation of package definition class if Mercurial working
+# copy state changes. Together with --guessVersion it ensures that package
+# definition class always contains correct binary revision string.
+!IFDEF HGROOT
+$(OUTDIR)jv_tea.$(O): $(HGROOT)\.hg\dirstate
+!ENDIF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bmake.bat	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,10 @@
+@REM -------
+@REM make using Borland bcc32
+@REM type bmake, and wait...
+@REM do not edit - automatically generated from ProjectDefinition
+@REM -------
+@SET DEFINES=
+
+make.exe -N -f bc.mak  %DEFINES% %*
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extensions.st	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,71 @@
+"{ Package: 'jv:tea' }"!
+
+!RBBlockNode methodsFor:'accessing'!
+
+returnTypeSpec
+    "Return the TTypeSpecNode describing the return type of the
+     block"
+
+    ^ self propertyAt: #returnTypeSpec ifAbsent: nil
+
+    "Created: / 21-08-2015 / 22:47:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!RBBlockNode methodsFor:'accessing'!
+
+returnTypeSpec: aTTypeSpecNode
+    "Set the TTypeSpecNode describing the return type of the block"
+
+    ^ self propertyAt: #returnTypeSpec put: aTTypeSpecNode
+
+    "Created: / 21-08-2015 / 22:48:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!RBMethodNode methodsFor:'accessing'!
+
+returnTypeSpec
+    "Return the TTypeSpecNode describing the return type of the
+     method"
+
+    ^ self propertyAt: #returnTypeSpec ifAbsent: nil
+
+    "Created: / 21-08-2015 / 22:47:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!RBMethodNode methodsFor:'accessing'!
+
+returnTypeSpec: aTTypeSpecNode
+    "Set the TTypeSpecNode describing the return type of the method"
+
+    ^ self propertyAt: #returnTypeSpec put: aTTypeSpecNode
+
+    "Created: / 21-08-2015 / 22:48:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!RBVariableNode methodsFor:'accessing'!
+
+typeSpec
+    "Return the TTypeSpecNode associated with this variable node
+     (if this node is for variable declaration) or nil (otherwise)"
+
+    ^ self propertyAt: #typeSpec ifAbsent: nil
+
+    "Created: / 21-08-2015 / 21:16:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!RBVariableNode methodsFor:'accessing'!
+
+typeSpec: aTTypeSpecNode
+    "Associate a TTypeSpecNode this variable node"
+
+    ^ self propertyAt: #typeSpec put: aTTypeSpecNode
+
+    "Created: / 21-08-2015 / 21:17:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!jv_tea class methodsFor:'documentation'!
+
+extensionsVersion_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jv_tea.st	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,140 @@
+"{ Package: 'jv:tea' }"
+
+"{ NameSpace: Smalltalk }"
+
+LibraryDefinition subclass:#jv_tea
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'* Projects & Packages *'
+!
+
+
+!jv_tea class methodsFor:'description'!
+
+excludedFromPreRequisites
+    "list packages which are to be explicitely excluded from the automatic constructed
+     prerequisites list. If empty, everything that is found along the inheritance of any of
+     my classes is considered to be a prerequisite package."
+
+    ^ #(
+    )
+!
+
+mandatoryPreRequisites
+    "list packages which are mandatory as a prerequisite.
+     This are packages containing superclasses of my classes and classes which
+     are extended by myself.
+     They are mandatory, because we need these packages as a prerequisite for loading and compiling.
+     This method is generated automatically,
+     by searching along the inheritance chain of all of my classes."
+
+    ^ #(
+        #'stx:goodies/refactoryBrowser/parser'    "RBBlockNode - extended"
+        #'stx:goodies/sunit'    "TestAsserter - superclass of TParserTests"
+        #'stx:libbasic'    "CompiledCode - superclass of TMethod"
+    )
+!
+
+referencedPreRequisites
+    "list packages which are a prerequisite, because they contain
+     classes which are referenced by my classes.
+     We do not need these packages as a prerequisite for compiling or loading,
+     however, a class from it may be referenced during execution and having it
+     unloaded then may lead to a runtime doesNotUnderstand error, unless the caller
+     includes explicit checks for the package being present.
+     This method is generated automatically,
+     by searching all classes (and their packages) which are referenced by my classes."
+
+    ^ #(
+    )
+!
+
+subProjects
+    "list packages which are known as subprojects.
+     The generated makefile will enter those and make there as well.
+     However: they are not forced to be loaded when a package is loaded;
+     for those, redefine requiredPrerequisites."
+
+    ^ #(
+    )
+! !
+
+!jv_tea class methodsFor:'description - contents'!
+
+classNamesAndAttributes
+    "lists the classes which are to be included in the project.
+     Each entry in the list may be: a single class-name (symbol),
+     or an array-literal consisting of class name and attributes.
+     Attributes are: #autoload or #<os> where os is one of win32, unix,..."
+
+    ^ #(
+        "<className> or (<className> attributes...) in load order"
+        TCompiler
+        TFormatter
+        THostProtoObject
+        TLanguage
+        TMethod
+        TParser
+        (TParserTests autoload)
+        TType
+        TTypeNode
+        TTypeSpecNode
+        #'jv_tea'
+        TSimpleType
+        TSimpleTypeNode
+        TUnionType
+        TUnionTypeNode
+    )
+!
+
+extensionMethodNames
+    "list class/selector pairs of extensions.
+     A correponding method with real names must be present in my concrete subclasses"
+
+    ^ #(
+        RBBlockNode returnTypeSpec
+        RBBlockNode returnTypeSpec:
+        RBMethodNode returnTypeSpec
+        RBMethodNode returnTypeSpec:
+        RBVariableNode typeSpec
+        RBVariableNode typeSpec:
+    )
+! !
+
+!jv_tea class methodsFor:'description - project information'!
+
+companyName
+    "Returns a company string which will appear in <lib>.rc.
+     Under win32, this is placed into the dlls file-info"
+
+    ^ 'My Company'
+!
+
+description
+    "Returns a description string which will appear in nt.def / bc.def"
+
+    ^ 'Class Library'
+!
+
+legalCopyright
+    "Returns a copyright string which will appear in <lib>.rc.
+     Under win32, this is placed into the dlls file-info"
+
+    ^ 'My CopyRight or CopyLeft'
+!
+
+productName
+    "Returns a product name which will appear in <lib>.rc.
+     Under win32, this is placed into the dlls file-info.
+     This method is usually redefined in a concrete application definition"
+
+    ^ 'LibraryName'
+! !
+
+!jv_tea class methodsFor:'documentation'!
+
+version_HG
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libInit.cc	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,47 @@
+/*
+ * $Header$
+ *
+ * DO NOT EDIT
+ * automagically generated from the projectDefinition: jv_tea.
+ */
+#define __INDIRECTVMINITCALLS__
+#include <stc.h>
+
+#ifdef WIN32
+# pragma codeseg INITCODE "INITCODE"
+#endif
+
+#if defined(INIT_TEXT_SECTION) || defined(DLL_EXPORT)
+DLL_EXPORT void _libjv_tea_Init() INIT_TEXT_SECTION;
+DLL_EXPORT void _libjv_tea_InitDefinition() INIT_TEXT_SECTION;
+#endif
+
+void _libjv_tea_InitDefinition(pass, __pRT__, snd)
+OBJ snd; struct __vmData__ *__pRT__; {
+__BEGIN_PACKAGE2__("libjv_tea__DFN", _libjv_tea_InitDefinition, "jv:tea");
+_jv_137tea_Init(pass,__pRT__,snd);
+
+__END_PACKAGE__();
+}
+
+void _libjv_tea_Init(pass, __pRT__, snd)
+OBJ snd; struct __vmData__ *__pRT__; {
+__BEGIN_PACKAGE2__("libjv_tea", _libjv_tea_Init, "jv:tea");
+_TCompiler_Init(pass,__pRT__,snd);
+_TFormatter_Init(pass,__pRT__,snd);
+_THostProtoObject_Init(pass,__pRT__,snd);
+_TLanguage_Init(pass,__pRT__,snd);
+_TMethod_Init(pass,__pRT__,snd);
+_TParser_Init(pass,__pRT__,snd);
+_TType_Init(pass,__pRT__,snd);
+_TTypeNode_Init(pass,__pRT__,snd);
+_TTypeSpecNode_Init(pass,__pRT__,snd);
+_jv_137tea_Init(pass,__pRT__,snd);
+_TSimpleType_Init(pass,__pRT__,snd);
+_TSimpleTypeNode_Init(pass,__pRT__,snd);
+_TUnionType_Init(pass,__pRT__,snd);
+_TUnionTypeNode_Init(pass,__pRT__,snd);
+
+_jv_137tea_extensions_Init(pass,__pRT__,snd);
+__END_PACKAGE__();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mingwmake.bat	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,13 @@
+@REM -------
+@REM make using mingw gnu compiler
+@REM type mingwmake, and wait...
+@REM do not edit - automatically generated from ProjectDefinition
+@REM -------
+@SET DEFINES=
+
+@pushd ..\..\stx\rules
+@call find_mingw.bat
+@popd
+make.exe -N -f bc.mak %DEFINES% %USEMINGW_ARG% %*
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tea.rc	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,37 @@
+//
+// DO NOT EDIT
+// automagically generated from the projectDefinition: jv_tea.
+//
+VS_VERSION_INFO VERSIONINFO
+  FILEVERSION     6,2,32767,32767
+  PRODUCTVERSION  6,2,5,0
+#if (__BORLANDC__)
+  FILEFLAGSMASK   VS_FF_DEBUG | VS_FF_PRERELEASE
+  FILEFLAGS       VS_FF_PRERELEASE | VS_FF_SPECIALBUILD
+  FILEOS          VOS_NT_WINDOWS32
+  FILETYPE        VFT_DLL
+  FILESUBTYPE     VS_USER_DEFINED
+#endif
+
+BEGIN
+  BLOCK "StringFileInfo"
+  BEGIN
+    BLOCK "040904E4"
+    BEGIN
+      VALUE "CompanyName", "My Company\0"
+      VALUE "FileDescription", "Class Library (LIB)\0"
+      VALUE "FileVersion", "6.2.32767.32767\0"
+      VALUE "InternalName", "jv:tea\0"
+      VALUE "LegalCopyright", "My CopyRight or CopyLeft\0"
+      VALUE "ProductName", "LibraryName\0"
+      VALUE "ProductVersion", "6.2.5.0\0"
+      VALUE "ProductDate", "Fri, 21 Aug 2015 23:15:42 GMT\0"
+    END
+
+  END
+
+  BLOCK "VarFileInfo"
+  BEGIN                               //  Language   |    Translation
+    VALUE "Translation", 0x409, 0x4E4 // U.S. English, Windows Multilingual
+  END
+END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vcmake.bat	Sat Aug 22 00:17:35 2015 +0100
@@ -0,0 +1,17 @@
+@REM -------
+@REM make using Microsoft Visual C compiler
+@REM type vcmake, and wait...
+@REM do not edit - automatically generated from ProjectDefinition
+@REM -------
+
+@if not defined VSINSTALLDIR (
+    pushd ..\..\stx\rules
+    call vcsetup.bat
+    popd
+)
+@SET DEFINES=
+
+make.exe -N -f bc.mak -DUSEVC=1 %DEFINES% %*
+
+
+