KVIrc  4.9.2
DeveloperAPIs
Public Types | Public Member Functions | Static Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
KviKvsParser Class Reference

#include <KviKvsParser.h>

Public Types

enum  Flags { AssumeLocals = 1, Pedantic = 2 }
 

Public Member Functions

bool error () const
 
 KviKvsParser (KviKvsScript *pScript, KviWindow *pOutputWindow)
 
KviKvsTreeNodeInstructionparse (const QChar *pBuffer, int iFlags=0)
 
KviKvsTreeNodeInstructionparseAsExpression (const QChar *pBuffer, int iFlags=0)
 
KviKvsTreeNodeInstructionparseAsParameter (const QChar *pBuffer, int iFlags=0)
 
 ~KviKvsParser ()
 

Static Protected Member Functions

static void init ()
 

Private Member Functions

void error (const QChar *pLocation, QString szMsgFmt,...)
 
void errorBadChar (const QChar *pLocation, char cExpected, const char *szCommandName)
 
KviKvsTreeNodeDataparseAt (bool bInObjScope=false)
 
KviKvsTreeNodeOperationparseBindingOperation ()
 
KviKvsTreeNodeConstantDataparseBindingOperationLiteralParameter ()
 
KviKvsTreeNodeDataparseBindingOperationParameter ()
 
KviKvsTreeNodeCommandparseCommand ()
 
KviKvsTreeNodeConstantDataparseCommandLiteralParameter ()
 
KviKvsTreeNodeDataparseCommandParameter (bool bPreferNumeric=false)
 
KviKvsTreeNodeDataListparseCommandParameterList ()
 
KviKvsTreeNodeSwitchListparseCommandSwitchList ()
 
KviKvsTreeNodeConstantDataparseCommaSeparatedLiteralParameter ()
 
KviKvsTreeNodeDataparseCommaSeparatedParameter ()
 
KviKvsTreeNodeDataListparseCommaSeparatedParameterList ()
 
KviPointerList< QString > * parseCommaSeparatedParameterListNoTree ()
 
KviKvsTreeNodeparseComment ()
 
KviKvsTreeNodeDataparseDollar (bool bInObjScope=false)
 
KviKvsTreeNodeExpressionparseExpression (char terminator)
 
KviKvsTreeNodeExpressionBinaryOperatorparseExpressionBinaryOperator ()
 
bool parseExpressionMightPointToOperator ()
 
KviKvsTreeNodeExpressionparseExpressionOperand (char terminator)
 
KviKvsTreeNodeExpressionparseExpressionOperandCore (char terminator)
 
KviKvsTreeNodeDataparseHashKey ()
 
KviKvsTreeNodeConstantDataparseHashKeyLiteralParameter ()
 
KviKvsTreeNodeInstructionparseInstruction ()
 
KviKvsTreeNodeInstructionparseInstructionBlock ()
 
KviKvsTreeNodeInstructionparseInstructionList ()
 
KviKvsTreeNodeOperationparseOperation ()
 
KviKvsTreeNodeDataparseOperationRightSide (bool bPreferNumeric=false)
 
KviKvsTreeNodeDataparseParameterPercentOrDollar ()
 
KviKvsTreeNodeVariableparsePercent (bool bInObjectScope=false)
 
KviKvsTreeNodeDataparsePercentOrDollar (bool bInObjScope=false)
 
KviKvsTreeNodeConstantDataparseSingleLiteralParameterInParenthesis ()
 
KviKvsTreeNodeDataparseSingleParameterInParenthesis ()
 
KviKvsTreeNodeCommandparseSpecialCommandBreak ()
 
KviKvsTreeNodeCommandparseSpecialCommandClass ()
 
KviKvsTreeNodeCommandparseSpecialCommandContinue ()
 
KviKvsTreeNodeCommandparseSpecialCommandDefpopup ()
 
KviKvsTreeNodeSpecialCommandDefpopupLabelPopupparseSpecialCommandDefpopupLabelPopup ()
 
KviKvsTreeNodeCommandparseSpecialCommandDo ()
 
KviKvsTreeNodeCommandparseSpecialCommandFor ()
 
KviKvsTreeNodeCommandparseSpecialCommandForeach ()
 
KviKvsTreeNodeCommandparseSpecialCommandGlobal ()
 
KviKvsTreeNodeCommandparseSpecialCommandHelp ()
 
KviKvsTreeNodeCommandparseSpecialCommandIf ()
 
KviKvsTreeNodeCommandparseSpecialCommandPerlBegin ()
 
KviKvsTreeNodeCommandparseSpecialCommandPythonBegin ()
 
KviKvsTreeNodeCommandparseSpecialCommandSwitch ()
 
KviKvsTreeNodeCommandparseSpecialCommandUnset ()
 
KviKvsTreeNodeCommandparseSpecialCommandWhile ()
 
KviKvsTreeNodeConstantDataparseStringLiteralParameter ()
 
KviKvsTreeNodeDataparseStringParameter ()
 
KviKvsTreeNodeInstructionparseVoidFunctionCallOrOperation ()
 
void report (bool bError, const QChar *pLocation, const QString &szMsgFmt, kvi_va_list va)
 
void skipSpaces ()
 
bool skipSpacesAndNewlines ()
 
void skipToEndOfCStyleComment ()
 
bool skipToEndOfForControlBlock ()
 
void skipToNextLine ()
 
void warning (const QChar *pLocation, QString szMsgFmt,...)
 

Private Attributes

bool m_bError
 
int m_iFlags
 
const QChar * m_pBuffer
 
KviPointerHashTable< QString,
QString > * 
m_pGlobals
 
KviKvsScriptm_pScript
 
const QChar * m_ptr
 
KviWindowm_pWindow
 

Friends

class KviKvsKernel
 

Member Enumeration Documentation

Enumerator
AssumeLocals 
Pedantic 

Constructor & Destructor Documentation

KviKvsParser::KviKvsParser ( KviKvsScript pScript,
KviWindow pOutputWindow 
)

References m_pGlobals, m_pScript, and m_pWindow.

KviKvsParser::~KviKvsParser ( )

References m_pGlobals.

Member Function Documentation

bool KviKvsParser::error ( ) const
inline
void KviKvsParser::error ( const QChar *  pLocation,
QString  szMsgFmt,
  ... 
)
private
void KviKvsParser::errorBadChar ( const QChar *  pLocation,
char  cExpected,
const char *  szCommandName 
)
private
void KviKvsParser::init ( )
staticprotected
KviKvsTreeNodeInstruction * KviKvsParser::parse ( const QChar *  pBuffer,
int  iFlags = 0 
)
KviKvsTreeNodeInstruction * KviKvsParser::parseAsExpression ( const QChar *  pBuffer,
int  iFlags = 0 
)
KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter ( const QChar *  pBuffer,
int  iFlags = 0 
)
KviKvsTreeNodeData* KviKvsParser::parseAt ( bool  bInObjScope = false)
private
KviKvsTreeNodeOperation * KviKvsParser::parseBindingOperation ( )
private
KviKvsTreeNodeConstantData* KviKvsParser::parseBindingOperationLiteralParameter ( )
private
KviKvsTreeNodeData * KviKvsParser::parseBindingOperationParameter ( )
private
KviKvsTreeNodeCommand * KviKvsParser::parseCommand ( )
private
KviKvsTreeNodeConstantData* KviKvsParser::parseCommandLiteralParameter ( )
private
KviKvsTreeNodeData* KviKvsParser::parseCommandParameter ( bool  bPreferNumeric = false)
private
KviKvsTreeNodeDataList * KviKvsParser::parseCommandParameterList ( )
private
KviKvsTreeNodeSwitchList * KviKvsParser::parseCommandSwitchList ( )
private
KviKvsTreeNodeConstantData* KviKvsParser::parseCommaSeparatedLiteralParameter ( )
private
KviKvsTreeNodeData* KviKvsParser::parseCommaSeparatedParameter ( )
private
KviKvsTreeNodeDataList * KviKvsParser::parseCommaSeparatedParameterList ( )
private
KviPointerList< QString > * KviKvsParser::parseCommaSeparatedParameterListNoTree ( )
private
KviKvsTreeNode * KviKvsParser::parseComment ( )
private
KviKvsTreeNodeData * KviKvsParser::parseDollar ( bool  bInObjScope = false)
private
KviKvsTreeNodeExpression * KviKvsParser::parseExpression ( char  terminator)
private
KviKvsTreeNodeExpressionBinaryOperator * KviKvsParser::parseExpressionBinaryOperator ( )
private
bool KviKvsParser::parseExpressionMightPointToOperator ( )
private
KviKvsTreeNodeExpression * KviKvsParser::parseExpressionOperand ( char  terminator)
private
KviKvsTreeNodeExpression * KviKvsParser::parseExpressionOperandCore ( char  terminator)
private
KviKvsTreeNodeData* KviKvsParser::parseHashKey ( )
private

Referenced by parsePercentOrDollar().

KviKvsTreeNodeConstantData* KviKvsParser::parseHashKeyLiteralParameter ( )
private
KviKvsTreeNodeInstruction * KviKvsParser::parseInstruction ( )
private
KviKvsTreeNodeInstruction * KviKvsParser::parseInstructionBlock ( )
private
KviKvsTreeNodeInstruction * KviKvsParser::parseInstructionList ( )
private
KviKvsTreeNodeOperation * KviKvsParser::parseOperation ( )
private
KviKvsTreeNodeData * KviKvsParser::parseOperationRightSide ( bool  bPreferNumeric = false)
private
KviKvsTreeNodeData * KviKvsParser::parseParameterPercentOrDollar ( )
private
KviKvsTreeNodeVariable * KviKvsParser::parsePercent ( bool  bInObjectScope = false)
private
KviKvsTreeNodeData * KviKvsParser::parsePercentOrDollar ( bool  bInObjScope = false)
private
KviKvsTreeNodeConstantData* KviKvsParser::parseSingleLiteralParameterInParenthesis ( )
private
KviKvsTreeNodeData* KviKvsParser::parseSingleParameterInParenthesis ( )
private
KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandBreak ( )
private
KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandClass ( )
private
KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandContinue ( )
private
KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandDefpopup ( )
private
KviKvsTreeNodeSpecialCommandDefpopupLabelPopup * KviKvsParser::parseSpecialCommandDefpopupLabelPopup ( )
private
KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandDo ( )
private
KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandFor ( )
private
KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandForeach ( )
private
KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandGlobal ( )
private
KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandHelp ( )
private
KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandIf ( )
private
KviKvsTreeNodeCommand* KviKvsParser::parseSpecialCommandPerlBegin ( )
private

Referenced by parseCommand().

KviKvsTreeNodeCommand* KviKvsParser::parseSpecialCommandPythonBegin ( )
private

Referenced by parseCommand().

KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandSwitch ( )
private
KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandUnset ( )
private
KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandWhile ( )
private
KviKvsTreeNodeConstantData* KviKvsParser::parseStringLiteralParameter ( )
private
KviKvsTreeNodeData* KviKvsParser::parseStringParameter ( )
private
KviKvsTreeNodeInstruction * KviKvsParser::parseVoidFunctionCallOrOperation ( )
private
void KviKvsParser::report ( bool  bError,
const QChar *  pLocation,
const QString &  szMsgFmt,
kvi_va_list  va 
)
private
void KviKvsParser::skipSpaces ( )
private
bool KviKvsParser::skipSpacesAndNewlines ( )
private
void KviKvsParser::skipToEndOfCStyleComment ( )
private
bool KviKvsParser::skipToEndOfForControlBlock ( )
private
void KviKvsParser::skipToNextLine ( )
private

References KVSP_curCharUnicode, and KVSP_skipChar.

Referenced by parseComment().

void KviKvsParser::warning ( const QChar *  pLocation,
QString  szMsgFmt,
  ... 
)
private

Friends And Related Function Documentation

friend class KviKvsKernel
friend

Member Data Documentation

bool KviKvsParser::m_bError
private
int KviKvsParser::m_iFlags
private
const QChar* KviKvsParser::m_pBuffer
private
KviPointerHashTable<QString, QString>* KviKvsParser::m_pGlobals
private
KviKvsScript* KviKvsParser::m_pScript
private

Referenced by KviKvsParser(), and report().

const QChar* KviKvsParser::m_ptr
private
KviWindow* KviKvsParser::m_pWindow
private

Referenced by KviKvsParser(), and report().


The documentation for this class was generated from the following files: