nyousefi / Fountain

An open source implementation of the Fountain screenplay formatting language.
http://fountain.io
MIT License
541 stars 55 forks source link

Grammar rules for Fountain #13

Open jjzazuet opened 9 years ago

jjzazuet commented 9 years ago

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!

nyousefi commented 9 years ago

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.

ghost commented 6 years ago

How about a BNF grammar ?

bjmc commented 5 months ago

I know this is an old thread, but I've written a PEG for Fountain: https://github.com/nyousefi/Fountain/issues/53

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