aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--toplevel/metasyntax.ml2
1 files changed, 2 insertions, 0 deletions
diff --git a/toplevel/metasyntax.ml b/toplevel/metasyntax.ml
index d0893107a..d41ce2803 100644
--- a/toplevel/metasyntax.ml
+++ b/toplevel/metasyntax.ml
@@ -529,6 +529,8 @@ let rec merge_entry_types etyps' = function
let set_entry_type etyps (x,typ) =
let typ = try
match List.assoc x etyps, typ with
+ | _, (_,BorderProd (true,_)) ->
+ error "The level of the leftmost non-terminal cannot be changed"
| ETConstr (n,()), (_,BorderProd (left,_)) ->
ETConstr (n,BorderProd (left,None))
| ETConstr (n,()), (_,InternalProd) -> ETConstr (n,InternalProd)