Skip to content

v0.11.0

Choose a tag to compare

@CodesAway CodesAway released this 23 Aug 22:23
· 32 commits to master since this release
6d2cd8b

Added

  • Support for parsing SQL

    • Includes support for ensuring BEGIN / END delimiters are balanced in a match
    • Added support for matching custom delimiters in a language (like BEGIN / END for SQL)
    • Method BEXMatchingUtilities.parseSQLTextStates
  • MatchingLanguage interface

    • Allows users to define custom language, if a sutable one isn't implemented
    • For example, this would be used to allow writing a parser to match language specific keywords (no plans / need to implement in BEX Matching, but user could implement for their own needs)
  • Part of custom delimiters

    • MatchingLanguage methods

      • findStartDelimiter
      • findEndDelimiter
    • BEXMatcher now internally tracks the MatchingLanguage, so that custom delimiters can be matched as part of a search

    • Internal BEXMatchingState changed to accept collection of delimiters versus a String of brackets

    • Enum MatchingDelimiterResult

    • Class MatchingDelimiterState

    • Interface MatchingLanguageSetting

      • No methods to implement
      • Used just to indicate a setting, so can write custom settings (trying to be flexible in design)
    • MatchingLanguageOption (implements MatchingLanguageSetting)

  • MatchingStateOption interface (implemented by BEXMatchingStateOption)

  • BEXMatchingUtilities

    • Method hasText which takes parameter to indicate if text search should be case-insensitive
    • Method hasCaseInsensitiveText
  • hashCode / equals method in BEXListPair and BEXMapPair (per SpotBugs warning)

Changed

  • BEXMatchingLanguage renamed extract method to parse

  • BEXMatchingUtilities renamed various extract methods to parse

  • BEXMatchingStateOption renamed MISMATCHED_BRACKETS to MISMATCHED_DELIMITERS

  • Changed to use MatchingStateOption interface instead of BEXMatchingStateOption enum

    • BEXMatcher
    • BEXMatchingUtilities
    • BEXString
  • BEXString keeps track of MatchingLanguage used when parser (helps BEXMatcher handle custom delimiters)

  • Minor tweaks to how BEXPattern caches patterns (ran into corner case with tests that checked for cached patterns)