]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/mathql/grammar.txt
Modified Files:
[helm.git] / helm / mathql / grammar.txt
index a7587fdd0bb52aeac8d4ffe3e8198e14baccd8d9..25e4b8e1eb3cb62c3730f2592c675ec6e0448e91 100644 (file)
@@ -7,8 +7,6 @@ MATHEMATICAL QUERY LANGUAGE (MathQL)
        |  <list> UNION <list>                  (* unione *)
        |  <list> INTERSECT <list>              (* intersezione *)
        |  <list> DIFF <list>                   (* differenza *)
-       |  <list> SORTEDBY <order> <function>   (* unione lista ordinata secondo
-                                                  ordine e valore funzione *)
        |  SELECT <rvar> IN <list> WHERE <bool> (* selezione *)
        |  EXISTS <rvar> IN <list> WHERE <bool> (* esistenziale *)
        |  USE <list> POSITION <svar>           (* unione lista backward *)
@@ -34,9 +32,9 @@ MATHEMATICAL QUERY LANGUAGE (MathQL)
        |  FALSE                                (* falso *)
        |  <string> IS <string>                 (* case sensitive matching *)
        
-<pattern> := <quoted-constant-string>          (* pattern costante *)
+<pattern> := <"-quoted-constant-string>        (* pattern costante *)
           
-<string> := <quoted-constant-string>           (* costante letterale *)
+<string> := <'-quoted-constant-string>         (* costante letterale *)
          |  CONCLUSION | HYPOTHESIS | BODY     (* costanti simboliche *)
          |  MAINCONCLUSION | MAINHYPOTHESIS
          |  <rvar>                             (* variabile *)
@@ -73,9 +71,6 @@ MATHEMATICAL QUERY LANGUAGE (MathQL)
              |  SUPER                         (* proprieta' e super-proprieta'
                                                   di *)
 
-<order>    := DESC                             (* ordinamento decrescente *)
-          |  ASC                              (* ordinamento crescente *) 
-
 <rvar> := <not-reserved-identifier>            (* variabile per risorse *)
 <svar> := $ <not-reserved-identifier>          (* variabile per stringhe *)
 
@@ -104,11 +99,31 @@ MATHEMATICAL QUERY LANGUAGE (MathQL)
   (cioe` delle uri eventualmente seguite da un fragment identifier)
   L'espressione regolare contiene i seguenti costrutti:
 
-  costrutto        semanticamente fa match con
-  ?                un singolo carattere diverso da / e #
-  *                la piu' lunga sottostringa che non contiene / e #
-  **               la piu' lunga sottostringa che non contiene #
+  costrutto        semanticamente fa match con                       
+  ?                un singolo carattere diverso da / # :             
+  *                la piu' lunga sottostringa che non contiene / # : 
+  **               la piu' lunga sottostringa che non contiene # :
   altro carattere  solo se' stesso
 
-  Il costrutto ** non puo' comparire nella parte dell'espressione che
-  fa match con un fragment identifier.
+  costrutto        puo' appareire in
+  ?                "body"
+  *                dovunque
+  **               "body" e "fragment"
+  altro carattere  dovunque
+
+  "body"     parte compresa fra le occorrenze di ":/" e "#1" escluse
+  "fragment" parte successiva all'occorrenza "#1"
+- FUTURO: operatore di ordinamento sul risultato finale della query.
+  <query> SORTEDBY <order> <function>   (* unione lista ordinata secondo
+                                           ordine e valore funzione *)
+  <order>    := DESC                           (* ordinamento decrescente *)
+            |  ASC                            (* ordinamento crescente *)     
+  DTD:
+  <!ENTITY % order '(ascendant|descendant)'>
+  <!ELEMENT Query %queryexpr;>
+  <!ELEMENT SortBy (Query, SortField)>
+  <!ELEMENT SortField %functexpr;>
+  <!ATTLIST SortField 
+            order %order; #IMPLIED>
+- RILASSAMENTO degli operatori UNION e INTERSECT. Operatori fuzzy con 
+  introduzione di pesi associati ai risultati.
\ No newline at end of file