Syntactic Code Search with Sequence-to-Tree Matching: Supporting Syntactic Search with(…)
summary
A new search architecture drops parsing and uses only tokenization plus a novel sequence-to-tree matching algorithm built on top-down tree automata to give semantics to incomplete queries. It ships as stsearch, supports every tokenizable (previously unparsable) query, implements subtree and sibling wildcards, and reports results comparable to Semgrep. Evaluation runs 161 real-world queries over ~100 npm packages and shows early tokens filter most matches, enabling stable interactive feedback.
AI-written summary · about
chapters (10)
- 0:00Syntactic code search intro
- 1:04Limitations of current tools
- 3:07Desired behavior for queries
- 4:08Architecture shift to token matching
- 5:12Query language with wildcards
- 6:38Sequence-to-tree matching formalized
- 7:43Introducing tri automata
- 9:28Evaluating interactive queries
- 11:14Summary
- 11:34Q&A
related talks
37mBeyond Grep: Semantic Code Search for Safer Change at Scale
31mAdvanced JavaScript code search: Abstract Syntax Tree analysis
08mSupercharging Developer Productivity With Advanced Code Search
39mTree-sitter - a new parsing system for programming tools
26mParsing Parsers
57mVariant analysis
20mTerm Search in Rust
37mIs it me you're searching for?
