Hm. I’ve been mulling over the problem of attempting to parse METAR data. Unfortunately, it looks like this:
KMSP 192353Z 15006KT 10SM SCT200 BKN250 22/07 A2986 RMK AO2 SLP112 T02170067 10261 20211 58013
I am taking a class in which part of the material covered involves parsing and grammars. Then it dawned on me: I could write a grammar which defines a METAR report.
So I have started in on my project. If this works, this will be a very cool and elegant solution. It involves a ton of experimentation, but hopefully the end result will pay off bigtime. I’m using Chaperon to parse the data. The cool part is that Chaperon includes Cocoon Generators and Transformers, so, hopefully, if I can wrap my head around the workings of Chaperon, I will be able to do all this parsing and decoding from within Cocoon.