* http://cs.unibo.it/helm/.
*/
+/* AUTOR: Ferruccio Guidi <fguidi@cs.unibo.it>
+ */
+
%{
let f (x, y, z) = x
let s (x, y, z) = y
%type <CicTextualParser0.interpretation_domain_item -> CicTextualParser0.interpretation_codomain_item option> interp
%token <string> STR
- %token DL DQ LC RC CM NOT
- %token MOBJ MSORT MREL SOBJ SSORT OREL WOBJ WSORT
+ %token DL DQ LC RC CM
+ %token MOBJ MSORT MREL OOBJ OSORT OREL UNIV
- %start qstr
- %type <string> qstr
+ %start qstr specs
+ %type <string> qstr
+ %type <MQueryGenerator.spec list> specs
%%
uri:
| CONURI { CicTextualParser0.ConUri $1 }
| DQ { "" }
| STR qstr { $1 ^ $2 }
;
-/* str:
+ str:
| STR { $1 }
| DL ID { try G.builtin $2 with _ -> "" }
;
list:
| LC strs RC { $2 }
;
- not:
- | NOT { true }
- | { false }
- ;
spec:
- | MOBJ not list list list { G.MustObj ($2, $3, $4, $5) }
- | MSORT not list list list { G.MustSort ($2, $3, $4, $5) }
- | MREL not list list { G.MustRel ($2, $3, $4) }
- | SOBJ not list list list { G.SOnlyObj ($2, $3, $4, $5) }
- | SSORT not list list list { G.SOnlySort ($2, $3, $4, $5) }
- | OREL not list list { G.OnlyRel ($2, $3, $4) }
- | WOBJ not list list list { G.WOnlyObj ($2, $3, $4, $5) }
- | WSORT not list list list { G.WOnlySort ($2, $3, $4, $5) }
+ | MOBJ list list list { G.MustObj ($2, $3, $4) }
+ | MSORT list list list { G.MustSort ($2, $3, $4) }
+ | MREL list list { G.MustRel ($2, $3) }
+ | OOBJ list list list { G.OnlyObj ($2, $3, $4) }
+ | OSORT list list list { G.OnlySort ($2, $3, $4) }
+ | OREL list list { G.OnlyRel ($2, $3) }
+ | UNIV list { G.Universe $2 }
;
specs:
| spec specs { $1 :: $2 }
| EOF { [] }
;
-*/