• R/O
  • SSH
  • HTTPS

kotoli: Commit


Commit MetaInfo

Revision213 (tree)
Time2010-08-15 01:41:53
Authorsgry

Log Message

修正)クエリーパーサのバグを2点修正。(1)LeafQueryを生成しない(2)ANDが常にORになってしまう

Change Summary

Incremental Difference

--- trunk/Kotoli/Query/QueryStringParser.cs (revision 212)
+++ trunk/Kotoli/Query/QueryStringParser.cs (revision 213)
@@ -57,7 +57,7 @@
5757 , Ops.ZeroOrMore(Prims.WhiteSpace)
5858 , Ops.ZeroOrMore(Prims.AnyChar - Prims.Eol) [ (sender, args)=> value = args.Value ]
5959 , Ops.ZeroOrMore(Prims.WhiteSpace)
60- ) [ (sender, args)=> _compositeQuery.Add( new FileNameQuery(value) ) ]
60+ ) [ (sender, args)=> _compositeQuery.Add( new LeafQuery(new FileNameQuery(value)) ) ]
6161 , Ops.Sequence
6262 (
6363 "content"
@@ -66,7 +66,7 @@
6666 , Ops.ZeroOrMore(Prims.WhiteSpace)
6767 , Ops.ZeroOrMore(Prims.AnyChar - Prims.Eol) [ (sender, args)=> value = args.Value ]
6868 , Ops.ZeroOrMore(Prims.WhiteSpace)
69- ) [ (sender, args)=> _compositeQuery.Add( new ContentQuery(value) ) ]
69+ ) [ (sender, args)=> _compositeQuery.Add( new LeafQuery(new ContentQuery(value)) ) ]
7070 , Ops.Sequence
7171 (
7272 "date"
@@ -75,15 +75,15 @@
7575 , Ops.ZeroOrMore(Prims.WhiteSpace)
7676 , Ops.ZeroOrMore(Prims.AnyChar - Prims.Eol) [ (sender, args)=> value = args.Value ]
7777 , Ops.ZeroOrMore(Prims.WhiteSpace)
78- ) [ (sender, args)=> _compositeQuery.Add( new LastWriteTimeQuery(DateTime.Parse(value), _op) ) ]
78+ ) [ (sender, args)=> _compositeQuery.Add( new LeafQuery(new LastWriteTimeQuery(DateTime.Parse(value), _op) )) ]
7979 );
8080 composite.Parser = Ops.Choice
8181 (
8282 Ops.Sequence
8383 (
84- "AND"
84+ Prims.Str("AND") [ OnComposite ]
8585 , Ops.ZeroOrMore(Prims.WhiteSpace)
86- , Prims.Ch('{') [ OnComposite ]
86+ , Prims.Ch('{')
8787 , Ops.ZeroOrMore(Prims.WhiteSpace)
8888 , Ops.OneOrMore
8989 (
@@ -95,9 +95,9 @@
9595 )
9696 , Ops.Sequence
9797 (
98- "OR"
98+ Prims.Str("OR") [ OnComposite ]
9999 , Ops.ZeroOrMore(Prims.WhiteSpace)
100- , Prims.Ch('{') [ OnComposite ]
100+ , Prims.Ch('{')
101101 , Ops.ZeroOrMore(Prims.WhiteSpace)
102102 , Ops.OneOrMore
103103 (
Show on old repository browser