X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fgrafite_parser%2FgrafiteParser.ml;h=d0a97072c0d1c1c2b7a1ee366863e5992d80d93c;hb=d17a38ddca548c784e9efa7c55e87c80203b024d;hp=396567a2e708f8b08bdc2972774c606738b5191c;hpb=df753672ee6c511b6ce721c2124e3294d0a28dbd;p=helm.git diff --git a/helm/software/components/grafite_parser/grafiteParser.ml b/helm/software/components/grafite_parser/grafiteParser.ml index 396567a2e..d0a97072c 100644 --- a/helm/software/components/grafite_parser/grafiteParser.ml +++ b/helm/software/components/grafite_parser/grafiteParser.ml @@ -118,8 +118,8 @@ EXTEND constructor: [ [ name = IDENT; SYMBOL ":"; typ = term -> (name, typ) ] ]; tactic_term: [ [ t = term LEVEL "90" -> t ] ]; new_name: [ - [ id = IDENT -> Some id - | SYMBOL "_" -> None ] + [ SYMBOL "_" -> None + | id = IDENT -> Some id ] ]; ident_list0: [ [ LPAREN; idents = LIST0 new_name; RPAREN -> idents ] ]; tactic_term_list1: [ @@ -709,8 +709,8 @@ EXTEND ]; level3_term: [ [ u = URI -> N.UriPattern (UriManager.uri_of_string u) + | IMPLICIT -> N.ImplicitPattern | id = IDENT -> N.VarPattern id - | SYMBOL "_" -> N.ImplicitPattern | LPAREN; terms = LIST1 SELF; RPAREN -> (match terms with | [] -> assert false @@ -726,9 +726,11 @@ EXTEND include_command: [ [ IDENT "include" ; path = QSTRING -> - loc,path,L.WithPreferences + loc,path,false,L.WithPreferences + | IDENT "include" ; IDENT "source" ; path = QSTRING -> + loc,path,true,L.WithPreferences | IDENT "include'" ; path = QSTRING -> - loc,path,L.WithoutPreferences + loc,path,false,L.WithoutPreferences ]]; grafite_command: [ [ @@ -885,17 +887,17 @@ EXTEND let stm = G.Comment (loc, com) in !grafite_callback status stm; status, LSome stm - | (iloc,fname,mode) = include_command ; SYMBOL "." -> + | (iloc,fname,source,mode) = include_command ; SYMBOL "." -> fun ?(never_include=false) ~include_paths status -> let stm = - G.Executable (loc, G.Command (loc, G.Include (iloc, fname))) + G.Executable (loc, G.Command (loc, G.Include (iloc, source, fname))) in !grafite_callback status stm; let _root, buri, fullpath, _rrelpath = Librarian.baseuri_of_script ~include_paths fname in let stm = - G.Executable (loc, G.Command (loc, G.Include (iloc, buri))) + G.Executable (loc, G.Command (loc, G.Include (iloc, source, buri))) in let status = if never_include then raise (NoInclusionPerformed fullpath)