masak / alma

ALgoloid with MAcros -- a language with Algol-family syntax where macros take center stage
Artistic License 2.0
137 stars 14 forks source link

Write a yacc grammar for 007 #381

Open masak opened 5 years ago

masak commented 5 years ago

"But @masak", I hear you object, "007's grammar is mutable!"

Why, yes. It is. There's no way a yacc grammar is going to capture that. (Pretty sure there ain't.) Heck, it won't even capture user-definable operators properly.

But I feel I have such a bad handle on yacc, and I would like to get to know it better. And who knows, maybe there will be some fallout that benefits 007's regular grammar. There usually is.

So: a grammar that captures the "base" (non-extended) part of 007's grammar.

masak commented 5 years ago

Pasting BNF for Tcl in here, as it seems very related in tone.