Re: Regular Expressions Plus?
Posted Feb 2, 2009 1:34 UTC (Mon) by ldo
In reply to: Regular Expressions Plus?
Parent article: Semantic patching with Coccinelle
Moreover, Coccinelle is not just a search/replace of syntactic constructs.
You have expression, function, and statement metavariables allowing
to match and move code and you can specify constraints about the
context of those entities.
Yes, but Im pretty sure that those constraints are all, in principle, expressible using well-known techniques like two-level grammars and attribute grammars.
Im not saying its a simple thing to do, but nevertheless it seems useful to have such prebuilt grammars for different languages, working with a common core of code, rather than writing different code for different languages.
Just a thought.
to post comments)