From 37bd7b464b9035d2986e24ff3d035d1d5de463c7 Mon Sep 17 00:00:00 2001 From: mpi Date: Thu, 22 Apr 2021 10:06:52 +0000 Subject: [PATCH] Simplify token declaration. --- usr.sbin/btrace/bt_parse.y | 13 +++++-------- 1 file 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 @@ -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 ERROR OP_EQ OP_NE OP_LE OP_GE OP_LAND OP_LOR BEGIN END /* Builtins */ -%token BUILTIN +%token BUILTIN HZ /* Functions and Map operators */ -%token F_DELETE F_PRINT FUNC0 FUNC1 FUNCN OP1 OP4 MOP0 MOP1 +%token F_DELETE F_PRINT FUNC0 FUNC1 FUNCN OP1 OP4 MOP0 MOP1 %token STRING CSTRING %token NUMBER %type gvar lvar %type staticval +%type beginend %type testop binop -%type BUILTIN F_DELETE F_PRINT FUNC0 FUNC1 FUNCN OP1 OP4 -%type MOP0 MOP1 %type probe probename %type predicate conditional %type action stmt stmtlist %type expr vargs mentry mexpr printargs term globalvar variable -%type beginend %left '|' %left '&' -- 2.20.1