Skip to content

Commit

Permalink
daide string generation and tests
Browse files Browse the repository at this point in the history
resolves #26
  • Loading branch information
Byung committed Nov 8, 2022
1 parent ff9467b commit 0ebd10e
Show file tree
Hide file tree
Showing 4 changed files with 1,114 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/daidepp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
from daidepp.daide_visitor import daide_visitor
from daidepp.grammar import create_daide_grammar

from daidepp.keywords import *
170 changes: 170 additions & 0 deletions src/daidepp/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
from typing import Literal

POWER = Literal["AUS", "ENG", "FRA", "GER", "ITA", "RUS", "TUR"]
UNIT_TYPE = Literal["AMY", "FLT"]

PROVINCE_LAND_SEA = Literal[
"ALB",
"ANK",
"APU",
"ARM",
"BEL",
"BER",
"BRE",
"BUL",
"CLY",
"CON",
"DEN",
"EDI",
"FIN",
"GAS",
"GRE",
"HOL",
"KIE",
"LON",
"LVN",
"LVP",
"MAR",
"NAF",
"NAP",
"NWY",
"PIC",
"PIE",
"POR",
"PRU",
"ROM",
"RUM",
"SEV",
"SMY",
"SPA",
"STP",
"SWE",
"SYR",
"TRI",
"TUN",
"TUS",
"VEN",
"YOR",
"WAL",
]
PROVINCE_LANDLOCK = Literal[
"BOH",
"BUD",
"BUR",
"MOS",
"MUN",
"GAL",
"PAR",
"RUH",
"SER",
"SIL",
"TYR",
"UKR",
"VIE",
"WAR",
]
PROVINCE_SEA = Literal[
"ADR",
"AEG",
"BAL",
"BAR",
"BLA",
"BOT",
"EAS",
"ENG",
"HEL",
"ION",
"IRI",
"LYO",
"MAO",
"NAO",
"NTH",
"NWG",
"SKA",
"TYS",
"WES",
]
PROVINCE_COAST = Literal[
"STP NCS", "STP SCS", "SPA NCS", "SPA SCS", "BUL ECS", "BUL SCS"
]
PROVINCE = Literal[PROVINCE_LAND_SEA, PROVINCE_LANDLOCK, PROVINCE_SEA, PROVINCE_COAST]
PROVINCE_NO_COAST = Literal[PROVINCE_LAND_SEA, PROVINCE_LANDLOCK, PROVINCE_SEA]

SEASON = Literal["SPR", "SUM", "FAL", "AUT", "WIN"]

TRY_TOKENS = Literal[
"PRP",
"PCE",
"ALY",
"VSS",
"DRW",
"SLO",
"NOT",
"NAR",
"YES",
"REJ",
"BWX",
"FCT",
"XDO",
"DMZ",
"AND",
"ORR",
"SCD",
"OCC",
"CHO",
"INS",
"QRY",
"THK",
"IDK",
"SUG",
"HOW",
"WHT",
"EXP",
"SRY",
"FOR",
"IFF",
"XOY",
"YDO",
"SND",
"FWD",
"BCC",
"WHY",
"POB",
]

SUPPLY_CENTER = Literal[
"ANK",
"BEL",
"BER",
"BRE",
"BUD",
"BUL",
"CON",
"DEN",
"EDI",
"GRE",
"HOL",
"KIE",
"LON",
"LVP",
"MAR",
"MOS",
"MUN",
"NAP",
"NWY",
"PAR",
"POR",
"ROM",
"RUM",
"SER",
"SEV",
"SMY",
"SPA",
"STP",
"SWE",
"TRI",
"TUN",
"VEN",
"VIE",
"WAR",
]
Loading

0 comments on commit 0ebd10e

Please sign in to comment.