Okay, well... I see others have listed most of them while I was crafting a reply :) I guess you miss - the negation operator, which can be applied to everything, and phrase search with "Hello World". I've add some examples below with the explanation, I had already written...
dxr/query.py lists the following parameters: path, ext, type, type-ref, function, function-ref, var, var-ref, macro, macro-ref, callers, called-by, warning, warning-opt, bases, derived, member, regexp In general if parameters like (e.g. function:printf) are are prefixed + (e.g. +function:printf) they are searching for exact matches of fully qualified names. This is mainly useful for automatically generated links, for example references of a specific function: +function-ref:"mozilla::layers::ImageLayer::SetContainer(class mozilla::layers::ImageContainer *)" The useful part is that users can now add additional constraints to the search query, say only results from layout/generic folder path:layout/generic +function-ref:"mozilla::layers::ImageLayer::SetContainer(class mozilla::layers::ImageContainer *)" It is also possible to search for phrases with "my phrase" (phrases allows you to search for whitespace). You can also give a phrase to a parameter, ie. path:" " to find the only file in mozilla central with whitespace in it's name :) Regular expressions are written as regexp:/abc.*d/ or regexp:#[0-9]*/[0-9]*# Ie. starts and ends with the same character like in vim. This might be confusing, it certainly can be when using the advanced search widget which tries to help with this. (Regular expression syntax is documented at http://code.google.com/p/re2/wiki/Syntax) All parameters, keywords and phrases can be prefixed - to exclude results. For instance all files in gfx/layers with the exclusion of cpp files: path:gfx/layers/ -ext:cpp Notice, + and - can be combined, ie. -+type-ref:mozilla::layers::BufferMode Ordering of + and - does not matter, the semantics are the same, in this case exclusion of all results with references to "mozilla::layers::BufferMode". Note: This search interface is powerful and reasonbly consistent, but not necessarily user friendly. So it might be worth considering minor adjustments, if users find it hard to use. In particular I can imagine that the regular expression parameter, regexp: is hard to use. - But then again regular expressions are not particularly user friendly by nature :) -- Regards Jonas Finnemann Jensen. On Wed, Feb 20, 2013 at 10:06 PM, Schalk Neethling <[email protected]>wrote: > Thanks Erik > > > On 2/20/13 11:03 PM, Erik Rose wrote: > >> Below is what I have, what other syntax is also supported? >>> >> >> Here are some more from the test suite: >> >> function: finds function declarations >> >> callers: finds call sites of a function >> >> called-by: finds all the functions called by a specific function >> >> +function: finds matches to a specific signature (I think). Example: >> +function:ConstOverload::foo() or +function:"ConstOverload::foo(**) >> const" >> >> +var:prototype_parameter_**function(int)::prototype_**parameter >> +var-ref:prototype_parameter_**function(int)::prototype_**parameter >> find variables of some kind or other >> >> +macro-ref: finds references to a macro >> >> member: finds members of a class >> >> +type: finds typedefs >> +type-ref: finds uses of a type >> >> Erik >> >> > -- > Kind Regards, > Schalk Neethling > Front-End Engineer > Mozilla > ______________________________**_________________ > dev-static-analysis mailing list > dev-static-analysis@lists.**mozilla.org<[email protected]> > https://lists.mozilla.org/**listinfo/dev-static-analysis<https://lists.mozilla.org/listinfo/dev-static-analysis> > _______________________________________________ dev-static-analysis mailing list [email protected] https://lists.mozilla.org/listinfo/dev-static-analysis
