miaowware / ctyparser

A CTY.DAT parser for modern amateur radio programs
https://ctyparser.miaow.io/
MIT License
4 stars 2 forks source link

dev documentation for parsing #46

Open classabbyamp opened 3 years ago

classabbyamp commented 3 years ago

explain what happens, relation to spec, etc

obi134 commented 3 years ago

Don't want to loose this explanation for the data regex:

    # explanation:
    # starting with optional '=' 
    #     (If an alias prefix is preceded by ‘=’, this indicates that the 
    #      prefix is to be treated as a full callsign, i.e. must be an exact match.)
    # Named group 'prefix': one or more of characters (both cases), numbers and '/'
    # Optional non-capturing group, named group 'cq' inside of '()' capturing numbers 
    #     ((#) Override CQ Zone)
    # Optional non-capturing group, named group 'itu' inside of '[]' capturing numbers 
    #     ([#] Override ITU Zone)
    # Optional named group 'latlong', inside of '<>' two named groups 'lat' and 'long' separated by '/'
    #     (<#/#> Override latitude/longitude)
    # Optional non-capturing group, named group 'continent' inside of '{}' capturing characters 
    #     ({aa} Override Continent)
    # Optional non-capturing group, named group 'tz' inside of '~~' 
    #     (~#~ Override local time offset from GMT)