add SOFT_PHRASE break and enable parsing

Also enables parsing of PART breaks.
This commit is contained in:
Sarah Hoffmann
2025-01-06 17:10:24 +01:00
parent 14ecfc7834
commit 499110f549
4 changed files with 20 additions and 4 deletions

View File

@@ -21,7 +21,13 @@ class BreakType(enum.Enum):
END = '>'
""" End of the query. """
PHRASE = ','
""" Break between two phrases. """
""" Hard break between two phrases. Address parts cannot cross hard
phrase boundaries."""
SOFT_PHRASE = ':'
""" Likely break between two phrases. Address parts should not cross soft
phrase boundaries. Soft breaks can be inserted by a preprocessor
that is analysing the input string.
"""
WORD = ' '
""" Break between words. """
PART = '-'