Adding syntax validation for a custom language using a worker

765 views
Skip to first unread message

Mike Cargal

unread,
Aug 25, 2015, 3:24:01 PM8/25/15
to Ajax.org Cloud9 Editor (Ace)
I'm using ACE editor as an integrated editor in a web app for editing a custom language.


I've followed that code, and get a 404 trying to load {...}/ace/src/worker-{mylang}.js

OK, so there's still more to do.  I've taken a look at several of the worker-*.js source files and they are HUGE and there is a LOT of repeated code across them.

It also seems there is a great deal of duplicated code across all of them.  I suspect that these files are built as some sort of build process to fulfill requirements around web workers being a single .js file (It's a bit hard to believe that everyone has authored these independently).

Is there somewhere I can get the story on these?

Extra points... I'm looking to leverage a parser I've generated from ANTLR (I've used to to implement the java compiler for this language, and have generated the JavaScript target to parse my custom language).  Any pointers on how I might utilize that are also appreciated.

Mike Cargal

unread,
Aug 25, 2015, 3:48:54 PM8/25/15
to Ajax.org Cloud9 Editor (Ace)
OK, let's see if I've answered my own question...

It would appear that I need to d/l the complete source from GitHub and run the Makefile.dryice.js (using node) and that it will build my worker-*.js file for me.

Is that correct?  (I'm sure there'll be much more to go, but I think I'm seeing that as where worker-*.js files are created.
Reply all
Reply to author
Forward
0 new messages