Andrey Shchekin Andrey Shchekin - 7 months ago 31
Javascript Question

Is there a framework for defining parsers in JavaScript?

Is there a JavaScript framework that allows to define a parsing grammar using JavaScript syntax, similar to the way Irony does it for C#?

Answer Source

I don't know much about how Irony works, but Chris Double has a library that lets you define grammars in JavaScript here: The code is available on GitHub.

It's a "parser combinator" library which means you combine parsers for each production in your grammar into a larger parser that parses the whole thing. Each "sub-grammar" is a just a function that you create by calling the library functions.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download