![]() |
KVIrc 5.2.4
Developer APIs
|
#include <KviKvsParser.h>
Public Types | |
enum | Flags { AssumeLocals = 1 , Pedantic = 2 } |
Public Member Functions | |
bool | error () const |
KviKvsParser (KviKvsScript *pScript, KviWindow *pOutputWindow) | |
KviKvsTreeNodeInstruction * | parse (const QChar *pBuffer, int iFlags=0) |
KviKvsTreeNodeInstruction * | parseAsExpression (const QChar *pBuffer, int iFlags=0) |
KviKvsTreeNodeInstruction * | parseAsParameter (const QChar *pBuffer, int iFlags=0) |
~KviKvsParser () | |
Static Protected Member Functions | |
static void | init () |
Private Attributes | |
bool | m_bError = false |
int | m_iFlags = 0 |
const QChar * | m_pBuffer = nullptr |
KviPointerHashTable< QString, QString > * | m_pGlobals |
KviKvsScript * | m_pScript |
const QChar * | m_ptr = nullptr |
KviWindow * | m_pWindow |
Friends | |
class | KviKvsKernel |
enum KviKvsParser::Flags |
KviKvsParser::KviKvsParser | ( | KviKvsScript * | pScript, |
KviWindow * | pOutputWindow | ||
) |
References m_pGlobals, m_pScript, and m_pWindow.
KviKvsParser::~KviKvsParser | ( | ) |
References m_pGlobals.
|
inline |
Referenced by errorBadChar(), parse(), parseAsExpression(), parseAsParameter(), parseBindingOperation(), parseCommand(), parseCommandSwitchList(), parseCommaSeparatedParameterList(), parseCommaSeparatedParameterListNoTree(), parseComment(), parseDollar(), parseExpressionBinaryOperator(), parseExpressionOperand(), parseExpressionOperandCore(), parseInstruction(), parseInstructionBlock(), parseInstructionList(), parseOperation(), parsePercent(), parseSpecialCommandClass(), parseSpecialCommandDefpopupLabelPopup(), parseSpecialCommandDo(), parseSpecialCommandFor(), parseSpecialCommandForeach(), parseSpecialCommandGlobal(), parseSpecialCommandIf(), parseSpecialCommandSwitch(), parseSpecialCommandUnset(), parseSpecialCommandWhile(), parseVoidFunctionCallOrOperation(), skipSpacesAndNewlines(), and skipToEndOfForControlBlock().
|
private |
References kvi_va_end, kvi_va_list, kvi_va_start, m_bError, and report().
|
private |
|
staticprotected |
References _REG_CNTRL_CMD, KviKvsKernel::instance(), parseSpecialCommandBreak(), parseSpecialCommandClass(), parseSpecialCommandContinue(), parseSpecialCommandDefpopup(), parseSpecialCommandDo(), parseSpecialCommandFor(), parseSpecialCommandForeach(), parseSpecialCommandGlobal(), parseSpecialCommandHelp(), parseSpecialCommandIf(), parseSpecialCommandSwitch(), parseSpecialCommandUnset(), and parseSpecialCommandWhile().
Referenced by KviKvsKernel::KviKvsKernel().
KviKvsTreeNodeInstruction * KviKvsParser::parse | ( | const QChar * | pBuffer, |
int | iFlags = 0 |
||
) |
References __tr2qs_ctx, KviPointerHashTable< Key, T >::clear(), error(), m_bError, m_iFlags, m_pBuffer, m_pGlobals, m_ptr, and parseInstructionList().
KviKvsTreeNodeInstruction * KviKvsParser::parseAsExpression | ( | const QChar * | pBuffer, |
int | iFlags = 0 |
||
) |
References __tr2qs_ctx, KviPointerHashTable< Key, T >::clear(), error(), m_bError, m_iFlags, m_pBuffer, m_pGlobals, m_ptr, and parseExpression().
KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter | ( | const QChar * | pBuffer, |
int | iFlags = 0 |
||
) |
References __tr2qs_ctx, KviPointerHashTable< Key, T >::clear(), error(), l, m_bError, m_iFlags, m_pBuffer, m_pGlobals, m_ptr, and parseCommandParameterList().
|
private |
|
private |
|
private |
Referenced by parseBindingOperationParameter().
|
private |
|
private |
References __tr2qs_ctx, KviCommandFormatter::bufferFromBlock(), KviQString::equalCI(), error(), KviKvsKernel::findCoreCallbackCommandExecRoutine(), KviKvsKernel::findCoreSimpleCommandExecRoutine(), KviKvsKernel::findSpecialCommandParsingRoutine(), KviKvsTreeNodeSwitchList::getStandardRebindingSwitch(), KviKvsKernel::instance(), KVSP_ASSERT, KVSP_curCharIsLetter, KVSP_curCharIsLetterOrNumber, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, KviKvsTreeNode::location(), parseCommandParameterList(), parseCommandSwitchList(), parseCommaSeparatedParameterList(), parseInstruction(), parseSpecialCommandPerlBegin(), parseSpecialCommandPythonBegin(), KviKvsSpecialCommandParsingRoutine::proc, r, KviKvsTreeNode::setLocation(), KviKvsTreeNodeCommand::setSwitchList(), skipSpaces(), skipSpacesAndNewlines(), and warning().
Referenced by parseInstruction().
|
private |
Referenced by parseCommandParameter().
|
private |
References KviKvsTreeNodeData::convertStringConstantToNumeric(), KVSP_curCharPointer, KVSP_curCharUnicode, l, p, parseCommandLiteralParameter(), parseParameterPercentOrDollar(), parseStringParameter(), pBegin, and KviPointerList< T >::setAutoDelete().
Referenced by parseBindingOperation(), parseCommandParameterList(), parseCommandSwitchList(), and parseOperationRightSide().
|
private |
References KVSP_ASSERT, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, l, p, parseCommandParameter(), and skipSpaces().
Referenced by parseAsParameter(), and parseCommand().
|
private |
References __tr2qs_ctx, KviKvsTreeNodeSwitchList::addLong(), KviKvsTreeNodeSwitchList::addShort(), error(), KviKvsTreeNodeSwitchList::isEmpty(), KVSP_ASSERT, KVSP_curCharIsEndOfCommand, KVSP_curCharIsLetter, KVSP_curCharIsLetterOrNumber, KVSP_curCharIsNumber, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_setCurCharPointer, KVSP_skipChar, p, parseCommandParameter(), pBegin, skipSpaces(), and warning().
Referenced by parseCommand().
|
private |
|
private |
Referenced by parseCommaSeparatedParameterList(), and parseCommaSeparatedParameterListNoTree().
|
private |
References __tr2qs_ctx, error(), KVSP_ASSERT, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, l, p, parseCommaSeparatedParameter(), and skipSpaces().
Referenced by parseCommand(), parseDollar(), parseSpecialCommandClass(), and parseSpecialCommandForeach().
|
private |
|
private |
References __tr2qs_ctx, error(), KVSP_ASSERT, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, pBegin, skipToNextLine(), and warning().
Referenced by parseInstruction(), parseSpecialCommandClass(), and skipSpacesAndNewlines().
|
private |
References __tr2qs_ctx, error(), KviKvsKernel::findCoreFunctionExecRoutine(), i, KviKvsKernel::instance(), KVSP_ASSERT, KVSP_backChar, KVSP_curCharIsFunctionStart, KVSP_curCharIsLetter, KVSP_curCharIsLetterOrNumber, KVSP_curCharIsNumber, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_setCurCharPointer, KVSP_skipChar, l, parseCommaSeparatedParameterList(), parseExpression(), parseInstructionBlock(), pBegin, r, skipSpaces(), and warning().
Referenced by parsePercentOrDollar().
|
private |
References KviKvsTreeNodeExpression::contextDescription(), KVSP_ASSERT, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, KviKvsTreeNodeExpression::parentWithPrecedenceLowerThan(), parseExpressionBinaryOperator(), parseExpressionOperand(), KviKvsTreeNodeExpression::precedence(), KviKvsTreeNodeExpression::right(), KviKvsTreeNodeExpression::setLeft(), KviKvsTreeNodeExpression::setRight(), and skipSpaces().
Referenced by parseAsExpression(), parseDollar(), parseExpressionOperand(), parsePercentOrDollar(), parseSpecialCommandDo(), parseSpecialCommandFor(), parseSpecialCommandIf(), parseSpecialCommandSwitch(), and parseSpecialCommandWhile().
|
private |
References __tr2qs_ctx, error(), KVSP_curCharPointer, KVSP_curCharUnicode, and KVSP_skipChar.
Referenced by parseExpression().
|
private |
References binary_operator_initial_char, KVSP_backChar, KVSP_curCharIsLetter, KVSP_curCharUnicode, and KVSP_skipChar.
Referenced by parseExpressionOperandCore().
|
private |
References __tr2qs_ctx, d, error(), KVSP_ASSERT, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, parseExpression(), parseExpressionOperand(), parseExpressionOperandCore(), and skipSpaces().
Referenced by parseExpression(), and parseExpressionOperand().
|
private |
References __tr2qs_ctx, KviPointerList< T >::append(), KviPointerList< T >::count(), d, error(), KviPointerList< T >::first(), KVSP_curCharIsLetterOrNumber, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, parseExpressionMightPointToOperator(), parseParameterPercentOrDollar(), parseStringParameter(), pBegin, KviPointerList< T >::setAutoDelete(), and skipSpaces().
Referenced by parseExpressionOperand().
|
private |
Referenced by parsePercentOrDollar().
|
private |
|
private |
References __tr2qs_ctx, error(), KVSP_ASSERT, KVSP_curCharIsLetter, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, parseCommand(), parseComment(), parseInstructionBlock(), and parseVoidFunctionCallOrOperation().
Referenced by parseCommand(), parseInstructionBlock(), parseInstructionList(), parseSpecialCommandClass(), parseSpecialCommandDefpopupLabelPopup(), parseSpecialCommandDo(), parseSpecialCommandFor(), parseSpecialCommandForeach(), parseSpecialCommandIf(), parseSpecialCommandSwitch(), and parseSpecialCommandWhile().
|
private |
References __tr2qs_ctx, KviKvsTreeNodeInstructionBlock::addInstruction(), error(), i, KviKvsTreeNodeInstructionBlock::instructionCount(), KVSP_ASSERT, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, parseInstruction(), pBegin, KviKvsTreeNodeInstructionBlock::releaseFirst(), skipSpacesAndNewlines(), and warning().
Referenced by parseDollar(), and parseInstruction().
|
private |
References error(), i, KVSP_ASSERT, KVSP_curCharPointer, KVSP_curCharUnicode, l, parseInstruction(), and skipSpacesAndNewlines().
Referenced by parse().
|
private |
References __tr2qs_ctx, d, error(), KVSP_curCharIsEndOfBuffer, KVSP_curCharIsEndOfCommand, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, parseBindingOperation(), parseOperationRightSide(), pBegin, SELF_OPERATOR, skipSpaces(), and warning().
Referenced by parseVoidFunctionCallOrOperation().
|
private |
References KVSP_curCharIsEndOfCommand, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, l, p, parseCommandParameter(), pBegin, and skipSpaces().
Referenced by parseOperation().
|
private |
|
private |
References __tr2qs_ctx, AssumeLocals, error(), KviPointerHashTable< Key, T >::find(), KVSP_ASSERT, KVSP_curCharIsLetterOrNumber, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, m_iFlags, m_pGlobals, and pBegin.
Referenced by parsePercentOrDollar(), and parseSpecialCommandUnset().
|
private |
References KviKvsTreeNodeData::canEvaluateInObjectScope(), e, KviKvsKernel::findCoreFunctionExecRoutine(), i, KviKvsKernel::instance(), KVSP_ASSERT, KVSP_backChar, KVSP_curCharIsFunctionStart, KVSP_curCharIsLetter, KVSP_curCharIsNumber, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_setCurCharPointer, KVSP_skipChar, parseDollar(), parseExpression(), parseHashKey(), parsePercent(), parsePercentOrDollar(), pBegin, r, and skipSpaces().
Referenced by parseParameterPercentOrDollar(), parsePercentOrDollar(), parseSpecialCommandForeach(), and parseVoidFunctionCallOrOperation().
|
private |
|
private |
Referenced by parseSpecialCommandDefpopup(), and parseSpecialCommandSwitch().
|
private |
References __tr2qs_ctx, KVSP_curCharIsEndOfBuffer, KVSP_curCharIsEndOfCommand, KVSP_curCharPointer, KVSP_skipChar, and pBegin.
Referenced by init().
|
private |
References __tr2qs_ctx, KviKvsTreeNodeSpecialCommandClass::addFunctionDefinition(), KviCommandFormatter::bufferFromBlock(), error(), errorBadChar(), KviKvsObjectFunctionHandler::Internal, KVSP_curCharIsEndOfBuffer, KVSP_curCharIsLetter, KVSP_curCharIsLetterOrNumber, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, l, parseCommaSeparatedParameterList(), parseComment(), parseInstruction(), pBegin, skipSpaces(), and skipSpacesAndNewlines().
Referenced by init().
|
private |
References __tr2qs_ctx, KVSP_curCharIsEndOfBuffer, KVSP_curCharIsEndOfCommand, KVSP_curCharPointer, KVSP_skipChar, pBegin, skipSpaces(), and warning().
Referenced by init().
|
private |
References __tr2qs_ctx, errorBadChar(), KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, parseSingleParameterInParenthesis(), parseSpecialCommandDefpopupLabelPopup(), pBegin, skipSpacesAndNewlines(), and warning().
Referenced by init().
|
private |
References __tr2qs_ctx, KviCommandFormatter::bufferFromBlock(), error(), errorBadChar(), EXTRACT_POPUP_LABEL_CONDITION, EXTRACT_POPUP_LABEL_PARAMETERS, KviPointerList< T >::first(), KVSP_curCharIsEndOfBuffer, KVSP_curCharIsLetter, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, KviPointerList< T >::next(), parseInstruction(), parseSpecialCommandDefpopupLabelPopup(), pBegin, KviKvsTreeNodeSpecialCommandDefpopupConditionalLabel::setCondition(), KviKvsTreeNodeSpecialCommandDefpopupConditionalLabelWithTextAndIcon::setIcon(), KviKvsTreeNodeSpecialCommandDefpopupLabel::setItemName(), KviKvsTreeNodeSpecialCommandDefpopupConditionalLabelWithTextAndIcon::setText(), skipSpacesAndNewlines(), and warning().
Referenced by parseSpecialCommandDefpopup(), and parseSpecialCommandDefpopupLabelPopup().
|
private |
References __tr2qs_ctx, e, error(), errorBadChar(), i, j, KVSP_curCharIsEndOfBuffer, KVSP_curCharIsEndOfCommand, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, parseExpression(), parseInstruction(), pBegin, skipSpaces(), skipSpacesAndNewlines(), and warning().
Referenced by init().
|
private |
References __tr2qs_ctx, e, error(), errorBadChar(), KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_setCurCharPointer, KVSP_skipChar, parseExpression(), parseInstruction(), pBegin, skipSpaces(), skipSpacesAndNewlines(), skipToEndOfForControlBlock(), and warning().
Referenced by init().
|
private |
References __tr2qs_ctx, d, error(), errorBadChar(), KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, l, parseCommaSeparatedParameterList(), parseInstruction(), parsePercentOrDollar(), skipSpaces(), skipSpacesAndNewlines(), and warning().
Referenced by init().
|
private |
References __tr2qs_ctx, error(), KVSP_curCharIsEndOfBuffer, KVSP_curCharIsEndOfCommand, KVSP_curCharIsLetterOrNumber, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, m_pGlobals, pBegin, KviPointerHashTable< Key, T >::replace(), KviPointerHashTable< Key, T >::setAutoDelete(), skipSpaces(), and warning().
Referenced by init().
|
private |
References KviKvsKernel::findCoreSimpleCommandExecRoutine(), KviKvsKernel::instance(), KVSP_curCharIsEndOfBuffer, KVSP_curCharIsEndOfCommand, KVSP_curCharPointer, KVSP_skipChar, p, pBegin, r, and skipSpaces().
Referenced by init().
|
private |
References __tr2qs_ctx, e, error(), errorBadChar(), i, KVSP_backChar, KVSP_curCharIsLetterOrNumber, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_setCurCharPointer, KVSP_skipChar, parseExpression(), parseInstruction(), pBegin, skipSpacesAndNewlines(), and warning().
Referenced by init().
|
private |
Referenced by parseCommand().
|
private |
Referenced by parseCommand().
|
private |
References __tr2qs_ctx, KviKvsTreeNodeSpecialCommandSwitch::addLabel(), e, error(), errorBadChar(), KviKvsTreeNodeSpecialCommandSwitch::isEmpty(), KVSP_curCharIsEndOfBuffer, KVSP_curCharIsLetter, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, parseExpression(), parseInstruction(), parseSingleParameterInParenthesis(), pBegin, KviKvsTreeNodeSpecialCommandSwitchLabel::setInstruction(), KviKvsTreeNodeSpecialCommandSwitchLabel::setParameter(), KviKvsTreeNodeSpecialCommandSwitchLabel::setTerminatingBreak(), skipSpaces(), skipSpacesAndNewlines(), and warning().
Referenced by init().
|
private |
References __tr2qs_ctx, KviPointerList< T >::append(), KviPointerList< T >::count(), d, error(), KVSP_curCharIsEndOfBuffer, KVSP_curCharIsEndOfCommand, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, parsePercent(), KviPointerList< T >::setAutoDelete(), skipSpaces(), and warning().
Referenced by init().
|
private |
References __tr2qs_ctx, e, error(), i, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, parseExpression(), parseInstruction(), pBegin, skipSpacesAndNewlines(), and warning().
Referenced by init().
|
private |
|
private |
Referenced by parseBindingOperationParameter(), parseCommandParameter(), and parseExpressionOperandCore().
|
private |
References __tr2qs_ctx, error(), KVSP_ASSERT, KVSP_curCharIsEndOfBuffer, KVSP_curCharIsEndOfCommand, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, parseOperation(), parsePercentOrDollar(), pBegin, r, KviKvsTreeNodeOperation::setTargetVariableReference(), skipSpaces(), and warning().
Referenced by parseInstruction().
|
private |
|
private |
References KVSP_backChar, KVSP_curCharUnicode, KVSP_skipChar, and skipSpaces().
Referenced by parseBindingOperation(), parseCommand(), parseCommandParameterList(), parseCommandSwitchList(), parseCommaSeparatedParameterList(), parseCommaSeparatedParameterListNoTree(), parseDollar(), parseExpression(), parseExpressionOperand(), parseExpressionOperandCore(), parseOperation(), parseOperationRightSide(), parsePercentOrDollar(), parseSpecialCommandClass(), parseSpecialCommandContinue(), parseSpecialCommandDo(), parseSpecialCommandFor(), parseSpecialCommandForeach(), parseSpecialCommandGlobal(), parseSpecialCommandHelp(), parseSpecialCommandSwitch(), parseSpecialCommandUnset(), parseVoidFunctionCallOrOperation(), and skipSpaces().
|
private |
References error(), KVSP_backChar, KVSP_curCharUnicode, KVSP_skipChar, parseComment(), and skipSpacesAndNewlines().
Referenced by parseCommand(), parseInstructionBlock(), parseInstructionList(), parseSpecialCommandClass(), parseSpecialCommandDefpopup(), parseSpecialCommandDefpopupLabelPopup(), parseSpecialCommandDo(), parseSpecialCommandFor(), parseSpecialCommandForeach(), parseSpecialCommandIf(), parseSpecialCommandSwitch(), parseSpecialCommandWhile(), and skipSpacesAndNewlines().
|
private |
|
private |
References __tr2qs_ctx, error(), KVSP_ASSERT, KVSP_curCharPointer, KVSP_curCharUnicode, and KVSP_skipChar.
Referenced by parseSpecialCommandFor().
|
private |
References KVSP_curCharUnicode, and KVSP_skipChar.
Referenced by parseComment().
|
private |
References kvi_va_end, kvi_va_list, kvi_va_start, and report().
Referenced by parseCommand(), parseCommandSwitchList(), parseComment(), parseDollar(), parseInstructionBlock(), parseOperation(), parseSpecialCommandContinue(), parseSpecialCommandDefpopup(), parseSpecialCommandDefpopupLabelPopup(), parseSpecialCommandDo(), parseSpecialCommandFor(), parseSpecialCommandForeach(), parseSpecialCommandGlobal(), parseSpecialCommandIf(), parseSpecialCommandSwitch(), parseSpecialCommandUnset(), parseSpecialCommandWhile(), and parseVoidFunctionCallOrOperation().
|
friend |
|
private |
Referenced by error(), parse(), parseAsExpression(), and parseAsParameter().
|
private |
Referenced by parse(), parseAsExpression(), parseAsParameter(), and parsePercent().
|
private |
Referenced by parse(), parseAsExpression(), parseAsParameter(), and report().
|
private |
Referenced by KviKvsParser(), parse(), parseAsExpression(), parseAsParameter(), parsePercent(), parseSpecialCommandGlobal(), and ~KviKvsParser().
|
private |
Referenced by KviKvsParser(), and report().
|
private |
Referenced by parse(), parseAsExpression(), and parseAsParameter().
|
private |
Referenced by KviKvsParser(), and report().