AFL Grammar?


I want to write a simple AFL lexer in Python for use in Pygments. Can anyone point me to the full AFL grammar (parts of it are scattered in the documentation)?


Download the community edition sources, and you’ll find these Flex and Bison input files:


That’s the full grammar. If you need to just parse array schemas, there is a usually-good-enough Python parser in


The soon-to-be-published 16.9 version of this module has many improvements over prior versions.

Hope this helps!


Thanks mjl. Lexer.ll and Parser.yy have just what I was looking for. I’ve previously used the schema definitions in, but will checkout the new version.