def col (loc,strg):
s = strg<EOL>return <NUM_LIT:1> if <NUM_LIT:0><loc<len(s) and s[loc-<NUM_LIT:1>] == '<STR_LIT:\n>' else loc - s.rfind("<STR_LIT:\n>", <NUM_LIT:0>, loc)<EOL>
Returns current column within a string, counting newlines as line separators.
   The first column is number 1.

   Note: the default parsing behavior is to expand tabs in the input string
   before starting the parsing process.  See
   :class:`ParserElement.parseString` for more
   information on parsing strings containing ``<TAB>`` s, and suggested
   methods to maintain a consistent view of the parsed string, the parse
   location, and line and column positions within the parsed string.