scans len bytes (including possibly NUL's) starting at location bytes.
Note that both of these functions create and scan a copy of the string or bytes. (This may be desirable, since yylex() modifies the contents of the buffer it is scanning.) You can avoid the copy by using:
yy_scan_buffer(char *base, yy_size_t size)
which scans in place the buffer starting at base, consisting of size bytes, the last two bytes of which must be YY_END_OF_BUFFER_CHAR (ASCII NUL). These last two bytes are not scanned; thus, scanning consists of base[0] through base[size-2], inclusive.
If you fail to set up base in this manner (i.e., forget the final two YY_END_OF_BUFFER_CHAR bytes), then yy_scan_buffer() returns a nil pointer instead of creating a new input buffer.
The type yy_size_t is an integral type to which you can cast an integer expression reflecting the size of the buffer.