{
  "name": "MET Base",
  "version": "1.0.0",
  "description": "MET: Base grammar for SIGMET/AIRMET",
  "tokens": {
    "firId": {
      "pattern": "^[A-Z]{4}$",
      "category": "location",
      "description": "ICAO location indicator of FIR/CTA"
    },
    "firIdArea": {
      "pattern": "^[A-Z]{4}$",
      "category": "location",
      "description": "ICAO location indicator of affected FIR/CTA area"
    },
    "sequenceNumber": {
      "pattern": "^[A-Z]?\\d{1,3}$",
      "category": "identifier",
      "description": "Message sequence number [A-Z]n[n][n]",
      "placeholder": { "value": "1", "editable": [{ "start": 0, "end": 1 }] }
    },
    "valid": {
      "pattern": "^VALID$",
      "category": "keyword",
      "description": "Validity keyword"
    },
    "validityPeriod": {
      "pattern": "^\\d{6}/\\d{6}$",
      "category": "datetime",
      "description": "Validity period DDHHmm/DDHHmm",
      "placeholder": {
        "value": "0000/0000",
        "editable": [
          {
            "start": 0,
            "end": 2
          },
          {
            "start": 2,
            "end": 4
          },
          {
            "start": 5,
            "end": 7
          },
          {
            "start": 7,
            "end": 9
          }
        ]
      }
    },
    "mwoId": {
      "pattern": "^[A-Z]{4}-$",
      "category": "location",
      "description": "MWO location indicator with hyphen",
      "placeholder": {
        "value": "AAAA-",
        "editable": [
          {
            "start": 0,
            "end": 4
          }
        ]
      }
    },
    "firName": {
      "pattern": "^[A-Z][A-Z\\s]{1,20}$",
      "category": "location",
      "description": "FIR/CTA name",
      "placeholder": {
        "value": "NAME",
        "editable": [
          {
            "start": 0,
            "end": 4
          }
        ]
      }
    },
    "fir": {
      "pattern": "^FIR$",
      "category": "keyword",
      "description": "Flight Information Region"
    },
    "uir": {
      "pattern": "^UIR$",
      "category": "keyword",
      "description": "Upper Information Region"
    },
    "firUir": {
      "pattern": "^FIR/UIR$",
      "category": "keyword",
      "description": "Flight Information Region / Upper Information Region"
    },
    "cta": {
      "pattern": "^CTA$",
      "category": "keyword",
      "description": "Control Area"
    },
    "firNumber": {
      "pattern": "^/\\d{1,2}$",
      "category": "identifier",
      "description": "FIR subdivision number"
    },
    "statusTest": {
      "pattern": "^TEST$",
      "category": "status",
      "description": "Test message indicator"
    },
    "statusExer": {
      "pattern": "^EXER$",
      "category": "status",
      "description": "Exercise message indicator"
    },
    "cnl": {
      "pattern": "^CNL$",
      "category": "keyword",
      "description": "Cancel keyword"
    },
    "cnlSequence": {
      "pattern": "^[A-Z]?\\d{1,3}$",
      "category": "identifier",
      "description": "Cancelled message sequence number"
    },
    "cnlValidity": {
      "pattern": "^\\d{6}/\\d{6}$",
      "category": "datetime",
      "description": "Cancelled message validity period"
    },
    "obs": {
      "pattern": "^OBS$",
      "category": "keyword",
      "description": "Observed"
    },
    "fcst": {
      "pattern": "^FCST$",
      "category": "keyword",
      "description": "Forecast"
    },
    "at": {
      "pattern": "^AT$",
      "category": "keyword",
      "description": "AT keyword"
    },
    "obsTime": {
      "pattern": "^\\d{4}Z$",
      "category": "datetime",
      "description": "Observation/forecast time HHmmZ",
      "placeholder": { "value": "0000Z", "editable": [{ "start": 0, "end": 4 }] }
    },
    "coordinate": {
      "pattern": "^[NS]\\d{2,4}\\s[EW]\\d{3,5}$",
      "category": "location",
      "description": "Geographic coordinate Nnn[nn] Ennn[nn] or Snn[nn] Wnnn[nn]",
      "placeholder": { "value": "N0000 E00000", "editable": [{ "start": 0, "end": 5 }, { "start": 6, "end": 12 }] }
    },
    "coordinateSimple": {
      "pattern": "^[NS]\\d{2,4}$",
      "category": "location",
      "description": "Simple latitude coordinate Nnn[nn] or Snn[nn]",
      "placeholder": { "value": "N00", "editable": [{ "start": 1, "end": 3 }] }
    },
    "coordinateLon": {
      "pattern": "^[EW]\\d{3,5}$",
      "category": "location",
      "description": "Simple longitude coordinate Ennn[nn] or Wnnn[nn]",
      "placeholder": { "value": "E000", "editable": [{ "start": 1, "end": 4 }] }
    },
    "coordinateSeparator": {
      "pattern": "^-$",
      "category": "keyword",
      "description": "Coordinate separator"
    },
    "nOf": {
      "pattern": "^N OF$",
      "category": "keyword",
      "description": "North of"
    },
    "sOf": {
      "pattern": "^S OF$",
      "category": "keyword",
      "description": "South of"
    },
    "eOf": {
      "pattern": "^E OF$",
      "category": "keyword",
      "description": "East of"
    },
    "wOf": {
      "pattern": "^W OF$",
      "category": "keyword",
      "description": "West of"
    },
    "and": {
      "pattern": "^AND$",
      "category": "keyword",
      "description": "AND conjunction"
    },
    "nOfLine": {
      "pattern": "^N OF LINE$",
      "category": "keyword",
      "description": "North of line"
    },
    "neOfLine": {
      "pattern": "^NE OF LINE$",
      "category": "keyword",
      "description": "Northeast of line"
    },
    "eOfLine": {
      "pattern": "^E OF LINE$",
      "category": "keyword",
      "description": "East of line"
    },
    "seOfLine": {
      "pattern": "^SE OF LINE$",
      "category": "keyword",
      "description": "Southeast of line"
    },
    "sOfLine": {
      "pattern": "^S OF LINE$",
      "category": "keyword",
      "description": "South of line"
    },
    "swOfLine": {
      "pattern": "^SW OF LINE$",
      "category": "keyword",
      "description": "Southwest of line"
    },
    "wOfLine": {
      "pattern": "^W OF LINE$",
      "category": "keyword",
      "description": "West of line"
    },
    "nwOfLine": {
      "pattern": "^NW OF LINE$",
      "category": "keyword",
      "description": "Northwest of line"
    },
    "wi": {
      "pattern": "^WI$",
      "category": "keyword",
      "description": "Within (polygon)"
    },
    "aprxWideLine": {
      "pattern": "^APRX \\d{1,3}KM WID LINE BTN$",
      "category": "keyword",
      "description": "Approximate corridor width in km"
    },
    "aprxWideLineNm": {
      "pattern": "^APRX \\d{1,3}NM WID LINE BTN$",
      "category": "keyword",
      "description": "Approximate corridor width in nm"
    },
    "entireFir": {
      "pattern": "^ENTIRE FIR$",
      "category": "keyword",
      "description": "Entire FIR"
    },
    "entireUir": {
      "pattern": "^ENTIRE UIR$",
      "category": "keyword",
      "description": "Entire UIR"
    },
    "entireFirUir": {
      "pattern": "^ENTIRE FIR/UIR$",
      "category": "keyword",
      "description": "Entire FIR/UIR"
    },
    "entireCta": {
      "pattern": "^ENTIRE CTA$",
      "category": "keyword",
      "description": "Entire CTA"
    },
    "flightLevel": {
      "pattern": "^FL\\d{3}$",
      "category": "measurement",
      "description": "Flight level FLnnn"
    },
    "sfcFl": {
      "pattern": "^SFC/FL\\d{3}$",
      "category": "measurement",
      "description": "Surface to flight level"
    },
    "sfcAlt": {
      "pattern": "^SFC/\\d{4,5}(M|FT)$",
      "category": "measurement",
      "description": "Surface to altitude in metres or feet"
    },
    "flRange": {
      "pattern": "^FL\\d{3}/\\d{3}$",
      "category": "measurement",
      "description": "Flight level range FLnnn/nnn"
    },
    "topFl": {
      "pattern": "^TOP FL\\d{3}$",
      "category": "measurement",
      "description": "Top flight level"
    },
    "topAbvFl": {
      "pattern": "^TOP ABV FL\\d{3}$",
      "category": "measurement",
      "description": "Top above flight level"
    },
    "abvFl": {
      "pattern": "^ABV FL\\d{3}$",
      "category": "measurement",
      "description": "Above flight level"
    },
    "altRange": {
      "pattern": "^\\d{4,5}/\\d{4,5}(M|FT)$",
      "category": "measurement",
      "description": "Altitude range in metres or feet"
    },
    "altToFl": {
      "pattern": "^\\d{4,5}(M|FT)/FL\\d{3}$",
      "category": "measurement",
      "description": "Altitude to flight level"
    },
    "movN": {
      "pattern": "^MOV N$",
      "category": "status",
      "description": "Moving north"
    },
    "movNne": {
      "pattern": "^MOV NNE$",
      "category": "status",
      "description": "Moving north-northeast"
    },
    "movNe": {
      "pattern": "^MOV NE$",
      "category": "status",
      "description": "Moving northeast"
    },
    "movEne": {
      "pattern": "^MOV ENE$",
      "category": "status",
      "description": "Moving east-northeast"
    },
    "movE": {
      "pattern": "^MOV E$",
      "category": "status",
      "description": "Moving east"
    },
    "movEse": {
      "pattern": "^MOV ESE$",
      "category": "status",
      "description": "Moving east-southeast"
    },
    "movSe": {
      "pattern": "^MOV SE$",
      "category": "status",
      "description": "Moving southeast"
    },
    "movSse": {
      "pattern": "^MOV SSE$",
      "category": "status",
      "description": "Moving south-southeast"
    },
    "movS": {
      "pattern": "^MOV S$",
      "category": "status",
      "description": "Moving south"
    },
    "movSsw": {
      "pattern": "^MOV SSW$",
      "category": "status",
      "description": "Moving south-southwest"
    },
    "movSw": {
      "pattern": "^MOV SW$",
      "category": "status",
      "description": "Moving southwest"
    },
    "movWsw": {
      "pattern": "^MOV WSW$",
      "category": "status",
      "description": "Moving west-southwest"
    },
    "movW": {
      "pattern": "^MOV W$",
      "category": "status",
      "description": "Moving west"
    },
    "movWnw": {
      "pattern": "^MOV WNW$",
      "category": "status",
      "description": "Moving west-northwest"
    },
    "movNw": {
      "pattern": "^MOV NW$",
      "category": "status",
      "description": "Moving northwest"
    },
    "movNnw": {
      "pattern": "^MOV NNW$",
      "category": "status",
      "description": "Moving north-northwest"
    },
    "speedKmh": {
      "pattern": "^\\d{1,3}KMH$",
      "category": "measurement",
      "description": "Speed in km/h",
      "placeholder": { "value": "00KMH", "editable": [{ "start": 0, "end": 2 }] }
    },
    "speedKt": {
      "pattern": "^\\d{1,3}KT$",
      "category": "measurement",
      "description": "Speed in knots",
      "placeholder": { "value": "00KT", "editable": [{ "start": 0, "end": 2 }] }
    },
    "stnr": {
      "pattern": "^STNR$",
      "category": "status",
      "description": "Stationary"
    },
    "intsf": {
      "pattern": "^INTSF$",
      "category": "keyword",
      "description": "Intensifying"
    },
    "wkn": {
      "pattern": "^WKN$",
      "category": "keyword",
      "description": "Weakening"
    },
    "nc": {
      "pattern": "^NC$",
      "category": "keyword",
      "description": "No change"
    },
    "fcstAt": {
      "pattern": "^FCST AT$",
      "category": "keyword",
      "description": "Forecast at time"
    },
    "fcstTime": {
      "pattern": "^\\d{4}Z$",
      "category": "datetime",
      "description": "Forecast time HHmmZ",
      "placeholder": { "value": "0000Z", "editable": [{ "start": 0, "end": 4 }] }
    }
  },
  "suggestions": {
    "items": {
      "sequenceNumber": [],
      "valid": [
        {
          "text": "VALID",
          "description": "Validity keyword"
        }
      ],
      "mwoId": [],
      "firName": [],
      "validityPeriod": [],
      "fir": [
        {
          "text": "FIR",
          "description": "Flight Information Region"
        }
      ],
      "uir": [
        {
          "text": "UIR",
          "description": "Upper Information Region"
        }
      ],
      "firUir": [
        {
          "text": "FIR/UIR",
          "description": "FIR and UIR"
        }
      ],
      "cta": [
        {
          "text": "CTA",
          "description": "Control Area"
        }
      ],
      "statusTest": [
        {
          "text": "TEST",
          "description": "Test message"
        }
      ],
      "statusExer": [
        {
          "text": "EXER",
          "description": "Exercise message"
        }
      ],
      "cnl": [
        {
          "text": "CNL",
          "description": "Cancel"
        }
      ],
      "obs": [
        {
          "text": "OBS",
          "description": "Observed"
        }
      ],
      "fcst": [
        {
          "text": "FCST",
          "description": "Forecast"
        }
      ],
      "at": [
        {
          "text": "AT",
          "description": "At time"
        }
      ],
      "obsTime": [],
      "entireFir": [
        {
          "text": "ENTIRE FIR",
          "description": "Entire FIR"
        }
      ],
      "entireUir": [
        {
          "text": "ENTIRE UIR",
          "description": "Entire UIR"
        }
      ],
      "entireFirUir": [
        {
          "text": "ENTIRE FIR/UIR",
          "description": "Entire FIR/UIR"
        }
      ],
      "wi": [
        {
          "text": "WI",
          "description": "Within polygon"
        }
      ],
      "nOf": [
        {
          "text": "N OF",
          "description": "North of"
        }
      ],
      "sOf": [
        {
          "text": "S OF",
          "description": "South of"
        }
      ],
      "eOf": [
        {
          "text": "E OF",
          "description": "East of"
        }
      ],
      "wOf": [
        {
          "text": "W OF",
          "description": "West of"
        }
      ],
      "nOfLine": [
        {
          "text": "N OF LINE",
          "description": "North of line"
        }
      ],
      "neOfLine": [
        {
          "text": "NE OF LINE",
          "description": "Northeast of line"
        }
      ],
      "sOfLine": [
        {
          "text": "S OF LINE",
          "description": "South of line"
        }
      ],
      "swOfLine": [
        {
          "text": "SW OF LINE",
          "description": "Southwest of line"
        }
      ],
      "aprxWideLine": [
        { "text": "APRX 50KM WID LINE BTN", "description": "Corridor 50km wide" },
        { "text": "APRX 100KM WID LINE BTN", "description": "Corridor 100km wide" }
      ],
      "coordinate": [],
      "coordinateSimple": [],
      "coordinateLon": [],
      "and": [
        {
          "text": "AND",
          "description": "And"
        }
      ],
      "flightLevel": [
        {
          "text": "FL100",
          "description": "Flight level 100"
        },
        {
          "text": "FL150",
          "description": "Flight level 150"
        },
        {
          "text": "FL180",
          "description": "Flight level 180"
        },
        {
          "text": "FL250",
          "description": "Flight level 250"
        }
      ],
      "sfcFl": [
        {
          "text": "SFC/FL100",
          "description": "Surface to FL100"
        },
        {
          "text": "SFC/FL150",
          "description": "Surface to FL150"
        }
      ],
      "flRange": [
        { "text": "FL050/150", "description": "FL050 to FL150" },
        { "text": "FL100/250", "description": "FL100 to FL250" },
        { "text": "FL250/350", "description": "FL250 to FL350" }
      ],
      "topFl": [
        {
          "text": "TOP FL100",
          "description": "Top FL100"
        },
        {
          "text": "TOP FL390",
          "description": "Top FL390"
        }
      ],
      "abvFl": [
        {
          "text": "ABV FL250",
          "description": "Above FL250"
        }
      ],
      "movN": [
        {
          "text": "MOV N",
          "description": "Moving north"
        }
      ],
      "movNe": [
        {
          "text": "MOV NE",
          "description": "Moving northeast"
        }
      ],
      "movE": [
        {
          "text": "MOV E",
          "description": "Moving east"
        }
      ],
      "movSe": [
        {
          "text": "MOV SE",
          "description": "Moving southeast"
        }
      ],
      "movS": [
        {
          "text": "MOV S",
          "description": "Moving south"
        }
      ],
      "movSw": [
        {
          "text": "MOV SW",
          "description": "Moving southwest"
        }
      ],
      "movW": [
        {
          "text": "MOV W",
          "description": "Moving west"
        }
      ],
      "movNw": [
        {
          "text": "MOV NW",
          "description": "Moving northwest"
        }
      ],
      "speedKmh": [
        { "text": "20KMH", "description": "20 km/h" },
        { "text": "30KMH", "description": "30 km/h" },
        { "text": "50KMH", "description": "50 km/h" }
      ],
      "speedKt": [
        { "text": "10KT", "description": "10 knots" },
        { "text": "20KT", "description": "20 knots" },
        { "text": "30KT", "description": "30 knots" }
      ],
      "stnr": [
        {
          "text": "STNR",
          "description": "Stationary"
        }
      ],
      "intsf": [
        {
          "text": "INTSF",
          "description": "Intensifying"
        }
      ],
      "wkn": [
        {
          "text": "WKN",
          "description": "Weakening"
        }
      ],
      "nc": [
        {
          "text": "NC",
          "description": "No change"
        }
      ],
      "fcstAt": [
        {
          "text": "FCST AT",
          "description": "Forecast at"
        }
      ],
      "fcstTime": []
    },
    "after": {
      "sequenceNumber": [
        "valid"
      ],
      "valid": [
        "validityPeriod"
      ],
      "validityPeriod": [
        "mwoId"
      ],
      "mwoId": [
        "firName"
      ],
      "firName": [
        "fir",
        "uir",
        "firUir",
        "cta"
      ],
      "at": [
        "obsTime"
      ],
      "obsTime": [
        "entireFir",
        "entireUir",
        "wi",
        "nOf",
        "sOf",
        "eOf",
        "wOf",
        "nOfLine",
        "sOfLine",
        "aprxWideLine",
        "coordinate"
      ],
      "entireFir": [
        "flightLevel",
        "sfcFl",
        "flRange",
        "topFl",
        "abvFl",
        "movNe",
        "movE",
        "movSe",
        "movSw",
        "movW",
        "movNw",
        "stnr",
        "intsf",
        "wkn",
        "nc"
      ],
      "entireUir": [
        "flightLevel",
        "sfcFl",
        "flRange",
        "topFl",
        "abvFl",
        "movNe",
        "movE",
        "movSe",
        "movSw",
        "movW",
        "movNw",
        "stnr",
        "intsf",
        "wkn",
        "nc"
      ],
      "wi": [
        "coordinate"
      ],
      "coordinate": [
        "coordinate",
        "flightLevel",
        "sfcFl",
        "flRange",
        "topFl",
        "movNe",
        "movE",
        "stnr"
      ],
      "nOf": [
        "coordinateSimple"
      ],
      "sOf": [
        "coordinateSimple"
      ],
      "eOf": [
        "coordinateLon"
      ],
      "wOf": [
        "coordinateLon"
      ],
      "coordinateSimple": [
        "and",
        "flightLevel",
        "sfcFl",
        "flRange",
        "movNe",
        "stnr"
      ],
      "coordinateLon": [
        "and",
        "flightLevel",
        "sfcFl",
        "flRange",
        "movNe",
        "stnr"
      ],
      "and": [
        "nOf",
        "sOf",
        "eOf",
        "wOf"
      ],
      "nOfLine": [
        "coordinate"
      ],
      "sOfLine": [
        "coordinate"
      ],
      "neOfLine": [
        "coordinate"
      ],
      "swOfLine": [
        "coordinate"
      ],
      "aprxWideLine": [
        "coordinate"
      ],
      "aprxWideLineNm": [
        "coordinate"
      ],
      "flightLevel": [
        "movNe",
        "movE",
        "movSe",
        "movSw",
        "movW",
        "movNw",
        "stnr",
        "intsf",
        "wkn",
        "nc"
      ],
      "sfcFl": [
        "movNe",
        "movE",
        "movSe",
        "movSw",
        "movW",
        "movNw",
        "stnr",
        "intsf",
        "wkn",
        "nc"
      ],
      "flRange": [
        "movNe",
        "movE",
        "movSe",
        "movSw",
        "movW",
        "movNw",
        "stnr",
        "intsf",
        "wkn",
        "nc"
      ],
      "topFl": [
        "movNe",
        "movE",
        "movSe",
        "movSw",
        "movW",
        "movNw",
        "stnr",
        "intsf",
        "wkn",
        "nc"
      ],
      "topAbvFl": [
        "movNe",
        "movE",
        "movSe",
        "movSw",
        "movW",
        "movNw",
        "stnr",
        "intsf",
        "wkn",
        "nc"
      ],
      "abvFl": [
        "movNe",
        "movE",
        "movSe",
        "movSw",
        "movW",
        "movNw",
        "stnr",
        "intsf",
        "wkn",
        "nc"
      ],
      "movN": [
        "speedKmh",
        "speedKt",
        "intsf",
        "wkn",
        "nc"
      ],
      "movNe": [
        "speedKmh",
        "speedKt",
        "intsf",
        "wkn",
        "nc"
      ],
      "movE": [
        "speedKmh",
        "speedKt",
        "intsf",
        "wkn",
        "nc"
      ],
      "movSe": [
        "speedKmh",
        "speedKt",
        "intsf",
        "wkn",
        "nc"
      ],
      "movS": [
        "speedKmh",
        "speedKt",
        "intsf",
        "wkn",
        "nc"
      ],
      "movSw": [
        "speedKmh",
        "speedKt",
        "intsf",
        "wkn",
        "nc"
      ],
      "movW": [
        "speedKmh",
        "speedKt",
        "intsf",
        "wkn",
        "nc"
      ],
      "movNw": [
        "speedKmh",
        "speedKt",
        "intsf",
        "wkn",
        "nc"
      ],
      "speedKmh": [
        "intsf",
        "wkn",
        "nc"
      ],
      "speedKt": [
        "intsf",
        "wkn",
        "nc"
      ],
      "stnr": [
        "intsf",
        "wkn",
        "nc"
      ],
      "intsf": [
        "fcstAt"
      ],
      "wkn": [
        "fcstAt"
      ],
      "nc": [
        "fcstAt"
      ],
      "fcstAt": [
        "fcstTime"
      ],
      "fcstTime": [
        "entireFir",
        "wi",
        "nOf",
        "sOf",
        "coordinate"
      ]
    }
  }
}
