Jmax | Contextual::Return ? |
f00li5h | Jmax: that'll be it |
optraz1 | thanks f00li5h |
Oktal | Okay then, I want a Perl module that will parse C code into some sort of tree representation, let me modify that tree and then deparse it back into C code again. It must work properly, not be some incomplete, undocumented piece of crap, and not be insanely difficult to use. |
Jmax | oh wow neat |
Oktal | f00li5h: how's that? :) |
f00li5h | optraz1: the llama book makes context very clear optraz1: how's what? |
Oktal | still read like spam? |
f00li5h | Oktal: now it reads like a #perl question, nice and agro. very good |
Oktal | (also, I'm not optraz1) :P |
f00li5h | Oktal++ |
Jmax | Oktal: there are parsing modules. i'm sure you can find a grammer for C |
f00li5h | Oktal: sometimes you are. |
Oktal | lol |
optraz1 | f00li5h: i just did it, thanks . and laters for the book |
mmap__ | Oktal: probably look at Parse::RecDescent you might be able to steal a yacc file from some c compiler to aid in creation of grammar specs |
Oktal | Jmax, mmap__: well in this case I think filtering by hand with regexps and such would be easier than say Parse::RecDescent or Parse::Yapp, for what I want to do |
mmap__ | parsing C with regex?.. that'd be a neat trick |
jtk | looking for the most encompassing uri parser, i've seen regex::common, not perfect, URI haven't tried, but not sure if it's complete, want to be able to pull out the authority (domain name typically) without anything else, including id:password@ text |
f00li5h | perlbot: parsing C? |
PerlJam | mmap__: anything is possible with perl ;) |
f00li5h | nothing saying "don't use a regex" so go ahead |
Oktal | don't need to parse the whole thing, just change C definitions to declarations (remove body/initializater) and add static linkage qualifiers |
mmap__ | didn't say it was impossible.. just insane |
action | QtPlatypus doesn't think that C is regular "Infact I'm quite sure that C isn't regular" |
QtPlatypus | doesn't think that C is regular "Infact I'm quite sure that C isn't regular" |
Jmax | jtk: URI is probably your best bet |
joseki | hey! what's the easiest way to call an external program in win32 perl? I know system and fork won't work, as they both wait for the process to finish. i just want to spawn it and forget about it. |
PerlJam | QtPlatypus: yeah, it's a good thing perl's regular expressions really aren't. |
jtk | Jmax, ok thanks i'll give it a try |
Aankhen`` | joseki: fork && exec? |
mauke | joseki: fork doesn't wait |
PerlJam | joseki: You might want to look at Win32::Job |
joseki | hm, fork doesn't wait? |
PerlJam | joseki: nope. |
Aankhen`` | perldoc -f fork |
PerlJam | joseki: It would be fairly userless if it id. er, did |
joseki | hence the point of waitpid() |