I checked the menhir examples in this link:
gitlab.inria.fr/fpottier/menhir; in this example, I copy some code snippet to below;
%token<int> INT "42"
%token PLUS "+"
%token MINUS "-"
%token TIMES "*"
%token DIV "/"
%token LPAREN "("
%token RPAREN ")"
%token EOL
(* Token aliases can be used throughout the rest of the grammar. E.g.,
they can be used in precedence declarations: *)
%left "+" "-" /* lowest precedence */
%left "*" "/" /* medium precedence */
%nonassoc UMINUS /* highest precedence */
there is no token to UMINUS
, so why UMINUS
exists in precedence? I checked the menhir reference guide and found nothing about this.