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

You can consider an extensible grammar as a "nested" grammar. You have certain extension points in the "parent" and you can attach a new grammar here.

For example, it would be easy to take a C# grammar and add a new operator, such as the null propagator "?.", since the list of operators is extensible. This wouldn't break anything, as it's just a new token for a binary expression.

Or, you could add something bigger, such as LINQ, by extending C# 2.0's Expression syntax rule with a LINQ query expression.



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

Search: