Parser for Short Hand Syntax (->)

SVN:b1312[5745]
This commit is contained in:
Eric Espié
2018-04-26 13:12:42 +00:00
parent 1c87c15222
commit d1d50e0448
7 changed files with 725 additions and 638 deletions

View File

@@ -88,6 +88,8 @@ where = "WHERE"
join = "JOIN"
on = "ON"
coma = ","
arrow = "->"
colon = ":"
par_open = "("
par_close = ")"
math_div = "/"
@@ -170,7 +172,7 @@ numval = /([0-9]+)/
strval = /"([^\\"]|\\"|\\\\)*"|'.chr(94).chr(39).'([^\\'.chr(39).']|\\'.chr(39).'|\\\\)*'.chr(39).'/
name = /([_a-zA-Z][_a-zA-Z0-9]*|`[^`]+`)/
varname = /:([_a-zA-Z][_a-zA-Z0-9]*->[_a-zA-Z][_a-zA-Z0-9]*|[_a-zA-Z][_a-zA-Z0-9]*)/
dot = "."
dot = "."
*/
/*!lex2php
@@ -198,6 +200,12 @@ join {
on {
$this->token = OQLParser::ON;
}
arrow {
$this->token = OQLParser::ARROW;
}
colon {
$this->token = OQLParser::COLON;
}
math_div {
$this->token = OQLParser::MATH_DIV;
}
@@ -396,6 +404,7 @@ varname {
dot {
$this->token = OQLParser::DOT;
}
*/
}