After completing implementation of the RapCAD parser I decided to give it a thorough test against as many files as possible. I created a script that scoured thingiverse and created a list of thingiverse scad asset urls.
I then ran the RapCAD parser against all of the downloaded scad scripts to see how it fared. The test includes 515 scad scripts, of these 380 seem to parse without problems, and 135 throw up syntax errors.
I have been investigating these errors. I found that 60 of the errors are accounted for by the fact that I am not supporting implicit includes (a deprecated feature in OpenSCAD). The remaining 75 are caused by the fact that I have created a more strict grammar for RapCAD. Hopefully this will mean my RapCAD parser is a more robust and less ambiguous. I will attempt to justify all of the syntax “improvements” and suggest changes that the OpenSCAD developers can consider.
Here is a list of those syntax errors:
2dTimingPulleyCutout.scad: 57: syntax error at for
5080-timingPulley-Z-mini-mendel.scad: 33: syntax error at <
alphabet_block.scad: 8: syntax error at <
AltComb.scad: 10: syntax error at <
AltGelBoat.scad: 10: syntax error at <
AltRenderer.scad: 9: syntax error at <
beltpulley.scad: 1: syntax error at ;
bevelgear.scad: 122: syntax error at ]
BfB_spindle_holder.scad: 65: syntax error at for
bitmap.scad: 965: syntax error at _
box_2part.scad: 303: syntax error at if
cake-topper-explode.scad: 28: syntax error at (
cake-topper-v5.scad: 29: syntax error at (
cashbox_dxf.scad: 3: syntax error at 0
cashbox.scad: 2: syntax error at <
clampbracket.scad: 8: syntax error at 0
darieus_2.scad: 1: syntax error at <
deskrack.scad: 86: syntax error at for
Dice.scad: 32: syntax error at ]
doblo-factory-1-3.scad: 592: syntax error at ]
doblo-factory-examples.scad: 608: syntax error at ]
domekit2v-penta-mod.scad: 17: syntax error at <
door-stopper-2.scad: 78: syntax error at ]
door-stopper.scad: 67: syntax error at ]
doublepinchbarrelrmount.scad: 4: syntax error at .1
doublepinchinner.scad: 4: syntax error at .1
doublepinchmotormount.scad: 4: syntax error at .1
doublepinchouterleft.scad: 4: syntax error at .1
doublepinchouterright.scad: 4: syntax error at .1
doublepinchouter.scad: 4: syntax error at .1
DrainScreen.scad: 86: syntax error at }
Dremelfuge_V4.scad: 8: syntax error at <
duplo-lugo-benchmark.scad: 613: syntax error at ]
finished2.scad: 5: syntax error at for
gadget_mount.scad: 22: syntax error at <
gear-common.scad: 209: syntax error at ]
gears_v5.1.scad: 503: syntax error at ]
generic_clamp.scad: 18: syntax error at <
generic_wristmount-beta2.scad: 22: syntax error at <
hdd-caddie-bottom.scad: 1: syntax error at <
hdd-caddie-half.scad: 22: syntax error at ;
hdd-caddie.scad: 1: syntax error at <
height_map.scad: 12: syntax error at <
iphone4.scad: 53: syntax error at ]
mendel_dc_extruder.scad: 4: syntax error at <
mendel_extruder.scad: 29: syntax error at .09
mendel_vertex.scad: 21: syntax error at <
mendel_x_carriage_lower_bfb_2head.scad: 20: syntax error at <
mendel_x_carriage_lower_bfb.scad: 20: syntax error at <
mendel_x_carriage_lower.scad: 20: syntax error at <
mendel_x_carriage_upper_bfb_2head.scad: 21: syntax error at <
mendel_x_carriage_upper_bfb.scad: 21: syntax error at <
mendel_x_carriage_upper.scad: 21: syntax error at <
mendel_y_axis_chain_clamp.scad: 5: syntax error at <
mendel_y_motor_bracket_slimline.scad: 26: syntax error at <
mendel-z-knob.scad: 27: syntax error at ]
mendel_z_leadscrew_base.scad: 20: syntax error at <
mendel_z_leadscrew_baseWithMotorNEW.scad: 21: syntax error at <
mendel_z_leadscrew_baseWithMotor.scad: 21: syntax error at <
mini_wrench.scad: 1: syntax error at <
motor-gear.scad: 7: syntax error at gear-common.scad
motormountscrew.scad: 3: syntax error at 0
name_tag.scad: 8: syntax error at <
nema_rails.scad: 21: syntax error at <
parametric_ball_pulley.scad: 56: syntax error at for
parametric_involute_gear.scad: 203: syntax error at ]
parametric_involute_gear_v4.0.scad: 480: syntax error at ]
parametric_involute_gear_v5.0.scad: 485: syntax error at ]
Parametric_RelayBrd_OctoMount_v2.scad: 1: syntax error at <
pcb_clamp.scad: 5: syntax error at <
PhoneCase.scad: 57: syntax error at $
pinch_block.scad: 36: syntax error at ;
power-bracket_1off.scad: 20: syntax error at <
PowerRing.scad: 22: syntax error at ]
printable_bushing_180.scad: 32: syntax error at for
printdino.scad: 3: syntax error at 0
prusa_bushing_180.scad: 14: syntax error at for
prusa_bushing.scad: 21: syntax error at for
ringthing.scad: 13: syntax error at for
robot-tilt-webcam-bracket.scad: 7: syntax error at <
rocket.scad: 8: syntax error at 0
RotaVac_Single_Piece.scad: 13: syntax error at <
screwbase.scad: 3: syntax error at 0
SlottedDrainScreen.scad: 73: syntax error at }
20: Can't open input file `/home/giles/rapcad/mendel.inc'.
21: Can't open input file `/home/giles/mendel.conf'.
23: Can't open input file `/home/giles/spindle.scad'.
20: Can't open input file `/home/giles/rapcad/mendel.inc'.
21: Can't open input file `/home/giles/mendel.conf'.
23: Can't open input file `/home/giles/spindle.scad'.
20: Can't open input file `/home/giles/rapcad/mendel.inc'.
21: Can't open input file `/home/giles/mendel.conf'.
23: Can't open input file `/home/giles/spindle.scad'.
20: Can't open input file `/home/giles/rapcad/mendel.inc'.
21: Can't open input file `/home/giles/mendel.conf'.
20: Can't open input file `/home/giles/rapcad/mendel.inc'.
21: Can't open input file `/home/giles/mendel.conf'.
23: Can't open input file `/home/giles/spindle.scad`'.
20: Can't open input file `/home/giles/rapcad/mendel.inc'.
21: Can't open input file `/home/giles/mendel.conf'.
23: Can't open input file `/home/giles/spindle.scad@'.
20: Can't open input file `/home/giles/rapcad/mendel.inc'.
21: Can't open input file `/home/giles/mendel.conf'.
23: Can't open input file `/home/giles/spindle.scad@'.
21: Can't open input file `/home/giles/rapcad/mendel.inc'.
22: Can't open input file `/home/giles/mendel.conf'.
24: Can't open input file `/home/giles/spindle.scad@'.
20: Can't open input file `/home/giles/rapcad/mendel.inc'.
21: Can't open input file `/home/giles/mendel.conf'.
23: Can't open input file `/home/giles/spindle.scad'.
24: Can't open input file `/home/giles/spindle-tube-fitting.scad'.
spirogear.scad: 33: syntax error at for
Spool-side.scad: 5: syntax error at <
Spool-side-wood.scad: 6: syntax error at <
spoon.scad: 8: syntax error at <
squaretube.scad: 68: syntax error at ;
stove_knob.scad: 22: syntax error at for
tie-bracket.scad: 32: syntax error at <
tie-bracket_v2.scad: 35: syntax error at <
timingPulley.scad: 116: syntax error at {
timingPulley-v2.scad: 33: syntax error at <
timingPulley-Z-mini-mendel.scad: 33: syntax error at <
turbine.scad: 24: syntax error at for
vawt.scad: 7: syntax error at ]
whistlec.scad: 3: syntax error at 1
x-belt-clamphorizontal.scad: 20: syntax error at <
x-vert-drive-nut-trap.scad: 24: syntax error at <
x-vert-drive-side-plate-180.scad: 22: syntax error at <
x-vert-drive-side-plate-360.scad: 22: syntax error at <
z-axis-combined-leadscrew-base.scad: 21: syntax error at <
z-leadscrew-base.scad: 20: syntax error at <
z_switch3.scad: 57: syntax error at if
z_switch.scad: 1: syntax error at <
z-tensioner.scad: 21: syntax error at <
Z-tri-bearing-bracket.scad: 30: syntax error at <