UnknownJoe796 / thench

1 stars 0 forks source link

Parser #1

Open UnknownJoe796 opened 1 year ago

UnknownJoe796 commented 1 year ago

We need a parser that will output the data available in the AstLayer.kt file.

It needs to:

It would be nice if:

I imagine that brace elision is only possible if we write our own parser rather than use some kind of BNF generator (like ANTLR). PushbackReader allows you to do some pretty funky stuff.

Don't hesitate to add new kinds of elements to AstLayer.kt. At a minimum, we are going to need a AstError for indicating some kind of messed up or incomplete syntax in some position.

UnknownJoe796 commented 1 year ago

Perhaps it might be good to start with a BNF though because I have no idea what this language should actually look like at the syntax layer at the moment. We'll need to answer a few open questions still too.