Skip to content

Commit

Permalink
regenerating category characters: Finally can compile new generated c…
Browse files Browse the repository at this point in the history
…ategories
  • Loading branch information
curious-odd-man committed Feb 23, 2024
1 parent 112def4 commit 9e46077
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 104 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import static com.github.curiousoddman.rgxgen.model.SymbolRange.range;
import static com.github.curiousoddman.rgxgen.model.UnicodeCategory.DECIMAL_DIGIT_NUMBER;
import static com.github.curiousoddman.rgxgen.model.UnicodeCategoryConstants.LATIN_LOWERCASE;
import static com.github.curiousoddman.rgxgen.model.UnicodeCategoryConstants.BASIC_LATIN_LOWERCASE_LATIN_ALPHABET;
import static com.github.curiousoddman.rgxgen.parsing.dflt.ConstantsProvider.*;
import static java.util.Arrays.asList;
import static java.util.Arrays.stream;
Expand Down Expand Up @@ -408,18 +408,18 @@ public enum TestPattern implements DataInterface {
CATEGORY_WITHIN_SQUART_BRACKETS("[a-z\\p{Nd}]{2}", new Repeat("[a-z\\p{Nd}]{2}",
SymbolSet.ofUnicode("\\p{Decimal_Digit_Number}",
Stream.concat(
Stream.of(LATIN_LOWERCASE),
Stream.of(BASIC_LATIN_LOWERCASE_LATIN_ALPHABET),
DECIMAL_DIGIT_NUMBER.getSymbolRanges().stream())
.collect(Collectors.toList()),
ZERO_LENGTH_CHARACTER_ARRAY, MatchType.POSITIVE), 2)) {{
setAllUniqueValues(
Stream.concat(
getRangeSymbolStream(LATIN_LOWERCASE),
getRangeSymbolStream(BASIC_LATIN_LOWERCASE_LATIN_ALPHABET),
getSymbolStream(DECIMAL_DIGIT_NUMBER)
)
.sorted(Comparator.naturalOrder())
.flatMap(c -> Stream
.concat(getRangeSymbolStream(LATIN_LOWERCASE), getSymbolStream(DECIMAL_DIGIT_NUMBER))
.concat(getRangeSymbolStream(BASIC_LATIN_LOWERCASE_LATIN_ALPHABET), getSymbolStream(DECIMAL_DIGIT_NUMBER))
.sorted(Comparator.naturalOrder())
.map(cc -> c + cc))
.collect(Collectors.toList()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import com.github.curiousoddman.rgxgen.model.SymbolRange;
import com.github.curiousoddman.rgxgen.model.UnicodeCategory;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import java.io.IOException;
Expand All @@ -34,7 +35,7 @@
import static com.github.curiousoddman.rgxgen.testutil.TestingUtilities.makeUnicodeCharacterArray;

@SuppressWarnings({"TestMethodWithoutAssertion", "NewClassNamingConvention"})
//@Disabled("Generator - not a test")
@Disabled("Generator - not a test")
public class UnicodeCategoryGeneration {

public static final Path SYMBOL_RANGE_DUMP_PATH = Paths.get("data/symbols");
Expand Down
198 changes: 99 additions & 99 deletions testdata/casesensitive/matching/CATEGORY_WITHIN_SQUART_BRACKETS.txt
Original file line number Diff line number Diff line change
@@ -1,100 +1,100 @@
꤀৬
߀꧖
꘥4
꧷४
꘨꩑
౯꯶
߁၈
٦᧑
꩓᱑
౫᪙
߁᭓
໐੨
୭٦
꣑᪂
༨୮
᠙꣓
১꩘
၄꘢
၀3
௯൫
᱁᥏
᧑᪄
໗꧕
۸২
੩꤀
j૨
෧७
໙᪓
᱒៨
໒᪇
៤꤂
५௭
꤅꤈
߀꯳
꤆೨
၉꧹
᱖௭
꧐᧘
᱖൨
໖८
౩4
꧰౪
1৫
୯៥
s౮
൫۴
᱒༧
꤅໗
३੨
߇᪇
٦෪
๔᠒
၁꧕
09
೩௧
٨꯱
꣘꤂
꤅߉
۱꯰
౩᪆
᠐᱑
٢३
꯹୬
౨᪔
३൩
๖١
꧶c
၆೮
꧗g
൯꯰
᧖᪗
१m
3୪
8᠕
༢꩘
੫๑
᧘᪖
꧸꧒
꣖᥏
᠓7
۸໑
৫๒
༧෧
᭒᭓
o꤈
௬꣘
꧔߃
᱂෩
໙r
୧৮
୦᭓
꘥᮴
꯹৪
႖m
༠౪
୯9
٦൫
٧꘠
᥎꧑
୬๖
᧙᠐
᱓꯴
0᪅
៧᮰
꤇᱒
٤᠕
߉୩
᱁१
᪁૯
८᱆
੯꧴
᱕꧒
᪆४
꘩᮹
꣓꘤
᧖๖
৪٥
૩௭
੭᱉
꧹᪂
૫z
༢߄
३᱀
၃૬
꯹꧹
᪉z
᮸۶
༦᧙
৪q
z3
႗௦
၈᪁
᪒٤
꣑꧱
६۳
٢௬
꤈꤀
๐᭖
᪓᠖
᮲᭔
꤅៧
᭑꯷
᥌২
᠕8
೦᱕
๙௧
᱙෮
௫꤁
꯶꧗
೬꣐
෪৪
௯᱃
᥆૫
၅௭
꘢১
๔໖
٣᱑
५੦
෧6
౦૧
၂৫
᱗٨
꯰᠐
᧑૩
໐᪃
౦༦
꧰០
᭑༦
b᮲
꧐꧷
௯႔
᠙᱒
๖꩙
௨꣖
꩓᠗
०꣖
౦c
߈7
᭕꧱
൮૫
೩꧐
౧᧑
۸᠗
୦᱈
߂൨
꯰᪇
᱈১
᮳၅
꤃᱈
꧒੩
໑၀
pi
꩔᮶
꤀௬
᱙੭
៤٧
꧹৪
߂᭗

0 comments on commit 9e46077

Please sign in to comment.