Update of /cvsroot/monetdb/pathfinder/compiler/parser
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv11652
Modified Files:
parser.y scanner.l
Log Message:
undo XQuery Fulltext checkin in HEAD. Updates are now in XQFT branch
Index: parser.y
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/parser/parser.y,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- parser.y 5 Nov 2009 16:24:00 -0000 1.74
+++ parser.y 10 Nov 2009 09:44:52 -0000 1.75
@@ -373,11 +373,6 @@
%token following_colon_colon "following::"
%token following_sibling_colon_colon "following-sibling::"
%token for_dollar "for $"
-%token ftand "ftand"
-%token ftcontains "ftcontains"
-%token ftmildnot "not in"
-%token ftnot "ftnot"
-%token ftor "ftor"
%token ge "ge"
%token greater_than ">"
%token greater_than_equal ">="
@@ -400,7 +395,7 @@
%token le "le"
%token less_than "<"
%token less_than_equal "<="
-%token let "let"
+%token let_dollar "let $"
%token lparen "("
%token lt "lt"
%token lt_lt "<<"
@@ -438,7 +433,6 @@
%token satisfies "satisfies"
%token schema_attribute_lparen "schema-attribute ("
%token schema_element_lparen "schema-element ("
-%token score_dollar "score $"
/* Pathfinder extension: recursion */
%token seeded_by "seeded by"
/* StandOff */
@@ -469,7 +463,6 @@
%token with "with"
/* Pathfinder extension: recursion */
%token with_dollar "with $"
-%token without_content "without content"
%token xml_comment_end "-->"
%token xml_comment_start "<!--"
%token xquery_version "xquery version"
@@ -566,7 +559,6 @@
%type <ptype>
DivOp_
- FTOp_
GeneralComp
NodeComp
SomeEvery_
@@ -634,18 +626,6 @@
FilterExpr
FLWORExpr
ForwardStep
- FTAndExpr
- FTContainsExpr
- FTIgnoreOption
- FTMildNot
- FTOrExpr
- FTPrimaryExpr
- FTPrimaryWithOptions
- FTScoreVar
- FTSelectionExpr
- FTUnaryNot
- FTWordsExpr
- FTWordsValueExpr
FuncArgList_
FunctionCall
FunctionDecl
@@ -1461,92 +1441,40 @@
$5),
$8.root);
}
- | /* full-text support */
- VarName OptTypeDeclaration_ OptPositionalVar_
FTScoreVar
- "in" ExprSingle
- { $$.root = $$.hole =
- wire2 (p_binds, @$,
- wire2 (p_bind, @$,
- wire2 (p_vars, loc_rng (@1, @4),
- wire2 (p_vars, loc_rng (@1, @3),
- wire2 (p_var_type, loc_rng (@1, @2),
- $1,
- $2),
- $3),
- $4),
- $6),
- nil (@$));
- }
- | /* full-text support */
- VarName OptTypeDeclaration_ OptPositionalVar_
FTScoreVar
- "in" ExprSingle "," "$" VarPosBindings_
- { $$.hole = $9.hole;
- $$.root =
- wire2 (p_binds, @$,
- wire2 (p_bind, @$,
- wire2 (p_vars, loc_rng (@1, @4),
- wire2 (p_vars, loc_rng (@1, @3),
- wire2 (p_var_type, loc_rng (@1, @2),
- $1,
- $2),
- $3),
- $4),
- $6),
- $9.root);
- }
;
OptPositionalVar_ : /* empty */ { $$ = nil (@$); }
| PositionalVar { $$ = $1; }
;
-/* Full-text support */
-FTScoreVar : "score $" VarName { $$ = $2; }
- ;
-
/* [35] */
PositionalVar : "at $" VarName { $$ = $2; }
;
/* [36] */
-LetClause : "let" LetBindings_ { $$ = $2; }
+LetClause : "let $" LetBindings_ { $$ = $2; }
;
-LetBindings_ : "$" VarName OptTypeDeclaration_ ":=" ExprSingle
+LetBindings_ : VarName OptTypeDeclaration_ ":=" ExprSingle
{ $$.root = $$.hole =
wire2 (p_binds, @$,
wire2 (p_let, @$,
- wire2 (p_var_type, loc_rng (@2, @3),
- $2, $3),
- $5),
+ wire2 (p_var_type, loc_rng (@1, @2),
+ $1, $2),
+ $4),
nil (@$));
}
- | "$" VarName OptTypeDeclaration_ ":=" ExprSingle
- "," LetBindings_
+ | VarName OptTypeDeclaration_ ":=" ExprSingle
+ "," "$" LetBindings_
{ $$.hole = $7.hole;
$$.root =
wire2 (p_binds, @$,
wire2 (p_let, @$,
- wire2 (p_var_type, loc_rng (@2, @3),
- $2, $3),
- $5),
+ wire2 (p_var_type, loc_rng (@1, @2),
+ $1, $2),
+ $4),
$7.root);
}
- | FTScoreVar ":=" ExprSingle
- { $$.root = $$.hole =
- wire2 (p_binds, @$,
- wire2 (p_let, @$, $1, $3),
- nil (@$));
- }
- | FTScoreVar ":=" ExprSingle
- "," LetBindings_
- {
- $$.hole = $5.hole;
- $$.root =
- wire2 (p_binds, @$,
- wire2 (p_let, @$, $1, $3),
- $5.root);
- }
;
/* [37] */
@@ -1685,79 +1613,15 @@
;
/* [48] */
-/*ComparisonExpr : RangeExpr { $$ = $1; }
+ComparisonExpr : RangeExpr { $$ = $1; }
| RangeExpr ValueComp RangeExpr
{ $$ = wire2 ($2, @$, $1, $3); }
| RangeExpr GeneralComp RangeExpr
{ $$ = wire2 ($2, @$, $1, $3); }
| RangeExpr NodeComp RangeExpr
{ $$ = wire2 ($2, @$, $1, $3); }
- ;*/
-
-/* Full-text */
-ComparisonExpr : FTContainsExpr { $$ = $1; }
- | FTContainsExpr ValueComp FTContainsExpr
- { $$ = wire2 ($2, @$, $1, $3); }
- | FTContainsExpr GeneralComp FTContainsExpr
- { $$ = wire2 ($2, @$, $1, $3); }
- | FTContainsExpr NodeComp FTContainsExpr
- { $$ = wire2 ($2, @$, $1, $3); }
- ;
-
-FTContainsExpr : RangeExpr { $$ = $1; }
- | RangeExpr FTOp_ FTSelectionExpr
- { $$ = wire2 ($2, @$, $1, $3); }
- | RangeExpr FTOp_ FTSelectionExpr FTIgnoreOption
- { $$ = wire2 ($2, @$, $1,
- wire2 (p_ftfilter, loc_rng (@3,
@4), $3, $4)); }
- ;
-
-FTOp_ : "ftcontains" { $$ = p_ftcontains; }
- ;
-
-FTSelectionExpr : FTOrExpr { $$ = $1; }
;
-FTIgnoreOption : "without content" UnionExpr
- { $$ = wire1 (p_ftignore, @$, $2); }
- ;
-
-FTOrExpr : FTAndExpr { $$ = $1; }
- | FTOrExpr "ftor" FTAndExpr
- { $$ = wire2 (p_ftor, @$,
$1, $3); }
- ;
-
-FTAndExpr : FTMildNot { $$ = $1; }
- | FTAndExpr "ftand" FTMildNot
- { $$ = wire2 (p_ftand, @$,
$1, $3); }
- ;
-
-FTMildNot : FTUnaryNot { $$ = $1; }
- | FTMildNot "not in" FTUnaryNot
- { $$ = wire2 (p_ftmildnot, @$, $1, $3); }
- ;
-
-FTUnaryNot : FTPrimaryWithOptions { $$ = $1; }
- | "ftnot" FTPrimaryWithOptions
- { $$ = wire1 (p_ftnot, @$, $2); }
- ;
-
-
-FTPrimaryWithOptions : FTPrimaryExpr { $$ = $1; }
- ;
-
-FTPrimaryExpr : FTWordsExpr { $$ = $1; }
- | "(" FTSelectionExpr ")"
- { $$ = $2; }
- ;
-
-FTWordsExpr : FTWordsValueExpr { $$ = $1; }
- ;
-
-FTWordsValueExpr : Literal { $$ = $1; }
- ;
-
-
/* [49] */
RangeExpr : AdditiveExpr { $$ = $1; }
| AdditiveExpr "to" AdditiveExpr
Index: scanner.l
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/parser/scanner.l,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- scanner.l 5 Nov 2009 16:24:00 -0000 1.68
+++ scanner.l 10 Nov 2009 09:44:52 -0000 1.69
@@ -531,8 +531,7 @@
"for"{_}"$" { gotoState (VARNAME); pf_yield
(for_dollar); }
-"let" { pf_yield (let); }
-"score"{_}"$" { gotoState (VARNAME);
pf_yield (score_dollar);}
+"let"{_}"$" { gotoState (VARNAME); pf_yield
(let_dollar); }
"some"{_}"$" { gotoState (VARNAME); pf_yield
(some_dollar); }
"every"{_}"$" { gotoState (VARNAME); pf_yield
(every_dollar);}
@@ -569,7 +568,6 @@
".." { gotoState (OPERATOR); pf_yield (dot_dot);
}
"." { gotoState (OPERATOR); pf_yield (dot); }
"*" { gotoState (OPERATOR); pf_yield (star); }
-"ftnot" { pf_yield (ftnot); }
{NCName}":*" { pflval.qname_raw
= PFqname_raw (PFstrndup (yytext,
yyleng));
@@ -709,7 +707,7 @@
"at"{_}"$" { gotoState (VARNAME); pf_yield
(at_dollar); }
"for"{_}"$" { gotoState (VARNAME); pf_yield
(for_dollar); }
-"let" { pf_yield (let); }
+"let"{_}"$" { gotoState (VARNAME); pf_yield
(let_dollar); }
"in" { gotoState (DEFAULT); pf_yield (in_); }
"seeded"{_}"by" { /* Pathfinder extension: recursion */
@@ -793,12 +791,6 @@
"before" { gotoState (DEFAULT); pf_yield (before);}
"with" { gotoState (DEFAULT); pf_yield (with);}
"modify" { gotoState (DEFAULT); pf_yield (modify);}
-"ftcontains" { gotoState (DEFAULT);
pf_yield (ftcontains);}
-"score"{_}"$" { gotoState (VARNAME);
pf_yield (score_dollar);}
-"without"{_}"content" { gotoState (DEFAULT); pf_yield
(without_content);}
-"ftor" { gotoState (DEFAULT); pf_yield (ftor);}
-"ftand" { gotoState (DEFAULT); pf_yield (ftand);}
-"not"{_}"in" { gotoState (DEFAULT); pf_yield
(ftmildnot);}
{_} ;
. { pf_yield (invalid_character); }
}
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins