Complex sentence: An ensign is a national flag when used at sea as a country's maritime flag, in vexillology, or a distinguishing token, emblem, or badge, such as a symbol of office in heraldry.
Split into simpler sentences: An ensign is a national flag when used at sea as a country's maritime flag. It serves as a distinguishing token, emblem, or badge, such as a symbol of office in heraldry.