dundalek / GrammKit

Generate diagrams for parser grammars
http://dundalek.com/GrammKit/
The Unlicense
236 stars 19 forks source link

Grammar target using query parameter #7

Closed sudo-suhas closed 7 years ago

sudo-suhas commented 7 years ago

Is it possible to specify the grammar file to be loaded using query parameter? It's easier to share links that way.

dundalek commented 7 years ago

What would be the advantages compared to currently passing it in a hash?

sudo-suhas commented 7 years ago

Correct me if I am wrong but isn't the hash used for anchors for the parsed grammar? I am trying to specify the grammar file via url.

sudo-suhas commented 7 years ago

I apologise. I should have tried one of the example files loaded via URL.

dundalek commented 7 years ago

That's a good point though, having it as query param would allow links to also point to specific grammar rule.

sudo-suhas commented 7 years ago

Hmm.. I didn't think of that. Would be nice to have. I don't need it though.

Maybe you could have a line or so explaining how to specify file in URL? Just an example should be sufficient.