fparser.cpp File Reference
#include "fparser.h"#include "fpconfig.h"#include "fptypes.h"#include <cstdlib>#include <cstring>#include <cctype>#include <cmath>

Go to the source code of this file.
Defines | |
| #define | M_PI 3.1415926535897932384626433832795 |
Functions | |
| const FuncDefinition * | fp_lower_bound (const FuncDefinition *first, const FuncDefinition *last, const FuncDefinition &value) |
| const FuncDefinition * | FindFunction (const char *F) |
| bool | ParseVars (const string &Vars, map< string, unsigned > &dest) |
| int | IsOperator (const char *F) |
| void | sws (const char *F, int &Ind) |
| int | doubleToInt (double d) |
| double | Min (double d1, double d2) |
| double | Max (double d1, double d2) |
| double | DegreesToRadians (double degrees) |
| double | RadiansToDegrees (double radians) |
Variables | |
| const unsigned | FUNC_AMOUNT = sizeof(Functions)/sizeof(Functions[0]) |
| const char * | ParseErrorMessage [] |
| const char *const | fpOperators [] |
Define Documentation
| #define M_PI 3.1415926535897932384626433832795 |
Definition at line 24 of file fparser.cpp.
Referenced by OODPlug::calculateArc(), FPointArray::calculateArc(), cosd(), ScPreview::createPreview(), DegreesToRadians(), ColorWheel::drawBorderPoint(), ScPageOutput::DrawItem_PathText(), ScPageOutput::DrawItem_PolyLine(), Canvas::drawLinkFrameLine(), PageItem_PolyLine::DrawObj_Item(), PageItem_PathText::DrawObj_Item(), ScPageOutput::DrawPattern(), SVGPlug::finishNode(), OODPlug::finishNodeParsing(), PolygonWidget::GetMaxFaktor(), PolygonWidget::GetZeroFaktor(), LegacyMode::mouseMoveEvent(), LegacyMode::mouseReleaseEvent(), FreehandMode::mouseReleaseEvent(), PropertiesPalette::NewH(), PropertiesPalette::NewW(), PropertiesPalette::NewX(), PropertiesPalette::NewY(), OODPlug::parseTransform(), PDFLibCore::PDF_ProcessItem(), PDFLibCore::PDF_ProcessTableItem(), PDFLibCore::PDF_TemplatePage(), AIPlug::processData(), PSLib::ProcessItem(), AIPlug::processRaster(), RegularPolygon(), RegularPolygonF(), PathStrokerPlugin::run(), ScribusDoc::scaleGroup(), sind(), ScribusDoc::SizeItem(), ColorWheel::valueFromPoint(), and xy2Deg().
Function Documentation
| double @204::DegreesToRadians | ( | double | degrees | ) | [inline, static] |
| int @204::doubleToInt | ( | double | d | ) | [inline, static] |
| const FuncDefinition* @204::FindFunction | ( | const char * | F | ) | [inline, static] |
Definition at line 51 of file fparser.cpp.
References fp_lower_bound(), FUNCTIONPARSERTYPES::Functions, and FUNCTIONPARSERTYPES::FuncDefinition::nameLength.
Referenced by FunctionParser::CheckSyntax(), FunctionParser::CompileElement(), and FunctionParser::isValidName().
| const FuncDefinition* @204::fp_lower_bound | ( | const FuncDefinition * | first, | |
| const FuncDefinition * | last, | |||
| const FuncDefinition & | value | |||
| ) | [static] |
| int @204::IsOperator | ( | const char * | F | ) | [inline, static] |
Definition at line 341 of file fparser.cpp.
References op.
Referenced by FunctionParser::CheckSyntax().
| double @204::Max | ( | double | d1, | |
| double | d2 | |||
| ) | [inline, static] |
| double @204::Min | ( | double | d1, | |
| double | d2 | |||
| ) | [inline, static] |
| bool @204::ParseVars | ( | const string & | Vars, | |
| map< string, unsigned > & | dest | |||
| ) | [static] |
Definition at line 192 of file fparser.cpp.
References FUNCTIONPARSERTYPES::VarBegin.
Referenced by FunctionParser::Parse().
| double @204::RadiansToDegrees | ( | double | radians | ) | [inline, static] |
| void @204::sws | ( | const char * | F, | |
| int & | Ind | |||
| ) | [inline, static] |
Definition at line 356 of file fparser.cpp.
Referenced by FunctionParser::CheckSyntax(), FunctionParser::CompileAddition(), FunctionParser::CompileAnd(), FunctionParser::CompileComparison(), FunctionParser::CompileElement(), FunctionParser::CompileExpression(), FunctionParser::CompileFunctionParams(), FunctionParser::CompileIf(), FunctionParser::CompileMult(), FunctionParser::CompileOr(), FunctionParser::CompilePow(), and FunctionParser::CompileUnaryMinus().
Variable Documentation
const char* const fpOperators[] [static] |
Initial value:
{
"+", "-", "*", "/", "%", "^",
"=", "!=", "<=", "<", ">=", ">", "&", "|",
0
}
Definition at line 332 of file fparser.cpp.
const unsigned FUNC_AMOUNT = sizeof(Functions)/sizeof(Functions[0]) [static] |
Definition at line 29 of file fparser.cpp.
const char* ParseErrorMessage[] [static] |
Initial value:
{
"Syntax error",
"Mismatched parenthesis",
"Missing ')'",
"Empty parentheses",
"Syntax error: Operator expected",
"Not enough memory",
"An unexpected error occurred. Please make a full bug report "
"to the author",
"Syntax error in parameter 'Vars' given to "
"FunctionParser::Parse()",
"Illegal number of parameters to function",
"Syntax error: Premature end of string",
"Syntax error: Expecting ( after function",
""
}
Definition at line 172 of file fparser.cpp.
Referenced by FunctionParser::ErrorMsg().
