X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fcomponents%2Fgrafite_parser%2Fprint_grammar.ml;h=9fea12e40fbd9ceda710866d0862757f3df1e396;hb=119da3f9ce130f7c4e8b23fcc491d221472ad657;hp=893a3f53c9ef2a72e93f57d7ed9187e7901ad18a;hpb=e14fdca3a845ad0b88a34497f41472c3e7f8473b;p=helm.git diff --git a/matita/components/grafite_parser/print_grammar.ml b/matita/components/grafite_parser/print_grammar.ml index 893a3f53c..9fea12e40 100644 --- a/matita/components/grafite_parser/print_grammar.ml +++ b/matita/components/grafite_parser/print_grammar.ml @@ -87,7 +87,7 @@ and is_symbol_dummy = function | Smeta (_, lt, _) -> List.for_all is_symbol_dummy lt | Snterm e | Snterml (e, _) -> is_entry_dummy e | Slist1 x | Slist0 x -> is_symbol_dummy x - | Slist1sep (x,y) | Slist0sep (x,y) -> is_symbol_dummy x && is_symbol_dummy y + | Slist1sep (x,y,false) | Slist0sep (x,y,false) -> is_symbol_dummy x && is_symbol_dummy y | Sopt x -> is_symbol_dummy x | Sself | Snext -> false | Stree t -> is_tree_dummy t @@ -105,7 +105,7 @@ let needs_brackets t = count_brothers t > 1 let visit_description desc fmt self = - let skip s = true in + let skip _s = true in let inline s = List.mem s [ "int" ] in let rec visit_entry e ?level todo is_son = @@ -140,7 +140,7 @@ let visit_description desc fmt self = (fun x -> Sself :: x) (flatten_tree suff) @ flatten_tree pref) todo is_son - and visit_tree name t todo is_son = + and visit_tree name t todo _is_son = if List.for_all (List.for_all is_symbol_dummy) t then todo else ( Format.fprintf fmt "@["; (match name with @@ -186,7 +186,7 @@ let visit_description desc fmt self = let todo = visit_symbol symbol todo is_son in Format.fprintf fmt "@]} @ "; todo - | Slist0sep (symbol,sep) -> + | Slist0sep (symbol,sep,false) -> Format.fprintf fmt "[@[ "; let todo = visit_symbol symbol todo is_son in Format.fprintf fmt "{@[ "; @@ -200,7 +200,7 @@ let visit_description desc fmt self = let todo = visit_symbol symbol todo is_son in Format.fprintf fmt "@]}+ @ "; todo - | Slist1sep (symbol,sep) -> + | Slist1sep (symbol,sep,false) -> let todo = visit_symbol symbol todo is_son in Format.fprintf fmt "{@[ "; let todo = visit_symbol sep todo is_son in @@ -264,8 +264,8 @@ let rec visit_entries fmt todo pped = visit_entries fmt todo pped ;; -let ebnf_of_term () = - let g_entry = Grammar.Entry.obj (CicNotationParser.term ()) in +let ebnf_of_term status = + let g_entry = Grammar.Entry.obj (CicNotationParser.term status) in let buff = Buffer.create 100 in let fmt = Format.formatter_of_buffer buff in visit_entries fmt [g_entry] [];