public function StringPrimary()
{
if ($this->_lexer->isNextToken(Lexer::T_IDENTIFIER)) {
$peek = $this->_lexer->glimpse();
if ($peek['value'] == '.') {
return $this->StateFieldPathExpression();
} else if ($peek['value'] == '(') {
return $this->FunctionsReturningStrings();
} else {
$this->syntaxError("'.' or '('");
}
} else if ($this->_lexer->isNextToken(Lexer::T_STRING)) {
$this->match(Lexer::T_STRING);
return $this->_lexer->token['value'];
} else if ($this->_lexer->isNextToken(Lexer::T_INPUT_PARAMETER)) {
return $this->InputParameter();
} else if ($this->_isAggregateFunction($this->_lexer->lookahead['type'])) {
return $this->AggregateExpression();
}
$this->syntaxError('StateFieldPathExpression | string | InputParameter | FunctionsReturningStrings | AggregateExpression');
}