I'm looking for a little guidance. Until this morning, this was all over my head. After spending today researching Wikipedia, StackOverflow, etc., I'd say I've got my nose above the water. I'm tasked with researching a project that, as I understand it, would involve reverse-engineering a domain-specific language that is basically a type of regular expression syntax and translating that into conventional (meaning, Perl-like) regular expressions. I'm hoping someone can fill in the gaps in my understanding, so let me explain what I've got and my understanding, thus far.
Regarding the DSL, it basically has two components to it. One is grep-like regular expressions, more or less. The other component consists of what you could call macros. These macros are used when you want to find Social Security numbers, credit card numbers and so forth in the text being analyzed. The DSL is a simpler way for the end-user to specify matching text and exceptions. (Honestly, it's still pretty complicated to use -- but easier than regular expressions.)
The DSL is used to write "rules," a rule being a one-line statement describing target text.
What I want to do is, taking a rule as input, translate that rule into a conventional regular expression where possible. If a macro doesn't break down into a single regular expression, I will translate the macro into one or more RE's, or any kind of text processing code needed.
My largest point of ignorance is the "translating." Here's my first question: will that involve what's called "parsing"? (As you can guess, I'm a self-taught programmer.) Would I be using a tool like ANTLR or PyParsing, or something like that? (I just found out about these tools today, during my research.) I'm guessing yes, but I'd appreciate confirmation.
How much do I have to learn? I'm not going to need to get the "Dragon book," right? I am not writing a DSL, but if I'm reverse-engineering one, then I'm guessing I will more or less need to learn how to create a DSL in the first place (since how else would I know how to do the parsing). Yes?
What do I need to get under my belt? That's what I'm trying to figure out. I've parsed configuration files; I've written a simple YAML to Java Bean code generator; I've written a simple HTML-stripper; I know a bit about regular expressions and text processing; but this particular endeavor is more sophisticated than anything I've done before. It seems doable, but as a sanity check please tell me if, in my ignorance, I've miscalculated and what I'm describing actually needs 4 years of being a computer science major to accomplish.
Can anyone point me in the right direction or give me some pointers? Thanks.