undertherain / pycontextfree

Pythonic generative art tool
http://pycontextfree.blackbird.pw/
Mozilla Public License 2.0
38 stars 3 forks source link

Context Free Grammar ? #18

Open stuaxo opened 1 year ago

stuaxo commented 1 year ago

I wonder if anyone has made a parser for the contextfree grammar itself ?

I guess it could be parsed to an AST, that calls this API and then generate pictures, this would be interesting for integrating CF with python.

undertherain commented 1 year ago

you mean parsing files from original "contextfree" tool? that would be interesting

stuaxo commented 1 year ago

Yeah.

I think it could output an AST that calls your code.

stuaxo commented 1 year ago

(Well - or calls any code) - originally I was thinking about how that could integrate with https://github.com/shoebot/shoebot but that's a couple more steps abstracted.

stuaxo commented 1 year ago

One thing I'm not quite sure about is what a good libraries is to parse the syntax with.