Project

General

Profile

« Previous | Next » 

Revision a6974c82

Added by Pierre-Loïc Garoche about 5 years ago

[Horn] Workaround to prevent the use of declared keywords as node name

View differences:

src/backends/Horn/horn_backend.ml
111 111
     end
112 112
  | _::_ -> false
113 113

  
114
let preprocess machines =
115
  List.fold_right (fun m res ->
116
    if List.mem m.mname.node_id registered_keywords then
117
      { m with mname  = { m.mname with node_id = protect_kwd m.mname.node_id }}::res
118
       else
119
	m :: res
120
  ) machines []
121
     
114 122
let translate fmt basename prog machines=
123
  let machines = preprocess machines in
115 124
  (* We print typedef *)
116 125
  print_dep fmt prog; (*print static library e.g. math*)
117 126
  print_type_definitions fmt;

Also available in: Unified diff