in reply to Try another tack...
in thread Maintaining horrible C with Parse::RecDescent

(backing up a few levels, because the reply chain was getting pretty deep)

Are all the tables STP_OLTAPON's? I'm pretty sure you can craft one (very ugly) //x regex to handle one of those tables, and reformat it. But it's not worth the effort if that particular type is only used for this one table...

That is some scary stuff!

Replies are listed 'Best First'.
Re: Re: Try another tack...
by isotope (Deacon) on Mar 15, 2002 at 17:20 UTC
      Hmmm... If you do
      perl -ne'print if /^[A-Z_]+ [a-z_0-9]+ = {/' *.c
      does that catch all of the array declarations?

      Does it catch anything else?

      If that works, you're home free (almost) :). At least as far as marking the array starts goes...

      Let's back up a bit, again. What were you thinking of doing with the tables if you can find them? Extract the data to some more maintainable format and have scripts to go back and forth? Just format them in place so they're easier to read/edit?