Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp745538ybv; Sat, 22 Feb 2020 14:04:59 -0800 (PST) X-Google-Smtp-Source: APXvYqy8foFeU5C8rxbw+IkgXxlEdGXgDUyVZjvZjWqrUKhi+aIJq1I3Pr6J+AeXfTMgZJNkOWLQ X-Received: by 2002:a9d:6184:: with SMTP id g4mr32385916otk.223.1582409099670; Sat, 22 Feb 2020 14:04:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582409099; cv=none; d=google.com; s=arc-20160816; b=G2ye23T2gqREgqftWlyysxwBUfFox6B35vN/w5uj9LX+VOo/XcVRVPYiUKYuVKIPcF AGEUw2zZxXrHGjBPzW4/IOYf7N12euLjySj2wSZxR4vM5iFJ8Ma79NhBbnNzrTQuFR51 hLrLbp+q8Xcth47chKHzyGaoEka5E7rDeiJ3Rv5sEqmAIs39doQ++jGP1pcZo+mps8NG 2CAqBwwRRWne3iE/U1PP2OGGywE0z7PMF300UVpM39fMGD15o9XMtuqPR7lwCSxiGc2G QLUv2JbwCDA66byeWSSumi5QPMH7svBL8hdXuvainzjD69XSkzhTuUzyy7OE8tAhlcx+ n6Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=HfKky+nt4grpJG/P21ojgvgnBL6Ye5h1Ib5S8gPVVb0=; b=GKup5a9Jk3aMUAxDGfjLOAgxzy6xDNQNSLWn8e+4mQMYA2F6RqV4bkOB9pTHn6eVST uVXkb0eLbDCp3UQRZiOwfde6zF+9ClleeA0OF2Y5edDIVBfacFQErNWY2a5GjX7dldTw rEYRnboPu48Dq4U7/oE758EJijUYPf8LNeax950FuCglcV+olSTkhF0fdnt3QEhA3pRq yEzpCFbq47EjI0OtaC5zSFe8WAXBYWLCFd8sXwfVjLhMnBIQjseT1MDRCDe3+e7/VNJt Eyg195dQ+kdzYo6+6CHxcKqc/fzmOVioOSXJrm4dpuFwMKdyw+tWfNei+jCtLcOypmlL 8cGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bdK74PlG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d5si2759448oij.139.2020.02.22.14.04.32; Sat, 22 Feb 2020 14:04:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bdK74PlG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726865AbgBVWCc (ORCPT + 99 others); Sat, 22 Feb 2020 17:02:32 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:26451 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726828AbgBVWCc (ORCPT ); Sat, 22 Feb 2020 17:02:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582408950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HfKky+nt4grpJG/P21ojgvgnBL6Ye5h1Ib5S8gPVVb0=; b=bdK74PlG1ZH9uWSLHCGpIT7EOnoH1S5OrSVWgUznbhfZgb3ZRjZYeDcLMa6DSvw67pSwGD STyDJzgeCCimTJabqKkeFeagqEUK+GLG2JVoYI+sxGOOvxGavj4qJM77KEoTwS41yEPAHY VJlkHu2RB3JHJ51w4uAij40KX4bHJXE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-201-YCF0ZadWN8ay53fld5q7HQ-1; Sat, 22 Feb 2020 17:02:25 -0500 X-MC-Unique: YCF0ZadWN8ay53fld5q7HQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7D1D98017CC; Sat, 22 Feb 2020 22:02:21 +0000 (UTC) Received: from krava (ovpn-204-16.brq.redhat.com [10.40.204.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 77BF69183B; Sat, 22 Feb 2020 22:02:18 +0000 (UTC) Date: Sat, 22 Feb 2020 23:02:15 +0100 From: Jiri Olsa To: Andi Kleen Cc: Jiri Olsa , Arnaldo Carvalho de Melo , lkml , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Michael Petlan , Ravi Bangoria , Kajol Jain , John Garry Subject: Re: [PATCH 2/4] perf expr: Move expr lexer to flex Message-ID: <20200222220215.GA9575@krava> References: <20200221231935.735145-1-jolsa@kernel.org> <20200221231935.735145-3-jolsa@kernel.org> <20200222002312.GN160988@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200222002312.GN160988@tassilo.jf.intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 21, 2020 at 04:23:12PM -0800, Andi Kleen wrote: > > +max { return MAX; } > > +min { return MIN; } > > +if { return IF; } > > +else { return ELSE; } > > +#smt_on { return SMT_ON; } > > +{number} { return value(yyscanner, 10); } > > +{symbol} { return str(yyscanner, ID); } > > +"|" { return '|'; } > > +"^" { return '^'; } > > +"&" { return '&'; } > > +"-" { return '-'; } > > +"+" { return '+'; } > > +"*" { return '*'; } > > +"/" { return '/'; } > > +"%" { return '%'; } > > +"(" { return '('; } > > +")" { return ')'; } > > +"," { return ','; } > > Didn't think there was a comma, but ok. > > Looks reasonable to me. it still needs to replace/skip special chars, I'll post fixed version next week thanks, jirka