# HG changeset patch # User Jan Vrany # Date 1439934370 -3600 # Node ID 09afcf28ed602ec838185796d21b55ace076d5cd # Parent 837963c607a640d270487913b604317faae03831 Fixed PEGFsaTransition>>disjunction: - xor: does not take blocks as xor is not subject to lazy evaluation. While in Pharo it worked, it does not work well under Smalltalk/X which does not send value to the passed argument. (partially because xor: is inlined by the stc/JIT compiler) diff -r 837963c607a6 -r 09afcf28ed60 compiler/PEGFsaCharacterTransition.st --- a/compiler/PEGFsaCharacterTransition.st Tue Aug 18 22:16:18 2015 +0100 +++ b/compiler/PEGFsaCharacterTransition.st Tue Aug 18 22:46:10 2015 +0100 @@ -179,19 +179,6 @@ ^ complement ! -disjunction: transition - | disjunction | - disjunction := Array new: 255. - - 1 to: 255 do: [ :index | - disjunction - at: index - put: ((self characterSet at: index) xor: [transition characterSet at: index]) - ]. - - ^ disjunction -! - intersection: transition | intersection | intersection := Array new: 255. diff -r 837963c607a6 -r 09afcf28ed60 compiler/PEGFsaTransition.st --- a/compiler/PEGFsaTransition.st Tue Aug 18 22:16:18 2015 +0100 +++ b/compiler/PEGFsaTransition.st Tue Aug 18 22:46:10 2015 +0100 @@ -143,10 +143,12 @@ 1 to: 255 do: [ :index | disjunction at: index - put: ((self characterSet at: index) xor: [transition characterSet at: index]) + put: ((self characterSet at: index) xor: (transition characterSet at: index)) ]. ^ disjunction + + "Modified: / 18-08-2015 / 22:41:06 / Jan Vrany " ! intersection: transition diff -r 837963c607a6 -r 09afcf28ed60 compiler/benchmarks/Make.proto --- a/compiler/benchmarks/Make.proto Tue Aug 18 22:16:18 2015 +0100 +++ b/compiler/benchmarks/Make.proto Tue Aug 18 22:46:10 2015 +0100 @@ -34,7 +34,7 @@ # add the path(es) here:, # ********** OPTIONAL: MODIFY the next lines *** # LOCALINCLUDES=-Ifoo -Ibar -LOCALINCLUDES= -I$(INCLUDE_TOP)/jv/calipel/s -I$(INCLUDE_TOP)/stx/goodies/liverobotics_parser -I$(INCLUDE_TOP)/stx/goodies/petitparser -I$(INCLUDE_TOP)/stx/goodies/petitparser/compiler -I$(INCLUDE_TOP)/stx/goodies/petitparser/compiler/tests/extras -I$(INCLUDE_TOP)/stx/goodies/petitparser/parsers/java -I$(INCLUDE_TOP)/stx/goodies/petitparser/parsers/smalltalk -I$(INCLUDE_TOP)/stx/goodies/petitparser/parsers/smalltalk/tests -I$(INCLUDE_TOP)/stx/goodies/petitparser/tests -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser -I$(INCLUDE_TOP)/stx/goodies/sunit -I$(INCLUDE_TOP)/stx/libbasic +LOCALINCLUDES= -I$(INCLUDE_TOP)/jv/calipel/s -I$(INCLUDE_TOP)/stx/goodies/petitparser -I$(INCLUDE_TOP)/stx/goodies/petitparser/compiler -I$(INCLUDE_TOP)/stx/goodies/petitparser/compiler/tests/extras -I$(INCLUDE_TOP)/stx/goodies/petitparser/parsers/java -I$(INCLUDE_TOP)/stx/goodies/petitparser/parsers/smalltalk -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser -I$(INCLUDE_TOP)/stx/libbasic # if you need any additional defines for embedded C code, @@ -104,13 +104,8 @@ cd ../../../../libbasic && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)" cd ../../../refactoryBrowser/parser && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)" cd ../../../../libbasic2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)" - cd ../../../../libview && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)" cd ../../ && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)" - cd ../../../../libview2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)" cd ../../parsers/smalltalk && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)" - cd ../../../sunit && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)" - cd ../../tests && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)" - cd ../../parsers/smalltalk/tests && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)" diff -r 837963c607a6 -r 09afcf28ed60 compiler/benchmarks/PPCSmalltalkNoopParser.st --- a/compiler/benchmarks/PPCSmalltalkNoopParser.st Tue Aug 18 22:16:18 2015 +0100 +++ b/compiler/benchmarks/PPCSmalltalkNoopParser.st Tue Aug 18 22:46:10 2015 +0100 @@ -9,6 +9,7 @@ category:'PetitCompiler-Benchmarks-Parsers' ! + !PPCSmalltalkNoopParser methodsFor:'accessing'! startExpression @@ -342,3 +343,10 @@ "Modified: / 15-05-2015 / 08:54:17 / Jan Vrany " ! ! +!PPCSmalltalkNoopParser class methodsFor:'documentation'! + +version_HG + + ^ '$Changeset: $' +! ! + diff -r 837963c607a6 -r 09afcf28ed60 compiler/benchmarks/abbrev.stc --- a/compiler/benchmarks/abbrev.stc Tue Aug 18 22:16:18 2015 +0100 +++ b/compiler/benchmarks/abbrev.stc Tue Aug 18 22:46:10 2015 +0100 @@ -4,5 +4,5 @@ PPCBenchmark PPCBenchmark stx:goodies/petitparser/compiler/benchmarks 'PetitCompiler-Benchmarks-Core' 0 PPCLRPParser_johanfabry_39 PPCLRPParser_johanfabry_39 stx:goodies/petitparser/compiler/benchmarks 'PetitCompiler-Benchmarks-Core' 0 PPCSmalltalkNoopParser PPCSmalltalkNoopParser stx:goodies/petitparser/compiler/benchmarks 'PetitCompiler-Benchmarks-Parsers' 0 +stx_goodies_petitparser_compiler_benchmarks stx_goodies_petitparser_compiler_benchmarks stx:goodies/petitparser/compiler/benchmarks '* Projects & Packages *' 3 PPCSmalltalkNoopParserTests PPCSmalltalkNoopParserTests stx:goodies/petitparser/compiler/benchmarks 'PetitCompiler-Benchmarks-Parsers-Tests' 1 -stx_goodies_petitparser_compiler_benchmarks stx_goodies_petitparser_compiler_benchmarks stx:goodies/petitparser/compiler/benchmarks '* Projects & Packages *' 3 diff -r 837963c607a6 -r 09afcf28ed60 compiler/benchmarks/bc.mak --- a/compiler/benchmarks/bc.mak Tue Aug 18 22:16:18 2015 +0100 +++ b/compiler/benchmarks/bc.mak Tue Aug 18 22:46:10 2015 +0100 @@ -35,7 +35,7 @@ -LOCALINCLUDES= -I$(INCLUDE_TOP)\jv\calipel\s -I$(INCLUDE_TOP)\stx\goodies\liverobotics_parser -I$(INCLUDE_TOP)\stx\goodies\petitparser -I$(INCLUDE_TOP)\stx\goodies\petitparser\compiler -I$(INCLUDE_TOP)\stx\goodies\petitparser\compiler\tests\extras -I$(INCLUDE_TOP)\stx\goodies\petitparser\parsers\java -I$(INCLUDE_TOP)\stx\goodies\petitparser\parsers\smalltalk -I$(INCLUDE_TOP)\stx\goodies\petitparser\parsers\smalltalk\tests -I$(INCLUDE_TOP)\stx\goodies\petitparser\tests -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser -I$(INCLUDE_TOP)\stx\goodies\sunit -I$(INCLUDE_TOP)\stx\libbasic +LOCALINCLUDES= -I$(INCLUDE_TOP)\jv\calipel\s -I$(INCLUDE_TOP)\stx\goodies\petitparser -I$(INCLUDE_TOP)\stx\goodies\petitparser\compiler -I$(INCLUDE_TOP)\stx\goodies\petitparser\compiler\tests\extras -I$(INCLUDE_TOP)\stx\goodies\petitparser\parsers\java -I$(INCLUDE_TOP)\stx\goodies\petitparser\parsers\smalltalk -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser -I$(INCLUDE_TOP)\stx\libbasic LOCALDEFINES= STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) -headerDir=. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -varPrefix=$(LIBNAME) @@ -54,13 +54,8 @@ pushd ..\..\..\..\libbasic & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) " pushd ..\..\..\refactoryBrowser\parser & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) " pushd ..\..\..\..\libbasic2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) " - pushd ..\..\..\..\libview & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) " pushd ..\.. & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) " - pushd ..\..\..\..\libview2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) " pushd ..\..\parsers\smalltalk & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) " - pushd ..\..\..\sunit & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) " - pushd ..\..\tests & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) " - pushd ..\..\parsers\smalltalk\tests & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) " diff -r 837963c607a6 -r 09afcf28ed60 compiler/benchmarks/stx_goodies_petitparser_compiler_benchmarks.st --- a/compiler/benchmarks/stx_goodies_petitparser_compiler_benchmarks.st Tue Aug 18 22:16:18 2015 +0100 +++ b/compiler/benchmarks/stx_goodies_petitparser_compiler_benchmarks.st Tue Aug 18 22:46:10 2015 +0100 @@ -61,10 +61,7 @@ ^ #( #'stx:goodies/petitparser' "PPCompositeParser - superclass of PPCLRPParser_johanfabry_39" #'stx:goodies/petitparser/parsers/smalltalk' "PPSmalltalkGrammar - superclass of PPCSmalltalkNoopParser" - #'stx:goodies/petitparser/parsers/smalltalk/tests' "PPSmalltalkGrammarTests - superclass of PPCSmalltalkNoopParserTests" - #'stx:goodies/petitparser/tests' "PPAbstractParserTest - superclass of PPCSmalltalkNoopParserTests" - #'stx:goodies/sunit' "TestAsserter - superclass of PPCSmalltalkNoopParserTests" - #'stx:libbasic' "LibraryDefinition - superclass of stx_goodies_petitparser_compiler_benchmarks" + #'stx:libbasic' "Autoload - superclass of PPCSmalltalkNoopParserTests" ) ! @@ -79,9 +76,9 @@ by searching all classes (and their packages) which are referenced by my classes." ^ #( - #'jv:calipel/s' "BenchmarkInstance - referenced by PPCBenchmark class>>run:" + #'jv:calipel/s' "BenchmarkInstance - referenced by PPCBenchmark class>>run:" #'stx:goodies/petitparser/compiler' "PPCConfiguration - referenced by PPCBenchmark>>benchmarkSmalltalkParserCompiled" - #'stx:goodies/petitparser/compiler/tests/extras' "PPCLRPParser - referenced by PPCBenchmark>>setupLRPParser" + #'stx:goodies/petitparser/compiler/tests/extras' "PPCLRPErrorNode - referenced by PPCLRPParser_johanfabry_39>>errorNode" #'stx:goodies/petitparser/parsers/java' "PPJavaSyntax - referenced by PPCBenchmark>>benchmarkJavaSyntax" #'stx:goodies/refactoryBrowser/parser' "RBArrayNode - referenced by PPCSmalltalkNoopParser>>buildArray:" ) @@ -110,8 +107,8 @@ PPCBenchmark #'PPCLRPParser_johanfabry_39' PPCSmalltalkNoopParser + #'stx_goodies_petitparser_compiler_benchmarks' (PPCSmalltalkNoopParserTests autoload) - #'stx_goodies_petitparser_compiler_benchmarks' ) ! diff -r 837963c607a6 -r 09afcf28ed60 compiler/tests/PPCNodeFirstFollowNextTests.st --- a/compiler/tests/PPCNodeFirstFollowNextTests.st Tue Aug 18 22:16:18 2015 +0100 +++ b/compiler/tests/PPCNodeFirstFollowNextTests.st Tue Aug 18 22:46:10 2015 +0100 @@ -20,6 +20,7 @@ " ! + !PPCNodeFirstFollowNextTests methodsFor:'setup'! setUp @@ -672,3 +673,10 @@ self assert: followSet anyMatchesType: PPCTrimmingTokenNode. ! ! +!PPCNodeFirstFollowNextTests class methodsFor:'documentation'! + +version_HG + + ^ '$Changeset: $' +! ! + diff -r 837963c607a6 -r 09afcf28ed60 compiler/tests/extras/PPCLRPTransition.st --- a/compiler/tests/extras/PPCLRPTransition.st Tue Aug 18 22:16:18 2015 +0100 +++ b/compiler/tests/extras/PPCLRPTransition.st Tue Aug 18 22:46:10 2015 +0100 @@ -9,6 +9,7 @@ category:'PetitCompiler-Extras-Tests-LRP' ! + !PPCLRPTransition class methodsFor:'instance creation'! on: anEvent from: startState to: endState name: aString @@ -97,3 +98,10 @@ aPPCLRPNodeVisitor visitTransitionNode: self. ! ! +!PPCLRPTransition class methodsFor:'documentation'! + +version_HG + + ^ '$Changeset: $' +! ! + diff -r 837963c607a6 -r 09afcf28ed60 compiler/tests/extras/abbrev.stc --- a/compiler/tests/extras/abbrev.stc Tue Aug 18 22:16:18 2015 +0100 +++ b/compiler/tests/extras/abbrev.stc Tue Aug 18 22:46:10 2015 +0100 @@ -5,8 +5,6 @@ PPCLRPParser PPCLRPParser stx:goodies/petitparser/compiler/tests/extras 'PetitCompiler-Extras-Tests-LRP' 0 PPCLRPParserSmokeTest PPCLRPParserSmokeTest stx:goodies/petitparser/compiler/tests/extras 'PetitCompiler-Extras-Tests-LRP' 1 PPCLRPSourcesResource PPCLRPSourcesResource stx:goodies/petitparser/compiler/tests/extras 'PetitCompiler-Extras-Tests-LRP' 1 -PPCResources PPCResources stx:goodies/petitparser/compiler/tests/extras 'PetitCompiler-Extras-Tests-Support' 1 -PPCSetUpBeforeTearDownAfterResource PPCSetUpBeforeTearDownAfterResource stx:goodies/petitparser/compiler/tests/extras 'PetitCompiler-Extras-Tests-Support' 2 stx_goodies_petitparser_compiler_tests_extras stx_goodies_petitparser_compiler_tests_extras stx:goodies/petitparser/compiler/tests/extras '* Projects & Packages *' 3 PPCLRPAction PPCLRPAction stx:goodies/petitparser/compiler/tests/extras 'PetitCompiler-Extras-Tests-LRP' 0 PPCLRPCompiledParserSmokeTest PPCLRPCompiledParserSmokeTest stx:goodies/petitparser/compiler/tests/extras 'PetitCompiler-Extras-Tests-LRP' 1 @@ -36,6 +34,8 @@ PPCLL1ExpressionGrammarTest PPCLL1ExpressionGrammarTest stx:goodies/petitparser/compiler/tests/extras 'PetitCompiler-Extras-Tests-Expressions' 1 PPCLL1ExpressionGrammarTest_Tokenized PPCLL1ExpressionGrammarTest_Tokenized stx:goodies/petitparser/compiler/tests/extras 'PetitCompiler-Extras-Tests-Expressions' 1 PPCLL1ExpressionGrammarTest_Universal PPCLL1ExpressionGrammarTest_Universal stx:goodies/petitparser/compiler/tests/extras 'PetitCompiler-Extras-Tests-Expressions' 1 +PPCResources PPCResources stx:goodies/petitparser/compiler/tests/extras 'PetitCompiler-Extras-Tests-Support' 1 +PPCSetUpBeforeTearDownAfterResource PPCSetUpBeforeTearDownAfterResource stx:goodies/petitparser/compiler/tests/extras 'PetitCompiler-Extras-Tests-Support' 2 PPCSmalltalkGrammarTests PPCSmalltalkGrammarTests stx:goodies/petitparser/compiler/tests/extras 'PetitCompiler-Extras-Tests-Smalltalk' 1 PPCSmalltalkGrammarTests_Tokenized PPCSmalltalkGrammarTests_Tokenized stx:goodies/petitparser/compiler/tests/extras 'PetitCompiler-Extras-Tests-Smalltalk' 1 PPCSmalltalkGrammarTests_Universal PPCSmalltalkGrammarTests_Universal stx:goodies/petitparser/compiler/tests/extras 'PetitCompiler-Extras-Tests-Smalltalk' 1 diff -r 837963c607a6 -r 09afcf28ed60 compiler/tests/extras/stx_goodies_petitparser_compiler_tests_extras.st --- a/compiler/tests/extras/stx_goodies_petitparser_compiler_tests_extras.st Tue Aug 18 22:16:18 2015 +0100 +++ b/compiler/tests/extras/stx_goodies_petitparser_compiler_tests_extras.st Tue Aug 18 22:46:10 2015 +0100 @@ -101,7 +101,7 @@ by searching all classes (and their packages) which are referenced by my classes." ^ #( - #'stx:goodies/petitparser/compiler' "PPCConfiguration - referenced by PPCLRPCompiledParserSmokeTest_Tokenized>>compilerConfiguration" + #'stx:goodies/petitparser/compiler' "PPCConfiguration - referenced by PPCLRPCompiledParserSmokeTest_Universal>>compilerConfiguration" #'stx:goodies/petitparser/parsers/smalltalk' "PPSmalltalkParser - referenced by PPCLRPParser>>methodizeBlock:withArguments:" ) ! @@ -130,8 +130,6 @@ PPCLRPParser PPCLRPParserSmokeTest PPCLRPSourcesResource - (PPCResources autoload) - (PPCSetUpBeforeTearDownAfterResource autoload) (#'stx_goodies_petitparser_compiler_tests_extras' autoload) PPCLRPAction PPCLRPCompiledParserSmokeTest @@ -161,6 +159,8 @@ (PPCLL1ExpressionGrammarTest autoload) (#'PPCLL1ExpressionGrammarTest_Tokenized' autoload) (#'PPCLL1ExpressionGrammarTest_Universal' autoload) + (PPCResources autoload) + (PPCSetUpBeforeTearDownAfterResource autoload) (PPCSmalltalkGrammarTests autoload) (#'PPCSmalltalkGrammarTests_Tokenized' autoload) (#'PPCSmalltalkGrammarTests_Universal' autoload)