Skip to content

Commit 0475b94

Browse files
authored
Added contexts and changed how pcre2_compile_java()-method is called (#2)
* Changed how compile function length parameter is passed to pcre2. Added context parametrization. Added extra_options parametrization for pcre2_compile. * Cleaned up code * Added IDE settings to gitignore, added slf4j for error logging, added rc parameter to RegexStruct for passing match error codes to java. * Added IDE settings to gitignore again * Added IDE settings to gitignore again 2 * Added IDE settings to gitignore again 3 * Added slf4j-simple dependency, removed slf4j-nop dependency, added slf4j tests, changed no-match logging level to debug, added IllegalStateExcecption and IllegalArgumentException for error handling where relevant. * Added errorcode cases to match error handling. * Overhauled pcre2_compile_java() to return a struct with both compile data and error data. Ready to implement pcre2_get_error_message() to translate error codes to textual error messages in java. * Added pcre2_translate_error_code() function for getting textual error messages * Added PatternSyntaxException for pcre2_jcompile() * Improved match exception handling and added more test cases. * Removed redundant logging from exception handling. * Added pcre2_get_utf8(), pcre2_check_utf8(), checkoptionzero() and pcre2_get_crlf_is_newline() functions for handling the recoverable matching errors. * Fixed compile context memory release bug. Creating comprehensive example for using the library and all its functions. * Fixed bug in matching error handling. * Fixed bugs, polished Main()-function example, found confusing bug around pcre2_translate_error_code() which still needs attention. * Replaced broken pcre2_translate_error_code() with working pcre2_translate_error_code_alternative(). * Fixed nullpointerexception (hopefully) * Fixed nullpointerexception (again) * Fixed pcre2_translate_error_code_alternative() malloc error handling * fixed bugs in matching exception handling, adding assertions to tests * fixed checkoptionzero() * fixed stuff, cleaned up code, added assertions to test cases. * Changed slf4j-simple scope to test * fixing test cases and example * Fixed enforcing the execution of assertions in test cases.
1 parent 7aa0f32 commit 0475b94

10 files changed

Lines changed: 1255 additions & 829 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ target/
77
.idea/modules.xml
88
.idea/jarRepositories.xml
99
.idea/compiler.xml
10+
.idea/misc.xml
11+
.idea/vcs.xml
1012
.idea/libraries/
13+
/.idea/
1114
*.iws
1215
*.iml
1316
*.ipr

.idea/misc.xml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.idea/vcs.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.idea/workspace.xml

Lines changed: 0 additions & 540 deletions
This file was deleted.

pom.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,17 @@
4040
<version>5.9.0</version>
4141
<scope>test</scope>
4242
</dependency>
43+
<dependency>
44+
<groupId>org.slf4j</groupId>
45+
<artifactId>slf4j-api</artifactId>
46+
<version>2.0.5</version>
47+
</dependency>
48+
<dependency>
49+
<groupId>org.slf4j</groupId>
50+
<artifactId>slf4j-simple</artifactId>
51+
<version>2.0.5</version>
52+
<scope>test</scope>
53+
</dependency>
4354
</dependencies>
4455
<build>
4556
<plugins>

0 commit comments

Comments
 (0)