0

Within the bismon program (a GPLv3+ software for Linux funded by H2020 research projects, whose draft documentation is here; the application domain of bismon is static source code analysis of C and C++ programs using generated GCC plugins) I want to parse some DSL of my own invention (philosophically a successor of my obsolete GCC MELT, which was some Lisp dialect). Of course I am allowed to change the syntax of that DSL and its REPL, if that makes my life simpler (the "selling point" being the semantics of that DSL).

Bismon is a collaborative web tool, with a web interface. So it is a specialized HTTP server. Detailed technical explanations are here (and you'll find there detailed motivations and context for this question too)

I would like to parse the same text both in the Firefox browser (in JavaScript) and the Bismon program (in C). I am dreaming of having some "auto-completion" feature in the browser which dynamically replaces a sub-expression by e.g. its macro-expansion (if you think in Lisp terms and its REPL).

I am considering sharing an LALR grammar between both (and have the parsing running concurrently in the Web browser and in the bismon Web server). So what is the closest JavaScript parser generator accepting a grammar similar to what GNU bison accepts?

I already have some flexible parsing infrastructure that I could reuse. For example, reparsing the entire expression at each keystroke.... (like my buggy GTK interface already does)

PS. License (legal) compatibility with GPLv3+ is essential.

NB. Sorry for the nearly similar in spelling bismon (my program) and bison (the GNU replacement for yacc).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.