refactored section of lex.c which deals with beginning whitespace and comments.
removed a goto loop and cleaned up some of the logic, it seems much more readable now.
made 2 minor whitespace changes
i'm confident that the code is correct, but suggestions on how to test this would be appreciated.
coding style fix
made a coding style fix.
the main goal of this patch was to improve readability, i'd appreciate feedback if that goal was reached.
Just a note, file attachments don't have a date so give them unique filenames that indicate the version of the file when you give updates (e.g., lex.patch, lex.v2.patch, etc).
As for how to test this change, the 'joint' command in mged is what uses the bu_lex() interace. The "joint load" subcommand loads a text 'joint' file. It'd take a bit to figure out how to use it, but feel free to give it a try after going through a couple of the mged tutorials (available on the website). The patch can't reasonably be applied until it is tested, unfortunately since it's a logic restructuring that could easily have unintended parser changes.
revised version applied in r50774
Log in to post a comment.