saulpw / aipl

Array-Inspired Pipeline Language
MIT License
119 stars 7 forks source link

Experiment with writing a grammar and parser. #20

Closed cthulahoops closed 1 year ago

cthulahoops commented 1 year ago

Only the beginnings, creating a PR to share what I'm thinking about.

saulpw commented 1 year ago

Sweet! I didn't know about Lark. Will this handle multiple commands on a single line?

cthulahoops commented 1 year ago

Sweet! I didn't know about Lark. Will this handle multiple commands on a single line?

It does now. (I keep forgetting that's allowed.)

It's my first time trying Lark. It took me a while to get my head around it (docs could be better), but it's working well now. It should let us improve the syntax a lot.

I'll be happy when we can allow this:

!split sep=' '
cthulahoops commented 1 year ago

This now passes all tests!