;ō PNĄ?c@s;dkZdkTdkTdklZdfd„ƒYZdS(N(s*(sget_line_markersParsePoscBs/tZdZddd„Zd„Zd„ZRS(sžObject to remember a file OR string being parsed, the last line read and the position in that line. Can't have a "file" and "string" at the same time.scCsI||_||_d|_t|ƒ|_d|_d|_||_dS(Nis( sfilesselfsstrings string_idxslens string_lenslinesidxsrpstack(sselfsrpstacksfilesstring((s-/mnt/gmirror/ports/devel/aap/work/ParsePos.pys__init__s     cCs|idiSdS(s/Get the line number of the recipe being parsed.i˙˙˙˙N(sselfsrpstacksline_nr(sself((s-/mnt/gmirror/ports/devel/aap/work/ParsePos.pysgetlnum#sc Csâd„}yfd}xYnoQ||ƒ|_|idid|id_|i ot|_Pnx‡not|iƒd}|djo|i|ddjo"|i|d |_|d}n|i| |_|djp|i|ddjoPn||ƒ}|idid|id_| o!dk l }||idƒn|djot |idƒ}n|i|d joIt |dƒ}|t|ƒjo||d jo||d}qĶn|id ||_qlWt |idƒ}|t|iƒjoU|i|d jo<t|i|ƒ}|tj o|d|id_qeqiPqqWWn<tj o0}ttd ƒ|iid t|ƒ‚nXd|_|itj ot|iƒ|_nd S(sųRead a line from "self.file" and handle line continuation. When reading a string use "self.string". Puts the concatenated line in "self.line", with EOL and backslashes removed. Returns None in "self.line" when at the end of the file or string. Increases the line number self.rpstack[-1].line_nr. Skips over empty and comment lines. Throws an exception when the last line has a backslash or when there is a read error.cCsã|iož|it|iƒjotSnti|id|iƒ}|djo'|i|id}t|iƒ}n|d}|i|i|!}||_|Sn8|ii ƒ}|o|ddjo |dSn|SdS(sfGet one line from the file or the string. Includes the newline at the end of the line.s iii˙˙˙˙N( sfpsstrings string_idxslensNonesfindsislinesfilesreadline(sfpsisline((s-/mnt/gmirror/ports/devel/aap/work/ParsePos.pysgetline2s      i˙˙˙˙iis s\(s recipe_errorslast line ends in a backslashs@s#sCannot read from "s": N(sgetlinesnonwhitesselfslinesrpstacksline_nrsNoneslensline_lensnextlinesProcesss recipe_errors skip_whitesisget_line_markersnsIOErrorses UserErrors_sfilesnamesstrsidx( sselfsnextlinesesisnonwhitesline_lens recipe_errorsnsgetline((s-/mnt/gmirror/ports/devel/aap/work/ParsePos.pysnextline'sZ    %%     $, (s__name__s __module__s__doc__s__init__sgetlnumsnextline(((s-/mnt/gmirror/ports/devel/aap/work/ParsePos.pysParsePoss  (sstringsErrorsUtilsProcesssget_line_markersParsePos(sParsePossstringsget_line_marker((s-/mnt/gmirror/ports/devel/aap/work/ParsePos.pys? s