<aname="L2"></a><ttclass="py-lineno"> 2</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># This file is part of pybliographer</tt></tt>
<aname="L7"></a><ttclass="py-lineno"> 7</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># This program is free software; you can redistribute it and/or</tt></tt>
<aname="L8"></a><ttclass="py-lineno"> 8</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># modify it under the terms of the GNU General Public License</tt></tt>
<aname="L9"></a><ttclass="py-lineno"> 9</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># as published by the Free Software Foundation; either version 2 </tt></tt>
<aname="L10"></a><ttclass="py-lineno"> 10</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># of the License, or (at your option) any later version.</tt></tt>
<aname="L12"></a><ttclass="py-lineno"> 12</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># This program is distributed in the hope that it will be useful,</tt></tt>
<aname="L13"></a><ttclass="py-lineno"> 13</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># but WITHOUT ANY WARRANTY; without even the implied warranty of</tt></tt>
<aname="L14"></a><ttclass="py-lineno"> 14</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</tt></tt>
<aname="L15"></a><ttclass="py-lineno"> 15</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># GNU General Public License for more details. </tt></tt>
<aname="L17"></a><ttclass="py-lineno"> 17</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># You should have received a copy of the GNU General Public License</tt></tt>
<aname="L18"></a><ttclass="py-lineno"> 18</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># along with this program; if not, write to the Free Software</tt></tt>
<aname="L19"></a><ttclass="py-lineno"> 19</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</tt></tt>
<aname="L22"></a><ttclass="py-lineno"> 22</tt><ttclass="py-line"><ttclass="py-docstring">""" Stream oriented reading of a BibTeX file, with no actual semantic</tt></tt>
<aname="L23"></a><ttclass="py-lineno"> 23</tt><ttclass="py-line"><ttclass="py-docstring">operation on the content. Tries to return _everything_ from the file,</tt></tt>
</div><divid="IBibTeX.flat-collapsed"style="display:none;"pad="+++"indent="++++++++"></div><divid="IBibTeX.flat-expanded"><aname="L34"></a><ttclass="py-lineno"> 34</tt><ttclass="py-line"><ttclass="py-docstring">""" Return a textual version of the field, with no visible BibTeX / LaTeX markup """</tt></tt>
</div><divid="IBibTeX.subst-collapsed"style="display:none;"pad="+++"indent="++++++++"></div><divid="IBibTeX.subst-expanded"><aname="L38"></a><ttclass="py-lineno"> 38</tt><ttclass="py-line"><ttclass="py-docstring">""" Return a flattened list of the balanced expressions composing the field """</tt></tt>
</div><divid="IBibTeX.execute-collapsed"style="display:none;"pad="+++"indent="++++++++"></div><divid="IBibTeX.execute-expanded"><aname="L42"></a><ttclass="py-lineno"> 42</tt><ttclass="py-line"><ttclass="py-docstring">""" Execute the known LaTeX commands forming the field,</tt></tt>
<aname="L43"></a><ttclass="py-lineno"> 43</tt><ttclass="py-line"><ttclass="py-docstring"> substitute the known symbols, and return the resulting string"""</tt></tt>
</div><divid="IBibTeX.tobib-collapsed"style="display:none;"pad="+++"indent="++++++++"></div><divid="IBibTeX.tobib-expanded"><aname="L47"></a><ttclass="py-lineno"> 47</tt><ttclass="py-line"><ttclass="py-docstring">""" Return the BibTeX version of the field """</tt></tt>
</div><divid="Join-collapsed"style="display:none;"pad="+++"indent="++++"></div><divid="Join-expanded"><aname="L87"></a><ttclass="py-lineno"> 87</tt><ttclass="py-line"><ttclass="py-docstring">""" A value, as a concatenation of blocks """</tt></tt>
</div><divid="Join.execute-collapsed"style="display:none;"pad="+++"indent="++++++++"></div><divid="Join.execute-expanded"><aname="L106"></a><ttclass="py-lineno">106</tt><ttclass="py-line"><ttclass="py-comment"># Joining of bare Text fragments leads to a lookup in the @string environment</tt></tt>
</div><divid="Cmd-collapsed"style="display:none;"pad="+++"indent="++++"></div><divid="Cmd-expanded"><aname="L147"></a><ttclass="py-lineno">147</tt><ttclass="py-line"><ttclass="py-docstring">""" A LaTeX \-command """</tt></tt>
</div><divid="Block-collapsed"style="display:none;"pad="+++"indent="++++"></div><divid="Block-expanded"><aname="L171"></a><ttclass="py-lineno">171</tt><ttclass="py-line"><ttclass="py-docstring">""" A textual block, as a sequence of text and commands """</tt></tt>
</div><divid="_on_out-collapsed"style="display:none;"pad="+++"indent="++++"></div><divid="_on_out-expanded"><aname="L286"></a><ttclass="py-lineno">286</tt><ttclass="py-line"><ttclass="py-docstring">""" Called when the parser is not in a record """</tt></tt>
</div><divid="_on_open-collapsed"style="display:none;"pad="+++"indent="++++"></div><divid="_on_open-expanded"><aname="L326"></a><ttclass="py-lineno">326</tt><ttclass="py-line"><ttclass="py-docstring">""" Called at the opening of a record """</tt></tt>
<aname="L330"></a><ttclass="py-lineno">330</tt><ttclass="py-line"><ttclass="py-comment"># We eat up input as long as we don't have a balanced expression</tt></tt>
<aname="L356"></a><ttclass="py-lineno">356</tt><ttclass="py-line"><ttclass="py-keyword">raise</tt><ttid="link-90"class="py-name"><atitle="Pyblio.Exceptions.ParserError"class="py-name"href="#"onclick="return doclink('link-90', 'ParserError', 'link-2');">ParserError</a></tt><ttclass="py-op">(</tt><ttclass="py-string">'backslash at the end of a line'</tt><ttclass="py-op">,</tt><ttclass="py-name">fd</tt><ttclass="py-op">.</tt><ttclass="py-name">ln</tt><ttclass="py-op">)</tt></tt>
<aname="L368"></a><ttclass="py-lineno">368</tt><ttclass="py-line"><ttclass="py-string">'unexpected data before '</tt></tt>
<aname="L369"></a><ttclass="py-lineno">369</tt><ttclass="py-line"><ttclass="py-string">'the opening of the record: %s'</tt><ttclass="py-op">%</tt><ttclass="py-name">repr</tt><ttclass="py-op">(</tt><ttclass="py-name">data</tt><ttclass="py-op">)</tt><ttclass="py-op">,</tt></tt>
<aname="L400"></a><ttclass="py-lineno">400</tt><ttclass="py-line"><ttclass="py-comment"># Except during the opening, the parenthesis is a normal token</tt></tt>
<aname="L471"></a><ttclass="py-lineno">471</tt><ttclass="py-line"><ttclass="py-string">"key is defined twice"</tt><ttclass="py-op">,</tt><ttclass="py-name">start</tt><ttclass="py-op">)</tt></tt>
<aname="L474"></a><ttclass="py-lineno">474</tt><ttclass="py-line"><ttclass="py-string">"key is defined in the middle of the record"</tt><ttclass="py-op">,</tt><ttclass="py-name">start</tt><ttclass="py-op">)</tt></tt>
<aname="L483"></a><ttclass="py-lineno">483</tt><ttclass="py-line"><ttclass="py-string">"invalid syntax after field %s"</tt><ttclass="py-op">%</tt><ttclass="py-name">repr</tt><ttclass="py-op">(</tt><ttclass="py-name">k</tt><ttclass="py-op">)</tt><ttclass="py-op">,</tt><ttclass="py-name">start</tt><ttclass="py-op">)</tt></tt>