Adding A New Language With "ace" Library
I'm new to Ace, and I want to add a new language. I created the file named new_highlight_rules , the problem is I have to add tokens and corresponding regex in this file, and my n
Solution 1:
If Ace has one way of writing regexes that doesn't match those of ANTLR lexers, then you will likely have to translate your ANTLR regexes manually.
As a general rule, I've never seen two language definition systems that used exactly the same syntax for specifying the details, so I'm pretty sure you are stuck.
As both notations are formal, and cover essentially the same ground (lexical-level specifications), you could contemplate building a translator to do the mapping for you. That's likely way more effort than simply doing the translation by hand. (And yes, I'm a big fan of automated tools. Its important to know when they are useful).
Post a Comment for "Adding A New Language With "ace" Library"