From: <jue...@go...> - 2021-06-25 08:10:06
|
Hello Andrew, > Hi, > > On Thu, Jun 24, 2021 at 12:19:17PM -0300, Vinícius dos Santos Oliveira wrote: >> Would it be possible to add an API to gawk that allows the plugin author to >> check whether there's a certain rule in the AWK script? > ... > > I don't have a strong view on this, but I'm also not certain that I understand > precisely what you want. If you were to develop and share a gawk patch to > implement your desired behavior, then I think we would all understand better > and could offer an opinion on whether the patch might be accepted. You are of > course always free to build gawk with your own patches; that's the beauty of > free software. > > Regards, > Andy I think he wants to detect the presence (and not the value) of a certain AWK rule at run-time. The term "rule" here seems to mean a keyword that exists after being declared by the plugin. I agree with you (Andrew) that the script example that he gave should be accompanied by a more detailed implementation of the plugin. Maybe it would suffice to have a way of looking up all the keywords that are defined after loading a plugin. |