Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Lemon uses a different grammar syntax which is designed to reduce the number of coding errors.

Why does it seem as if almost every parser generator defines its own quirky grammar syntax? What's wrong or so difficult with just accepting W3C EBNF? Who thinks it's a good idea to force grammars to be re-written in the first place?

Does nobody complain about vendor lock-in due to the quirky grammar syntax they were forced to use?

Where are the automatic conversion utilities for these parser generators? Something that takes, say W3C EBNF and spits out the quirky parser generator grammar language? Shouldn't that be simple?

I really don't get it.



The extra syntax is to fix having to count the number of items to get the value you want like ‘$$=foo($7, $3, $4);’ because if your count is off you end up sending in a bad bug report to one of the industry leaders in computer graphics which is kind of embarrassing.


In addition to the other replies, Lemon predates W3C, possibly by a decade.


> What's wrong or so difficult with just accepting W3C EBNF?

Why should we do what the W3C want?

Anyway - not all grammars are expressible using EBNF. For example prioritised choice.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: