X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fcontent_pres%2FcicNotationParser.ml;h=95b688c548b0f4565dcecddff4c777e26477c546;hb=12023ae1e3d075130b31d2d8559c85847ef06dee;hp=1a664d525d82018672d727548b807e3bf3232c83;hpb=09cfd99de377d72d7af96ad9815342a1b7b467a9;p=helm.git diff --git a/helm/software/components/content_pres/cicNotationParser.ml b/helm/software/components/content_pres/cicNotationParser.ml index 1a664d525..95b688c54 100644 --- a/helm/software/components/content_pres/cicNotationParser.ml +++ b/helm/software/components/content_pres/cicNotationParser.ml @@ -246,9 +246,14 @@ let compare_rule_id x y = | [],[] -> 0 | [],_ -> ~-1 | _,[] -> 1 - | ((s1::tl1) as x),((s2::tl2) as y) -> + | ((s1::tl1) ),((s2::tl2) ) -> if Gramext.eq_symbol s1 s2 then aux (tl1,tl2) - else Pervasives.compare x y + else + let res = + try Pervasives.compare s1 s2 + with Invalid_argument _ -> 0 + in + if res = 0 then aux (tl1, tl2) else res in aux (x,y) @@ -581,9 +586,9 @@ EXTEND sort: [ [ "Prop" -> `Prop | "Set" -> `Set - | "Type"; SYMBOL "["; n = NUMBER; SYMBOL "]" -> `NType n + | "Type"; SYMBOL "["; n = [ NUMBER| IDENT ]; SYMBOL "]" -> `NType n | "Type" -> `Type (CicUniv.fresh ()) - | "CProp"; SYMBOL "["; n = NUMBER; SYMBOL "]" -> `NCProp n + | "CProp"; SYMBOL "["; n = [ NUMBER| IDENT ]; SYMBOL "]" -> `NCProp n | "CProp" -> `CProp (CicUniv.fresh ()) ] ];