patrickhuber / Pliant

MIT License
26 stars 4 forks source link

Instructions on transferring code from other parsers #89

Open ArsenShnurkov opened 6 years ago

ArsenShnurkov commented 6 years ago

It would be good to parse grammars of other parsers as is (using their grammars).

GOLD parser in particular. AntlrCS and gppg are 2 other tools.

patrickhuber commented 6 years ago

Do you have links to the grammar definitions for these languages?

Here is what I found based on brief googling:

Gold Parser Language

Productions Terminals Character Sets

Antlr

Grammar

gppg & GPLEX

canonical source appears to be codeplex which is depricated

gppg

GitHub Mirror by Oleg1cqa GitHub Mirror by deAtog

gplex

Github Mirror by deAtog

Tagging with help wanted, as this is an easy contribution for someone to make via pull request. The Ebnf namespace (soon do be renamed Dsl) is pretty much the exact code needed to perform this for each parser generator.

ArsenShnurkov commented 6 years ago

1) Antlrcs = Antlr3, not Antlr4

2) i packaged https://github.com/dbremner/gppg https://github.com/dbremner/gplex (don't remember why this mirror, but it was fixed a bit) gppg/gplex have very good documentation pdf files

patrickhuber commented 6 years ago

Ok, will this grammar do for antlrcs? https://github.com/antlr/grammars-v3/blob/master/Antlrv3/ANTLRv3.g

ArsenShnurkov commented 6 years ago

https://github.com/antlr/antlrcs/blob/master/Antlr3/Grammars/ANTLR.g3