/[svn]/typing/typer.ml
ViewVC logotype

Diff of /typing/typer.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 515 by abate, Tue Jul 10 17:40:17 2007 UTC revision 516 by abate, Tue Jul 10 17:40:48 2007 UTC
# Line 1030  Line 1030 
1030      let complex_memo = Hashtbl.create 213      let complex_memo = Hashtbl.create 213
1031    
1032      let rec regexp_of_term = function      let rec regexp_of_term = function
1033        | All _ -> assert false        | All [] | Choice [] | Sequence [] -> PEpsilon
       | Choice [] -> PEpsilon  
1034        | Choice (hd :: tl) ->        | Choice (hd :: tl) ->
1035            List.fold_left            List.fold_left
1036              (fun acc particle -> PAlt (acc, regexp_of_particle particle))              (fun acc particle -> PAlt (acc, regexp_of_particle particle))
1037              (regexp_of_particle hd) tl              (regexp_of_particle hd) tl
1038        | Sequence [] -> PEpsilon        | All (hd :: tl) | Sequence (hd :: tl) ->
       | Sequence (hd :: tl) ->  
1039            List.fold_left            List.fold_left
1040              (fun acc particle -> PSeq (acc, regexp_of_particle particle))              (fun acc particle -> PSeq (acc, regexp_of_particle particle))
1041              (regexp_of_particle hd) tl              (regexp_of_particle hd) tl

Legend:
Removed from v.515  
changed lines
  Added in v.516

CVS Admin">CVS Admin
ViewVC Help
Powered by ViewVC 1.1.5