The engineers used a weighted context-free grammar (WCFG) to represent Graph Search’s query language. Think of a tree, with the root or base as the “Start” of a particular query. Facebook calls this the “parse tree,” and the various “limbs” branching from the root include verbs, objects, etc. The “leaves” at the top are the terminal symbols, or entities such as users, cities, employers, groups, and the phrases that link those entities together. It’s perhaps easier to diagram than explain: