summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2021-04-22 10:06:53 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2021-04-22 10:06:53 +0000
commita9e0cf59e6b19e7591b1882eac5638ff5b355cf6 (patch)
treefd97156847f09df81a3358142d5b2ebbed81d382
parent67c9989225a4a2ee88b72a7204936c85b0e19034 (diff)
Simplify token declaration.
-rw-r--r--usr.sbin/btrace/bt_parse.y13
1 files changed, 5 insertions, 8 deletions
diff --git a/usr.sbin/btrace/bt_parse.y b/usr.sbin/btrace/bt_parse.y
index 7d640136bd3..fcae1763b2f 100644
--- a/usr.sbin/btrace/bt_parse.y
+++ b/usr.sbin/btrace/bt_parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: bt_parse.y,v 1.31 2021/04/22 09:44:38 mpi Exp $ */
+/* $OpenBSD: bt_parse.y,v 1.32 2021/04/22 10:06:52 mpi Exp $ */
/*
* Copyright (c) 2019-2021 Martin Pieuchot <mpi@openbsd.org>
@@ -96,7 +96,6 @@ typedef struct {
struct bt_filter *filter;
struct bt_stmt *stmt;
struct bt_arg *arg;
- enum bt_rtype rtype;
} v;
const char *filename;
int lineno;
@@ -110,24 +109,22 @@ static int yylex(void);
static int pflag;
%}
-%token ERROR OP_EQ OP_NE OP_LE OP_GE OP_LAND OP_LOR BEGIN END HZ
+%token <v.i> ERROR OP_EQ OP_NE OP_LE OP_GE OP_LAND OP_LOR BEGIN END
/* Builtins */
-%token BUILTIN
+%token <v.i> BUILTIN HZ
/* Functions and Map operators */
-%token F_DELETE F_PRINT FUNC0 FUNC1 FUNCN OP1 OP4 MOP0 MOP1
+%token <v.i> F_DELETE F_PRINT FUNC0 FUNC1 FUNCN OP1 OP4 MOP0 MOP1
%token <v.string> STRING CSTRING
%token <v.number> NUMBER
%type <v.string> gvar lvar
%type <v.number> staticval
+%type <v.i> beginend
%type <v.i> testop binop
-%type <v.i> BUILTIN F_DELETE F_PRINT FUNC0 FUNC1 FUNCN OP1 OP4
-%type <v.i> MOP0 MOP1
%type <v.probe> probe probename
%type <v.filter> predicate conditional
%type <v.stmt> action stmt stmtlist
%type <v.arg> expr vargs mentry mexpr printargs term globalvar variable
-%type <v.rtype> beginend
%left '|'
%left '&'