usr.bin/m4/expr.c
/*
 * unary : factor | unop unary
 */
unary : factor | unop unary
unary : factor | unop unary
static int
unary()
{
	register int val, c;
	if ((c = skipws()) == '+' || c == '-' || c == '~') {
		val = unary();
		switch (c) {
		case '+':
			return val;
		case '-':
			return -val;
		case '~':
			return ~val;
		}
	}
	ungetch();
	return factor();
}
static int unary ( ) { register int val , c ; if ( ( c = skipws ( ) ) == ' ' || c == ' ' || c == ' ' ) { val = unary ( ) ; switch ( c ) { case ' ' : return val ; case ' ' : return - val ; case ' ' : return ~ val ; } } ungetch ( ) ; return factor ( ) ; }
unary : factor | unop unary
unary : factor | unop unary