equal
deleted
inserted
replaced
6 instanceVariableNames:'' |
6 instanceVariableNames:'' |
7 classVariableNames:'' |
7 classVariableNames:'' |
8 poolDictionaries:'' |
8 poolDictionaries:'' |
9 category:'PetitCompiler-Extras-Tests-Smalltalk' |
9 category:'PetitCompiler-Extras-Tests-Smalltalk' |
10 ! |
10 ! |
11 |
|
12 |
11 |
13 !PPCSmalltalkGrammarTests class methodsFor:'resources'! |
12 !PPCSmalltalkGrammarTests class methodsFor:'resources'! |
14 |
13 |
15 resources |
14 resources |
16 ^ Array with: (PPCSetUpBeforeTearDownAfterResource for: self) |
15 ^ Array with: (PPCSetUpBeforeTearDownAfterResource for: self) |
42 ^ (self petitParserClass name , 'C_' , |
41 ^ (self petitParserClass name , 'C_' , |
43 "This is bit hacky!!" |
42 "This is bit hacky!!" |
44 ((self compilerConfiguration isKindOf: PPCTokenizingConfiguration) ifTrue:[ 'Tokenizing' ] ifFalse:[ 'Universal' ])) asSymbol |
43 ((self compilerConfiguration isKindOf: PPCTokenizingConfiguration) ifTrue:[ 'Tokenizing' ] ifFalse:[ 'Universal' ])) asSymbol |
45 |
44 |
46 "Created: / 29-07-2015 / 16:54:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
45 "Created: / 29-07-2015 / 16:54:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
46 ! |
|
47 |
|
48 compiledScannerClassName |
|
49 "Return the name of the compiled parser" |
|
50 |
|
51 ^ (self petitParserClass name , 'C_Scanner') asSymbol |
47 ! |
52 ! |
48 |
53 |
49 compilerConfiguration |
54 compilerConfiguration |
50 "Return configuration to use when compiling parser (as instance of PPCConfiguration)" |
55 "Return configuration to use when compiling parser (as instance of PPCConfiguration)" |
51 |
56 |
89 "Called before any of my tests is run (when resources are set up)" |
94 "Called before any of my tests is run (when resources are set up)" |
90 | time configuration | |
95 | time configuration | |
91 |
96 |
92 configuration := self compilerConfiguration. |
97 configuration := self compilerConfiguration. |
93 configuration arguments parserName: self compiledParserClassName. |
98 configuration arguments parserName: self compiledParserClassName. |
|
99 configuration arguments scannerName: self compiledScannerClassName. |
|
100 |
94 time := Time millisecondsToRun: [ |
101 time := Time millisecondsToRun: [ |
95 self petitParser compileWithConfiguration: configuration. |
102 self petitParser compileWithConfiguration: configuration. |
96 ]. |
103 ]. |
97 Transcript show: self petitParserClass name ; show:' compiled in: '; show: time asString; show: 'ms'; cr. |
104 Transcript show: self petitParserClass name ; show:' compiled in: '; show: time asString; show: 'ms'; cr. |
98 |
105 |
104 "Called after all my tests are ryn(when resources are torn down)" |
111 "Called after all my tests are ryn(when resources are torn down)" |
105 |
112 |
106 "Created: / 29-07-2015 / 16:33:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
113 "Created: / 29-07-2015 / 16:33:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
107 ! ! |
114 ! ! |
108 |
115 |
109 !PPCSmalltalkGrammarTests class methodsFor:'documentation'! |
|
110 |
|
111 version |
|
112 ^ 'Path: stx/goodies/petitparser/compiler/tests/extras/PPCSmalltalkGrammarTests.st, Version: 1.0, User: jv, Time: 2015-07-30T07:31:30.012+01' |
|
113 ! |
|
114 |
|
115 version_HG |
|
116 ^ 'Path: stx/goodies/petitparser/compiler/tests/extras/PPCSmalltalkGrammarTests.st, Version: 1.0, User: jv, Time: 2015-07-30T07:31:30.012+01' |
|
117 ! ! |
|
118 |
|