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

119 views Asked by At

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

1

There are 1 answers

2
Apalala On

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.