This module implements a base object of a lexer with efficient buffer handling. Only at line endings checks are necessary if the buffer needs refilling.
BaseLexer=objectofRootObjbufpos*:int## the current position within the bufferbuf*:string## the buffer itself## the input streamlineNumber*:int## the current line numberoffsetBase*:int
the base lexer. Inherit your lexer from this object.
SourceEdit
Call this if you scanned over '\c' in the buffer; it returns the position to continue the scanning from. pos must be the position of the '\c'.
SourceEdit
Call this if you scanned over '\L' in the buffer; it returns the position to continue the scanning from. pos must be the position of the '\L'.
SourceEdit