#perl - Thu 17 May 2007 between 01:06 and 01:14



JmaxContextual::Return ?
f00li5hJmax: that'll be it
optraz1thanks f00li5h
OktalOkay 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.
Jmaxoh wow neat
Oktalf00li5h: how's that? :)
f00li5hoptraz1: the llama book makes context very clear
optraz1: how's what?
Oktalstill read like spam?
f00li5hOktal: now it reads like a #perl question, nice and agro. very good
Oktal(also, I'm not optraz1) :P
f00li5hOktal++
JmaxOktal: there are parsing modules. i'm sure you can find a grammer for C
f00li5hOktal: sometimes you are.
Oktallol
optraz1f00li5h: 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
OktalJmax, 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
jtklooking 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
f00li5hperlbot: parsing C?
PerlJammmap__: anything is possible with perl ;)
f00li5hnothing saying "don't use a regex" so go ahead
Oktaldon'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
actionQtPlatypus doesn't think that C is regular "Infact I'm quite sure that C isn't regular"
QtPlatypusdoesn't think that C is regular "Infact I'm quite sure that C isn't regular"
Jmaxjtk: URI is probably your best bet
josekihey! 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.
PerlJamQtPlatypus: yeah, it's a good thing perl's regular expressions really aren't.
jtkJmax, ok thanks i'll give it a try
Aankhen``joseki: fork && exec?
maukejoseki: fork doesn't wait
PerlJamjoseki: You might want to look at Win32::Job
josekihm, fork doesn't wait?
PerlJamjoseki: nope.
Aankhen``perldoc -f fork
PerlJamjoseki: It would be fairly userless if it id.
er, did
josekihence the point of waitpid()

Page: 2 9 16 23 30 37 44 51 58 65 72 

IrcArchive