Documentation

Parser
in package

OASIS-CQL Parser

Provides Level 1 variant 2.b) conformance.

http://docs.oasis-open.org/search-ws/searchRetrieve/v1.0/os/part5-cql/searchRetrieve-v1.0-os-part5-cql.html

Tags
author

zozlak

Table of Contents

Constants

STATE_NOTERM  = 1
STATE_TERM  = 2
TOKEN_REGEX  = '([()/<=>]|<=|>=|==)|([^"()/<=>\\s]+)|"([\\\\]"|[^"])*"'

Properties

$allowedBoolOp  : mixed
$queryTree  : Term

Methods

__toString()  : string
asTsquery()  : string
parse()  : mixed
setAllowedBoolOp()  : void
checkQueryTree()  : void
parseLogical()  : Term
parseSimple()  : Term
parseTokens()  : array<string|int, Token>

Constants

STATE_NOTERM

public mixed STATE_NOTERM = 1

STATE_TERM

public mixed STATE_TERM = 2

TOKEN_REGEX

public mixed TOKEN_REGEX = '([()/<=>]|<=|>=|==)|([^"()/<=>\\s]+)|"([\\\\]"|[^"])*"'

Properties

$allowedBoolOp

private mixed $allowedBoolOp = ['and', 'or', 'not', 'prox']

Methods

__toString()

public __toString() : string
Return values
string

asTsquery()

public asTsquery() : string
Return values
string

parse()

public parse(string $query) : mixed
Parameters
$query : string

setAllowedBoolOp()

public setAllowedBoolOp(array<string|int, string> $allowed) : void
Parameters
$allowed : array<string|int, string>

checkQueryTree()

private checkQueryTree(Term $term) : void
Parameters
$term : Term

parseLogical()

private parseLogical(array<string|int, Token&$tokens) : Term
Parameters
$tokens : array<string|int, Token>
Return values
Term

parseSimple()

private parseSimple(array<string|int, mixed> &$tokens) : Term
Parameters
$tokens : array<string|int, mixed>
Return values
Term

parseTokens()

private parseTokens(string $query) : array<string|int, Token>
Parameters
$query : string
Return values
array<string|int, Token>

        
On this page

Search results