Re: [PATCH 2/4] perf expr: Move expr lexer to flex

From: Jiri Olsa
Date: Sat Feb 22 2020 - 17:05:20 EST


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