The class paceval_cScanner is derived from paceval_cRegisteredObject and encapsulates the exploration of mathematical strings as parts of the user's function.
More...
#include "inc/paceval_cScanner.h"
The class paceval_cScanner is derived from paceval_cRegisteredObject and encapsulates the exploration of mathematical strings as parts of the user's function.
The scanner itself is controlled by the paceval_cSyntacticAnalysis object. The user's function is run through once from left to right and all node objects are created in a single run, which is very performant.
◆ paceval_cScanner()
the constructor of paceval_cScanner
- Parameters
-
| handle_CleanupHandler_in | is the associated handler for deleting this registered object |
◆ ~paceval_cScanner()
| paceval_cScanner::~paceval_cScanner |
( |
| ) |
|
◆ addScannerCharacter()
| unsigned long paceval_cScanner::addScannerCharacter |
( |
int | character_in | ) |
|
|
private |
adds a character with its ASCII value to the scanned string of variable length and returns its position in the string
- Parameters
-
| character_in | specifies the character to be added |
◆ doScanning()
carries out the next step of scanning and returns the mathematical character type found
◆ getCharacter()
| int paceval_cScanner::getCharacter |
( |
| ) |
|
|
private |
gets the next character in the user's function and returns its ASCII value (incrementing the position by 1)
◆ getLookAheadMathematicalCharacterType()
gets the next mathematical character type
◆ getMainPositionOfScanner()
| long paceval_cScanner::getMainPositionOfScanner |
( |
| ) |
|
gets the current main position of the scanner in the user's function
◆ getScannerString()
| const char * paceval_cScanner::getScannerString |
( |
long * | lengthOfScannerString_out | ) |
|
gets the pointer to the last scanned string of variable length (this can be variable identifiers, constants and function names)
- Parameters
-
| lengthOfScannerString_out | this buffer retrieves the length of the string |
◆ identifyMatch()
identifies whether the current status of the scanner matches the newly scanned mathematical character type or not (in this case an error is thrown as an exception)
- Parameters
-
| eMathematicalCharacterType_in | specifies the newly scanned type of paceval_eMathematicalCharacterTypes |
◆ increaseScannerStringSize()
| void paceval_cScanner::increaseScannerStringSize |
( |
| ) |
|
|
private |
increases the buffer of the scanned string of variable length
◆ initializeData()
| void paceval_cScanner::initializeData |
( |
const char * | functionString_in | ) |
|
initiates the data held by this paceval_cScanner
- Parameters
-
| functionString_in | specifies the user's function |
◆ isAlphabetic()
| bool paceval_cScanner::isAlphabetic |
( |
int | character_in | ) |
|
|
private |
checks whether the character with this ASCII value is an alphabetic character (true) or not (false)
- Parameters
-
| character_in | specifies the character to be checked |
◆ isAlphanumeric()
| bool paceval_cScanner::isAlphanumeric |
( |
int | character_in | ) |
|
|
private |
checks whether the character with this ASCII value is an alphanumeric character (true) or not (false)
- Parameters
-
| character_in | specifies the character to be checked |
◆ isNumericalDigit()
| bool paceval_cScanner::isNumericalDigit |
( |
int | character_in | ) |
|
|
private |
checks whether the character with this ASCII value is a numeric character (true) or not (false)
- Parameters
-
| character_in | specifies the character to be checked |
◆ resetScannerString()
| void paceval_cScanner::resetScannerString |
( |
| ) |
|
|
private |
resets the scanned string of variable length (to save time, only the length is set to zero)
◆ setMainPositionOfScanner()
| void paceval_cScanner::setMainPositionOfScanner |
( |
long | mainPositionOfScanner_in | ) |
|
sets the new main position of the scanner in the user's function (this can also be referred to as the start of the position of interest and is also used for error outputs)
- Parameters
-
| mainPositionOfScanner_in | specifies the new main position of the scanner |
◆ ungetCharacter()
| void paceval_cScanner::ungetCharacter |
( |
| ) |
|
|
private |
ungets the character (this decreases the position by 1)
◆ bracketsCounter
| long paceval_cScanner::bracketsCounter |
|
private |
stores the number of opening brackets minus the number of closing brackets
◆ handle_functionString
| const char* paceval_cScanner::handle_functionString |
|
private |
stores the pointer to the user function
◆ increaseCounter
| unsigned long paceval_cScanner::increaseCounter |
|
private |
stores how often the buffer has already been increased
◆ lastMathematicalCharacterType
stores the last scanned mathematical character type
◆ length_functionString
| unsigned long paceval_cScanner::length_functionString |
|
private |
stores the length of the user function
◆ lengthBuffer_ScannerString
| unsigned long paceval_cScanner::lengthBuffer_ScannerString |
|
private |
the length of the buffer for the last scanned string
◆ lengthUsed_ScannerString
| unsigned long paceval_cScanner::lengthUsed_ScannerString |
|
private |
the length of characters used in the last scanned string
◆ lookAheadMathematicalCharacterType
stores the next scanned mathematical character type
◆ mainPositionOfScanner
| long paceval_cScanner::mainPositionOfScanner |
|
private |
gets the current main position of the scanner in the user's function
◆ position
| unsigned long paceval_cScanner::position |
|
private |
the current position of the scanner in the user function
◆ scannerString
| char* paceval_cScanner::scannerString |
|
private |
stores the last scanned string of variable length (this can be variable identifiers, constants and function names)
The documentation for this class was generated from the following files: