Skip to content

Commit

Permalink
Added contexts and changed how pcre2_compile_java()-method is called (#2
Browse files Browse the repository at this point in the history
)

* 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.
  • Loading branch information
Tiihott authored Jan 13, 2023
1 parent 7aa0f32 commit 0475b94
Show file tree
Hide file tree
Showing 10 changed files with 1,255 additions and 829 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ target/
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/misc.xml
.idea/vcs.xml
.idea/libraries/
/.idea/
*.iws
*.iml
*.ipr
Expand Down
14 changes: 0 additions & 14 deletions .idea/misc.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

540 changes: 0 additions & 540 deletions .idea/workspace.xml

This file was deleted.

11 changes: 11 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,17 @@
<version>5.9.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.5</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.5</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
Loading

0 comments on commit 0475b94

Please sign in to comment.