kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #22046
Re: [rfc] actual sexpression parsing
>You take the BNF form, process it and write the corresponding state machine. It's not VB6, it's a state machine :D
Writing a new state machine for every single list and every single
file over and over again is the part I have problems with. There
should be a single state machine that takes the tokens and gives you a
list. Not 500 over the whole codebase.
>Well these are trivial IMHO. The biggest horror for me is splitting one
object in many data forms.
The definition of sanity is not splitting it into many data forms.
>3) Using an XML similitude, usual sexp processing in lisp follows
something like a DOM model
Yea that was the plan when I structured my end result. Walking it
later is trivial.
I'm more for manual walking of the lists after the fact than trying to
use an event based one. I don't see a benefit really and rather see it
increase complexity with needing callback classes when manual
unrolling should work fairly well BUT i am not exactly happy with
manual unrolling looks so its something to play with.
Follow ups
References