Is there a JavaScript environment that allows you to define parsing grammar using JavaScript syntax, similar to how Irony does it for C #?
I donโt know much about how Irony works, but Chris Double has a library that allows you to define grammar in JavaScript here: http://www.bluishcoder.co.nz/2007/10/javascript-parser-combinators.html . The code is available on GitHub .
This is a parser-combinator library, which means that you combine the parsers for each piece in your grammar into a stronger parser that parses it all. Each โsubgramโ is simply a function that you create by calling library functions.
I created a JavaScript syntax DSL called Chevrotain .
Source: https://github.com/SAP/chevrotain
Online Playground: http://sap.imtqy.com/chevrotain/playground/
Parser, , " JavaScript" - .
" " , , :
Chevrotain .
, , javascript javascript.
PEG.js .
PEG.js - JavaScript, . , , ., - , LL (k) LR (k) , JavaScript API
PEG.js - JavaScript, . , , .
, - , LL (k) LR (k) , JavaScript API