Commit 16dffbe7 authored by POTTIER Francois's avatar POTTIER Francois
Browse files

Removed a useless loop index.

parent 96702616
......@@ -64,8 +64,8 @@ let actiondef grammar symbol branch =
(* Construct a list of the semantic action's formal parameters that
depend on the production's right-hand side. *)
let _, formals =
List.fold_left (fun (i, formals) (symbol, id) ->
let formals =
List.fold_left (fun formals (symbol, id) ->
let id, startp, endp, starto, endo =
id,
Printf.sprintf "_startpos_%s_" id,
......@@ -86,14 +86,13 @@ let actiondef grammar symbol branch =
(* Symbol is a nonterminal. *)
nttype grammar symbol
in
i + 1,
PAnnot (PVar id, t) ::
PAnnot (PVar startp, tposition) ::
PAnnot (PVar endp, tposition) ::
PAnnot (PVar starto, tint) ::
PAnnot (PVar endo, tint) ::
formals
) (0, []) branch.producers
) [] branch.producers
in
(* Extend the list with parameters that do not depend on the
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment