Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCP: PCRE2 support. #424

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

SCP: PCRE2 support. #424

wants to merge 2 commits into from

Commits on Sep 27, 2024

  1. SCP: PCRE2 support.

    Add PCRE2 support as an alternative to the original PCRE. PCRE2 is
    actively maintained and has a cleaner API than its predecessor.
    
    - Use a function interface around regular expressions to isolate and
      reduce the preprocessor #if/#endif forest. Abide by a single function
      declaration/implementation approach, vs. multiple function
      implentations within an #if/#endif forest.
    
    - Clean up the code so that work isn't recreated or duplicated, such as
      compiling regexps.
    
    Platform notes:
    
    - cmake: PCRE2 is the default RegEx support. To revert to PCRE, add
      "-DPREFER_PCRE" to the cmake configuration command line.
    
    - makefile: PCRE remains the default RegEx support out of respect for
      tradition (cue Chaim Topol singing "Tradition".) Enable PCRE2 by
      defining "USE_PCRE2=<some value>" from the make command line or shell
      environment.
    
    - Visual Studio Projects: Untouched. Externally built libraries provide
      regular expression support residing in a specific place in the file
      system, which is outside the control of SIMH proper.
    
    sim_defs.h:
    
    - Change EXPECT::size from int32 to size_t for increased
      cross-platform/64-bit compatibility (i.e., array indices and offsets
      should be size_t, where practicable.)
    
    - Add typedefs for EXPECT regex support independence: sim_regex_t,
      sim_re_capture_t.
    
    - Add regular expression context to EXPTAB that maintains state when
      processing the captured matches, making the function interface clean.
      Tracks intermediate state while processing captured matches.
    bscottm committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    f008ac7 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2024

  1. Makfile: PCRE2 default

    Remove the USE_PCRE2 makefile variable so that the makefile's
    configuration searches for PCRE2 and falls back to PCRE if not found.
    bscottm committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    d5fe32c View commit details
    Browse the repository at this point in the history