Plan 9 from Bell Labs’s /usr/web/sources/contrib/nemo/root/sys/src/cmd/tags/query.h

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


enum {
	/* operators for tag expressions
	 */
	Ttag,
	Tand,
	Tor,
};

typedef struct Vals Vals;
typedef struct Texpr Texpr;

struct Vals {
	uvlong*	v;
	int	nv;
	int	av;	// allocated vs
};

struct Texpr {
	int	op;
	int	arity;
	Vals*	rval;	// result value
	union {
		char*	tag;	// Ttag 
		Texpr**	tagls;	// Tand, Tor
	};
};

void		printexpr(Texpr* e);
void		printexprval(Texpr* e);
char*		smprintexprval(Texpr* e);
void		evalexpr(Trie* t, Texpr* e);
void		freeexpr(Texpr* e);
Texpr*		parseexpr(int ntoks, char* toks[], int* pos);


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.