diff options
| author | barras | 2001-11-29 09:21:25 +0000 |
|---|---|---|
| committer | barras | 2001-11-29 09:21:25 +0000 |
| commit | 86952ac8ad1dba395cb4724ac0b4f54774448944 (patch) | |
| tree | 11936786a1a4c5e394c6adba3c5fa737470628d0 /parsing | |
| parent | b92811d26a108c12803edd63eb390e9dd05b5652 (diff) | |
nouvel algo de conversion plus uniforme
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@2246 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'parsing')
| -rwxr-xr-x | parsing/ast.ml | 10 | ||||
| -rw-r--r-- | parsing/printer.ml | 1 |
2 files changed, 7 insertions, 4 deletions
diff --git a/parsing/ast.ml b/parsing/ast.ml index dc751186f7..1830e45e9f 100755 --- a/parsing/ast.ml +++ b/parsing/ast.ml @@ -104,15 +104,16 @@ let rec print_ast ast = match ast with | Num(_,n) -> [< 'iNT n >] | Str(_,s) -> [< 'qS s >] - | Path(_,sl) -> [< pr_sp sl >] + | Path(_,sl) -> [< 'sTR(string_of_path sl) >] | Id (_,s) -> [< 'sTR"{" ; 'sTR s ; 'sTR"}" >] - | Nvar(_,s) -> [< pr_id s >] + | Nvar(_,s) -> [< 'sTR(string_of_id s) >] | Nmeta(_,s) -> [< 'sTR s >] | Node(_,op,l) -> hOV 3 [< 'sTR"(" ; 'sTR op ; 'sPC ; print_astl l; 'sTR")" >] | Slam(_,None,ast) -> hOV 1 [< 'sTR"[<>]"; print_ast ast >] | Slam(_,Some x,ast) -> - hOV 1 [< 'sTR"["; pr_id x; 'sTR"]"; 'cUT; print_ast ast >] + hOV 1 + [< 'sTR"["; 'sTR(string_of_id x); 'sTR"]"; 'cUT; print_ast ast >] | Smetalam(_,id,ast) -> hOV 1 [< 'sTR id; print_ast ast >] | Dynamic(_,d) -> hOV 0 [< 'sTR"<dynamic: "; 'sTR(Dyn.tag d); 'sTR">" >] @@ -138,7 +139,8 @@ let rec print_astpat = function hOV 2 [< 'sTR"(" ; 'sTR op; 'sPC; print_astlpat al; 'sTR")" >] | Pslam(None,b) -> hOV 1 [< 'sTR"[<>]"; 'cUT; print_astpat b >] | Pslam(Some id,b) -> - hOV 1 [< 'sTR"["; pr_id id; 'sTR"]"; 'cUT; print_astpat b >] + hOV 1 + [< 'sTR"["; 'sTR(string_of_id id); 'sTR"]"; 'cUT; print_astpat b >] and print_astlpat = function | Pnil -> [< >] diff --git a/parsing/printer.ml b/parsing/printer.ml index 76c0995a5d..77d0f59a1d 100644 --- a/parsing/printer.ml +++ b/parsing/printer.ml @@ -11,6 +11,7 @@ open Pp open Util open Names +open Nameops open Term open Termops open Sign |
