dimitriv / Ziria

A domain-specific-language and compiler for low-level bitstream processing.
92 stars 18 forks source link

Reserved keywords #40

Closed bradunov closed 9 years ago

bradunov commented 9 years ago
edsko commented 9 years ago

I've now modified the parser so that it allows keywords wherever we expect identifiers. Making sure that this does not lead to ambiguity ("whenever it's not ambiguous") is difficult, but after I made one change to the comp parser, all existing tests (including WiFi tests) still yield precisely the same parse trees as before, which means it's probably okay. Also added a test that specifically tries to use a keyword as identifier.