code: def find_column(token):
      
      i = token.lexpos
      input = token.lexer.lexdata
  
      while i > 0:
          if input[i - 1] == '\n':
              break
          i -= 1
  
      column = token.lexpos - i + 1
  
      return column
docs: Compute column:
              input is the input text string
              token is a token instance