A portion of my TE parser.:
if(last_op == ',' ) {
close_update_graph(other());
new_graph(other());
append_graph(other(),ts);
last_op = op;
continue;
};
No expression trees visible. When the expression analyzer needs to link up an expression block, is simply closes and updates the subgraph upon which the expression exists. When it want to start a new expression, creating subgraph from the parent does the trick. Pointers are maintained to keep sub graphs nested with their parent graphs properly.
Only three operations allow the machine to compile ultra nested search graphs into nested order. Make a subgraph on the old, update and close a sub graph on the older, and appending to a sub graph. Given the simple four character operator set, the state transition are simple, so why bother cursing though the syntax then subgraphing does the trick.
I will try to get updates out in a few hours. Right now I am banging complex search strings at the parser.
No comments:
Post a Comment