kDB: Knowledge DataBase
Loading...
Searching...
No Matches
kDB::SPARQL::Token Struct Reference
Collaboration diagram for kDB::SPARQL::Token:

Public Types

enum  Type {
  INVALID_BINDING = -6 , UNKNOWN_BINDING = -5 , UNFINISHED_STRING = -4 , END_OF_FILE = -3 ,
  END_OF_LINE = -2 , UNKNOWN = -1 , SEMI = 0 , COLON ,
  COMA , DOT , STARTBRACE , ENDBRACE ,
  STARTBRACKET , ENDBRACKET , STARTBOXBRACKET , ENDBOXBRACKET ,
  EQUAL , DIFFERENT , AND , OR ,
  INFERIOR , INFERIOREQUAL , SUPPERIOR , SUPPERIOREQUAL ,
  PLUS , MINUS , MULTIPLY , DIVIDE ,
  EXCLAMATION , UNDERSCORECOLON , CIRCUMFLEXCIRCUMFLEX , FLOAT_CONSTANT ,
  INTEGER_CONSTANT , STRING_CONSTANT , URI_CONSTANT , NAME ,
  LANG_TAG , VARIABLE , CURIE_CONSTANT , BINDING ,
  FALSE , TRUE , A , ___
}
 

Public Member Functions

 Token (const knowCore::Curie &_curie, int _line, int _column)
 
 Token (Type _type, int _line, int _column)
 
 Token (Type _type, const QString &_string, int _line, int _column)
 
bool isExpressionTerminal ()
 
bool isConstant () const
 
bool isBinaryOperator () const
 
int binaryOperationPriority () const
 
bool isUnaryOperator () const
 
bool isOperator () const
 
bool isPrimary () const
 
QString toString () const
 
bool operator== (const Token &_rhs) const
 

Static Public Member Functions

static QString typeToString (Type)
 

Public Attributes

Type type
 type of the token
 
int line
 line of the token
 
int column
 Column of the token.
 
QString string
 String or identifier name.
 
knowCore::Curie curie
 

Member Enumeration Documentation

◆ Type

List of possible token type

Enumerator
SEMI 

;

COLON 

:

COMA 

,

DOT 
STARTBRACE 

{

ENDBRACE 

}

STARTBRACKET 

(

ENDBRACKET 

)

STARTBOXBRACKET 

[

ENDBOXBRACKET 

]

EQUAL 

=

DIFFERENT 

!=

AND 

and &&

OR 

or ||

INFERIOR 

<

INFERIOREQUAL 

<=

SUPPERIOR 

SUPPERIOREQUAL 

>=

PLUS 
  • followed by a space
MINUS 
MULTIPLY 
DIVIDE 

/

EXCLAMATION 

not !

UNDERSCORECOLON 

_:

CIRCUMFLEXCIRCUMFLEX 

^^

Constructor & Destructor Documentation

◆ Token() [1/2]

Token::Token ( Type _type,
int _line,
int _column )

Creates a token of the given type

◆ Token() [2/2]

Token::Token ( Type _type,
const QString & _string,
int _line,
int _column )

Creates an identifier or a string constant or a number constant


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