Skip to content

Commit

Permalink
Handle direct-dieback in homeworld trade codes
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberiaResurrection committed Dec 27, 2024
1 parent bb0b903 commit 3a0ea23
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions PyRoute/Inputs/StarlineParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ class StarlineParser:
BLANK: / /
BINARY.3: /[A-Z][a-z]/
POPCODE.3: /[A-Z][a-z!]{1,3}[W\d]{0,1}/
MINOR_SOPHONT.3: /\([^\)\{\(]{1,}\)[W\d\?]{0,1}/
MINOR_SOPHONT.3: /\([^\)\{\(]{1,}\)[WX\d\?]{0,1}/
MINOR_DIEBACK.3: /Di\([^\)]{1,}\)[\d]{0,1}/
MAJOR_SOPHONT.3: /\[[^\]\{]{1,}\][W\d\?]{0,1}/
MAJOR_SOPHONT.3: /\[[^\]\{]{1,}\][WX\d\?]{0,1}/
OWNED_COLONY.3: /[OC]:[X\d\?]{0,4}/ | /[OC]:[A-Z][A-Za-z]{3,3}[-\:]{0,1}\d{4,4}/
RESIDUAL.2: /[0-9A-Za-z?\-+*()\'\{\}\[\]]{2,}/
SINGLETON: /[0-9AC-Za-z\+\*()?\']/
Expand Down
4 changes: 2 additions & 2 deletions PyRoute/Inputs/StarlineStationParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ class StarlineStationParser:
BLANK: / /
BINARY.3: /[A-Z][a-z]/
POPCODE.3: /[A-Z][a-z!]{1,3}[W\d]{0,1}/
MINOR_SOPHONT.3: /\([^\)\{\(]{1,}\)[W\d\?]{0,1}/
MINOR_SOPHONT.3: /\([^\)\{\(]{1,}\)[WX\d\?]{0,1}/
MINOR_DIEBACK.3: /Di\([^\)]{1,}\)[\d]{0,1}/
MAJOR_SOPHONT.3: /\[[^\]\{]{1,}\][W\d\?]{0,1}/
MAJOR_SOPHONT.3: /\[[^\]\{]{1,}\][WX\d\?]{0,1}/
OWNED_COLONY.3: /[OC]:[X\d\?]{0,4}/ | /[OC]:[A-Z][A-Za-z]{3,3}[-\:]{0,1}\d{4,4}/
RESIDUAL.2: /[0-9A-Za-z?\-+*()\'\{\}\[\]]{2,}/
SINGLETON: /[0-9AC-Za-z\+\*()?\']/
Expand Down
1 change: 1 addition & 0 deletions Tests/Hypothesis/testStar.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ def setUp(self) -> None:
@example('0101 000000000000000 ???????-? [0000000000)(]( - - A 000 00)')
@example('0101 000000000000000 ???????-? [000000000000000000000000000000000000]? - - A 000 00')
@example('0101 02111111111111) ???????-? [oPrh00011111GitpHqwhA{KRNf{rpjqI}7bj]A - - B 000 100')
@example('0101 000000000000000 ???????-? [0000000)(]X [ - - B 001 100')
def test_parse_line_to_star(self, s):
hyp_line = "Hypothesis input: " + s
sector = Sector('# Core', '# 0, 0')
Expand Down

0 comments on commit 3a0ea23

Please sign in to comment.