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 new language is very complicated, so I have a lot of regex and rules to add.
My question is: if I have the grammar of my language written for ANTLR, is there a practical way to add regexes and tokens? and is there any other way without using ANTLR?
Please I'm new and any guidance, even very basic, can help me.
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).