Tests moved to separate sub-package named tests to follow convention.
--- a/compiler/Dart__ParserTests.st Thu Oct 30 21:22:38 2014 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,164 +0,0 @@
-"{ Package: 'jv:dart/compiler' }"
-
-"{ NameSpace: Dart }"
-
-PPCompositeParserTest subclass:#ParserTests
- instanceVariableNames:''
- classVariableNames:''
- poolDictionaries:''
- category:'Languages-Dart-Parser-Tests'
-!
-
-
-!ParserTests methodsFor:'accessing'!
-
-parserClass
- ^ Dart::Parser
-
- "Modified: / 11-01-2013 / 13:14:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!ParserTests methodsFor:'parsing'!
-
-fail: aString rule: aSymbol
-
- ^super fail: (Dart::Scanner for: aString) rule: aSymbol
-
- "Created: / 14-03-2012 / 22:51:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 11-01-2013 / 13:28:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-parse: aString rule: aSymbol
- | production |
- production := self parserInstance.
- aSymbol = #start ifFalse: [
- production := production productionAt: aSymbol.
- production := production , (Dart::Parser::TokenParser for: #EOF).
- ].
-
- result := production parse: (Dart::Scanner for: aString).
- self
- assert: result isPetitFailure not
- description: 'Unable to parse ' , aString printString.
-
- ^ result
-
- "Created: / 14-03-2012 / 22:51:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 11-01-2013 / 15:35:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!ParserTests methodsFor:'tests - expressions'!
-
-test_expression_01
-
- self parse:'1 + 1' rule: #expression
-
- "Created: / 11-01-2013 / 15:12:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-test_expression_02
-
- self parse:'a.foo()' rule: #expression
-
- "Created: / 11-01-2013 / 15:19:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-test_expression_04
-
- self parse:'new Foo()' rule: #expression
-
- "Created: / 11-01-2013 / 15:38:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!ParserTests methodsFor:'tests - literals'!
-
-test_literal_01
-
- self parse: '1' rule: #literal.
- self parse: '1.0' rule: #literal.
- self parse: 'true' rule: #literal.
- self parse: 'false' rule: #literal.
- self parse: 'null' rule: #literal.
-
- "Created: / 11-01-2013 / 15:13:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!ParserTests methodsFor:'tests - misc'!
-
-test_misc_01
-
- self parse:'=' rule: #assignmentOperator
-
- "Created: / 11-01-2013 / 15:49:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!ParserTests methodsFor:'tests - smoke'!
-
-test_smoke_01
- self parse: 'import ''dart:html'';
-
-void main() {
-
-}'
-
- "Created: / 11-01-2013 / 13:15:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-test_smoke_01a
- self parse: 'void main() { }'
-
- "Created: / 11-01-2013 / 13:37:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-test_smoke_02
- self parse: '
-
-void main() {
- var a = 1 + 1;
-
-}'
-
- "Created: / 11-01-2013 / 13:30:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 11-01-2013 / 15:07:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-test_smoke_03
- self parse: '
-
-class Test {
- void foo() {
- print("Foo");
- }
-}
-
-void main() {1
- 1 = 1 + 1;
- Test foo = new Test();
- foo.foo();
-}'
-
- "Created: / 11-01-2013 / 13:34:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!ParserTests methodsFor:'tests - statements'!
-
-test_statement_01
-
- self parse:'a = 1;' rule: #statement
-
- "Created: / 11-01-2013 / 15:40:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-test_statement_02
-
- self parse:'return 1;' rule: #statement
-
- "Created: / 11-01-2013 / 15:44:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!ParserTests class methodsFor:'documentation'!
-
-version_HG
-
- ^ '$Changeset: <not expanded> $'
-! !
--- a/compiler/Dart__ScannerTests.st Thu Oct 30 21:22:38 2014 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-"{ Package: 'jv:dart/compiler' }"
-
-"{ NameSpace: Dart }"
-
-TestCase subclass:#ScannerTests
- instanceVariableNames:''
- classVariableNames:''
- poolDictionaries:''
- category:'Languages-Dart-Parser-Tests'
-!
-
-
-!ScannerTests methodsFor:'tests'!
-
-test_01
-
- self assert:
- (Dart::Scanner scan: 'import ''dart:html''; void main() { }') asArray
- = #(#import #String $; #void #identifier $( $) ${ $} )
-
- "Created: / 11-01-2013 / 12:53:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-test_02
-
- self assert:
- (Dart::Scanner scan: 'a |= 1') asArray
- = #()
-
- "Created: / 11-01-2013 / 15:46:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!ScannerTests class methodsFor:'documentation'!
-
-version_HG
-
- ^ '$Changeset: <not expanded> $'
-! !
--- a/compiler/Make.proto Thu Oct 30 21:22:38 2014 +0000
+++ b/compiler/Make.proto Tue Nov 04 00:17:12 2014 +0000
@@ -21,7 +21,7 @@
INCLUDE_TOP=$(TOP)/..
# subdirectories where targets are to be made:
-SUBDIRS=
+SUBDIRS= tests
# subdirectories where Makefiles are to be made:
@@ -34,7 +34,7 @@
# add the path(es) here:,
# ********** OPTIONAL: MODIFY the next lines ***
# LOCALINCLUDES=-Ifoo -Ibar
-LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/goodies/sunit -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/goodies/petitparser
+LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/goodies/petitparser -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libcomp
# if you need any additional defines for embedded C code,
@@ -82,7 +82,7 @@
# run default testsuite for this package
test: $(TOP)/goodies/builder/reports
- $(MAKE) -C $(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)
@@ -99,11 +99,18 @@
# add more postMake actions here
postMake:: cleanjunk
-prereq: $(REQUIRED_SUPPORT_DIRS)
+# build all mandatory prerequisite packages (containing superclasses) for this package
+prereq:
cd $(TOP)/libbasic && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
- cd $(TOP)/librun && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+ cd $(TOP)/libbasic2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+ cd $(TOP)/goodies/petitparser && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+
+# build all packages containing referenced classes for this package
+# they are nor needed to compile the package
+references:
+
cleanjunk::
-rm -f *.s *.s2
@@ -119,8 +126,7 @@
$(OUTDIR)Dart__Parser.$(O) Dart__Parser.$(H): Dart__Parser.st $(INCLUDE_TOP)/stx/goodies/petitparser/PPCompositeParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPDelegateParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPParser.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)Dart__ParserError.$(O) Dart__ParserError.$(H): Dart__ParserError.st $(INCLUDE_TOP)/stx/libbasic/Error.$(H) $(INCLUDE_TOP)/stx/libbasic/Exception.$(H) $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)Dart__ScannerBase.$(O) Dart__ScannerBase.$(H): Dart__ScannerBase.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)Dart__ScannerTests.$(O) Dart__ScannerTests.$(H): Dart__ScannerTests.st $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)ctu_dart_compiler.$(O) ctu_dart_compiler.$(H): ctu_dart_compiler.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)ctu_dart_compiler.$(O) ctu_dart_compiler.$(H): ctu_dart_compiler.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(STCHDR)
$(OUTDIR)Dart__Scanner.$(O) Dart__Scanner.$(H): Dart__Scanner.st $(INCLUDE_TOP)/ctu/dart/compiler/Dart__ScannerBase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)Dart__ScannerError.$(O) Dart__ScannerError.$(H): Dart__ScannerError.st $(INCLUDE_TOP)/ctu/dart/compiler/Dart__ParserError.$(H) $(INCLUDE_TOP)/stx/libbasic/Error.$(H) $(INCLUDE_TOP)/stx/libbasic/Exception.$(H) $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)Dart__SyntaxError.$(O) Dart__SyntaxError.$(H): Dart__SyntaxError.st $(INCLUDE_TOP)/ctu/dart/compiler/Dart__ParserError.$(H) $(INCLUDE_TOP)/stx/libbasic/Error.$(H) $(INCLUDE_TOP)/stx/libbasic/Exception.$(H) $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
--- a/compiler/Make.spec Thu Oct 30 21:22:38 2014 +0000
+++ b/compiler/Make.spec Tue Nov 04 00:17:12 2014 +0000
@@ -50,27 +50,25 @@
STCWARNINGS=-warnNonStandard
COMMON_CLASSES= \
- ctu_dart_compiler \
+ Dart::Parser \
+ Dart::ParserError \
Dart::ScannerBase \
- Dart::Parser \
+ ctu_dart_compiler \
Dart::Scanner \
- Dart::ScannerTests \
- Dart::ParserError \
+ Dart::ScannerError \
Dart::SyntaxError \
- Dart::ScannerError \
COMMON_OBJS= \
- $(OUTDIR)ctu_dart_compiler.$(O) \
- $(OUTDIR)Dart__ScannerBase.$(O) \
- $(OUTDIR)Dart__Parser.$(O) \
- $(OUTDIR)Dart__Scanner.$(O) \
- $(OUTDIR)Dart__ScannerTests.$(O) \
- $(OUTDIR)Dart__ParserError.$(O) \
- $(OUTDIR)Dart__SyntaxError.$(O) \
- $(OUTDIR)Dart__ScannerError.$(O) \
+ $(OUTDIR_SLASH)Dart__Parser.$(O) \
+ $(OUTDIR_SLASH)Dart__ParserError.$(O) \
+ $(OUTDIR_SLASH)Dart__ScannerBase.$(O) \
+ $(OUTDIR_SLASH)ctu_dart_compiler.$(O) \
+ $(OUTDIR_SLASH)Dart__Scanner.$(O) \
+ $(OUTDIR_SLASH)Dart__ScannerError.$(O) \
+ $(OUTDIR_SLASH)Dart__SyntaxError.$(O) \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/Makefile.init Tue Nov 04 00:17:12 2014 +0000
@@ -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
--- a/compiler/abbrev.stc Thu Oct 30 21:22:38 2014 +0000
+++ b/compiler/abbrev.stc Tue Nov 04 00:17:12 2014 +0000
@@ -1,12 +1,10 @@
# 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.
-jv_dart_compiler jv_dart_compiler jv:dart/compiler '* Projects & Packages *' 3
-Dart::ScannerBase Dart__ScannerBase jv:dart/compiler 'Languages-Dart-Parser' 3
-Dart::Parser Dart__Parser jv:dart/compiler 'Languages-Dart-Parser' 0
-Dart::Scanner Dart__Scanner jv:dart/compiler 'Languages-Dart-Parser' 3
-Dart::ScannerTests Dart__ScannerTests jv:dart/compiler 'Languages-Dart-Parser-Tests' 1
-Dart::ParserError Dart__ParserError jv:dart/compiler 'Languages-Dart-Parser' 1
-Dart::SyntaxError Dart__SyntaxError jv:dart/compiler 'Languages-Dart-Parser' 1
-Dart::ScannerError Dart__ScannerError jv:dart/compiler 'Languages-Dart-Parser' 1
-Dart::ParserTests Dart__ParserTests jv:dart/compiler 'Languages-Dart-Parser-Tests' 1
+Dart::Parser Dart__Parser ctu:dart/compiler 'Languages-Dart-Parser' 0
+Dart::ParserError Dart__ParserError ctu:dart/compiler 'Languages-Dart-Parser' 1
+Dart::ScannerBase Dart__ScannerBase ctu:dart/compiler 'Languages-Dart-Parser' 3
+ctu_dart_compiler ctu_dart_compiler ctu:dart/compiler '* Projects & Packages *' 3
+Dart::Scanner Dart__Scanner ctu:dart/compiler 'Languages-Dart-Parser' 3
+Dart::ScannerError Dart__ScannerError ctu:dart/compiler 'Languages-Dart-Parser' 1
+Dart::SyntaxError Dart__SyntaxError ctu:dart/compiler 'Languages-Dart-Parser' 1
--- a/compiler/bc.mak Thu Oct 30 21:22:38 2014 +0000
+++ b/compiler/bc.mak Tue Nov 04 00:17:12 2014 +0000
@@ -30,11 +30,11 @@
!INCLUDE Make.spec
LIBNAME=libctu_dart_compiler
-RESFILES=compiler.res
+RESFILES=compiler.$(RES)
-LOCALINCLUDES= -I$(INCLUDE_TOP)\stx\goodies\sunit -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\goodies\petitparser
+LOCALINCLUDES= -I$(INCLUDE_TOP)\stx\goodies\petitparser -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\libcomp
LOCALDEFINES=
STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) -headerDir=. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -varPrefix=$(LIBNAME)
@@ -48,10 +48,12 @@
!INCLUDE $(TOP)\rules\stdRules_bc
-# build all prerequisite packages for this package
+# build all mandatory prerequisite packages (containing superclasses) for this package
prereq:
pushd ..\..\..\stx\libbasic & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
- pushd ..\..\..\stx\librun & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ pushd ..\..\..\stx\libbasic2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ pushd ..\..\..\stx\goodies\petitparser & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+
@@ -61,13 +63,16 @@
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)Dart__Parser.$(O) Dart__Parser.$(H): Dart__Parser.st $(INCLUDE_TOP)\stx\goodies\petitparser\PPCompositeParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPDelegateParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPParser.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)Dart__ParserError.$(O) Dart__ParserError.$(H): Dart__ParserError.st $(INCLUDE_TOP)\stx\libbasic\Error.$(H) $(INCLUDE_TOP)\stx\libbasic\Exception.$(H) $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)Dart__ScannerBase.$(O) Dart__ScannerBase.$(H): Dart__ScannerBase.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)Dart__ScannerTests.$(O) Dart__ScannerTests.$(H): Dart__ScannerTests.st $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)ctu_dart_compiler.$(O) ctu_dart_compiler.$(H): ctu_dart_compiler.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)ctu_dart_compiler.$(O) ctu_dart_compiler.$(H): ctu_dart_compiler.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(STCHDR)
$(OUTDIR)Dart__Scanner.$(O) Dart__Scanner.$(H): Dart__Scanner.st $(INCLUDE_TOP)\ctu\dart\compiler\Dart__ScannerBase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)Dart__ScannerError.$(O) Dart__ScannerError.$(H): Dart__ScannerError.st $(INCLUDE_TOP)\ctu\dart\compiler\Dart__ParserError.$(H) $(INCLUDE_TOP)\stx\libbasic\Error.$(H) $(INCLUDE_TOP)\stx\libbasic\Exception.$(H) $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)Dart__SyntaxError.$(O) Dart__SyntaxError.$(H): Dart__SyntaxError.st $(INCLUDE_TOP)\ctu\dart\compiler\Dart__ParserError.$(H) $(INCLUDE_TOP)\stx\libbasic\Error.$(H) $(INCLUDE_TOP)\stx\libbasic\Exception.$(H) $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
--- a/compiler/bmake.bat Thu Oct 30 21:22:38 2014 +0000
+++ b/compiler/bmake.bat Tue Nov 04 00:17:12 2014 +0000
@@ -9,4 +9,11 @@
@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%"
make.exe -N -f bc.mak %DEFINES% %*
+@echo "***********************************"
+@echo "Buildung ctu/dart/compiler/tests
+@echo "***********************************"
+@cd tests
+@call bmake %1 %2
+@cd ..
+
--- a/compiler/compiler.rc Thu Oct 30 21:22:38 2014 +0000
+++ b/compiler/compiler.rc Tue Nov 04 00:17:12 2014 +0000
@@ -4,7 +4,7 @@
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 6,2,32767,32767
- PRODUCTVERSION 6,2,3,0
+ PRODUCTVERSION 6,2,4,0
#if (__BORLANDC__)
FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE
FILEFLAGS VS_FF_PRERELEASE | VS_FF_SPECIALBUILD
@@ -21,11 +21,11 @@
VALUE "CompanyName", "My Company\0"
VALUE "FileDescription", "Class Library (LIB)\0"
VALUE "FileVersion", "6.2.32767.32767\0"
- VALUE "InternalName", "jv:dart/compiler\0"
+ VALUE "InternalName", "ctu:dart/compiler\0"
VALUE "LegalCopyright", "My CopyRight or CopyLeft\0"
VALUE "ProductName", "ProductName\0"
- VALUE "ProductVersion", "6.2.3.0\0"
- VALUE "ProductDate", "Fri, 11 Jan 2013 15:52:43 GMT\0"
+ VALUE "ProductVersion", "6.2.4.0\0"
+ VALUE "ProductDate", "Tue, 04 Nov 2014 00:16:20 GMT\0"
END
END
--- a/compiler/ctu_dart_compiler.st Thu Oct 30 21:22:38 2014 +0000
+++ b/compiler/ctu_dart_compiler.st Tue Nov 04 00:17:12 2014 +0000
@@ -1,4 +1,4 @@
-"{ Package: 'jv:dart/compiler' }"
+"{ Package: 'ctu:dart/compiler' }"
LibraryDefinition subclass:#ctu_dart_compiler
instanceVariableNames:''
@@ -18,6 +18,20 @@
)
!
+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/petitparser' "PPCompositeParser - superclass of Dart::Parser"
+ #'stx:libbasic' "Error - superclass of Dart::ParserError"
+ )
+!
+
preRequisites
"list all required packages.
This list can be maintained manually or (better) generated and
@@ -29,6 +43,29 @@
^ #(
#'stx:libbasic' "LibraryDefinition - superclass of jv_dart "
)
+!
+
+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 loading or compiling.
+ This method is generated automatically,
+ by searching all classes (and their packages) which are referenced by my classes."
+
+ ^ #(
+ #'stx:libcomp' "ParserFlags - referenced by Dart::ScannerBase>>initialize"
+ )
+!
+
+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."
+
+ ^ #(
+ #'ctu:dart/compiler/tests'
+ )
! !
!ctu_dart_compiler class methodsFor:'description - contents'!
@@ -41,21 +78,19 @@
^ #(
"<className> or (<className> attributes...) in load order"
- #'ctu_dart_compiler'
+ #'Dart::Parser'
+ #'Dart::ParserError'
#'Dart::ScannerBase'
- #'Dart::Parser'
+ #'ctu_dart_compiler'
#'Dart::Scanner'
- #'Dart::ScannerTests'
- #'Dart::ParserError'
+ #'Dart::ScannerError'
#'Dart::SyntaxError'
- #'Dart::ScannerError'
- (#'Dart::ParserTests' autoload)
)
!
extensionMethodNames
- "lists the extension methods which are to be included in the project.
- Entries are 2-element array literals, consisting of class-name and selector."
+ "list class/selector pairs of extensions.
+ A correponding method with real names must be present in my concrete subclasses"
^ #(
)
@@ -107,3 +142,4 @@
^ '$Changeset: <not expanded> $'
! !
+
--- a/compiler/lccmake.bat Thu Oct 30 21:22:38 2014 +0000
+++ b/compiler/lccmake.bat Tue Nov 04 00:17:12 2014 +0000
@@ -5,4 +5,11 @@
@REM -------
make.exe -N -f bc.mak -DUSELCC=1 %*
+@echo "***********************************"
+@echo "Buildung ctu/dart/compiler/tests
+@echo "***********************************"
+@cd tests
+@call lccmake %1 %2
+@cd ..
+
--- a/compiler/libInit.cc Thu Oct 30 21:22:38 2014 +0000
+++ b/compiler/libInit.cc Tue Nov 04 00:17:12 2014 +0000
@@ -13,24 +13,23 @@
#if defined(INIT_TEXT_SECTION) || defined(DLL_EXPORT)
DLL_EXPORT void _libctu_dart_compiler_Init() INIT_TEXT_SECTION;
-// DLL_EXPORT void _libctu_dart_compiler_InitDefinition() INIT_TEXT_SECTION;
+DLL_EXPORT void _libctu_dart_compiler_InitDefinition() INIT_TEXT_SECTION;
#endif
-// void _libctu_dart_compiler_InitDefinition(pass, __pRT__, snd)
-// OBJ snd; struct __vmData__ *__pRT__; {
-// __BEGIN_PACKAGE2__("libctu_dart_compiler__DFN", _libctu_dart_compiler_InitDefinition, "jv:dart/compiler");
-// _ctu_137dart_137compiler_Init(pass,__pRT__,snd);
+void _libctu_dart_compiler_InitDefinition(pass, __pRT__, snd)
+OBJ snd; struct __vmData__ *__pRT__; {
+__BEGIN_PACKAGE2__("libctu_dart_compiler__DFN", _libctu_dart_compiler_InitDefinition, "ctu:dart/compiler");
+_ctu_137dart_137compiler_Init(pass,__pRT__,snd);
-// __END_PACKAGE__();
-// }
+__END_PACKAGE__();
+}
void _libctu_dart_compiler_Init(pass, __pRT__, snd)
OBJ snd; struct __vmData__ *__pRT__; {
-__BEGIN_PACKAGE2__("libctu_dart_compiler", _libctu_dart_compiler_Init, "jv:dart/compiler");
+__BEGIN_PACKAGE2__("libctu_dart_compiler", _libctu_dart_compiler_Init, "ctu:dart/compiler");
_Dart__Parser_Init(pass,__pRT__,snd);
_Dart__ParserError_Init(pass,__pRT__,snd);
_Dart__ScannerBase_Init(pass,__pRT__,snd);
-_Dart__ScannerTests_Init(pass,__pRT__,snd);
_ctu_137dart_137compiler_Init(pass,__pRT__,snd);
_Dart__Scanner_Init(pass,__pRT__,snd);
_Dart__ScannerError_Init(pass,__pRT__,snd);
--- a/compiler/mingwmake.bat Thu Oct 30 21:22:38 2014 +0000
+++ b/compiler/mingwmake.bat Tue Nov 04 00:17:12 2014 +0000
@@ -7,6 +7,17 @@
@REM Kludge got Mercurial, cannot be implemented in Borland make
@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i
@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%"
-make.exe -N -f bc.mak -DUSEMINGW=1 %DEFINES% %*
+
+@pushd ..\..\..\stx\rules
+@call find_mingw.bat
+@popd
+make.exe -N -f bc.mak %DEFINES% %USEMINGW_ARG% %*
+
+@echo "***********************************"
+@echo "Buildung ctu/dart/compiler/tests
+@echo "***********************************"
+@cd tests
+@call mingwmake %1 %2
+@cd ..
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/tests/Dart__ParserTests.st Tue Nov 04 00:17:12 2014 +0000
@@ -0,0 +1,165 @@
+"{ Package: 'ctu:dart/compiler/tests' }"
+
+"{ NameSpace: Dart }"
+
+PPCompositeParserTest subclass:#ParserTests
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'Languages-Dart-Parser-Tests'
+!
+
+
+!ParserTests methodsFor:'accessing'!
+
+parserClass
+ ^ Dart::Parser
+
+ "Modified: / 11-01-2013 / 13:14:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!ParserTests methodsFor:'parsing'!
+
+fail: aString rule: aSymbol
+
+ ^super fail: (Dart::Scanner for: aString) rule: aSymbol
+
+ "Created: / 14-03-2012 / 22:51:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 11-01-2013 / 13:28:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+parse: aString rule: aSymbol
+ | production |
+ production := self parserInstance.
+ aSymbol = #start ifFalse: [
+ production := production productionAt: aSymbol.
+ production := production , (Dart::Parser::TokenParser for: #EOF).
+ ].
+
+ result := production parse: (Dart::Scanner for: aString).
+ self
+ assert: result isPetitFailure not
+ description: 'Unable to parse ' , aString printString.
+
+ ^ result
+
+ "Created: / 14-03-2012 / 22:51:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 11-01-2013 / 15:35:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!ParserTests methodsFor:'tests - expressions'!
+
+test_expression_01
+
+ self parse:'1 + 1' rule: #expression
+
+ "Created: / 11-01-2013 / 15:12:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_expression_02
+
+ self parse:'a.foo()' rule: #expression
+
+ "Created: / 11-01-2013 / 15:19:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_expression_04
+
+ self parse:'new Foo()' rule: #expression
+
+ "Created: / 11-01-2013 / 15:38:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!ParserTests methodsFor:'tests - literals'!
+
+test_literal_01
+
+ self parse: '1' rule: #literal.
+ self parse: '1.0' rule: #literal.
+ self parse: 'true' rule: #literal.
+ self parse: 'false' rule: #literal.
+ self parse: 'null' rule: #literal.
+
+ "Created: / 11-01-2013 / 15:13:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!ParserTests methodsFor:'tests - misc'!
+
+test_misc_01
+
+ self parse:'=' rule: #assignmentOperator
+
+ "Created: / 11-01-2013 / 15:49:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!ParserTests methodsFor:'tests - smoke'!
+
+test_smoke_01
+ self parse: 'import ''dart:html'';
+
+void main() {
+
+}'
+
+ "Created: / 11-01-2013 / 13:15:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_smoke_01a
+ self parse: 'void main() { }'
+
+ "Created: / 11-01-2013 / 13:37:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_smoke_02
+ self parse: '
+
+void main() {
+ var a = 1 + 1;
+
+}'
+
+ "Created: / 11-01-2013 / 13:30:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 11-01-2013 / 15:07:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_smoke_03
+ self parse: '
+
+class Test {
+ void foo() {
+ print("Foo");
+ }
+}
+
+void main() {1
+ 1 = 1 + 1;
+ Test foo = new Test();
+ foo.foo();
+}'
+
+ "Created: / 11-01-2013 / 13:34:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!ParserTests methodsFor:'tests - statements'!
+
+test_statement_01
+
+ self parse:'a = 1;' rule: #statement
+
+ "Created: / 11-01-2013 / 15:40:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_statement_02
+
+ self parse:'return 1;' rule: #statement
+
+ "Created: / 11-01-2013 / 15:44:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!ParserTests class methodsFor:'documentation'!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+! !
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/tests/Dart__ScannerTests.st Tue Nov 04 00:17:12 2014 +0000
@@ -0,0 +1,39 @@
+"{ Package: 'ctu:dart/compiler/tests' }"
+
+"{ NameSpace: Dart }"
+
+TestCase subclass:#ScannerTests
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'Languages-Dart-Parser-Tests'
+!
+
+
+!ScannerTests methodsFor:'tests'!
+
+test_01
+
+ self assert:
+ (Dart::Scanner scan: 'import ''dart:html''; void main() { }') asArray
+ = #(#import #String $; #void #identifier $( $) ${ $} )
+
+ "Created: / 11-01-2013 / 12:53:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_02
+
+ self assert:
+ (Dart::Scanner scan: 'a |= 1') asArray
+ = #()
+
+ "Created: / 11-01-2013 / 15:46:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!ScannerTests class methodsFor:'documentation'!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+! !
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/tests/Make.proto Tue Nov 04 00:17:12 2014 +0000
@@ -0,0 +1,136 @@
+# $Header$
+#
+# DO NOT EDIT
+# automagically generated from the projectDefinition: ctu_dart_compiler_tests.
+#
+# 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)/ctu/dart/compiler -I$(INCLUDE_TOP)/stx/goodies/petitparser/tests -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=libctu_dart_compiler_tests
+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**'))
+ctu_dart_compiler_tests.$(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)/libbasic2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+ cd $(TOP)/libbasic3 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+ cd $(TOP)/libview && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+ cd $(TOP)/goodies/petitparser && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+ cd $(TOP)/libview2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+ cd $(TOP)/goodies/sunit && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+ cd $(TOP)/goodies/petitparser/tests && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+
+
+
+# build all packages containing referenced classes for this package
+# they are nor needed to compile the package
+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)Dart__ParserTests.$(O) Dart__ParserTests.$(H): Dart__ParserTests.st $(INCLUDE_TOP)/stx/goodies/petitparser/tests/PPAbstractParserTest.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/tests/PPCompositeParserTest.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)Dart__ScannerTests.$(O) Dart__ScannerTests.$(H): Dart__ScannerTests.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)ctu_dart_compiler_tests.$(O) ctu_dart_compiler_tests.$(H): ctu_dart_compiler_tests.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(STCHDR)
+
+# ENDMAKEDEPEND --- do not remove this line
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/tests/Make.spec Tue Nov 04 00:17:12 2014 +0000
@@ -0,0 +1,66 @@
+# $Header$
+#
+# DO NOT EDIT
+# automagically generated from the projectDefinition: ctu_dart_compiler_tests.
+#
+# 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=ctu
+MODULE_DIR=dart/compiler/tests
+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
+#
+# ********** OPTIONAL: MODIFY the next line(s) ***
+# STCWARNINGS=-warn
+# STCWARNINGS=-warnNonStandard
+# STCWARNINGS=-warnEOLComments
+STCWARNINGS=-warnNonStandard
+
+COMMON_CLASSES= \
+ Dart::ParserTests \
+ Dart::ScannerTests \
+ ctu_dart_compiler_tests \
+
+
+
+
+COMMON_OBJS= \
+ $(OUTDIR_SLASH)Dart__ParserTests.$(O) \
+ $(OUTDIR_SLASH)Dart__ScannerTests.$(O) \
+ $(OUTDIR_SLASH)ctu_dart_compiler_tests.$(O) \
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/tests/Makefile.init Tue Nov 04 00:17:12 2014 +0000
@@ -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/compiler/tests/abbrev.stc Tue Nov 04 00:17:12 2014 +0000
@@ -0,0 +1,6 @@
+# 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.
+Dart::ParserTests Dart__ParserTests ctu:dart/compiler/tests 'Languages-Dart-Parser-Tests' 1
+Dart::ScannerTests Dart__ScannerTests ctu:dart/compiler/tests 'Languages-Dart-Parser-Tests' 1
+ctu_dart_compiler_tests ctu_dart_compiler_tests ctu:dart/compiler/tests '* Projects & Packages *' 3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/tests/bc.mak Tue Nov 04 00:17:12 2014 +0000
@@ -0,0 +1,90 @@
+# $Header$
+#
+# DO NOT EDIT
+# automagically generated from the projectDefinition: ctu_dart_compiler_tests.
+#
+# 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=libctu_dart_compiler_tests
+RESFILES=tests.$(RES)
+
+
+
+LOCALINCLUDES= -I$(INCLUDE_TOP)\ctu\dart\compiler -I$(INCLUDE_TOP)\stx\goodies\petitparser\tests -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\libbasic2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ pushd ..\..\..\..\stx\libbasic3 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ pushd ..\..\..\..\stx\libview & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ pushd ..\..\..\..\stx\goodies\petitparser & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ pushd ..\..\..\..\stx\libview2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ pushd ..\..\..\..\stx\goodies\sunit & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ pushd ..\..\..\..\stx\goodies\petitparser\tests & $(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)Dart__ParserTests.$(O) Dart__ParserTests.$(H): Dart__ParserTests.st $(INCLUDE_TOP)\stx\goodies\petitparser\tests\PPAbstractParserTest.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\tests\PPCompositeParserTest.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)Dart__ScannerTests.$(O) Dart__ScannerTests.$(H): Dart__ScannerTests.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)ctu_dart_compiler_tests.$(O) ctu_dart_compiler_tests.$(H): ctu_dart_compiler_tests.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(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)ctu_dart_compiler_tests.$(O): $(HGROOT)\.hg\dirstate
+!ENDIF
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/tests/bmake.bat Tue Nov 04 00:17:12 2014 +0000
@@ -0,0 +1,12 @@
+@REM -------
+@REM make using Borland bcc32
+@REM type bmake, and wait...
+@REM do not edit - automatically generated from ProjectDefinition
+@REM -------
+@SET DEFINES=
+@REM Kludge got Mercurial, cannot be implemented in Borland make
+@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i
+@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%"
+make.exe -N -f bc.mak %DEFINES% %*
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/tests/ctu_dart_compiler_tests.st Tue Nov 04 00:17:12 2014 +0000
@@ -0,0 +1,118 @@
+"{ Package: 'ctu:dart/compiler/tests' }"
+
+LibraryDefinition subclass:#ctu_dart_compiler_tests
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'* Projects & Packages *'
+!
+
+
+!ctu_dart_compiler_tests 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/petitparser/tests' "PPAbstractParserTest - superclass of Dart::ParserTests"
+ #'stx:goodies/sunit' "TestAsserter - superclass of Dart::ParserTests"
+ #'stx:libbasic' "LibraryDefinition - superclass of ctu_dart_compiler_tests"
+ )
+!
+
+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 loading or compiling.
+ This method is generated automatically,
+ by searching all classes (and their packages) which are referenced by my classes."
+
+ ^ #(
+ #'ctu:dart/compiler' "Dart::Parser - referenced by Dart::ParserTests>>parse:rule:"
+ )
+!
+
+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."
+
+ ^ #(
+ )
+! !
+
+!ctu_dart_compiler_tests 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"
+ #'Dart::ParserTests'
+ #'Dart::ScannerTests'
+ #'ctu_dart_compiler_tests'
+ )
+!
+
+extensionMethodNames
+ "list class/selector pairs of extensions.
+ A correponding method with real names must be present in my concrete subclasses"
+
+ ^ #(
+ )
+! !
+
+!ctu_dart_compiler_tests 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'
+! !
+
+!ctu_dart_compiler_tests class methodsFor:'documentation'!
+
+version_HG
+ ^ '$Changeset: <not expanded> $'
+! !
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/tests/lccmake.bat Tue Nov 04 00:17:12 2014 +0000
@@ -0,0 +1,8 @@
+@REM -------
+@REM make using lcc compiler
+@REM type lccmake, and wait...
+@REM do not edit - automatically generated from ProjectDefinition
+@REM -------
+make.exe -N -f bc.mak -DUSELCC=1 %*
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/tests/libInit.cc Tue Nov 04 00:17:12 2014 +0000
@@ -0,0 +1,36 @@
+/*
+ * $Header$
+ *
+ * DO NOT EDIT
+ * automagically generated from the projectDefinition: ctu_dart_compiler_tests.
+ */
+#define __INDIRECTVMINITCALLS__
+#include <stc.h>
+
+#ifdef WIN32
+# pragma codeseg INITCODE "INITCODE"
+#endif
+
+#if defined(INIT_TEXT_SECTION) || defined(DLL_EXPORT)
+DLL_EXPORT void _libctu_dart_compiler_tests_Init() INIT_TEXT_SECTION;
+DLL_EXPORT void _libctu_dart_compiler_tests_InitDefinition() INIT_TEXT_SECTION;
+#endif
+
+void _libctu_dart_compiler_tests_InitDefinition(pass, __pRT__, snd)
+OBJ snd; struct __vmData__ *__pRT__; {
+__BEGIN_PACKAGE2__("libctu_dart_compiler_tests__DFN", _libctu_dart_compiler_tests_InitDefinition, "ctu:dart/compiler/tests");
+_ctu_137dart_137compiler_137tests_Init(pass,__pRT__,snd);
+
+__END_PACKAGE__();
+}
+
+void _libctu_dart_compiler_tests_Init(pass, __pRT__, snd)
+OBJ snd; struct __vmData__ *__pRT__; {
+__BEGIN_PACKAGE2__("libctu_dart_compiler_tests", _libctu_dart_compiler_tests_Init, "ctu:dart/compiler/tests");
+_Dart__ParserTests_Init(pass,__pRT__,snd);
+_Dart__ScannerTests_Init(pass,__pRT__,snd);
+_ctu_137dart_137compiler_137tests_Init(pass,__pRT__,snd);
+
+
+__END_PACKAGE__();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/tests/mingwmake.bat Tue Nov 04 00:17:12 2014 +0000
@@ -0,0 +1,16 @@
+@REM -------
+@REM make using mingw gnu compiler
+@REM type mingwmake, and wait...
+@REM do not edit - automatically generated from ProjectDefinition
+@REM -------
+@SET DEFINES=
+@REM Kludge got Mercurial, cannot be implemented in Borland make
+@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i
+@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%"
+
+@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/compiler/tests/tests.rc Tue Nov 04 00:17:12 2014 +0000
@@ -0,0 +1,37 @@
+//
+// DO NOT EDIT
+// automagically generated from the projectDefinition: ctu_dart_compiler_tests.
+//
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 6,2,32767,32767
+ PRODUCTVERSION 6,2,4,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", "ctu:dart/compiler/tests\0"
+ VALUE "LegalCopyright", "My CopyRight or CopyLeft\0"
+ VALUE "ProductName", "LibraryName\0"
+ VALUE "ProductVersion", "6.2.4.0\0"
+ VALUE "ProductDate", "Tue, 04 Nov 2014 00:16:21 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/compiler/tests/vcmake.bat Tue Nov 04 00:17:12 2014 +0000
@@ -0,0 +1,20 @@
+@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=
+@REM Kludge got Mercurial, cannot be implemented in Borland make
+@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i
+@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%"
+make.exe -N -f bc.mak -DUSEVC=1 %DEFINES% %*
+
+
+
+
--- a/compiler/vcmake.bat Thu Oct 30 21:22:38 2014 +0000
+++ b/compiler/vcmake.bat Tue Nov 04 00:17:12 2014 +0000
@@ -5,7 +5,9 @@
@REM -------
@if not defined VSINSTALLDIR (
- call ..\..\..\stx\rules\vcsetup.bat
+ pushd ..\..\..\stx\rules
+ call vcsetup.bat
+ popd
)
@SET DEFINES=
@REM Kludge got Mercurial, cannot be implemented in Borland make
@@ -15,4 +17,11 @@
+@echo "***********************************"
+@echo "Buildung ctu/dart/compiler/tests
+@echo "***********************************"
+@cd tests
+@call vcmake %1 %2
+@cd ..
+