Skip to main content

Ralsina.Me — Roberto Alsina's website

Sometimes, you need to do it the hard way.

You may have no­ticed no posts about Stupid­Sheet for about a week.

Well, I ran in­to the lim­i­ta­tions of the for­mu­la pars­er I was do­ing us­ing Ape­ri­ot. I just could­n't make it parse this:

A1=IF(A2=B2,1,0)

So, I spent the next week try­ing one pars­ing pack­age for Python a day un­til I could find one I un­der­stood and could make it parse that ex­am­ple.

I must say it was ed­u­ca­tion­al.

So, now the pars­er is based on PLY which is pret­ty much Lex+Y­ACC with a (s­light­ly more) python­ic syn­tax, and it work­s.

Yes, it's a bit hard­er, but by try­ing to do things sim­ply I was lim­it­ing my­self too much, and, per­haps un­der­es­ti­mat­ing my­self.

I am a pret­ty smart guy, there is no rea­son I can't un­der­stand these things.


Contents © 2000-2023 Roberto Alsina