123456789101112131415161718192021222324252627(* camlp5r *)(* gramext.ml,v *)(* Copyright (c) INRIA 2007-2017 *)typeposition=|First|Last|Beforeofstring|Afterofstringtypeg_assoc=NonA|RightA|LeftA|BothAletpr_assoc=function|BothA->Pp.str"multi associativity"|LeftA->Pp.str"left associativity"|RightA->Pp.str"right associativity"|NonA->Pp.str"no associativity"(** Returns whether SELF means SELF, respectively on the left and on the right. *)letsplit_assoc=function|BothA->(true,true)|LeftA->(true,false)|RightA->(false,true)|NonA->(false,false)letself_on_the_leftassoc=fst(split_assocassoc)letself_on_the_rightassoc=snd(split_assocassoc)