Translation wrapper and refactoring of the ast builder

Translation wrapper that constains the chain:
datalog -> tokens -> ast -> sql -> result