Skip to content

refactor char class creation#987

Merged
lsf37 merged 2 commits intomasterfrom
ccl-init
Jan 1, 2023
Merged

refactor char class creation#987
lsf37 merged 2 commits intomasterfrom
ccl-init

Conversation

@lsf37
Copy link
Member

@lsf37 lsf37 commented Dec 31, 2022

  • add test case for char class directives delete existing classes #986

  • move char class creation to after the entire spec has been parsed, so we definitively know the input char set

  • to do that, factor out char class creation from scanner and parser into own pass

  • to do that, make pre-defined classes and unicode property classes parts of the syntax tree as opposed to inline unfolded char sets

  • to do that, factor out regexp char class normalisation into own pass (separate from macro expansion), so that this normalisation can be done after pre-defined classes are converted to char sets

  • add error message for declaring input char set twice

  • make CharClasses.init() private (use constructor instead)

Fixes #986

@lsf37 lsf37 self-assigned this Dec 31, 2022
@lsf37 lsf37 added bug Not working as intended code quality Code health and clean-up labels Dec 31, 2022
@lsf37 lsf37 added this to the 1.9.0 milestone Dec 31, 2022
@lsf37 lsf37 force-pushed the ccl-init branch 2 times, most recently from f2e076c to dc688b1 Compare December 31, 2022 23:33
- move char class creation to after the entire spec has been parsed,
  so we definitively know the input char set
- to do that, factor out char class creation from scanner and parser
  into own pass
- to do that, make pre-defined classes and unicode property classes
  parts of the syntax tree as opposed to inline unfolded char sets
- to do that, factor out regexp char class normalisation into own
  pass (separate from macro expansion), so that this normalisation can
  be done after pre-defined classes are converted to char sets
- add error message for declaring input char set twice
- make CharClasses.init() private (use constructor instead)

Fixes #986
@lsf37 lsf37 merged commit 32f1be8 into master Jan 1, 2023
@lsf37 lsf37 deleted the ccl-init branch January 1, 2023 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Not working as intended code quality Code health and clean-up

Projects

None yet

Development

Successfully merging this pull request may close these issues.

char class directives delete existing classes

1 participant