Commit 45d9e27b authored by POTTIER Francois's avatar POTTIER Francois

Cleanup. Renamed [tk_priority] to [tk_precedence].

parent f58d6adb
......@@ -26,7 +26,7 @@ module TokPrecedence = struct
level was useful. *)
let levelip id properties =
lazy (use id), properties.tk_priority
lazy (use id), properties.tk_precedence
let leveli id =
let properties =
......@@ -43,7 +43,7 @@ module TokPrecedence = struct
let diagnostics () =
StringMap.iter (fun id properties ->
if not (StringSet.mem id !ever_useful) then
match properties.tk_priority with
match properties.tk_precedence with
| UndefinedPrecedence ->
()
| PrecedenceLevel (_, _, pos1, pos2) ->
......@@ -202,7 +202,7 @@ module Terminal = struct
let not_so_dummy_properties = (* applicable to [error] and [#] *)
{
tk_filename = "__primitives__";
tk_priority = UndefinedPrecedence;
tk_precedence = UndefinedPrecedence;
tk_associativity = UndefinedAssoc;
tk_ocamltype = None;
tk_is_declared = true;
......
......@@ -64,7 +64,7 @@ let join_declaration filename (grammar : grammar) decl =
tk_filename = filename;
tk_ocamltype = ocamltype;
tk_associativity = UndefinedAssoc;
tk_priority = UndefinedPrecedence;
tk_precedence = UndefinedPrecedence;
tk_position = decl.position;
tk_is_declared = true
}
......@@ -101,7 +101,7 @@ let join_declaration filename (grammar : grammar) decl =
tk_filename = filename;
tk_ocamltype = None;
tk_associativity = UndefinedAssoc;
tk_priority = prec;
tk_precedence = prec;
tk_is_declared = false;
(* Will be updated later. *)
tk_position = decl.position;
......@@ -119,7 +119,7 @@ let join_declaration filename (grammar : grammar) decl =
(* Record the new declaration. *)
token_properties.tk_priority <- prec;
token_properties.tk_precedence <- prec;
token_properties.tk_associativity <- assoc;
grammar
......
......@@ -48,7 +48,7 @@ type token_properties =
tk_ocamltype : Stretch.ocamltype option;
tk_position : Positions.t;
mutable tk_associativity : token_associativity;
mutable tk_priority : precedence_level; (* TEMPORARY terminologie toujours pas coherente *)
mutable tk_precedence : precedence_level;
mutable tk_is_declared : bool;
}
......
......@@ -54,7 +54,7 @@ let print_tokens mode b g =
(* Sort tokens wrt precedence. *)
let undefined, partition_tokens =
StringMap.fold (fun token prop acu ->
insert acu (token, prop.tk_priority)
insert acu (token, prop.tk_precedence)
) g.tokens ([], [])
in
let ordered_tokens =
......
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