def Parse(self, expression): """Parses an event filter expression. Args: expression (str): event filter expression. Returns: Expression: expression. """ if not expression: return expressions.IdentityExpression() self._Reset() self._buffer = expression token = self._GetNextToken() while token: token = self._GetNextToken() return self._Reduce()
def testCompile(self): """Tests the Compile function.""" expression = expressions.IdentityExpression() expression.Compile()