Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Extending a Parse::RecDescent grammar for inline comments

by CountZero (Bishop)
on Aug 20, 2010 at 17:38 UTC ( #856332=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://856332]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2023-01-29 16:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?