http://qs321.pair.com?node_id=856332


in reply to Extending a Parse::RecDescent grammar for inline comments

I know nothing about Parse::RecDescent, but my (naive) solution would be to pre-process the file and delete the offending comments. Provided you will have no more than one ';' per line that could be easily done with a split.

That would also allow you to capture the comments and save them somewhere.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James