erikrose / parsimonious

The fastest pure-Python PEG parser I can muster
MIT License
1.79k stars 126 forks source link

What is the official file name extension for grammars in `parsinomous` DSL? #219

Closed KOLANICH closed 1 year ago

KOLANICH commented 1 year ago

Hint: it should be unique enough and short enough.

erikrose commented 1 year ago

I've seen .peg used for some other PEG libraries, though there are minor differences in syntax with Parsimonious. Of course, I'm not sure if those libs are all mutually compatible either.

KOLANICH commented 1 year ago

That's why I have asked. I know it is a variant of peg/packrat and in the DSL emiter I reuse a bit of an impl, but here are some differences, for example to Arpeggio and PEG.js:

Arpeggio:

assignmentOperator = " <- "
singleLineCommentStart = "//"
endStatementOperator = ";"

parsimonious:

assignmentOperator = " = "
singleLineCommentStart = "#"
endStatementOperator = ""

PEG.js

assignmentOperator = " = "
endStatementOperator = ""
singleLineCommentStart = "//"

So we need an own extension, and also to cooperate to other projects to unify the DSL syntax.

erikrose commented 1 year ago

Well, "parsimonious" is a long name, so I'm loath to include it verbatim in an extension. "ppeg" immediately comes to mind. Or, if somebody's already using that, "parpeg".

KOLANICH commented 1 year ago

parpeg seems to be too long, I like ppeg better. According to the websites tracking file extensions, it is not taken. Also I have tried to google .ppeg and got only garbage results. It seems like it is not used by anyone.

erikrose commented 1 year ago

Works for me!