Commit 8b02e47f authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2003-12-08 14:43:28 by cmiachon] retirer la projection / et /@ et mises dans query/query_parse.ml

Original author: cmiachon
Date: 2003-12-08 14:43:28+00:00
parent e1d8af0c
......@@ -252,30 +252,11 @@ EXTEND
|
[ e1 = expr; op = ["*"]; e2 = expr -> exp loc (Op (op,[e1;e2]))
| e1 = expr; "&&"; e2 = expr -> exp loc (logical_and e1 e2)
| e = expr; "/" ;
t = [a = pat ->
let tag = mk loc (Internal (Types.atom (Atoms.any))) in
let att = mk loc (Internal Types.Record.any) in
let any = mk loc (Internal (Types.any)) in
let re = Star(Alt(SeqCapture(id_dummy,Elem a), Elem any)) in
let ct = mk loc (Regexp (re,any)) in
let p = mk loc (XmlT (tag, multi_prod loc [att;ct])) in
(p, Var (Id.value id_dummy))
| "@"; a = [IDENT|keyword]-> (* projection sur 1 attribut *)
let tag = mk loc (Internal(Types.atom Atoms.any)) in
let any = mk loc (Internal(Types.any)) in
let att = mk loc (Record(true,[(label a,mk loc (PatVar(U.mk "$$$")))]))in
let ct= mk loc (Regexp(Elem any , any)) in
let p = mk loc(XmlT (tag,multi_prod loc[att;ct])) in
(p, Pair(Var (Id.value id_dummy),cst_nil))
] -> exp loc (Transform (e,[t]))
]
|
[ e = expr; "."; l = [IDENT | keyword ] ->
exp loc (Dot (e, label l))
]
|
[ op = [ IDENT "flatten"
| IDENT "load_xml"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment