I've used https://github.com/bcl/aisparser (C) in several projects. It does a nice job of parsing the sentences, but you'll need your own code to handle the incoming serial or network stream and to do something useful with the parsed sentences. It doesn't handle all of the latest locally defined payloads on sentences 6 and 8. Hal N3YX