3 ms·
If anyone is interested in making a language in JS I can recommend the "Nearley" parser/lexer: http://nearley.js.org http://nearley.js.org Very easy parser/le
by chvid 10y ago
If anyone is interested in making a language in JS I can recommend the "Nearley" parser/lexer:
http://nearley.js.org http://nearley.js.org
Very easy parser/lexer to use, accepts a larger class of grammars than yacc/lex and is reasonably fast.
I use it for the language in my project: http://emunotes.com http://emunotes.com and Nearley is fast enough to parse stuff as the user is entering text.
It may be tempting to see if you can get away with not using a parser generator (as the author does here) but I found it is not worth the trouble it generates down the road.
- joshmarinacci 10y agoEmunotes is really cool. A magical word processor. Is there a way to make functions that connect to expanded services?
- chvid 10y agoThanks; if you by expanded services mean integration with external pieces of user-defined javascript or data sources (such as a YQL query) it is a good and very potent idea. It is something I like to do a little further down the road. In the near future I am focusing on graphics and collaborative features.