@@ -427,6 +427,7 @@ abstract class RegexString extends Expr {
427427 }
428428
429429 predicate normalCharacter ( int start , int end ) {
430+ end = start + 1 and
430431 this .character ( start , end ) and
431432 not this .specialCharacter ( start , end , _)
432433 }
@@ -447,16 +448,16 @@ abstract class RegexString extends Expr {
447448 }
448449
449450 /**
450- * A sequence of 'simple ' characters.
451+ * Holds if the range [start:end) consists of only 'normal ' characters.
451452 */
452- predicate simpleCharacterSequence ( int start , int end ) {
453- // a simple character inside a character set is interpreted on its own
454- this .simpleCharacter ( start , end ) and
453+ predicate normalCharacterSequence ( int start , int end ) {
454+ // a normal character inside a character set is interpreted on its own
455+ this .normalCharacter ( start , end ) and
455456 this .inCharSet ( start )
456457 or
457- // a maximal run of simple characters is considered as one constant
458+ // a maximal run of normal characters is considered as one constant
458459 exists ( int s , int e |
459- e = max ( int i | simpleCharacterRun ( s , i ) ) and
460+ e = max ( int i | this . normalCharacterRun ( s , i ) ) and
460461 not this .inCharSet ( s )
461462 |
462463 // 'abc' can be considered one constant, but
@@ -474,17 +475,17 @@ abstract class RegexString extends Expr {
474475 )
475476 }
476477
477- private predicate simpleCharacterRun ( int start , int end ) {
478+ private predicate normalCharacterRun ( int start , int end ) {
478479 (
479- simpleCharacterRun ( start , end - 1 )
480+ this . normalCharacterRun ( start , end - 1 )
480481 or
481- start = end - 1 and not normalCharacter ( start - 1 , start )
482+ start = end - 1 and not this . normalCharacter ( start - 1 , start )
482483 ) and
483- this .simpleCharacter ( end - 1 , end )
484+ this .normalCharacter ( end - 1 , end )
484485 }
485486
486487 private predicate characterItem ( int start , int end ) {
487- this .simpleCharacterSequence ( start , end ) or
488+ this .normalCharacterSequence ( start , end ) or
488489 this .escapedCharacter ( start , end ) or
489490 this .specialCharacter ( start , end , _)
490491 }
0 commit comments