|
tuple | ExpressReader.re_match_entity = re.compile(r"""ENTITY\s+(\w+)\s* # 'ENTITY foo'.*? # skip SUPERTYPE-of(?:SUBTYPE\s+OF\s+\((\w+)\))?; # 'SUBTYPE OF (bar);' or simply ';'(.*?) # 'a : atype;' (0 or more lines like this)(?:(?:INVERSE|UNIQUE|WHERE)\s*$.*?)? # skip the INVERSE, UNIQUE, WHERE clauses and everything behind END_ENTITY; """,re.VERBOSE|re.DOTALL|re.MULTILINE) |
|
tuple | ExpressReader.re_match_field = re.compile(r"""\s+(\w+?)\s*:\s*(OPTIONAL)?\s*((?:LIST|SET)\s*\[\d+:[\d?]+\]\s*OF)?(?:\s*UNIQUE)?\s*(\w+?);""",re.VERBOSE|re.DOTALL) |
|
tuple | ExpressReader.re_match_type = re.compile(r"""TYPE\s+(\w+?)\s*=\s*((?:LIST|SET)\s*\[\d+:[\d?]+\]\s*OF)?(?:\s*UNIQUE)?\s*(\w+) # TYPE foo = LIST[1:2] of blub(?:(?<=ENUMERATION)\s*OF\s*\((.*?)\))?.*? # skip the WHERE clauseEND_TYPE;""",re.VERBOSE|re.DOTALL) |
|