Chicken Scheme 4.8.0.5
Greetings all,
Here's a snippet of a malformed definition of a list of lists. I say malformed because the variable name lies outside the leftmost parenthesis and there is no explicit define statement ie. (define techDisplays ((AG1 fillerIgnore....nil nil))
snippet.il
techDisplays(
;( LayerName Purpose Packet Vis Sel C2C Drg Val )
;( --------- ------- ------ --- --- --- --- --- )
( AG1 fillerIgnore AG1_fillerIgnore t t nil t nil )
( AG2 drawing AG2_drawing t t nil t t )
( AG2 fillerIgnore AG2_fillerIgnore t t nil t nil )
( AG2 frame AG2_frame t t nil t t )
( AG2 frameOnly AG2_frameOnly t t nil t t )
( AG2 frameOnlyHole AG2_frameOnlyHole t t nil t t )
( y0 flight y0_flight t t t t nil )
( y1 flight y1_flight t t t t nil )
( y2 flight y2_flight t t t t nil )
( y3 flight y3_flight t t t t nil )
( y4 flight y4_flight t t t t nil )
( y5 flight y5_flight t t t t nil )
( y6 flight y6_flight t t t t nil )
( y7 flight y7_flight t t t t nil )
( y8 flight y8_flight t t t t nil )
( y9 flight y9_flight t t t t nil )
( border boundary border_boundary t nil t t nil )
( snap grid snap_grid t nil t nil nil )
) ;techDisplays
Problem: I need to get Scheme to recognise this as a valid top-level definition Further problem: Solution must be scalable as there's 100s more where this one came from that I must read in as well Constraint: I would very very much like NOT to have to write some parsing routine as it'd very likely turn out wrong what with all the parenthesis-counting , matching, and layering.
Any ideas, hints, constructive critisisms are all welcome.
TIA,
Still-learning Steve
Consider this,
If you think this won't scale (although 100s more won't be something that a modern scheme interpreter in a decent box will have trouble crunching) we can suggest alternatives. Hope this helps.
Cheers.