I'm wondering if someone has already written a Treetop grammar for JavaScript. Has anyone?
Looking through the web site one of the first things I was trying to find was a collection of Treetop grammars for existing languages, and was somewhat disappointed not to find any.
I saw the examples directory in the github repo contained "lambda_calculus" and that was it.
I think it'd be really handy to have a central collection of grammars that others have already implemented for various languages.
I know that http://snippets.dzone.com/ is supposed to host some
treetop grammars, but i never find an easy way to browse them all,
also, there is really *no* benefit compared to github.
A github repo, maybe called treetop-grammars or something, would be
really helpful, but would need some sort of gatekeeper. A different
(or additional) approach, would be to establish a naming convention
for the grammars, something like
treetop-mygrammar_name
maybe, so that it's easily searchable on github. Datamapper or Merb
for example go this way with their plugins. There's no need for a
central gatekeeper and it's still easy to find/fork treetop grammars.
The naming convention should be spoken out loud though, so that almost
everyone will see a reference to it.
On Thu, Jun 4, 2009 at 02:02, Tony <basc...@gmail.com> wrote:
> Hello everyone,
> I'm wondering if someone has already written a Treetop grammar for
> JavaScript. Has anyone?
> Looking through the web site one of the first things I was trying to find
> was a collection of Treetop grammars for existing languages, and was
> somewhat disappointed not to find any.
> I saw the examples directory in the github repo contained "lambda_calculus"
> and that was it.
> I think it'd be really handy to have a central collection of grammars that
> others have already implemented for various languages.
> I know that http://snippets.dzone.com/ is supposed to host some
> treetop grammars, but i never find an easy way to browse them all,
> also, there is really *no* benefit compared to github.
> A github repo, maybe called treetop-grammars or something, would be
> really helpful, but would need some sort of gatekeeper. A different
> (or additional) approach, would be to establish a naming convention
> for the grammars, something like
> treetop-mygrammar_name
> maybe, so that it's easily searchable on github. Datamapper or Merb
> for example go this way with their plugins. There's no need for a
> central gatekeeper and it's still easy to find/fork treetop grammars.
> The naming convention should be spoken out loud though, so that almost
> everyone will see a reference to it.
> cheers
> snusnu
> On Thu, Jun 4, 2009 at 02:02, Tony <basc...@gmail.com> wrote:
>> Hello everyone,
>> I'm wondering if someone has already written a Treetop grammar for
>> JavaScript. Has anyone?
>> Looking through the web site one of the first things I was trying to find
>> was a collection of Treetop grammars for existing languages, and was
>> somewhat disappointed not to find any.
>> I saw the examples directory in the github repo contained "lambda_calculus"
>> and that was it.
>> I think it'd be really handy to have a central collection of grammars that
>> others have already implemented for various languages.
> I'm wondering if someone has already written a Treetop grammar for > JavaScript. Has anyone?
I thought I saw one posted a while back, but can't find the reference now. A friend was working on one but was new to Treetop and had bugs to iron out - I've tried contacting him on Twitter as @whatupdave
Otherwise I have his (still-not-working) version I can probably share, it might be a good start.