Loading...
Searching...
No Matches
by::tokenScanable Class Referenceabstract

Interface for token scanning functionality. More...

#include <tokenScanable.hpp>

Inheritance diagram for by::tokenScanable:
by::parser by::tokenScan by::indentScan by::normalScan

Public Member Functions

nint onScan (parser &ps, YYSTYPE *val, YYLTYPE *loc, yyscan_t scanner)
 Default entry point for token scanning.
 
virtual nint onScan (parser &ps, YYSTYPE *yylval, YYLTYPE *loc, yyscan_t yyscanner, nbool &isBypass)=0
 Pure virtual method for concrete token scanning implementations.
 

Detailed Description

Interface for token scanning functionality.

Defines the contract for token scanning implementations. Provides hooks for custom token processing during parsing.

Member Function Documentation

◆ onScan() [1/2]

nint by::tokenScanable::onScan ( parser & ps,
YYSTYPE * val,
YYLTYPE * loc,
yyscan_t scanner )

Default entry point for token scanning.

This non-virtual method acts as a wrapper that internally dispatches to the pure virtual onScan method, which must be implemented by concrete scanner strategies.

Parameters
psThe parser instance.
valThe YYSTYPE value pointer for the token.
locThe YYLTYPE location pointer for the token.
scannerThe Flex scanner instance.
Returns
The token ID.

◆ onScan() [2/2]

virtual nint by::tokenScanable::onScan ( parser & ps,
YYSTYPE * yylval,
YYLTYPE * loc,
yyscan_t yyscanner,
nbool & isBypass )
pure virtual

Pure virtual method for concrete token scanning implementations.

Parameters
psThe parser instance.
yylvalThe YYSTYPE value pointer for the token.
locThe YYLTYPE location pointer for the token.
yyscannerThe Flex scanner instance.
isBypassFlag indicating if indentation bypass is active.
Returns
The token ID.

Implemented in by::parser, by::tokenScan, by::normalScan, by::indentScan, by::tokenScan, and by::parser.


The documentation for this class was generated from the following file:
to Top