paceval. 4.26
Documentation of the paceval. source-code, Copyright ©1994-2024. Version 1.x, 2.x, 3.x, 4.x ©1994-2025 Joerg Koenning & paceval UG [Registered Trade Mark] All rights reserved., Author(s) : Joerg Koenning
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
paceval_cScanner Class Reference

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"

Inheritance diagram for paceval_cScanner:
Inheritance graph
Collaboration diagram for paceval_cScanner:
Collaboration graph

Public Member Functions

 paceval_cScanner (paceval_cCleanupHandler *handle_CleanupHandler_in)
 
void initializeData (const char *functionString_in)
 
 ~paceval_cScanner ()
 
void identifyMatch (paceval_eMathematicalCharacterTypes eMathematicalCharacterType_in)
 
void setMainPositionOfScanner (long mainPositionOfScanner_in)
 
long getMainPositionOfScanner ()
 
paceval_eMathematicalCharacterTypes getLookAheadMathematicalCharacterType ()
 
const char * getScannerString (long *lengthOfScannerString_out)
 
- Public Member Functions inherited from paceval_cRegisteredObject
 paceval_cRegisteredObject (paceval_cCleanupHandler *handle_CleanupHandler_in)
 
 ~paceval_cRegisteredObject ()
 
void setRegisterPosition (unsigned long registerPosition_in)
 
unsigned long getRegisterPosition ()
 

Private Member Functions

int getCharacter ()
 
void ungetCharacter ()
 
bool isNumericalDigit (int character_in)
 
bool isAlphabetic (int character_in)
 
bool isAlphanumeric (int character_in)
 
unsigned long addScannerCharacter (int character_in)
 
void resetScannerString ()
 
void increaseScannerStringSize ()
 
paceval_eMathematicalCharacterTypes doScanning ()
 

Private Attributes

const char * handle_functionString
 
unsigned long length_functionString
 
paceval_eMathematicalCharacterTypes lookAheadMathematicalCharacterType
 
paceval_eMathematicalCharacterTypes lastMathematicalCharacterType
 
unsigned long position
 
long mainPositionOfScanner
 
long bracketsCounter
 
char * scannerString
 
unsigned long lengthBuffer_ScannerString
 
unsigned long lengthUsed_ScannerString
 
unsigned long increaseCounter
 

Additional Inherited Members

- Protected Attributes inherited from paceval_cRegisteredObject
paceval_cCleanupHandlerhandle_CleanupHandler
 
unsigned long registerPosition
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ paceval_cScanner()

paceval_cScanner::paceval_cScanner ( paceval_cCleanupHandler * handle_CleanupHandler_in)

the constructor of paceval_cScanner

Parameters
handle_CleanupHandler_inis the associated handler for deleting this registered object

◆ ~paceval_cScanner()

paceval_cScanner::~paceval_cScanner ( )

the destructor of paceval_cGraph

Member Function Documentation

◆ 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_inspecifies the character to be added
Here is the call graph for this function:
Here is the caller graph for this function:

◆ doScanning()

paceval_eMathematicalCharacterTypes paceval_cScanner::doScanning ( )
private

carries out the next step of scanning and returns the mathematical character type found

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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)

Here is the caller graph for this function:

◆ getLookAheadMathematicalCharacterType()

paceval_eMathematicalCharacterTypes paceval_cScanner::getLookAheadMathematicalCharacterType ( )

gets the next mathematical character type

Here is the caller graph for this function:

◆ getMainPositionOfScanner()

long paceval_cScanner::getMainPositionOfScanner ( )

gets the current main position of the scanner in the user's function

Here is the caller graph for this 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_outthis buffer retrieves the length of the string
Here is the caller graph for this function:

◆ identifyMatch()

void paceval_cScanner::identifyMatch ( paceval_eMathematicalCharacterTypes eMathematicalCharacterType_in)

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_inspecifies the newly scanned type of paceval_eMathematicalCharacterTypes
Here is the call graph for this function:
Here is the caller graph for this function:

◆ increaseScannerStringSize()

void paceval_cScanner::increaseScannerStringSize ( )
private

increases the buffer of the scanned string of variable length

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initializeData()

void paceval_cScanner::initializeData ( const char * functionString_in)

initiates the data held by this paceval_cScanner

Parameters
functionString_inspecifies the user's function
Here is the call graph for this function:
Here is the caller graph for this 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_inspecifies the character to be checked
Here is the caller graph for this function:

◆ 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_inspecifies the character to be checked
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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_inspecifies the character to be checked
Here is the caller graph for this function:

◆ resetScannerString()

void paceval_cScanner::resetScannerString ( )
private

resets the scanned string of variable length (to save time, only the length is set to zero)

Here is the caller graph for this function:

◆ 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_inspecifies the new main position of the scanner
Here is the caller graph for this function:

◆ ungetCharacter()

void paceval_cScanner::ungetCharacter ( )
private

ungets the character (this decreases the position by 1)

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ 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

paceval_eMathematicalCharacterTypes paceval_cScanner::lastMathematicalCharacterType
private

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

paceval_eMathematicalCharacterTypes paceval_cScanner::lookAheadMathematicalCharacterType
private

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:

https://paceval.com