Fix U.S. PROB group handling and trim RMK from remark

This commit is contained in:
2023-08-26 10:22:42 -07:00
parent 52fb856f9b
commit 486688e72a
3 changed files with 6 additions and 29 deletions

View File

@@ -6,7 +6,7 @@ import (
var lex = lexer.MustSimple([]lexer.SimpleRule{
{Name: "header", Pattern: `TAF (AMD|COR)? ?`},
{Name: "Remark", Pattern: `RMK .*`},
{Name: "Remark", Pattern: `RMK[^\n]*`},
{Name: "Number", Pattern: `\d+`},
{Name: "Modifier", Pattern: `[+-]|VC`},
{Name: "Prob", Pattern: "PROB"},

View File

@@ -34,8 +34,8 @@ type ValidPair struct {
type Probability struct {
Pos lexer.Position
Value string `Prob @Number`
Time string `(WS @Number)?`
Value string `Prob @Number`
Valid ValidPair `(WS @@)?`
}
type WindSpeed struct {