2009-05-19, 03:15
Code:
<GetIMDBPoster dest="5">
<RegExp input="$$8$$9$$10$$11" output="<details><thumbs>\1</thumbs></details>" dest="5">
<RegExp input="$$1" output="\1_SX$INFO[imdbscale]_SY$INFO[imdbscale]_\2" dest="6">
<expression noclean="1,2"><a name="poster".*?src="(.*?)_S.*?(.jpg)".*?</a></expression>
</RegExp>
<RegExp input="$$6" output="<thumb>\1</thumb>" dest="11">
<expression clear="yes" noclean="1">(.*?_SX[0-9]+_SY[0-9]+_.jpg)</expression>
</RegExp>
<expression noclean="1"></expression>
</RegExp>
</GetIMDBPoster>
okay another question... this function clears the buffers, however its asking for info from 4 of the buffers, info created fom other functions, so when exactley is clearbuffers supposed to happen?
from this function's behaviour i would guess that at the beginning of a new function it checks the state of clear buffers from the last function and if clearbuffers is true from the last function it clears the buffers and then sets the state of the current function, am i right?
Code:
Function Process
1. checks for if clearbuffers = no
1.a if clearbuffers ="no" leaves everything intact in the buffers
1.b if clearbuffers ="yes" or isnot set then deletes everything from all buffer
2. Either downloads specific page reffered to, or takes title and year and sets that to $$1
3.Parses through regular expressions
execution starts from the first RegExp's deepest decendant
Check conditional
if condition met...
replacebuffers on input
if clear is set on the expression, the destination is cleared before execution,
replace buffers on expression before compile
apply expression to text
check if there are any matches
if repeat....
if noclean....
if trim.....
apply results to output
replace buffers on ouptut
checks wheter to append or overwrite
if condition not met
do not execute regexp
4. check output for custom function calls
Goes over the same process above with customfunctions
checks each custom function output once more for any newly created custom function calls
5. Final results
This is the process of my parser as i have it so far, other than not being sure of where and when to clear buffers or at what time from each function it reads this info i think i have it licked, can you verify?