DEV Community

Discussion on: Which modern languages use grammars as a basic feature?

Collapse
 
eljayadobe profile image
Eljay-Adobe

If you mean strictly part of the language (out of the box, no extra stuff), then I'm not sure.

C++ Boost Spirit has grammars.

Not part of the C++ standard, but Boost is a popular set of libraries for C++. Some of which has become part of C++ standard. It a very large library, but very useful, and well vetted, and written by many of the same people on the C++ standards committee. (I think Boost originated by committee members who were doing neat things they wanted to share, but didn't think those things would be able to become part of the C++ standard. Or they were just trying to relax and take a break from the normal WG21 slog.)

My grammar friends point to Ohm for JavaScript, if you need a grammar parser engine to write your own DSL that will be used in a web app or NodeJS.

Again, not part of the rapidly evolving JavaScript itself (i.e., EMCA-262 ECMAScript), but for JavaScript.

Collapse
 
jj profile image
Juan Julián Merelo Guervós

Yep, I meant as part of the language itself. As you say, these features might become part of those languages in the near future.