title: How to get a list of variable names from a c file in Python
body: <p>I have a c file and would like to create a list of all variable names defined - using Python.</p>
  
  <p>E.g. from the following c file</p>
  
  <pre><code>int mynum = 12;
  
  // Timers
  VAR_IN_SECTION(task_timers, .mem_layout)
  timers_t timers[DSP_NUM_TASK_TIMERS];
  </code></pre>
  
  <p>I would like some Python magic to return </p>
  
  <pre><code>["mynum", "timers"]
  </code></pre>
  
  <p>How could this be done (in a way not specific to good c formatting), what would the Python magic be?</p>
  
  <p>Note: This is for parsing a file that will only have variable declarations in it.</p>