def _get_sql_table(token_value):
  """Returns SqlTable tuple for the given token_value."""
  token_value = token_value.lower()
  if ' as ' in token_value:
    # Table is aliased.
    splits = token_value.split(' as ')
    if len(splits) != 2:
      raise ParseError('Error parsing token: %s' % token_value)
    return SqlTable(table_name=splits[0], alias=splits[1])
  else:
    # Table is not aliased.
    return SqlTable(table_name=token_value, alias=None)
Returns SqlTable tuple for the given token_value.
language/xsp/data_preprocessing/abstract_sql.py