#91 refactored part of libbu/lex.c

closed-accepted
crdueck
None
5
2012-05-31
2012-05-16
crdueck
No

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.

Discussion

  • crdueck

    crdueck - 2012-05-16
     
  • crdueck

    crdueck - 2012-05-21

    coding style fix

     
  • crdueck

    crdueck - 2012-05-21

    made a coding style fix.

    the main goal of this patch was to improve readability, i'd appreciate feedback if that goal was reached.

     
  • Sean Morrison

    Sean Morrison - 2012-05-23

    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).

     
  • Sean Morrison

    Sean Morrison - 2012-05-23

    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.

     
  • Sean Morrison

    Sean Morrison - 2012-05-23
    • assigned_to: nobody --> brlcad
    • status: open --> pending-postponed
     
  • crdueck

    crdueck - 2012-05-30

    revised version applied in r50774

     
  • crdueck

    crdueck - 2012-05-30
    • status: pending-postponed --> closed-postponed
     
  • crdueck

    crdueck - 2012-05-30
    • assigned_to: brlcad --> ctjctj
    • status: closed-postponed --> closed-accepted
     
  • Sean Morrison

    Sean Morrison - 2012-05-31
    • assigned_to: ctjctj --> crdueck
     

Log in to post a comment.