The Trunk: Regex-Core-ul.49.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Regex-Core-ul.49.mcz

commits-2
Levente Uzonyi uploaded a new version of Regex-Core to project The Trunk:
http://source.squeak.org/trunk/Regex-Core-ul.49.mcz

==================== Summary ====================

Name: Regex-Core-ul.49
Author: ul
Time: 28 March 2016, 2:19:08.381924 am
UUID: 1cd17ad2-154c-4667-8211-ea6b76c1df92
Ancestors: Regex-Core-ul.48

- don't bother calling the match optimizer when it can't optimize anything. just throw it away instead
- removed some leftover methods from RxMatcher, RxmLookahead and RxmSubstring

=============== Diff against Regex-Core-ul.48 ===============

Item was changed:
  ----- Method: RxMatchOptimizer>>canStartMatch:in: (in category 'accessing') -----
  canStartMatch: aCharacter in: aMatcher
  "Answer whether a match could commence at the given lookahead
  character, or in the current state of <aMatcher>. True answered
  by this method does not mean a match will definitly occur, while false
  answered by this method *does* guarantee a match will never occur."
 
  aCharacter ifNil: [ ^true ].
- testBlock ifNil: [ ^true ].
  ^testBlock value: aCharacter value: aMatcher!

Item was added:
+ ----- Method: RxMatchOptimizer>>hasTestBlock (in category 'testing') -----
+ hasTestBlock
+
+ ^testBlock notNil!

Item was removed:
- ----- Method: RxMatcher>>atEnd (in category 'streaming') -----
- atEnd
-
- ^stream atEnd!

Item was changed:
  ----- Method: RxMatcher>>initialize:ignoreCase: (in category 'initialize-release') -----
  initialize: syntaxTreeRoot ignoreCase: aBoolean
  "Compile thyself for the regex with the specified syntax tree.
  See comment and `building' protocol in this class and
  #dispatchTo: methods in syntax tree components for details
  on double-dispatch building.
  The argument is supposedly a RxsRegex."
 
  ignoreCase := aBoolean.
  self buildFrom: syntaxTreeRoot.
  self initializeMarkerPositions.
+ startOptimizer := RxMatchOptimizer new initialize: syntaxTreeRoot ignoreCase: aBoolean.
+ startOptimizer hasTestBlock ifFalse: [
+ startOptimizer := nil ]!
- startOptimizer := RxMatchOptimizer new initialize: syntaxTreeRoot ignoreCase: aBoolean!

Item was removed:
- ----- Method: RxMatcher>>lastResult (in category 'accessing') -----
- lastResult
-
- ^lastResult!

Item was removed:
- ----- Method: RxMatcher>>next (in category 'streaming') -----
- next
- ^ stream next!

Item was removed:
- ----- Method: RxmLookahead>>lookahead (in category 'accessing') -----
- lookahead
- ^ lookahead!

Item was removed:
- ----- Method: RxmSubstring>>character:ignoreCase: (in category 'initialize-release') -----
- character: aCharacter ignoreCase: aBoolean
- "Match exactly this character."
-
- sampleStream := (String with: aCharacter) readStream.
- ignoreCase := aBoolean!