Module Name:    src
Committed By:   rillig
Date:           Sat Apr 16 21:22:12 UTC 2022

Modified Files:
        src/usr.bin/xlint/lint1: ops.def

Log Message:
lint: clean up table with operator properties

Now that lint may use C99, make use of empty macro arguments.

No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/usr.bin/xlint/lint1/ops.def

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/xlint/lint1/ops.def
diff -u src/usr.bin/xlint/lint1/ops.def:1.26 src/usr.bin/xlint/lint1/ops.def:1.27
--- src/usr.bin/xlint/lint1/ops.def:1.26	Sat Apr 16 21:14:33 2022
+++ src/usr.bin/xlint/lint1/ops.def	Sat Apr 16 21:22:12 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: ops.def,v 1.26 2022/04/16 21:14:33 rillig Exp $ */
+/*	$NetBSD: ops.def,v 1.27 2022/04/16 21:22:12 rillig Exp $ */
 
 begin_ops()
 
@@ -27,92 +27,92 @@ begin_ops()
  *	binary			x	|	|	|	|
  */
 /*	name	repr		b l b B i c a s f v t b s l r p c e e =	*/
-op(	NOOP,	"no-op",	-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-)
-op(	ARROW,	"->",		1,-,1,-,-,-,-,-,-,1,-,-,-,-,-,-,-,-,-,-)
-op(	POINT,	".",		1,-,1,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-)
-op(	NOT,	"!",		-,1,1,1,-,-,-,1,1,-,1,-,-,-,-,-,-,-,1,-)
-op(	COMPL,	"~",		-,-,-,-,-,1,-,-,1,1,-,-,-,-,-,-,-,-,1,1)
-op(	INC,	"++",		-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-)
-op(	DEC,	"--",		-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-)
-op(	INCBEF,	"++x",		-,-,-,-,-,-,-,1,-,-,-,-,1,-,-,-,-,-,1,-)
-op(	DECBEF,	"--x",		-,-,-,-,-,-,-,1,-,-,-,-,1,-,-,-,-,-,1,-)
-op(	INCAFT,	"x++",		-,-,-,-,-,-,-,1,-,-,-,-,1,-,-,-,-,-,1,-)
-op(	DECAFT,	"x--",		-,-,-,-,-,-,-,1,-,-,-,-,1,-,-,-,-,-,1,-)
-op(	UPLUS,	"+",		-,-,-,-,-,-,1,-,1,1,-,-,-,-,-,-,-,-,1,1)
-op(	UMINUS,	"-",		-,-,-,-,-,-,1,-,1,1,-,-,-,1,-,-,-,-,1,1)
-op(	INDIR,	"*",		-,-,-,-,-,-,-,-,-,1,-,-,-,-,-,-,-,-,-,-)
-op(	ADDR,	"&",		-,-,1,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-)
+op(	NOOP,	"no-op",	 , , , , , , , , , , , , , , , , , , , )
+op(	ARROW,	"->",		1, ,1, , , , , , ,1, , , , , , , , , , )
+op(	POINT,	".",		1, ,1, , , , , , , , , , , , , , , , , )
+op(	NOT,	"!",		 ,1,1,1, , , ,1,1, ,1, , , , , , , ,1, )
+op(	COMPL,	"~",		 , , , , ,1, , ,1,1, , , , , , , , ,1,1)
+op(	INC,	"++",		 , , , , , , , , , , , , , , , , , , , )
+op(	DEC,	"--",		 , , , , , , , , , , , , , , , , , , , )
+op(	INCBEF,	"++x",		 , , , , , , ,1, , , , ,1, , , , , ,1, )
+op(	DECBEF,	"--x",		 , , , , , , ,1, , , , ,1, , , , , ,1, )
+op(	INCAFT,	"x++",		 , , , , , , ,1, , , , ,1, , , , , ,1, )
+op(	DECAFT,	"x--",		 , , , , , , ,1, , , , ,1, , , , , ,1, )
+op(	UPLUS,	"+",		 , , , , , ,1, ,1,1, , , , , , , , ,1,1)
+op(	UMINUS,	"-",		 , , , , , ,1, ,1,1, , , ,1, , , , ,1,1)
+op(	INDIR,	"*",		 , , , , , , , , ,1, , , , , , , , , , )
+op(	ADDR,	"&",		 , ,1, , , , , , , , , , , , , , , , , )
 /* the operator 'arr[ind]' is translated to '*(arr + ind)' during parsing. */
 
 /*	name	repr		b l b B i c a s f v t b s l r p c e e = */
-op(	MULT,	"*",		1,-,-,-,-,-,1,-,1,1,-,1,-,-,1,-,-,-,1,1)
-op(	DIV,	"/",		1,-,-,-,-,-,1,-,1,1,-,1,-,1,1,-,-,-,1,1)
-op(	MOD,	"%",		1,-,-,-,1,-,-,-,1,1,-,1,-,1,1,-,-,-,1,1)
-op(	PLUS,	"+",		1,-,-,-,-,-,-,1,1,1,-,1,-,-,-,-,-,-,1,-)
-op(	MINUS,	"-",		1,-,-,-,-,-,-,1,1,1,-,1,-,-,-,-,-,-,1,-)
-op(	SHL,	"<<",		1,-,-,-,1,-,-,-,1,1,-,-,-,-,-,1,-,-,1,1)
-op(	SHR,	">>",		1,-,-,-,1,-,-,-,1,1,-,-,-,1,-,1,-,-,1,1)
-
-/*	name	repr		b l b B i c a s f v t b s l r p c e e = */
-op(	LT,	"<",		1,1,-,-,-,-,-,1,1,1,-,1,-,1,1,-,1,1,-,1)
-op(	LE,	"<=",		1,1,-,-,-,-,-,1,1,1,-,1,-,1,1,-,1,1,-,1)
-op(	GT,	">",		1,1,-,-,-,-,-,1,1,1,-,1,-,1,1,-,1,1,-,1)
-op(	GE,	">=",		1,1,-,-,-,-,-,1,1,1,-,1,-,1,1,-,1,1,-,1)
-op(	EQ,	"==",		1,1,1,-,-,-,-,1,1,1,-,1,-,-,-,-,1,1,-,1)
-op(	NE,	"!=",		1,1,1,-,-,-,-,1,1,1,-,1,-,-,-,-,1,1,-,1)
-
-/*	name	repr		b l b B i c a s f v t b s l r p c e e = */
-op(	BITAND,	"&",		1,-,1,-,1,-,-,-,1,1,-,1,-,-,-,1,-,-,1,-)
-op(	BITXOR,	"^",		1,-,1,-,1,-,-,-,1,1,-,1,-,-,-,1,-,-,1,-)
-op(	BITOR,	"|",		1,-,1,-,1,-,-,-,1,1,-,1,-,-,-,1,-,-,1,-)
-op(	LOGAND,	"&&",		1,1,1,1,-,-,-,1,1,-,1,-,-,-,-,-,-,-,1,-)
-op(	LOGOR,	"||",		1,1,1,1,-,-,-,1,1,-,1,-,-,-,-,1,-,-,1,-)
-op(	QUEST,	"?",		1,-,-,-,-,-,-,-,1,-,1,-,-,-,-,-,-,-,-,-)
-op(	COLON,	":",		1,-,1,-,-,-,-,-,-,1,-,1,-,-,-,-,-,1,-,-)
-
-/*	name	repr		b l b B i c a s f v t b s l r p c e e = */
-op(	ASSIGN,	"=",		1,-,1,-,-,-,-,-,-,-,-,-,1,-,-,-,-,1,-,-)
-op(	MULASS,	"*=",		1,-,-,-,-,-,1,-,-,-,-,-,1,-,-,-,-,-,1,-)
-op(	DIVASS,	"/=",		1,-,-,-,-,-,1,-,-,-,-,-,1,-,1,-,-,-,1,-)
-op(	MODASS,	"%=",		1,-,-,-,1,-,-,-,-,-,-,-,1,-,1,-,-,-,1,-)
-op(	ADDASS,	"+=",		1,-,-,-,-,-,-,1,-,-,-,-,1,-,-,-,-,-,1,-)
-op(	SUBASS,	"-=",		1,-,-,-,-,-,-,1,-,-,-,-,1,-,-,-,-,-,1,-)
-op(	SHLASS,	"<<=",		1,-,-,-,1,-,-,-,-,-,-,-,1,-,-,-,-,-,1,-)
-op(	SHRASS,	">>=",		1,-,-,-,1,-,-,-,-,-,-,-,1,-,-,-,-,-,1,-)
-op(	ANDASS,	"&=",		1,-,1,-,1,-,-,-,-,-,-,-,1,-,-,-,-,-,1,-)
-op(	XORASS,	"^=",		1,-,1,-,1,-,-,-,-,-,-,-,1,-,-,-,-,-,1,-)
-op(	ORASS,	"|=",		1,-,1,-,1,-,-,-,-,-,-,-,1,-,-,-,-,-,1,-)
-
-/*	name	repr		b l b B i c a s f v t b s l r p c e e = */
-op(	NAME,	"name",		-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-)
-op(	CON,	"constant",	-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-)
-op(	STRING,	"string",	-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-)
-op(	FSEL,	"fsel",		-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-)
-op(	CALL,	"call",		1,-,-,-,-,-,-,-,-,-,-,-,1,-,-,-,-,-,-,-)
-op(	COMMA,	",",		1,-,1,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,1)
-op(	CVT,	"convert",	-,-,-,-,-,-,-,-,-,1,-,-,-,-,-,-,-,-,-,-)
-op(	ICALL,	"icall",	1,-,-,-,-,-,-,-,-,-,-,-,1,-,-,-,-,-,-,-)
-op(	LOAD,	"load",		-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-)
+op(	MULT,	"*",		1, , , , , ,1, ,1,1, ,1, , ,1, , , ,1,1)
+op(	DIV,	"/",		1, , , , , ,1, ,1,1, ,1, ,1,1, , , ,1,1)
+op(	MOD,	"%",		1, , , ,1, , , ,1,1, ,1, ,1,1, , , ,1,1)
+op(	PLUS,	"+",		1, , , , , , ,1,1,1, ,1, , , , , , ,1, )
+op(	MINUS,	"-",		1, , , , , , ,1,1,1, ,1, , , , , , ,1, )
+op(	SHL,	"<<",		1, , , ,1, , , ,1,1, , , , , ,1, , ,1,1)
+op(	SHR,	">>",		1, , , ,1, , , ,1,1, , , ,1, ,1, , ,1,1)
+
+/*	name	repr		b l b B i c a s f v t b s l r p c e e = */
+op(	LT,	"<",		1,1, , , , , ,1,1,1, ,1, ,1,1, ,1,1, ,1)
+op(	LE,	"<=",		1,1, , , , , ,1,1,1, ,1, ,1,1, ,1,1, ,1)
+op(	GT,	">",		1,1, , , , , ,1,1,1, ,1, ,1,1, ,1,1, ,1)
+op(	GE,	">=",		1,1, , , , , ,1,1,1, ,1, ,1,1, ,1,1, ,1)
+op(	EQ,	"==",		1,1,1, , , , ,1,1,1, ,1, , , , ,1,1, ,1)
+op(	NE,	"!=",		1,1,1, , , , ,1,1,1, ,1, , , , ,1,1, ,1)
+
+/*	name	repr		b l b B i c a s f v t b s l r p c e e = */
+op(	BITAND,	"&",		1, ,1, ,1, , , ,1,1, ,1, , , ,1, , ,1, )
+op(	BITXOR,	"^",		1, ,1, ,1, , , ,1,1, ,1, , , ,1, , ,1, )
+op(	BITOR,	"|",		1, ,1, ,1, , , ,1,1, ,1, , , ,1, , ,1, )
+op(	LOGAND,	"&&",		1,1,1,1, , , ,1,1, ,1, , , , , , , ,1, )
+op(	LOGOR,	"||",		1,1,1,1, , , ,1,1, ,1, , , , ,1, , ,1, )
+op(	QUEST,	"?",		1, , , , , , , ,1, ,1, , , , , , , , , )
+op(	COLON,	":",		1, ,1, , , , , , ,1, ,1, , , , , ,1, , )
+
+/*	name	repr		b l b B i c a s f v t b s l r p c e e = */
+op(	ASSIGN,	"=",		1, ,1, , , , , , , , , ,1, , , , ,1, , )
+op(	MULASS,	"*=",		1, , , , , ,1, , , , , ,1, , , , , ,1, )
+op(	DIVASS,	"/=",		1, , , , , ,1, , , , , ,1, ,1, , , ,1, )
+op(	MODASS,	"%=",		1, , , ,1, , , , , , , ,1, ,1, , , ,1, )
+op(	ADDASS,	"+=",		1, , , , , , ,1, , , , ,1, , , , , ,1, )
+op(	SUBASS,	"-=",		1, , , , , , ,1, , , , ,1, , , , , ,1, )
+op(	SHLASS,	"<<=",		1, , , ,1, , , , , , , ,1, , , , , ,1, )
+op(	SHRASS,	">>=",		1, , , ,1, , , , , , , ,1, , , , , ,1, )
+op(	ANDASS,	"&=",		1, ,1, ,1, , , , , , , ,1, , , , , ,1, )
+op(	XORASS,	"^=",		1, ,1, ,1, , , , , , , ,1, , , , , ,1, )
+op(	ORASS,	"|=",		1, ,1, ,1, , , , , , , ,1, , , , , ,1, )
+
+/*	name	repr		b l b B i c a s f v t b s l r p c e e = */
+op(	NAME,	"name",		 , , , , , , , , , , , , , , , , , , , )
+op(	CON,	"constant",	 , , , , , , , , , , , , , , , , , , , )
+op(	STRING,	"string",	 , , , , , , , , , , , , , , , , , , , )
+op(	FSEL,	"fsel",		 , , , , , , , , , , , , , , , , , , , )
+op(	CALL,	"call",		1, , , , , , , , , , , ,1, , , , , , , )
+op(	COMMA,	",",		1, ,1, , , , , , , , , , , , , , , , ,1)
+op(	CVT,	"convert",	 , , , , , , , , ,1, , , , , , , , , , )
+op(	ICALL,	"icall",	1, , , , , , , , , , , ,1, , , , , , , )
+op(	LOAD,	"load",		 , , , , , , , , , , , , , , , , , , , )
 /*
  * PUSH is a virtual node that is used to concatenate arguments in a function
  * call expression.  The PUSH nodes are ordered from right to left.  For
  * example, the function call f(17, 23) is represented as
  * CALL(f, PUSH(23, PUSH(17, NULL))).
  */
-op(	PUSH,	"push",		-,-,-,-,-,-,-,-,-,1,-,-,-,-,-,-,-,-,-,-)
-op(	RETURN,	"return",	1,-,1,-,-,-,-,-,-,-,-,-,1,-,-,-,-,1,-,-)
-op(	REAL,	"real",		-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-)
-op(	IMAG,	"imag",		-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-)
+op(	PUSH,	"push",		 , , , , , , , , ,1, , , , , , , , , , )
+op(	RETURN,	"return",	1, ,1, , , , , , , , , ,1, , , , ,1, , )
+op(	REAL,	"real",		 , , , , , , , , , , , , , , , , , , , )
+op(	IMAG,	"imag",		 , , , , , , , , , , , , , , , , , , , )
 
 /* INIT, CASE and FARG are pseudo operators that don't appear in the tree. */
 /*	name	repr		b l b B i c a s f v t b s l r p c e e = */
-op(	INIT,	"init",		1,-,1,-,-,-,-,-,-,-,-,-,1,-,-,-,-,1,-,-)
-op(	CASE,	"case",		-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-)
+op(	INIT,	"init",		1, ,1, , , , , , , , , ,1, , , , ,1, , )
+op(	CASE,	"case",		 , , , , , , , , , , , , , , , , , , , )
 /*
  * FARG is only used temporarily in check_prototype_argument to check type
  * compatibility and conversion for function arguments.
  */
-op(	FARG,	"farg",		1,-,1,-,-,-,-,-,-,-,-,-,-,-,-,-,-,1,-,-)
+op(	FARG,	"farg",		1, ,1, , , , , , , , , , , , , , ,1, , )
 
 end_ops()
 

Reply via email to