pjfarley3
pjfarley3

Reputation: 94

Is there a Tatsu or any PEG-format grammar available for the [g]awk language syntax?

As the subject asks, does anyone know of an existing Tatsu grammar (or at least a PEG-format grammar) for the [g]awk language?

I did already browse all existing Tatsu examples that I could find, and searched extensively around the net for any PEG-format grammar for the requested language.

Peter

Upvotes: 0

Views: 139

Answers (1)

Apalala
Apalala

Reputation: 9244

If there's an ANTLR grammar for AWK, you can start with the TatSu g2e converter.

If there is a grammar for AWK in any other grammar language, the shortest route is to write a grammar->grammar translator, as grammar languages tend to be small enough to be treatable with little effort.

Moving a grammar that was originally LR, LL, or LLA to PEG+LEFTREC takes just a little more effort.

Upvotes: 0

Related Questions