nyousefi/Fountain

Grammar rules for Fountain

Opened this issue · 3 comments

Hi. I'd like to create Abstract Syntax Trees out of Fountain documents.

Is there a grammar spec or a reference compatibility document (kind of like a TCK) so that I can know that I'm parsing documents correctly?

Thanks!

The Fountain syntax spec is at http://fountain.io/syntax, and this repo has a set a tests along with test files you can use. It's not great, but it might be sufficient for what you're trying to do.

How about a BNF grammar ?

bjmc commented

I know this is an old thread, but I've written a PEG for Fountain: #53

If people are interested, I can clean it up and add some docs and maybe a CLI parser/linter.