kDB: Knowledge DataBase
Loading...
Searching...
No Matches
kdb
kDB
SPARQL
Lexer_p.h
1
/*
2
* Copyright (c) 2008,2010,2015 Cyrille Berger <cberger@cberger.net>
3
*
4
*/
5
6
#ifndef _SPARQL_LEXER_BASE_H_
7
#define _SPARQL_LEXER_BASE_H_
8
9
class
QIODevice;
10
11
#include <QVariantHash>
12
13
#include <knowCore/ValueHash.h>
14
#include <knowCore/LexerTextStream.h>
15
16
#include "Token_p.h"
17
18
namespace
kDB
19
{
20
namespace
SPARQL
21
{
28
class
Lexer
{
29
public
:
30
Lexer
(QIODevice* sstream,
const
knowCore::ValueHash
& _bindings);
31
Lexer
(
const
QString&
string
,
const
knowCore::ValueHash
& _bindings);
32
~Lexer
();
33
public
:
34
Token
nextToken();
35
void
setCurieLexingEnabled(
bool
_v);
36
bool
isCurieLexingEnabled()
const
;
37
void
setPrefixLexingEnabled(
bool
_v);
38
void
setUriLexingEnabled(
bool
_v);
39
bool
isUriLexingEnabled()
const
;
40
void
setPLLexingEnabled(
bool
_v);
41
bool
isPLLexingEnabled()
const
;
42
protected
:
46
enum
NameMode
47
{
48
PN_LOCAL, VARNAME, IDENTIFIER
49
};
50
QString getName(
knowCore::LexerTextStream::Element
lastChar,
NameMode
nameMode);
51
Token
getDigit(
knowCore::LexerTextStream::Element
lastChar);
52
Token
getString(
const
QString& terminator,
Token::Type
_type);
53
private
:
54
struct
Private;
55
Private*
const
d;
56
};
57
}
58
}
59
60
#endif
kDB::SPARQL::Lexer
Definition
Lexer_p.h:28
kDB::SPARQL::Lexer::NameMode
NameMode
Definition
Lexer_p.h:47
knowCore::ValueHash
Definition
ValueHash.h:13
kDB::SPARQL::Token
Definition
Token_p.h:18
kDB::SPARQL::Token::Type
Type
Definition
Token_p.h:22
knowCore::LexerTextStream::Element
Definition
LexerTextStream.h:36
Generated by
1.12.0