mivek/MetarParser

End indicator (=) leads to wrong parse results

f-loris opened this issue · 2 comments

Describe the bug
METAR or TAF reports usually end with a =. Currently this is not considered/handled while parsing. E.g. can be found here: https://en.wikipedia.org/wiki/METAR

To Reproduce
Steps to reproduce the behavior:

  1. Parse the following METAR: LOWW 011150Z 27019KT 9999 FEW034 SCT300 13/04 Q1010 NOSIG=
  2. getNosig() returns false instead of true

Expected behavior
The parser should safely omit the end indicator while parsing.

I can file a PR for this after #165 is done.

mivek commented

Indeed, I reproduced the bug. I think updating the method AbstractParser#tokenize or the regex AbstractParser#TOKENIZE_REGEX could resolve the problem.