Apex grammer and transformer for Lark https://github.com/lark-parser/lark
Still a work in progress. Need to complete the grammer definition. Existing definition is here: https://github.com/forcedotcom/apex-tmLanguage/blob/master/grammars/apex.tmLanguage
Can run example: python apex_parser.py apex.lark test_apex_files/fflib_QueryFactory.cls