KVIrc
4.9.2
DeveloperAPIs
|
#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 |
int | m_iFlags |
const QChar * | m_pBuffer |
KviPointerHashTable< QString, QString > * | m_pGlobals |
KviKvsScript * | m_pScript |
const QChar * | m_ptr |
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(), KviKvsScript::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().
Referenced by KviKvsScript::parse().
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().
Referenced by KviKvsScript::parse().
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().
Referenced by KviKvsScript::parse().
|
private |
|
private |
|
private |
Referenced by parseBindingOperationParameter().
|
private |
References KviPointerList< T >::append(), KviPointerList< T >::count(), KviPointerList< T >::first(), KVSP_curCharPointer, KVSP_curCharUnicode, l, p, parseBindingOperationLiteralParameter(), parseParameterPercentOrDollar(), parseStringParameter(), and KviPointerList< T >::setAutoDelete().
Referenced by parseBindingOperation().
|
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 |
|
private |
Referenced by parseBindingOperation(), parseCommandParameterList(), parseCommandSwitchList(), and parseOperationRightSide().
|
private |
References KviKvsTreeNodeDataList::addItem(), 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(), skipSpaces(), and warning().
Referenced by parseCommand().
|
private |
|
private |
Referenced by parseCommaSeparatedParameterList(), and parseCommaSeparatedParameterListNoTree().
|
private |
References __tr2qs_ctx(), KviKvsTreeNodeDataList::addItem(), 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, 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(), 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, KviKvsTreeNode::location(), parseExpression(), parseExpressionOperandCore(), and skipSpaces().
Referenced by parseExpression().
|
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(), 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(), KviKvsTreeNodeInstructionBlock::releaseFirst(), skipSpacesAndNewlines(), and warning().
Referenced by parseDollar(), and parseInstruction().
|
private |
References KviKvsTreeNodeInstructionBlock::addInstruction(), error(), i, KviKvsTreeNodeInstructionBlock::instructionCount(), KVSP_ASSERT, KVSP_curCharPointer, KVSP_curCharUnicode, l, parseInstruction(), KviKvsTreeNodeInstructionBlock::releaseFirst(), and skipSpacesAndNewlines().
Referenced by parse().
|
private |
|
private |
References KviPointerList< T >::append(), KviPointerList< T >::count(), KviPointerList< T >::first(), KVSP_curCharIsEndOfCommand, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, l, p, parseCommandParameter(), KviPointerList< T >::setAutoDelete(), and skipSpaces().
Referenced by parseOperation().
|
private |
References KVSP_ASSERT, KVSP_backChar, KVSP_curCharIsFunctionStart, KVSP_curCharIsLetter, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, and parsePercentOrDollar().
Referenced by parseBindingOperationParameter(), and parseExpressionOperandCore().
|
private |
References __tr2qs_ctx(), AssumeLocals, error(), KviPointerHashTable< Key, T >::find(), KVSP_ASSERT, KVSP_curCharIsLetterOrNumber, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, m_iFlags, and m_pGlobals.
Referenced by parsePercentOrDollar(), and parseSpecialCommandUnset().
|
private |
References KviKvsTreeNodeData::canEvaluateInObjectScope(), KviKvsTreeNodeData::canEvaluateToObjectReference(), 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(), r, and skipSpaces().
Referenced by parseParameterPercentOrDollar(), parseSpecialCommandForeach(), and parseVoidFunctionCallOrOperation().
|
private |
|
private |
Referenced by parseSpecialCommandDefpopup(), and parseSpecialCommandSwitch().
|
private |
References __tr2qs_ctx(), KVSP_curCharIsEndOfBuffer, KVSP_curCharIsEndOfCommand, KVSP_curCharPointer, KVSP_skipChar, and KviMessageBox::warning().
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(), skipSpaces(), and skipSpacesAndNewlines().
Referenced by init().
|
private |
References __tr2qs_ctx(), KVSP_curCharIsEndOfBuffer, KVSP_curCharIsEndOfCommand, KVSP_curCharPointer, KVSP_skipChar, skipSpaces(), and warning().
Referenced by init().
|
private |
References __tr2qs_ctx(), errorBadChar(), KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, parseSingleParameterInParenthesis(), parseSpecialCommandDefpopupLabelPopup(), skipSpacesAndNewlines(), and warning().
Referenced by init().
|
private |
References __tr2qs_ctx(), KviKvsTreeNodeSpecialCommandDefpopupLabelPopup::addLabel(), 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(), KviKvsTreeNodeSpecialCommandDefpopupConditionalLabel::setCondition(), KviKvsTreeNodeSpecialCommandDefpopupConditionalLabelWithTextAndIcon::setIcon(), KviKvsTreeNodeSpecialCommandDefpopupLabel::setItemName(), KviKvsTreeNodeSpecialCommandDefpopupConditionalLabelWithTextAndIcon::setText(), skipSpacesAndNewlines(), and warning().
Referenced by parseSpecialCommandDefpopup().
|
private |
References __tr2qs_ctx(), e, error(), errorBadChar(), i, j, KVSP_curCharIsEndOfBuffer, KVSP_curCharIsEndOfCommand, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, parseExpression(), parseInstruction(), skipSpaces(), skipSpacesAndNewlines(), and warning().
Referenced by init().
|
private |
References __tr2qs_ctx(), e, error(), errorBadChar(), KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_setCurCharPointer, KVSP_skipChar, parseExpression(), parseInstruction(), skipSpaces(), skipSpacesAndNewlines(), skipToEndOfForControlBlock(), and warning().
Referenced by init().
|
private |
References __tr2qs_ctx(), d, error(), errorBadChar(), KviKvsTreeNodeData::isFunctionCall(), KviKvsTreeNodeData::isReadOnly(), 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, KviPointerHashTable< Key, T >::replace(), KviPointerHashTable< Key, T >::setAutoDelete(), skipSpaces(), and warning().
Referenced by init().
|
private |
|
private |
References __tr2qs_ctx(), e, error(), errorBadChar(), i, KVSP_backChar, KVSP_curCharIsLetterOrNumber, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_setCurCharPointer, KVSP_skipChar, parseExpression(), parseInstruction(), 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(), 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(), skipSpacesAndNewlines(), and warning().
Referenced by init().
|
private |
|
private |
Referenced by parseBindingOperationParameter(), and parseExpressionOperandCore().
|
private |
References __tr2qs_ctx(), error(), KviKvsTreeNodeData::isFunctionCall(), KviKvsTreeNodeData::isReadOnly(), KVSP_ASSERT, KVSP_curCharIsEndOfBuffer, KVSP_curCharIsEndOfCommand, KVSP_curCharPointer, KVSP_curCharUnicode, KVSP_skipChar, KviKvsTreeNode::location(), parseOperation(), parsePercentOrDollar(), r, KviKvsTreeNodeOperation::setTargetVariableReference(), skipSpaces(), and warning().
Referenced by parseInstruction().
|
private |
|
private |
References KVSP_backChar, KVSP_curCharUnicode, and KVSP_skipChar.
Referenced by parseBindingOperation(), parseCommand(), parseCommandParameterList(), parseCommandSwitchList(), parseCommaSeparatedParameterList(), parseCommaSeparatedParameterListNoTree(), parseDollar(), parseExpression(), parseExpressionOperand(), parseExpressionOperandCore(), parseOperation(), parseOperationRightSide(), parsePercentOrDollar(), parseSpecialCommandClass(), parseSpecialCommandContinue(), parseSpecialCommandDo(), parseSpecialCommandFor(), parseSpecialCommandForeach(), parseSpecialCommandGlobal(), parseSpecialCommandHelp(), parseSpecialCommandSwitch(), parseSpecialCommandUnset(), and parseVoidFunctionCallOrOperation().
|
private |
References error(), KVSP_backChar, KVSP_curCharUnicode, KVSP_skipChar, and parseComment().
Referenced by parseCommand(), parseInstructionBlock(), parseInstructionList(), parseSpecialCommandClass(), parseSpecialCommandDefpopup(), parseSpecialCommandDefpopupLabelPopup(), parseSpecialCommandDo(), parseSpecialCommandFor(), parseSpecialCommandForeach(), parseSpecialCommandIf(), parseSpecialCommandSwitch(), and parseSpecialCommandWhile().
|
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().