Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structured Search #30

Open
gabriel-weaver opened this issue Jun 21, 2012 · 2 comments
Open

Structured Search #30

gabriel-weaver opened this issue Jun 21, 2012 · 2 comments

Comments

@gabriel-weaver
Copy link
Owner

Some practitioners were interested in Context-Free Grep to do a structured code search (where it is block defined). For example, "what's in the struct?" or queries based on timestamps.

@gabriel-weaver
Copy link
Owner Author

A slash dotter stated the following: "Context-Free Grep/Diff can be used to search for data/changes in arbitrary non-line-record-based files. Such as XML, HTML, JSON, SQLite databases, other databases, Apache configs, and many other pieces of data. Heck, even most programming languages are not line-based, but statement terminated/separated. Imagine being able to grep for a function name, and getting its entire prototype/usage even when it spans multiple lines (very common in standard glib headers). And, depending on the plugin's capabilities, you could grep for a function name as a function name and not get back any usage of that text as a variable or embedded in a string, or a comment (skip commented-out calls!). If there's sufficient configurability, you could ask for the entire block that the given text is in, and such a grep would be able to display everything in the corresponding...Makes grep that much valuable. So my question is, why aren't more IT-heavy corporations/government departments not involved?"

@gabriel-weaver
Copy link
Owner Author

Another slashdotter stated: "If you have structured data (say XML), you could target hierarchies like "config-root:server-name:name". That way, if the text inside name is only being looked for in that one field, you won't hit a bunch of other stuff that also happen to be similar strings but are unrelated."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant