Răsfoiți Sursa

Initial commit of PyBison (version 0.1.8)

Sander Mathijs van Veen 14 ani în urmă
comite
a8765c6130
76 a modificat fișierele cu 17658 adăugiri și 0 ștergeri
  1. 80 0
      CHANGELOG
  2. 341 0
      COPYING
  3. 17 0
      CREDITS
  4. 28 0
      INSTALL
  5. 26 0
      Makefile
  6. 40 0
      README
  7. 97 0
      doc/api/epydoc.css
  8. 13 0
      doc/api/index.html
  9. 257 0
      doc/api/private/__builtin__.object-class.html
  10. 516 0
      doc/api/private/__builtin__.type-class.html
  11. 204 0
      doc/api/private/bison-module.html
  12. 125 0
      doc/api/private/bison.BisonError-class.html
  13. 237 0
      doc/api/private/bison.BisonNode-class.html
  14. 803 0
      doc/api/private/bison.BisonParser-class.html
  15. 291 0
      doc/api/private/bison.ParserEngine-class.html
  16. 97 0
      doc/api/private/bison.ParserSyntaxError-class.html
  17. 97 0
      doc/api/private/epydoc.css
  18. 96 0
      doc/api/private/exceptions.Exception-class.html
  19. 13 0
      doc/api/private/frames.html
  20. 236 0
      doc/api/private/help.html
  21. 13 0
      doc/api/private/index.html
  22. 245 0
      doc/api/private/indices.html
  23. 39 0
      doc/api/private/toc-bison-module.html
  24. 39 0
      doc/api/private/toc-everything.html
  25. 25 0
      doc/api/private/toc.html
  26. 92 0
      doc/api/private/trees.html
  27. 257 0
      doc/api/public/__builtin__.object-class.html
  28. 516 0
      doc/api/public/__builtin__.type-class.html
  29. 204 0
      doc/api/public/bison-module.html
  30. 88 0
      doc/api/public/bison.BisonError-class.html
  31. 237 0
      doc/api/public/bison.BisonNode-class.html
  32. 769 0
      doc/api/public/bison.BisonParser-class.html
  33. 291 0
      doc/api/public/bison.ParserEngine-class.html
  34. 97 0
      doc/api/public/bison.ParserSyntaxError-class.html
  35. 97 0
      doc/api/public/epydoc.css
  36. 96 0
      doc/api/public/exceptions.Exception-class.html
  37. 13 0
      doc/api/public/frames.html
  38. 236 0
      doc/api/public/help.html
  39. 13 0
      doc/api/public/index.html
  40. 239 0
      doc/api/public/indices.html
  41. 39 0
      doc/api/public/toc-bison-module.html
  42. 39 0
      doc/api/public/toc-everything.html
  43. 25 0
      doc/api/public/toc.html
  44. 92 0
      doc/api/public/trees.html
  45. 138 0
      doc/calc.py
  46. 161 0
      doc/index.html
  47. 1036 0
      doc/walkthrough.html
  48. 16 0
      examples/C/README
  49. 189 0
      examples/C/c.l
  50. 464 0
      examples/C/c.y
  51. 7 0
      examples/calc/README
  52. 138 0
      examples/calc/calc.py
  53. 8 0
      examples/calc/run.py
  54. 30 0
      examples/calc1/README
  55. 252 0
      examples/calc1/calc1.py
  56. 12 0
      examples/java/CREDITS
  57. 13 0
      examples/java/HelloWorldApp.java
  58. 20 0
      examples/java/README
  59. 180 0
      examples/java/javaparser.l
  60. 954 0
      examples/java/javaparser.y
  61. 38 0
      examples/java/run.py
  62. 68 0
      examples/java/table.h
  63. 15 0
      examples/template/README
  64. 202 0
      examples/template/template.py
  65. 52 0
      setup.py
  66. 82 0
      src/c/bisondynlib-linux.c
  67. 89 0
      src/c/bisondynlib-win32.c
  68. 25 0
      src/c/bisondynlib.h
  69. 5 0
      src/c/win32test.c
  70. 4256 0
      src/pyrex/bison_.c
  71. 3 0
      src/pyrex/bison_.h
  72. 2 0
      src/pyrex/bison_.pxi
  73. 684 0
      src/pyrex/bison_.pyx
  74. 938 0
      src/python/bison.py
  75. 84 0
      utils/bison2py
  76. 82 0
      utils/bison2py.py

+ 80 - 0
CHANGELOG

@@ -0,0 +1,80 @@
+
+Version 0.1.7:
+
+    2004-04-30:
+
+        - Added scientific calculator example (calc1)
+        - Added support for error-handling rules
+        - Added support for rule handlers to raise errors
+
+Version 0.1.6:
+
+    2004-04-30:
+
+        - Added ANSI C parser to examples
+
+Version 0.1.5:
+
+    2004-04-30:
+
+        - Added XML support - can now export and import parse trees to/from
+          XML strings or xml.dom.minidom objects
+
+Version 0.1.4:
+
+    2004-04-29:
+    
+        - Improved the layout and usability of python parser files generated
+          by the bison2py utility, particularly with the '-c' option enabled
+
+        - fixed the 'template' example, so that it actually works if used as is
+
+        - tidied up and fleshed out the walkthrough document
+
+Version 0.1.3:
+
+    2004-04-28:
+    
+        - java example:
+        
+            - replaced grammar file with an adapted version of one
+              from the GNU gcj compiler source - the damn thing works now!
+              
+            - fixed lex script
+
+        - core - added support for a 'debug' flag keyword argument to Parser.run(),
+          which causes the bison-generated parser to haemorrhage out all manner of
+          detailed debug info
+
+        - various other fixes and tidy-ups
+
+Version 0.1.2:
+
+    2004-04-25:
+
+        - moved pure-python code from bison.pyx (now renamed to bison_.pyx),
+          into a new file 'bison.py'.
+          
+        - patched by Eugene Oden to fix bug in processing legacy rules files
+          in cases where rules contained character literals
+
+        - added '-c' option to bison2py utility, which causes the generation
+          of handler code as separate node classes instead of methods
+
+Version 0.1.1:
+
+    2004-04-23:
+    
+        - changed call signature for user target callbacks, to a much faster and 
+          more convenient form
+        
+        - fixed several fatal bugs
+        
+        - added java parser example
+
+Version 0.1.0:
+
+    2004-04-23:
+    
+        - first release
+

+ 341 - 0
COPYING

@@ -0,0 +1,341 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
+

+ 17 - 0
CREDITS

@@ -0,0 +1,17 @@
+PyBison was designed and written by David McNab <david@freenet.org.nz>.
+
+---------------------
+
+Ideas for the class model were borrowed from the PLY Python Parser
+Builder toolkit - http://systems.cs.uchicago.edu/ply/
+
+----------------------
+
+The javaparser.l and javaparser.y files in the examples/ directory
+are based (almost verbatim) on scripts written by
+Professor Dave Binkley
+(http://www.cs.loyola.edu/~binkley/)
+at the Department of Computer Science at Loyola College in Maryland
+(http://www.cs.loyola.edu/)
+(permission pending)
+

+ 28 - 0
INSTALL

@@ -0,0 +1,28 @@
+INSTALL file for PyBison
+
+1. Prerequisites
+
+You will need:
+
+  - Python 2.2 or later, with development headers and libraries
+  - GNU bison (or yacc) - www.gnu.org or gnuwin32.sf.net
+  - GNU flex (or lex) - ditto
+  - The Pyrex Python/C wrapper creation framework:
+      - http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/
+  - A standard C compiler and linker
+
+2. Installing
+
+  - Crack the tarball somewhere convenient (eg your home directory)
+  - cd into the top level directory of this package
+  - become root, and type 'python setup.py install'
+
+With all going well, you should see a bunch of harmless warning messages
+from the compilation of bison.c, but no errors.
+
+The following commands will verify if the installation succeeded:
+
+  $ which bison2py
+  /usr/bin/bison2py
+  $ python -c "import bison"
+  $

+ 26 - 0
Makefile

@@ -0,0 +1,26 @@
+#@+leo-ver=4
+#@+node:@file Makefile
+#all: java-grammar
+
+PY_INCLUDE=/usr/include/python2.3
+
+all: module doco
+
+module:
+	python setup.py build
+
+install:
+	python setup.py install
+
+doco:
+	epydoc -n "PyBison API Reference" -o doc/api build/lib*/bison.py
+
+clean:
+	rm -rf *~ *.output tokens.h *.tab.* *.yy.c java-grammar new.* *.o *.so dummy build *.pxi *-lexer.c
+	rm -rf *-parser.y *-parser.c *-parser.h pybison.c pybison.h
+	rm -rf bison.c bison.h 
+	rm -rf *.pyc
+	rm -rf tmp.*
+	rm -f src/pyrex/bison_.pxi src/pyrex/bison_.c src/pyrex/bison_.h
+#@-node:@file Makefile
+#@-leo

+ 40 - 0
README

@@ -0,0 +1,40 @@
+Welcome to PyBison
+
+Bringing GNU Bison/Flex's raw speed and power to Python
+
+1) What is PyBison?
+
+PyBison is a framework which effectively 'wraps' Bison and Flex into a Python
+class structure.
+
+You define a parser class, define tokens and precedences as attributes,
+and parse targets as methods with rules in the docstrings,
+then instantiate and run.
+
+Black Magick happens in the background, whereupon you get callbacks each
+time yyparse() resolves a parse target.
+
+2) There are already parsers for Python. Why re-invent the wheel?
+
+I looked at all the Python-based parsing frameworks.
+
+IMO, the best one was PLY - a pure-python lexx/yacc implementation
+(which I have borrowed from heavily in designing PyBison's OO model).
+
+But PLY suffers some major limitations:
+
+ * usage of 'named groups' regular expressions in the lexer creates
+   a hard limit of 100 tokens - not enough to comfortably handle major
+   languages
+ 
+ * pure-python implementation is a convenience, but incurs a cruel
+   performance penalty
+
+ * the parser engine is SLR, not full LALR(1)
+
+The other frameworks utilise a fiddly script syntax - 
+   
+3) How do I use this?
+
+Refer to the INSTALL file for setting up.
+Refer to the examples and the doco for usage.

+ 97 - 0
doc/api/epydoc.css

@@ -0,0 +1,97 @@
+
+/* Body color */ 
+body               { background: #ffffff; color: #000000; } 
+ 
+/* Tables */ 
+table.summary, table.details, table.index
+                   { background: #e8f0f8; color: #000000; } 
+tr.summary, tr.details, tr.index
+                   { background: #70b0f0; color: #000000;  
+                     text-align: left; font-size: 120%; } 
+tr.group           { background: #c0e0f8; color: #000000;
+                     text-align: left; font-size: 120%;
+                     font-style: italic; } 
+
+/* Documentation page titles */
+h2.module          { margin-top: 0.2em; }
+h2.class           { margin-top: 0.2em; }
+ 
+/* Headings */
+h1.heading         { font-size: +140%; font-style: italic;
+                     font-weight: bold; }
+h2.heading         { font-size: +125%; font-style: italic;
+                     font-weight: bold; }
+h3.heading         { font-size: +110%; font-style: italic;
+                     font-weight: normal; }
+                    
+/* Base tree */
+pre.base-tree      { font-size: 80%; margin: 0; }
+
+/* Details Sections */
+table.func-details { background: #e8f0f8; color: #000000;
+                     border: 2px groove #c0d0d0;
+                     padding: 0 1em 0 1em; margin: 0.4em 0 0 0; }
+h3.func-detail     { background: transparent; color: #000000;
+                     margin: 0 0 1em 0; }
+
+table.var-details  { background: #e8f0f8; color: #000000;
+                     border: 2px groove #c0d0d0;
+                     padding: 0 1em 0 1em; margin: 0.4em 0 0 0; }
+h3.var-details     { background: transparent; color: #000000;
+                     margin: 0 0 1em 0; }
+
+/* Function signatures */
+.sig               { background: transparent; color: #000000;
+                     font-weight: bold; }  
+.sig-name          { background: transparent; color: #006080; }  
+.sig-arg, .sig-kwarg, .sig-vararg
+                   { background: transparent; color: #008060; }  
+.sig-default       { background: transparent; color: #602000; }  
+.summary-sig       { background: transparent; color: #000000; }  
+.summary-sig-name  { background: transparent; color: #204080; }
+.summary-sig-arg, .summary-sig-kwarg, .summary-sig-vararg
+                   { background: transparent; color: #008060; }  
+
+/* Doctest blocks */
+.py-src            { background: transparent; color: #000000; }
+.py-prompt         { background: transparent; color: #005050;
+                     font-weight: bold;}
+.py-string         { background: transparent; color: #006030; }
+.py-comment        { background: transparent; color: #003060; }
+.py-keyword        { background: transparent; color: #600000; }
+.py-output         { background: transparent; color: #404040; }
+pre.doctestblock   { background: #f4faff; color: #000000; 
+                     padding: .5em; margin: 1em;
+                     border: 1px solid #708890; }
+table pre.doctestblock
+                   { background: #dce4ec; color: #000000; 
+                     padding: .5em; margin: 1em;
+                     border: 1px solid #708890; }
+
+/* Variable values */
+pre.variable       { background: #dce4ec; color: #000000;
+                     padding: .5em; margin: 0;
+                     border: 1px solid #708890; }
+.variable-linewrap { background: transparent; color: #604000; }
+.variable-ellipsis { background: transparent; color: #604000; }
+.variable-quote    { background: transparent; color: #604000; }
+.re                { background: transparent; color: #000000; }
+.re-char           { background: transparent; color: #006030; }
+.re-op             { background: transparent; color: #600000; }
+.re-group          { background: transparent; color: #003060; }
+.re-ref            { background: transparent; color: #404040; }
+
+/* Navigation bar */ 
+table.navbar       { background: #a0c0ff; color: #0000ff;
+                     border: 2px groove #c0d0d0; }
+th.navbar          { background: #a0c0ff; color: #0000ff; } 
+th.navselect       { background: #70b0ff; color: #000000; } 
+.nomargin          { margin: 0; }
+
+/* Links */ 
+a:link             { background: transparent; color: #0000ff; }  
+a:visited          { background: transparent; color: #204080; }  
+a.navbar:link      { background: transparent; color: #0000ff; 
+                     text-decoration: none; }  
+a.navbar:visited   { background: transparent; color: #204080; 
+                     text-decoration: none; }  

+ 13 - 0
doc/api/index.html

@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
+<html>
+<head>
+  <title> PyBison API Reference </title>
+</head>
+<frameset cols="20%,80%">
+  <frameset rows="30%,70%">
+    <frame src="public/toc.html" name="moduleListFrame">
+    <frame src="public/toc-everything.html" name="moduleFrame">
+  </frameset>
+  <frame src="public/bison-module.html" name="mainFrame">
+</frameset>
+</html>

+ 257 - 0
doc/api/private/__builtin__.object-class.html

@@ -0,0 +1,257 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>__builtin__.object</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <font size="-1"><b class="breadcrumbs">
+        Module&nbsp;__builtin__ ::
+        Class&nbsp;object
+      </b></font></br>
+    </td>
+    <td><table cellpadding="0" cellspacing="0">
+      <tr><td align="right"><font size="-2">[show&nbsp;private&nbsp;|&nbsp;<a href="../public/__builtin__.object-class.html">hide&nbsp;private</a>]</font></td></tr>
+      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="__builtin__.object-class.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
+    </table></td>
+</tr></table>
+
+<!-- =========== START OF CLASS DESCRIPTION =========== -->
+<h2 class="class">Class object</h2>
+
+<dl><dt><b>Known Subclasses:</b></dt>
+<dd>
+    <a href="bison.BisonParser-class.html"><code>BisonParser</code></a>,
+    <a href="__builtin__.type-class.html"><code>type</code></a></dd></dl>
+
+<hr/>
+
+The most base type
+<hr/>
+
+
+<!-- =========== START OF METHOD SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Method Summary</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__init__(...) initializes x; see x.__class__.__doc__ for 
+signature</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__delattr__" class="summary-sig-name"><code>__delattr__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__delattr__('name') &lt;==&gt; del x.name</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__getattribute__" class="summary-sig-name"><code>__getattribute__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__getattribute__('name') &lt;==&gt; x.name</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__hash__" class="summary-sig-name"><code>__hash__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
+<br />
+x.__hash__() &lt;==&gt; hash(x)</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__reduce__" class="summary-sig-name"><code>__reduce__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+helper for pickle</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__reduce_ex__" class="summary-sig-name"><code>__reduce_ex__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+helper for pickle</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__repr__" class="summary-sig-name"><code>__repr__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
+<br />
+x.__repr__() &lt;==&gt; repr(x)</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__setattr__" class="summary-sig-name"><code>__setattr__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__setattr__('name', value) &lt;==&gt; x.name = value</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__str__" class="summary-sig-name"><code>__str__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
+<br />
+x.__str__() &lt;==&gt; str(x)</td></tr>
+<tr bgcolor="#e8f0f8" class="group">
+  <th colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;Inherited from type</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.type-class.html#__new__" class="summary-sig-name"><code>__new__</code></a>(<span class=summary-sig-arg>T</span>,
+          <span class=summary-sig-arg>S</span>,
+          <span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+T.__new__(S, ...) -&gt; a new object with type S, a subtype of T</td></tr>
+</table><br />
+
+
+<!-- =========== START OF CLASS VARIABLE SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Class Variable Summary</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>type</code></font></td>
+  <td><a name="__class__"></a><b><code>__class__</code></b> = <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+</table><br />
+
+
+<!-- =========== START OF METHOD DETAILS =========== -->
+<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="details">
+  <th colspan="2">Method Details</th></tr>
+</table>
+
+<a name="__init__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-vararg">...</span>)</span>
+    <br /><i>(Constructor)</i>
+  </h3>
+  x.__init__(...) initializes x; see x.__class__.__doc__ for 
+  signature
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__delattr__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__delattr__</span>(<span class="sig-vararg">...</span>)</span>
+  </h3>
+  x.__delattr__('name') &lt;==&gt; del x.name
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__getattribute__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__getattribute__</span>(<span class="sig-vararg">...</span>)</span>
+  </h3>
+  x.__getattribute__('name') &lt;==&gt; x.name
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__hash__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__hash__</span>(<span class=sig-arg>x</span>)</span>
+    <br /><i>(Hashing function)</i>
+  </h3>
+  x.__hash__() &lt;==&gt; hash(x)
+  <dl><dt></dt><dd>
+    <dl><dt><b>Returns:</b></dt>
+      <dd>
+<pre class="literalblock">
+hash(x)
+</pre>
+      </dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__reduce__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__reduce__</span>(<span class="sig-vararg">...</span>)</span>
+  </h3>
+  helper for pickle
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__reduce_ex__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__reduce_ex__</span>(<span class="sig-vararg">...</span>)</span>
+  </h3>
+  helper for pickle
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__repr__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__repr__</span>(<span class=sig-arg>x</span>)</span>
+    <br /><i>(Representation operator)</i>
+  </h3>
+  x.__repr__() &lt;==&gt; repr(x)
+  <dl><dt></dt><dd>
+    <dl><dt><b>Returns:</b></dt>
+      <dd>
+<pre class="literalblock">
+repr(x)
+</pre>
+      </dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__setattr__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__setattr__</span>(<span class="sig-vararg">...</span>)</span>
+  </h3>
+  x.__setattr__('name', value) &lt;==&gt; x.name = value
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__str__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__str__</span>(<span class=sig-arg>x</span>)</span>
+    <br /><i>(Informal representation operator)</i>
+  </h3>
+  x.__str__() &lt;==&gt; str(x)
+  <dl><dt></dt><dd>
+    <dl><dt><b>Returns:</b></dt>
+      <dd>
+<pre class="literalblock">
+str(x)
+</pre>
+      </dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+<br />
+
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+  <tr>
+    <td align="left"><font size="-2">Generated by Epydoc 2.0 on Sun Jun 27 12:36:56 2004</font></td>
+    <td align="right"><a href="http://epydoc.sourceforge.net"
+                      ><font size="-2">http://epydoc.sf.net</font></a></td>
+  </tr>
+</table>
+</body>
+</html>

+ 516 - 0
doc/api/private/__builtin__.type-class.html

@@ -0,0 +1,516 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>__builtin__.type</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <font size="-1"><b class="breadcrumbs">
+        Module&nbsp;__builtin__ ::
+        Class&nbsp;type
+      </b></font></br>
+    </td>
+    <td><table cellpadding="0" cellspacing="0">
+      <tr><td align="right"><font size="-2">[show&nbsp;private&nbsp;|&nbsp;<a href="../public/__builtin__.type-class.html">hide&nbsp;private</a>]</font></td></tr>
+      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="__builtin__.type-class.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
+    </table></td>
+</tr></table>
+
+<!-- =========== START OF CLASS DESCRIPTION =========== -->
+<h2 class="class">Class type</h2>
+
+<pre class="base-tree">
+<a href="__builtin__.object-class.html"><code>object</code></a> --+
+         |
+        <b>type</b>
+</pre><br />
+
+<hr/>
+
+type(object) -&gt; the object's type type(name, bases, dict) -&gt; a 
+new type
+<hr/>
+
+
+<!-- =========== START OF METHOD SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Method Summary</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.type-class.html#__call__" class="summary-sig-name"><code>__call__</code></a>(<span class=summary-sig-arg>x</span>,
+          <span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__call__(...) &lt;==&gt; x(...)</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.type-class.html#__cmp__" class="summary-sig-name"><code>__cmp__</code></a>(<span class=summary-sig-arg>x</span>,
+          <span class=summary-sig-arg>y</span>)</span></code>
+<br />
+x.__cmp__(y) &lt;==&gt; cmp(x,y)</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.type-class.html#__delattr__" class="summary-sig-name"><code>__delattr__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__delattr__('name') &lt;==&gt; del x.name</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.type-class.html#__getattribute__" class="summary-sig-name"><code>__getattribute__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__getattribute__('name') &lt;==&gt; x.name</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.type-class.html#__hash__" class="summary-sig-name"><code>__hash__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
+<br />
+x.__hash__() &lt;==&gt; hash(x)</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.type-class.html#__new__" class="summary-sig-name"><code>__new__</code></a>(<span class=summary-sig-arg>T</span>,
+          <span class=summary-sig-arg>S</span>,
+          <span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+T.__new__(S, ...) -&gt; a new object with type S, a subtype of T</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.type-class.html#__repr__" class="summary-sig-name"><code>__repr__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
+<br />
+x.__repr__() &lt;==&gt; repr(x)</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.type-class.html#__setattr__" class="summary-sig-name"><code>__setattr__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__setattr__('name', value) &lt;==&gt; x.name = value</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">list of immediate subclasses</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.type-class.html#__subclasses__" class="summary-sig-name"><code>__subclasses__</code></a>()</span></code>
+<br />
+__subclasses__() -&gt; list of immediate subclasses</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">list</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.type-class.html#mro" class="summary-sig-name"><code>mro</code></a>()</span></code>
+<br />
+return a type's method resolution order</td></tr>
+<tr bgcolor="#e8f0f8" class="group">
+  <th colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;Inherited from object</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__init__(...) initializes x; see x.__class__.__doc__ for 
+signature</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__reduce__" class="summary-sig-name"><code>__reduce__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+helper for pickle</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__reduce_ex__" class="summary-sig-name"><code>__reduce_ex__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+helper for pickle</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__str__" class="summary-sig-name"><code>__str__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
+<br />
+x.__str__() &lt;==&gt; str(x)</td></tr>
+</table><br />
+
+
+<!-- =========== START OF CLASS VARIABLE SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Class Variable Summary</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>type</code></font></td>
+  <td><a name="__base__"></a><b><code>__base__</code></b> = <a href="__builtin__.object-class.html"><code>__builtin__.object</code></a></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>tuple</code></font></td>
+<td><b><a href="__builtin__.type-class.html#__bases__"><code>__bases__</code></a></b> = <span title="(&lt;type 'object'&gt;,)"><code>(&lt;type&nbsp;'object'&gt;,)                           </code>
+</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>int</code></font></td>
+<td><b><a href="__builtin__.type-class.html#__basicsize__"><code>__basicsize__</code></a></b> = <span title="420">420&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>int</code></font></td>
+<td><b><a href="__builtin__.type-class.html#__dictoffset__"><code>__dictoffset__</code></a></b> = <span title="132">132&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>int</code></font></td>
+<td><b><a href="__builtin__.type-class.html#__flags__"><code>__flags__</code></a></b> = <span title="21995">21995&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>int</code></font></td>
+<td><b><a href="__builtin__.type-class.html#__itemsize__"><code>__itemsize__</code></a></b> = <span title="20">20&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>tuple</code></font></td>
+<td><b><a href="__builtin__.type-class.html#__mro__"><code>__mro__</code></a></b> = <span title="(&lt;type 'type'&gt;, &lt;type 'object'&gt;)"><code>(&lt;type&nbsp;'type'&gt;,&nbsp;&lt;type&nbsp;'object'&gt;)               </code>
+</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
+<td><b><a href="__builtin__.type-class.html#__name__"><code>__name__</code></a></b> = <span title="'type'"><code><span class="variable-quote">'</span>type<span class="variable-quote">'</span>                                        </code>
+</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>int</code></font></td>
+<td><b><a href="__builtin__.type-class.html#__weakrefoffset__"><code>__weakrefoffset__</code></a></b> = <span title="184">184&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>
+</table><br />
+
+
+<!-- =========== START OF METHOD DETAILS =========== -->
+<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="details">
+  <th colspan="2">Method Details</th></tr>
+</table>
+
+<a name="__call__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__call__</span>(<span class=sig-arg>x</span>,
+          <span class="sig-vararg">...</span>)</span>
+    <br /><i>(Call operator)</i>
+  </h3>
+  x.__call__(...) &lt;==&gt; x(...)
+  <dl><dt></dt><dd>
+    <dl><dt><b>Returns:</b></dt>
+      <dd>
+<pre class="literalblock">
+x(...)
+</pre>
+      </dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__cmp__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__cmp__</span>(<span class=sig-arg>x</span>,
+          <span class=sig-arg>y</span>)</span>
+    <br /><i>(Comparison operator)</i>
+  </h3>
+  x.__cmp__(y) &lt;==&gt; cmp(x,y)
+  <dl><dt></dt><dd>
+    <dl><dt><b>Returns:</b></dt>
+      <dd>
+<pre class="literalblock">
+cmp(x,y)
+</pre>
+      </dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__delattr__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__delattr__</span>(<span class="sig-vararg">...</span>)</span>
+  </h3>
+  x.__delattr__('name') &lt;==&gt; del x.name
+  <dl><dt></dt><dd>
+    <dl><dt><b>Overrides:</b></dt>
+      <dd><a href="__builtin__.object-class.html#__delattr__"><code>__builtin__.object.__delattr__</code></a></dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__getattribute__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__getattribute__</span>(<span class="sig-vararg">...</span>)</span>
+  </h3>
+  x.__getattribute__('name') &lt;==&gt; x.name
+  <dl><dt></dt><dd>
+    <dl><dt><b>Overrides:</b></dt>
+      <dd><a href="__builtin__.object-class.html#__getattribute__"><code>__builtin__.object.__getattribute__</code></a></dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__hash__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__hash__</span>(<span class=sig-arg>x</span>)</span>
+    <br /><i>(Hashing function)</i>
+  </h3>
+  x.__hash__() &lt;==&gt; hash(x)
+  <dl><dt></dt><dd>
+    <dl><dt><b>Returns:</b></dt>
+      <dd>
+<pre class="literalblock">
+hash(x)
+</pre>
+      </dd>
+    </dl>
+    <dl><dt><b>Overrides:</b></dt>
+      <dd><a href="__builtin__.object-class.html#__hash__"><code>__builtin__.object.__hash__</code></a></dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__new__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__new__</span>(<span class=sig-arg>T</span>,
+          <span class=sig-arg>S</span>,
+          <span class="sig-vararg">...</span>)</span>
+  </h3>
+  T.__new__(S, ...) -&gt; a new object with type S, a subtype of T
+  <dl><dt></dt><dd>
+    <dl><dt><b>Returns:</b></dt>
+      <dd>
+<pre class="literalblock">
+a new object with type S, a subtype of T
+</pre>
+      </dd>
+    </dl>
+    <dl><dt><b>Overrides:</b></dt>
+      <dd><a href="__builtin__.type-class.html#__new__"><code>__builtin__.type.__new__</code></a></dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__repr__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__repr__</span>(<span class=sig-arg>x</span>)</span>
+    <br /><i>(Representation operator)</i>
+  </h3>
+  x.__repr__() &lt;==&gt; repr(x)
+  <dl><dt></dt><dd>
+    <dl><dt><b>Returns:</b></dt>
+      <dd>
+<pre class="literalblock">
+repr(x)
+</pre>
+      </dd>
+    </dl>
+    <dl><dt><b>Overrides:</b></dt>
+      <dd><a href="__builtin__.object-class.html#__repr__"><code>__builtin__.object.__repr__</code></a></dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__setattr__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__setattr__</span>(<span class="sig-vararg">...</span>)</span>
+  </h3>
+  x.__setattr__('name', value) &lt;==&gt; x.name = value
+  <dl><dt></dt><dd>
+    <dl><dt><b>Overrides:</b></dt>
+      <dd><a href="__builtin__.object-class.html#__setattr__"><code>__builtin__.object.__setattr__</code></a></dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__subclasses__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__subclasses__</span>()</span>
+  </h3>
+  __subclasses__() -&gt; list of immediate subclasses
+  <dl><dt></dt><dd>
+    <dl><dt><b>Returns:</b></dt>
+      <dd>
+list of immediate subclasses      </dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+
+<a name="mro"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">mro</span>()</span>
+  </h3>
+  return a type's method resolution order
+  <dl><dt></dt><dd>
+    <dl><dt><b>Returns:</b></dt>
+      <dd>
+list      </dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+<br />
+
+
+<!-- =========== START OF CLASS VARIABLE DETAILS =========== -->
+<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="details">
+  <th colspan="2">Class Variable Details</th></tr>
+</table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="__bases__"></a>
+<h3>__bases__</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>tuple</code>
+
+      </dd>
+<span title="(&lt;type 'object'&gt;,)">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+(&lt;type 'object'&gt;,)                                                     </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="__basicsize__"></a>
+<h3>__basicsize__</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>int</code>
+
+      </dd>
+<span title="420">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+420&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="__dictoffset__"></a>
+<h3>__dictoffset__</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>int</code>
+
+      </dd>
+<span title="132">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+132&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="__flags__"></a>
+<h3>__flags__</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>int</code>
+
+      </dd>
+<span title="21995">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+21995&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="__itemsize__"></a>
+<h3>__itemsize__</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>int</code>
+
+      </dd>
+<span title="20">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+20&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="__mro__"></a>
+<h3>__mro__</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>tuple</code>
+
+      </dd>
+<span title="(&lt;type 'type'&gt;, &lt;type 'object'&gt;)">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+(&lt;type 'type'&gt;, &lt;type 'object'&gt;)                                       </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="__name__"></a>
+<h3>__name__</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>str</code>
+
+      </dd>
+<span title="'type'">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+<span class="variable-quote">'</span>type<span class="variable-quote">'</span>                                                                 </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="__weakrefoffset__"></a>
+<h3>__weakrefoffset__</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>int</code>
+
+      </dd>
+<span title="184">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+184&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<br />
+
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+  <tr>
+    <td align="left"><font size="-2">Generated by Epydoc 2.0 on Sun Jun 27 12:36:56 2004</font></td>
+    <td align="right"><a href="http://epydoc.sourceforge.net"
+                      ><font size="-2">http://epydoc.sf.net</font></a></td>
+  </tr>
+</table>
+</body>
+</html>

+ 204 - 0
doc/api/private/bison-module.html

@@ -0,0 +1,204 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>bison</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th bgcolor="#70b0f0" class="navselect">&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <font size="-1"><b class="breadcrumbs">
+        Module&nbsp;bison
+      </b></font></br>
+    </td>
+    <td><table cellpadding="0" cellspacing="0">
+      <tr><td align="right"><font size="-2">[show&nbsp;private&nbsp;|&nbsp;<a href="../public/bison-module.html">hide&nbsp;private</a>]</font></td></tr>
+      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="bison-module.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
+    </table></td>
+</tr></table>
+
+<!-- =========== START OF MODULE DESCRIPTION =========== -->
+<h2 class="module">Module bison</h2>
+
+<p>Wrapper module for interfacing with Bison (yacc)</p>
+<p>Written April 2004 by David McNab &lt;david&#64;freenet.org.nz&gt; 
+Copyright (c) 2004 by David McNab, all rights reserved.</p>
+<p>Released under the GNU General Public License, a copy of which should 
+appear in this distribution in the file called 'COPYING'. If this file is 
+missing, then you can obtain a copy of the GPL license document from the 
+GNU website at http://www.gnu.org.</p>
+<p>This software is released with no warranty whatsoever. Use it at your 
+own risk.</p>
+If you wish to use this software in a commercial application, and wish 
+to depart from the GPL licensing requirements, please contact the author 
+and apply for a commercial license.
+<hr/>
+
+<!-- =========== START OF CLASSES =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Classes</th></tr>
+<tr><td width="15%">
+  <b><a href="bison.BisonError-class.html"><code>BisonError</code></a></b></td>
+  <td>Flags an error to yyparse()</td></tr>
+<tr><td width="15%">
+  <b><a href="bison.BisonNode-class.html"><code>BisonNode</code></a></b></td>
+  <td>Generic class for wrapping parse targets.</td></tr>
+<tr><td width="15%">
+  <b><a href="bison.BisonParser-class.html"><code>BisonParser</code></a></b></td>
+  <td>Base parser class</td></tr>
+</table><br />
+
+
+<!-- =========== START OF EXCEPTIONS =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Exceptions</th></tr>
+<tr><td width="15%">
+  <b><a href="bison.ParserSyntaxError-class.html"><code>ParserSyntaxError</code></a></b></td>
+  <td>&nbsp;</td></tr>
+</table><br />
+
+
+<!-- =========== START OF FUNCTION SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Function Summary</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison-module.html#bisonToPython" class="summary-sig-name"><code>bisonToPython</code></a>(<span class=summary-sig-arg>bisonfileName</span>,
+          <span class=summary-sig-arg>lexfileName</span>,
+          <span class=summary-sig-arg>pyfileName</span>,
+          <span class=summary-sig-arg>generateClasses</span>)</span></code>
+<br />
+Rips the rules, tokens and precedences from a bison file, and the 
+verbatim text from a lex file and generates a boilerplate python file 
+containing a Parser class with handler methods and grammar attributes</td></tr>
+</table><br />
+
+
+<!-- =========== START OF VARIABLE SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Variable Summary</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>SRE_Pattern</code></font></td>
+<td><b><a href="bison-module.html#reSpaces"><code>reSpaces</code></a></b> = <span title="&lt;_sre.SRE_Pattern object at 0x4029a2f8&gt;"><code><span class="re"><span class="re-char">\s</span><span class="re-op">+</span></span>                                           </code>
+</span></td></tr>
+</table><br />
+
+
+<!-- =========== START OF FUNCTION DETAILS =========== -->
+<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="details">
+  <th colspan="2">Function Details</th></tr>
+</table>
+
+<a name="bisonToPython"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">bisonToPython</span>(<span class=sig-arg>bisonfileName</span>,
+          <span class=sig-arg>lexfileName</span>,
+          <span class=sig-arg>pyfileName</span>,
+          <span class=sig-arg>generateClasses</span>=<span class=sig-default>0</span>)</span>
+  </h3>
+  <p>Rips the rules, tokens and precedences from a bison file, and the 
+  verbatim text from a lex file and generates a boilerplate python file 
+  containing a Parser class with handler methods and grammar 
+  attributes</p>
+  Arguments:
+  <ul>
+    <li>
+      bisonfileName - name of input bison script
+    </li>
+    <li>
+      lexfileName - name of input flex script
+    </li>
+    <li>
+      pyfileName - name of output python file
+    </li>
+    <li>
+      generateClasses - flag - default 0 - if 1, causes a unique class 
+      to be defined for each parse target, and for the corresponding 
+      target handler method in the main Parser class to use this class 
+      when creating the node.
+    </li>
+  </ul>
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+<br />
+
+
+<!-- =========== START OF VARIABLE DETAILS =========== -->
+<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="details">
+  <th colspan="2">Variable Details</th></tr>
+</table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="reSpaces"></a>
+<h3>reSpaces</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>SRE_Pattern</code>
+
+      </dd>
+<span title="&lt;_sre.SRE_Pattern object at 0x4029a2f8&gt;">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+<span class="re"><span class="re-char">\s</span><span class="re-op">+</span></span>                                                                    </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<br />
+
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th bgcolor="#70b0f0" class="navselect">&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+  <tr>
+    <td align="left"><font size="-2">Generated by Epydoc 2.0 on Sun Jun 27 12:36:56 2004</font></td>
+    <td align="right"><a href="http://epydoc.sourceforge.net"
+                      ><font size="-2">http://epydoc.sf.net</font></a></td>
+  </tr>
+</table>
+</body>
+</html>

+ 125 - 0
doc/api/private/bison.BisonError-class.html

@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>bison.BisonError</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <font size="-1"><b class="breadcrumbs">
+        <a href="bison-module.html">Module&nbsp;bison</a> ::
+        Class&nbsp;BisonError
+      </b></font></br>
+    </td>
+    <td><table cellpadding="0" cellspacing="0">
+      <tr><td align="right"><font size="-2">[show&nbsp;private&nbsp;|&nbsp;<a href="../public/bison.BisonError-class.html">hide&nbsp;private</a>]</font></td></tr>
+      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="bison.BisonError-class.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
+    </table></td>
+</tr></table>
+
+<!-- =========== START OF CLASS DESCRIPTION =========== -->
+<h2 class="class">Class BisonError</h2>
+
+<hr/>
+
+<p>Flags an error to yyparse()</p>
+You should return this in your actions to notify a syntax error
+<hr/>
+
+
+<!-- =========== START OF METHOD SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Method Summary</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><a name="__init__"></a><span class="summary-sig"><span class="summary-sig-name">__init__</span>(<span class=summary-sig-arg>self</span>,
+          <span class=summary-sig-arg>value</span>)</span></code>
+</td></tr>
+</table><br />
+
+
+<!-- =========== START OF CLASS VARIABLE SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Class Variable Summary</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>int</code></font></td>
+<td><b><a href="../private/bison.BisonError-class.html#_pyBisonError"><code>_pyBisonError</code></a></b> = <span title="1">1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>
+</table><br />
+
+
+<!-- =========== START OF CLASS VARIABLE DETAILS =========== -->
+<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="details">
+  <th colspan="2">Class Variable Details</th></tr>
+</table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="_pyBisonError"></a>
+<h3>_pyBisonError</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>int</code>
+
+      </dd>
+<span title="1">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<br />
+
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+  <tr>
+    <td align="left"><font size="-2">Generated by Epydoc 2.0 on Sun Jun 27 12:36:56 2004</font></td>
+    <td align="right"><a href="http://epydoc.sourceforge.net"
+                      ><font size="-2">http://epydoc.sf.net</font></a></td>
+  </tr>
+</table>
+</body>
+</html>

+ 237 - 0
doc/api/private/bison.BisonNode-class.html

@@ -0,0 +1,237 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>bison.BisonNode</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <font size="-1"><b class="breadcrumbs">
+        <a href="bison-module.html">Module&nbsp;bison</a> ::
+        Class&nbsp;BisonNode
+      </b></font></br>
+    </td>
+    <td><table cellpadding="0" cellspacing="0">
+      <tr><td align="right"><font size="-2">[show&nbsp;private&nbsp;|&nbsp;<a href="../public/bison.BisonNode-class.html">hide&nbsp;private</a>]</font></td></tr>
+      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="bison.BisonNode-class.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
+    </table></td>
+</tr></table>
+
+<!-- =========== START OF CLASS DESCRIPTION =========== -->
+<h2 class="class">Class BisonNode</h2>
+
+<hr/>
+
+<p>Generic class for wrapping parse targets.</p>
+Arguments:
+<ul>
+  <li>
+    targetname - the name of the parse target being wrapped.
+  </li>
+  <li>
+    items - optional - a list of items comprising a clause in the 
+    target rule - typically this will only be used by the PyBison 
+    callback mechanism.
+  </li>
+</ul>
+Keywords:
+<ul>
+  <li>
+    any keywords you want (except 'items'), with any type of value. 
+    keywords will be stored as attributes in the constructed object.
+  </li>
+</ul>
+<hr/>
+
+
+<!-- =========== START OF METHOD SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Method Summary</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><a name="__init__"></a><span class="summary-sig"><span class="summary-sig-name">__init__</span>(<span class=summary-sig-arg>self</span>,
+          <span class="summary-sig-kwarg">**kw</span>)</span></code>
+</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonNode-class.html#__getitem__" class="summary-sig-name"><code>__getitem__</code></a>(<span class=summary-sig-arg>self</span>,
+          <span class=summary-sig-arg>item</span>)</span></code>
+<br />
+Retrieves the ith value from this node, or child nodes</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><a name="__getslice__"></a><span class="summary-sig"><span class="summary-sig-name">__getslice__</span>(<span class=summary-sig-arg>self</span>,
+          <span class=summary-sig-arg>fromidx</span>,
+          <span class=summary-sig-arg>toidx</span>)</span></code>
+</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><a name="__iter__"></a><span class="summary-sig"><span class="summary-sig-name">__iter__</span>(<span class=summary-sig-arg>self</span>)</span></code>
+</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><a name="__len__"></a><span class="summary-sig"><span class="summary-sig-name">__len__</span>(<span class=summary-sig-arg>self</span>)</span></code>
+</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><a name="__repr__"></a><span class="summary-sig"><span class="summary-sig-name">__repr__</span>(<span class=summary-sig-arg>self</span>)</span></code>
+</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><a name="__str__"></a><span class="summary-sig"><span class="summary-sig-name">__str__</span>(<span class=summary-sig-arg>self</span>)</span></code>
+</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonNode-class.html#dump" class="summary-sig-name"><code>dump</code></a>(<span class=summary-sig-arg>self</span>,
+          <span class=summary-sig-arg>indent</span>)</span></code>
+<br />
+For debugging - prints a recursive dump of a parse tree node and its 
+children</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonNode-class.html#toprettyxml" class="summary-sig-name"><code>toprettyxml</code></a>(<span class=summary-sig-arg>self</span>,
+          <span class=summary-sig-arg>indent</span>,
+          <span class=summary-sig-arg>newl</span>,
+          <span class=summary-sig-arg>encoding</span>)</span></code>
+<br />
+returns a human-readable xml serialisation of this node and its 
+children</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonNode-class.html#toxml" class="summary-sig-name"><code>toxml</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
+<br />
+Returns an xml serialisation of this node and its children, as a raw 
+string</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonNode-class.html#toxmldoc" class="summary-sig-name"><code>toxmldoc</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
+<br />
+Returns the node and its children as an xml.dom.minidom.Document 
+object</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonNode-class.html#toxmlelem" class="summary-sig-name"><code>toxmlelem</code></a>(<span class=summary-sig-arg>self</span>,
+          <span class=summary-sig-arg>docobj</span>)</span></code>
+<br />
+Returns a DOM Element object of this node and its children</td></tr>
+</table><br />
+
+
+<!-- =========== START OF METHOD DETAILS =========== -->
+<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="details">
+  <th colspan="2">Method Details</th></tr>
+</table>
+
+<a name="__getitem__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__getitem__</span>(<span class=sig-arg>self</span>,
+          <span class=sig-arg>item</span>)</span>
+    <br /><i>(Indexing operator)</i>
+  </h3>
+  <p>Retrieves the ith value from this node, or child nodes</p>
+  <p>If the subscript is a single number, it will be used as an index 
+  into this node's children list.</p>
+  If the subscript is a list or tuple, we recursively fetch the item 
+  by using the first element as an index into this node's children, the 
+  second element as an index into that child node's children, and so 
+  on
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="dump"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">dump</span>(<span class=sig-arg>self</span>,
+          <span class=sig-arg>indent</span>=<span class=sig-default>0</span>)</span>
+  </h3>
+  For debugging - prints a recursive dump of a parse tree node and its 
+  children
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="toprettyxml"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">toprettyxml</span>(<span class=sig-arg>self</span>,
+          <span class=sig-arg>indent</span>=<span class=sig-default>'&nbsp;&nbsp;'</span>,
+          <span class=sig-arg>newl</span>=<span class=sig-default>'\n'</span>,
+          <span class=sig-arg>encoding</span>=<span class=sig-default>None</span>)</span>
+  </h3>
+  returns a human-readable xml serialisation of this node and its 
+  children
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="toxml"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">toxml</span>(<span class=sig-arg>self</span>)</span>
+  </h3>
+  <p>Returns an xml serialisation of this node and its children, as a raw 
+  string</p>
+  Called on the toplevel node, the xml is a representation of the 
+  entire parse tree.
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="toxmldoc"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">toxmldoc</span>(<span class=sig-arg>self</span>)</span>
+  </h3>
+  Returns the node and its children as an xml.dom.minidom.Document 
+  object
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="toxmlelem"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">toxmlelem</span>(<span class=sig-arg>self</span>,
+          <span class=sig-arg>docobj</span>)</span>
+  </h3>
+  Returns a DOM Element object of this node and its children
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+<br />
+
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+  <tr>
+    <td align="left"><font size="-2">Generated by Epydoc 2.0 on Sun Jun 27 12:36:56 2004</font></td>
+    <td align="right"><a href="http://epydoc.sourceforge.net"
+                      ><font size="-2">http://epydoc.sf.net</font></a></td>
+  </tr>
+</table>
+</body>
+</html>

+ 803 - 0
doc/api/private/bison.BisonParser-class.html

@@ -0,0 +1,803 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>bison.BisonParser</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <font size="-1"><b class="breadcrumbs">
+        <a href="bison-module.html">Module&nbsp;bison</a> ::
+        Class&nbsp;BisonParser
+      </b></font></br>
+    </td>
+    <td><table cellpadding="0" cellspacing="0">
+      <tr><td align="right"><font size="-2">[show&nbsp;private&nbsp;|&nbsp;<a href="../public/bison.BisonParser-class.html">hide&nbsp;private</a>]</font></td></tr>
+      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="bison.BisonParser-class.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
+    </table></td>
+</tr></table>
+
+<!-- =========== START OF CLASS DESCRIPTION =========== -->
+<h2 class="class">Class BisonParser</h2>
+
+<pre class="base-tree">
+<a href="__builtin__.object-class.html"><code>object</code></a> --+
+         |
+        <b>BisonParser</b>
+</pre><br />
+
+<hr/>
+
+<p>Base parser class</p>
+You should subclass this, and provide a bunch of methods called 
+'on_TargetName', where 'TargetName' is the name of each target in your 
+grammar (.y) file.
+<hr/>
+
+
+<!-- =========== START OF METHOD SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Method Summary</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonParser-class.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class=summary-sig-arg>self</span>,
+          <span class="summary-sig-kwarg">**kw</span>)</span></code>
+<br />
+Abstract representation of parser</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><a name="__getitem__"></a><span class="summary-sig"><span class="summary-sig-name">__getitem__</span>(<span class=summary-sig-arg>self</span>,
+          <span class=summary-sig-arg>idx</span>)</span></code>
+</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonParser-class.html#error" class="summary-sig-name"><code>error</code></a>(<span class=summary-sig-arg>self</span>,
+          <span class=summary-sig-arg>value</span>)</span></code>
+<br />
+Return the result of this method from a handler to notify a syntax 
+error</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonParser-class.html#loadxml" class="summary-sig-name"><code>loadxml</code></a>(<span class=summary-sig-arg>self</span>,
+          <span class=summary-sig-arg>raw</span>,
+          <span class=summary-sig-arg>namespace</span>)</span></code>
+<br />
+Loads a parse tree from raw xml text</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonParser-class.html#loadxmldoc" class="summary-sig-name"><code>loadxmldoc</code></a>(<span class=summary-sig-arg>self</span>,
+          <span class=summary-sig-arg>xmldoc</span>,
+          <span class=summary-sig-arg>namespace</span>)</span></code>
+<br />
+Returns a reconstituted parse tree, loaded from an 
+xml.dom.minidom.Document instance</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonParser-class.html#loadxmlobj" class="summary-sig-name"><code>loadxmlobj</code></a>(<span class=summary-sig-arg>self</span>,
+          <span class=summary-sig-arg>xmlobj</span>,
+          <span class=summary-sig-arg>namespace</span>)</span></code>
+<br />
+Returns a node object, being a parse tree, reconstituted from an 
+xml.dom.minidom.Element object</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonParser-class.html#read" class="summary-sig-name"><code>read</code></a>(<span class=summary-sig-arg>self</span>,
+          <span class=summary-sig-arg>nbytes</span>)</span></code>
+<br />
+Override this in your subclass, if you desire.</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonParser-class.html#run" class="summary-sig-name"><code>run</code></a>(<span class=summary-sig-arg>self</span>,
+          <span class="summary-sig-kwarg">**kw</span>)</span></code>
+<br />
+Runs the parser, and returns the top-most parse target.</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonParser-class.html#toprettyxml" class="summary-sig-name"><code>toprettyxml</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
+<br />
+Returns a human-readable xml representation of the parse tree</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonParser-class.html#toxml" class="summary-sig-name"><code>toxml</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
+<br />
+Serialises the parse tree and returns it as a raw xml string</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonParser-class.html#toxmldoc" class="summary-sig-name"><code>toxmldoc</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
+<br />
+Returns an xml.dom.minidom.Document object containing the parse 
+tree</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><a name="_error"></a><span class="summary-sig"><span class="summary-sig-name">_error</span>(<span class=summary-sig-arg>self</span>,
+          <span class=summary-sig-arg>linenum</span>,
+          <span class=summary-sig-arg>msg</span>,
+          <span class=summary-sig-arg>tok</span>)</span></code>
+</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><a name="_globals"></a><span class="summary-sig"><span class="summary-sig-name">_globals</span>(<span class=summary-sig-arg>self</span>)</span></code>
+</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="../private/bison.BisonParser-class.html#_handle" class="summary-sig-name"><code>_handle</code></a>(<span class=summary-sig-arg>self</span>,
+          <span class=summary-sig-arg>targetname</span>,
+          <span class=summary-sig-arg>option</span>,
+          <span class=summary-sig-arg>names</span>,
+          <span class=summary-sig-arg>values</span>)</span></code>
+<br />
+Callback which receives a target from parser, as a targetname and list 
+of term names and values.</td></tr>
+<tr bgcolor="#e8f0f8" class="group">
+  <th colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;Inherited from object</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__delattr__" class="summary-sig-name"><code>__delattr__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__delattr__('name') &lt;==&gt; del x.name</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__getattribute__" class="summary-sig-name"><code>__getattribute__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__getattribute__('name') &lt;==&gt; x.name</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__hash__" class="summary-sig-name"><code>__hash__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
+<br />
+x.__hash__() &lt;==&gt; hash(x)</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__reduce__" class="summary-sig-name"><code>__reduce__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+helper for pickle</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__reduce_ex__" class="summary-sig-name"><code>__reduce_ex__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+helper for pickle</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__repr__" class="summary-sig-name"><code>__repr__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
+<br />
+x.__repr__() &lt;==&gt; repr(x)</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__setattr__" class="summary-sig-name"><code>__setattr__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__setattr__('name', value) &lt;==&gt; x.name = value</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__str__" class="summary-sig-name"><code>__str__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
+<br />
+x.__str__() &lt;==&gt; str(x)</td></tr>
+<tr bgcolor="#e8f0f8" class="group">
+  <th colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;Inherited from type</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.type-class.html#__new__" class="summary-sig-name"><code>__new__</code></a>(<span class=summary-sig-arg>T</span>,
+          <span class=summary-sig-arg>S</span>,
+          <span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+T.__new__(S, ...) -&gt; a new object with type S, a subtype of T</td></tr>
+</table><br />
+
+
+<!-- =========== START OF CLASS VARIABLE SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Class Variable Summary</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#bisonCFile"><code>bisonCFile</code></a></b> = <span title="'tmp.tab.c'"><code><span class="variable-quote">'</span>tmp.tab.c<span class="variable-quote">'</span>                                 </code>
+</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#bisonCFile1"><code>bisonCFile1</code></a></b> = <span title="'tmp.bison.c'"><code><span class="variable-quote">'</span>tmp.bison.c<span class="variable-quote">'</span>                              </code>
+</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>list</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#bisonCmd"><code>bisonCmd</code></a></b> = <span title="['bison', '-d', '-v', '-t']"><code>['bison',&nbsp;'-d',&nbsp;'-v',&nbsp;'-t']                   </code>
+</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>NoneType</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#bisonEngineLibName"><code>bisonEngineLibName</code></a></b> = <span title="None">None&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#bisonFile"><code>bisonFile</code></a></b> = <span title="'tmp.y'"><code><span class="variable-quote">'</span>tmp.y<span class="variable-quote">'</span>                                      </code>
+</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#bisonHFile"><code>bisonHFile</code></a></b> = <span title="'tmp.tab.h'"><code><span class="variable-quote">'</span>tmp.tab.h<span class="variable-quote">'</span>                                 </code>
+</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#bisonHFile1"><code>bisonHFile1</code></a></b> = <span title="'tokens.h'"><code><span class="variable-quote">'</span>tokens.h<span class="variable-quote">'</span>                                 </code>
+</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>classobj</code></font></td>
+  <td><a name="defaultNodeClass"></a><b><code>defaultNodeClass</code></b> = <a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>NoneType</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#file"><code>file</code></a></b> = <span title="None">None&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#flexCFile"><code>flexCFile</code></a></b> = <span title="'lex.yy.c'"><code><span class="variable-quote">'</span>lex.yy.c<span class="variable-quote">'</span>                                   </code>
+</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#flexCFile1"><code>flexCFile1</code></a></b> = <span title="'tmp.lex.c'"><code><span class="variable-quote">'</span>tmp.lex.c<span class="variable-quote">'</span>                                 </code>
+</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>list</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#flexCmd"><code>flexCmd</code></a></b> = <span title="['flex']"><code>['flex']                                       </code>
+</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#flexFile"><code>flexFile</code></a></b> = <span title="'tmp.l'"><code><span class="variable-quote">'</span>tmp.l<span class="variable-quote">'</span>                                       </code>
+</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>int</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#keepfiles"><code>keepfiles</code></a></b> = <span title="0">0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>NoneType</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#last"><code>last</code></a></b> = <span title="None">None&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>NoneType</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#lasterror"><code>lasterror</code></a></b> = <span title="None">None&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>int</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#verbose"><code>verbose</code></a></b> = <span title="0">0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>
+</table><br />
+
+
+<!-- =========== START OF METHOD DETAILS =========== -->
+<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="details">
+  <th colspan="2">Method Details</th></tr>
+</table>
+
+<a name="__init__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__init__</span>(<span class=sig-arg>self</span>,
+          <span class="sig-kwarg">**kw</span>)</span>
+    <br /><i>(Constructor)</i>
+  </h3>
+  <p>Abstract representation of parser</p>
+  Keyword arguments:
+  <ul>
+    <li>
+      read - a callable accepting an int arg (nbytes) and returning a 
+      string, default is this class' read() method
+    </li>
+    <li>
+      file - a file object, or string of a pathname to open as a file, 
+      defaults to sys.stdin. Note that you can leave this blank, and pass 
+      a file keyword argument to the .run() method.
+    </li>
+    <li>
+      verbose - set to 1 to enable verbose output messages, default 
+      0
+    </li>
+    <li>
+      keepfiles - if non-zero, keeps any files generated in the course 
+      of building the parser engine; by default, all these files get 
+      deleted upon a successful engine build
+    </li>
+    <li>
+      defaultNodeClass - the class to use for creating parse nodes, 
+      default is self.defaultNodeClass (in this base class, 
+      BisonNode)
+    </li>
+  </ul>
+  <dl><dt></dt><dd>
+    <dl><dt><b>Overrides:</b></dt>
+      <dd><a href="__builtin__.object-class.html#__init__"><code>__builtin__.object.__init__</code></a></dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+
+<a name="error"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">error</span>(<span class=sig-arg>self</span>,
+          <span class=sig-arg>value</span>)</span>
+  </h3>
+  Return the result of this method from a handler to notify a syntax 
+  error
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="loadxml"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">loadxml</span>(<span class=sig-arg>self</span>,
+          <span class=sig-arg>raw</span>,
+          <span class=sig-arg>namespace</span>=<span class=sig-default>None</span>)</span>
+  </h3>
+  <p>Loads a parse tree from raw xml text</p>
+  <p>Stores it in the '.last' attribute, which is where the root node of 
+  parsed text gets stored</p>
+  Arguments:
+  <ul>
+    <li>
+      raw - string containing the raw xml
+    </li>
+    <li>
+      namespace - a dict or module object, where the node classes 
+      required for reconstituting the parse tree, can be found
+    </li>
+  </ul>
+  Returns:
+  <ul>
+    <li>
+      root node object of reconstituted parse tree
+    </li>
+  </ul>
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="loadxmldoc"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">loadxmldoc</span>(<span class=sig-arg>self</span>,
+          <span class=sig-arg>xmldoc</span>,
+          <span class=sig-arg>namespace</span>=<span class=sig-default>None</span>)</span>
+  </h3>
+  <p>Returns a reconstituted parse tree, loaded from an 
+  xml.dom.minidom.Document instance</p>
+  Arguments:
+  <ul>
+    <li>
+      xmldoc - an xml.dom.minidom.Document instance
+    </li>
+    <li>
+      namespace - a dict from which to find the classes needed to 
+      translate the document into a tree of parse nodes
+    </li>
+  </ul>
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="loadxmlobj"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">loadxmlobj</span>(<span class=sig-arg>self</span>,
+          <span class=sig-arg>xmlobj</span>,
+          <span class=sig-arg>namespace</span>=<span class=sig-default>None</span>)</span>
+  </h3>
+  <p>Returns a node object, being a parse tree, reconstituted from an 
+  xml.dom.minidom.Element object</p>
+  Arguments:
+  <ul>
+    <li>
+      xmlobj - an xml.dom.minidom.Element instance
+    </li>
+    <li>
+      namespace - a namespace from which the node classes needed for 
+      reconstituting the tree, can be found
+    </li>
+  </ul>
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="read"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">read</span>(<span class=sig-arg>self</span>,
+          <span class=sig-arg>nbytes</span>)</span>
+  </h3>
+  <p>Override this in your subclass, if you desire.</p>
+  Arguments:
+  <ul>
+    <li>
+      nbytes - the maximum length of the string which you may return. 
+      DO NOT return a string longer than this, or else Bad Things will 
+      happen.
+    </li>
+  </ul>
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="run"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">run</span>(<span class=sig-arg>self</span>,
+          <span class="sig-kwarg">**kw</span>)</span>
+  </h3>
+  <p>Runs the parser, and returns the top-most parse target.</p>
+  Keywords:
+  <ul>
+    <li>
+      file - either a string, comprising a file to open and read input 
+      from, or a Python file object
+    </li>
+    <li>
+      debug - enables garrulous parser debugging output, default 0
+    </li>
+  </ul>
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="toprettyxml"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">toprettyxml</span>(<span class=sig-arg>self</span>)</span>
+  </h3>
+  Returns a human-readable xml representation of the parse tree
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="toxml"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">toxml</span>(<span class=sig-arg>self</span>)</span>
+  </h3>
+  Serialises the parse tree and returns it as a raw xml string
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="toxmldoc"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">toxmldoc</span>(<span class=sig-arg>self</span>)</span>
+  </h3>
+  Returns an xml.dom.minidom.Document object containing the parse 
+  tree
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="_handle"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">_handle</span>(<span class=sig-arg>self</span>,
+          <span class=sig-arg>targetname</span>,
+          <span class=sig-arg>option</span>,
+          <span class=sig-arg>names</span>,
+          <span class=sig-arg>values</span>)</span>
+  </h3>
+  <p>Callback which receives a target from parser, as a targetname and 
+  list of term names and values.</p>
+  Tries to dispatch to on_TargetName() methods if they exist, 
+  otherwise wraps the target in a BisonNode object
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+<br />
+
+
+<!-- =========== START OF CLASS VARIABLE DETAILS =========== -->
+<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="details">
+  <th colspan="2">Class Variable Details</th></tr>
+</table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="bisonCFile"></a>
+<h3>bisonCFile</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>str</code>
+
+      </dd>
+<span title="'tmp.tab.c'">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+<span class="variable-quote">'</span>tmp.tab.c<span class="variable-quote">'</span>                                                            </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="bisonCFile1"></a>
+<h3>bisonCFile1</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>str</code>
+
+      </dd>
+<span title="'tmp.bison.c'">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+<span class="variable-quote">'</span>tmp.bison.c<span class="variable-quote">'</span>                                                          </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="bisonCmd"></a>
+<h3>bisonCmd</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>list</code>
+
+      </dd>
+<span title="['bison', '-d', '-v', '-t']">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+['bison', '-d', '-v', '-t']                                            </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="bisonEngineLibName"></a>
+<h3>bisonEngineLibName</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>NoneType</code>
+
+      </dd>
+<span title="None">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+None&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="bisonFile"></a>
+<h3>bisonFile</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>str</code>
+
+      </dd>
+<span title="'tmp.y'">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+<span class="variable-quote">'</span>tmp.y<span class="variable-quote">'</span>                                                                </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="bisonHFile"></a>
+<h3>bisonHFile</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>str</code>
+
+      </dd>
+<span title="'tmp.tab.h'">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+<span class="variable-quote">'</span>tmp.tab.h<span class="variable-quote">'</span>                                                            </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="bisonHFile1"></a>
+<h3>bisonHFile1</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>str</code>
+
+      </dd>
+<span title="'tokens.h'">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+<span class="variable-quote">'</span>tokens.h<span class="variable-quote">'</span>                                                             </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="file"></a>
+<h3>file</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>NoneType</code>
+
+      </dd>
+<span title="None">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+None&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="flexCFile"></a>
+<h3>flexCFile</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>str</code>
+
+      </dd>
+<span title="'lex.yy.c'">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+<span class="variable-quote">'</span>lex.yy.c<span class="variable-quote">'</span>                                                             </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="flexCFile1"></a>
+<h3>flexCFile1</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>str</code>
+
+      </dd>
+<span title="'tmp.lex.c'">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+<span class="variable-quote">'</span>tmp.lex.c<span class="variable-quote">'</span>                                                            </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="flexCmd"></a>
+<h3>flexCmd</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>list</code>
+
+      </dd>
+<span title="['flex']">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+['flex']                                                               </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="flexFile"></a>
+<h3>flexFile</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>str</code>
+
+      </dd>
+<span title="'tmp.l'">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+<span class="variable-quote">'</span>tmp.l<span class="variable-quote">'</span>                                                                </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="keepfiles"></a>
+<h3>keepfiles</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>int</code>
+
+      </dd>
+<span title="0">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="last"></a>
+<h3>last</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>NoneType</code>
+
+      </dd>
+<span title="None">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+None&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="lasterror"></a>
+<h3>lasterror</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>NoneType</code>
+
+      </dd>
+<span title="None">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+None&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="verbose"></a>
+<h3>verbose</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>int</code>
+
+      </dd>
+<span title="0">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<br />
+
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+  <tr>
+    <td align="left"><font size="-2">Generated by Epydoc 2.0 on Sun Jun 27 12:36:56 2004</font></td>
+    <td align="right"><a href="http://epydoc.sourceforge.net"
+                      ><font size="-2">http://epydoc.sf.net</font></a></td>
+  </tr>
+</table>
+</body>
+</html>

+ 291 - 0
doc/api/private/bison.ParserEngine-class.html

@@ -0,0 +1,291 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>bison.ParserEngine</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <font size="-1"><b class="breadcrumbs">
+        <a href="bison-module.html">Module&nbsp;bison</a> ::
+        Class&nbsp;ParserEngine
+      </b></font></br>
+    </td>
+    <td><table cellpadding="0" cellspacing="0">
+      <tr><td align="right"><font size="-2">[show&nbsp;private&nbsp;|&nbsp;<a href="../public/bison.ParserEngine-class.html">hide&nbsp;private</a>]</font></td></tr>
+      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="bison.ParserEngine-class.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
+    </table></td>
+</tr></table>
+
+<!-- =========== START OF CLASS DESCRIPTION =========== -->
+<h2 class="class">Class ParserEngine</h2>
+
+<pre class="base-tree">
+<a href="__builtin__.object-class.html"><code>object</code></a> --+
+         |
+        <b>ParserEngine</b>
+</pre><br />
+
+<hr/>
+
+<p>Wraps the interface to the binary bison/lex-generated parser engine 
+dynamic library.</p>
+<p>You shouldn't need to deal with this at all.</p>
+Takes care of:
+<ul>
+  <li>
+    building the library (if the parser rules have changed)
+  </li>
+  <li>
+    loading the library and extracting the parser entry point
+  </li>
+  <li>
+    calling the entry point
+  </li>
+  <li>
+    closing the library
+  </li>
+</ul>
+Makes direct calls to the platform-dependent routines in 
+bisondynlib-[linux|windows].c
+<hr/>
+
+
+<!-- =========== START OF METHOD SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Method Summary</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.ParserEngine-class.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__init__(...) initializes x; see x.__class__.__doc__ for 
+signature</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.ParserEngine-class.html#__del__" class="summary-sig-name"><code>__del__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+Clean up and bail</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.ParserEngine-class.html#buildLib" class="summary-sig-name"><code>buildLib</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+Creates the parser engine lib</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.ParserEngine-class.html#closeLib" class="summary-sig-name"><code>closeLib</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+Does the necessary cleanups and closes the parser library</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.ParserEngine-class.html#openCurrentLib" class="summary-sig-name"><code>openCurrentLib</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+Tests if library exists and is current.</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.ParserEngine-class.html#openLib" class="summary-sig-name"><code>openLib</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+Loads the parser engine's dynamic library, and extracts the following 
+symbols:</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.ParserEngine-class.html#runEngine" class="summary-sig-name"><code>runEngine</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+Runs the binary parser engine, as loaded from the lib</td></tr>
+<tr bgcolor="#e8f0f8" class="group">
+  <th colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;Inherited from object</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__delattr__" class="summary-sig-name"><code>__delattr__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__delattr__('name') &lt;==&gt; del x.name</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__getattribute__" class="summary-sig-name"><code>__getattribute__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__getattribute__('name') &lt;==&gt; x.name</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__hash__" class="summary-sig-name"><code>__hash__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
+<br />
+x.__hash__() &lt;==&gt; hash(x)</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__reduce__" class="summary-sig-name"><code>__reduce__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+helper for pickle</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__reduce_ex__" class="summary-sig-name"><code>__reduce_ex__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+helper for pickle</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__repr__" class="summary-sig-name"><code>__repr__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
+<br />
+x.__repr__() &lt;==&gt; repr(x)</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__setattr__" class="summary-sig-name"><code>__setattr__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__setattr__('name', value) &lt;==&gt; x.name = value</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__str__" class="summary-sig-name"><code>__str__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
+<br />
+x.__str__() &lt;==&gt; str(x)</td></tr>
+<tr bgcolor="#e8f0f8" class="group">
+  <th colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;Inherited from type</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.type-class.html#__new__" class="summary-sig-name"><code>__new__</code></a>(<span class=summary-sig-arg>T</span>,
+          <span class=summary-sig-arg>S</span>,
+          <span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+T.__new__(S, ...) -&gt; a new object with type S, a subtype of T</td></tr>
+</table><br />
+
+
+<!-- =========== START OF METHOD DETAILS =========== -->
+<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="details">
+  <th colspan="2">Method Details</th></tr>
+</table>
+
+<a name="__init__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-vararg">...</span>)</span>
+    <br /><i>(Constructor)</i>
+  </h3>
+  x.__init__(...) initializes x; see x.__class__.__doc__ for 
+  signature
+  <dl><dt></dt><dd>
+    <dl><dt><b>Overrides:</b></dt>
+      <dd><a href="__builtin__.object-class.html#__init__"><code>__builtin__.object.__init__</code></a></dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__del__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__del__</span>(<span class="sig-vararg">...</span>)</span>
+    <br /><i>(Destructor)</i>
+  </h3>
+  Clean up and bail
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="buildLib"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">buildLib</span>(<span class="sig-vararg">...</span>)</span>
+  </h3>
+  <p>Creates the parser engine lib</p>
+  This consists of:
+  <ol start="1">
+    <li>
+      Ripping the tokens list, precedences, start target, handler 
+      docstrings and lex script from this Parser instance's attribs and 
+      methods
+    </li>
+    <li>
+      Creating bison and lex files
+    </li>
+    <li>
+      Compiling bison/lex files to C
+    </li>
+    <li>
+      Compiling the C files, and link into a dynamic lib
+    </li>
+  </ol>
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="closeLib"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">closeLib</span>(<span class="sig-vararg">...</span>)</span>
+  </h3>
+  Does the necessary cleanups and closes the parser library
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="openCurrentLib"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">openCurrentLib</span>(<span class="sig-vararg">...</span>)</span>
+  </h3>
+  <p>Tests if library exists and is current. If not, builds a fresh 
+  one</p>
+  Opens the library
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="openLib"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">openLib</span>(<span class="sig-vararg">...</span>)</span>
+  </h3>
+  Loads the parser engine's dynamic library, and extracts the 
+  following symbols:
+  <ul>
+    <li>
+      void *do_parse() (runs parser)
+    </li>
+    <li>
+      char *parserHash (contains hash of python parser rules)
+    </li>
+  </ul>
+  <p>Returns lib handle, plus pointer to do_parse() function, as long 
+  ints (which later need to be cast to pointers)</p>
+  Important note -this is totally linux-specific. If you want windows 
+  support, you'll have to modify these funcs to use glib instead (or 
+  create windows equivalents), in which case I'd greatly appreciate you 
+  sending me a patch.
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="runEngine"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">runEngine</span>(<span class="sig-vararg">...</span>)</span>
+  </h3>
+  Runs the binary parser engine, as loaded from the lib
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+<br />
+
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+  <tr>
+    <td align="left"><font size="-2">Generated by Epydoc 2.0 on Fri Apr 23 19:00:01 2004</font></td>
+    <td align="right"><a href="http://epydoc.sourceforge.net"
+                      ><font size="-2">http://epydoc.sf.net</font></a></td>
+  </tr>
+</table>
+</body>
+</html>

+ 97 - 0
doc/api/private/bison.ParserSyntaxError-class.html

@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>bison.ParserSyntaxError</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <font size="-1"><b class="breadcrumbs">
+        <a href="bison-module.html">Module&nbsp;bison</a> ::
+        Class&nbsp;ParserSyntaxError
+      </b></font></br>
+    </td>
+    <td><table cellpadding="0" cellspacing="0">
+      <tr><td align="right"><font size="-2">[show&nbsp;private&nbsp;|&nbsp;<a href="../public/bison.ParserSyntaxError-class.html">hide&nbsp;private</a>]</font></td></tr>
+      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="bison.ParserSyntaxError-class.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
+    </table></td>
+</tr></table>
+
+<!-- =========== START OF CLASS DESCRIPTION =========== -->
+<h2 class="class">Class ParserSyntaxError</h2>
+
+<pre class="base-tree">
+<a href="exceptions.Exception-class.html"><code>Exception</code></a> --+
+            |
+           <b>ParserSyntaxError</b>
+</pre><br />
+
+<hr/>
+
+
+<!-- =========== START OF METHOD SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Method Summary</th></tr>
+<tr bgcolor="#e8f0f8" class="group">
+  <th colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;Inherited from Exception</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="exceptions.Exception-class.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="exceptions.Exception-class.html#__getitem__" class="summary-sig-name"><code>__getitem__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="exceptions.Exception-class.html#__str__" class="summary-sig-name"><code>__str__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+</td></tr>
+</table><br />
+
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+  <tr>
+    <td align="left"><font size="-2">Generated by Epydoc 2.0 on Sun Jun 27 12:36:56 2004</font></td>
+    <td align="right"><a href="http://epydoc.sourceforge.net"
+                      ><font size="-2">http://epydoc.sf.net</font></a></td>
+  </tr>
+</table>
+</body>
+</html>

+ 97 - 0
doc/api/private/epydoc.css

@@ -0,0 +1,97 @@
+
+/* Body color */ 
+body               { background: #ffffff; color: #000000; } 
+ 
+/* Tables */ 
+table.summary, table.details, table.index
+                   { background: #e8f0f8; color: #000000; } 
+tr.summary, tr.details, tr.index
+                   { background: #70b0f0; color: #000000;  
+                     text-align: left; font-size: 120%; } 
+tr.group           { background: #c0e0f8; color: #000000;
+                     text-align: left; font-size: 120%;
+                     font-style: italic; } 
+
+/* Documentation page titles */
+h2.module          { margin-top: 0.2em; }
+h2.class           { margin-top: 0.2em; }
+ 
+/* Headings */
+h1.heading         { font-size: +140%; font-style: italic;
+                     font-weight: bold; }
+h2.heading         { font-size: +125%; font-style: italic;
+                     font-weight: bold; }
+h3.heading         { font-size: +110%; font-style: italic;
+                     font-weight: normal; }
+                    
+/* Base tree */
+pre.base-tree      { font-size: 80%; margin: 0; }
+
+/* Details Sections */
+table.func-details { background: #e8f0f8; color: #000000;
+                     border: 2px groove #c0d0d0;
+                     padding: 0 1em 0 1em; margin: 0.4em 0 0 0; }
+h3.func-detail     { background: transparent; color: #000000;
+                     margin: 0 0 1em 0; }
+
+table.var-details  { background: #e8f0f8; color: #000000;
+                     border: 2px groove #c0d0d0;
+                     padding: 0 1em 0 1em; margin: 0.4em 0 0 0; }
+h3.var-details     { background: transparent; color: #000000;
+                     margin: 0 0 1em 0; }
+
+/* Function signatures */
+.sig               { background: transparent; color: #000000;
+                     font-weight: bold; }  
+.sig-name          { background: transparent; color: #006080; }  
+.sig-arg, .sig-kwarg, .sig-vararg
+                   { background: transparent; color: #008060; }  
+.sig-default       { background: transparent; color: #602000; }  
+.summary-sig       { background: transparent; color: #000000; }  
+.summary-sig-name  { background: transparent; color: #204080; }
+.summary-sig-arg, .summary-sig-kwarg, .summary-sig-vararg
+                   { background: transparent; color: #008060; }  
+
+/* Doctest blocks */
+.py-src            { background: transparent; color: #000000; }
+.py-prompt         { background: transparent; color: #005050;
+                     font-weight: bold;}
+.py-string         { background: transparent; color: #006030; }
+.py-comment        { background: transparent; color: #003060; }
+.py-keyword        { background: transparent; color: #600000; }
+.py-output         { background: transparent; color: #404040; }
+pre.doctestblock   { background: #f4faff; color: #000000; 
+                     padding: .5em; margin: 1em;
+                     border: 1px solid #708890; }
+table pre.doctestblock
+                   { background: #dce4ec; color: #000000; 
+                     padding: .5em; margin: 1em;
+                     border: 1px solid #708890; }
+
+/* Variable values */
+pre.variable       { background: #dce4ec; color: #000000;
+                     padding: .5em; margin: 0;
+                     border: 1px solid #708890; }
+.variable-linewrap { background: transparent; color: #604000; }
+.variable-ellipsis { background: transparent; color: #604000; }
+.variable-quote    { background: transparent; color: #604000; }
+.re                { background: transparent; color: #000000; }
+.re-char           { background: transparent; color: #006030; }
+.re-op             { background: transparent; color: #600000; }
+.re-group          { background: transparent; color: #003060; }
+.re-ref            { background: transparent; color: #404040; }
+
+/* Navigation bar */ 
+table.navbar       { background: #a0c0ff; color: #0000ff;
+                     border: 2px groove #c0d0d0; }
+th.navbar          { background: #a0c0ff; color: #0000ff; } 
+th.navselect       { background: #70b0ff; color: #000000; } 
+.nomargin          { margin: 0; }
+
+/* Links */ 
+a:link             { background: transparent; color: #0000ff; }  
+a:visited          { background: transparent; color: #204080; }  
+a.navbar:link      { background: transparent; color: #0000ff; 
+                     text-decoration: none; }  
+a.navbar:visited   { background: transparent; color: #204080; 
+                     text-decoration: none; }  

+ 96 - 0
doc/api/private/exceptions.Exception-class.html

@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>exceptions.Exception</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <font size="-1"><b class="breadcrumbs">
+        Module&nbsp;exceptions ::
+        Class&nbsp;Exception
+      </b></font></br>
+    </td>
+    <td><table cellpadding="0" cellspacing="0">
+      <tr><td align="right"><font size="-2">[show&nbsp;private&nbsp;|&nbsp;<a href="../public/exceptions.Exception-class.html">hide&nbsp;private</a>]</font></td></tr>
+      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="exceptions.Exception-class.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
+    </table></td>
+</tr></table>
+
+<!-- =========== START OF CLASS DESCRIPTION =========== -->
+<h2 class="class">Class Exception</h2>
+
+<dl><dt><b>Known Subclasses:</b></dt>
+<dd>
+    <a href="bison.ParserSyntaxError-class.html"><code>ParserSyntaxError</code></a></dd></dl>
+
+<hr/>
+
+Common base class for all exceptions.
+<hr/>
+
+
+<!-- =========== START OF METHOD SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Method Summary</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><a name="__init__"></a><span class="summary-sig"><span class="summary-sig-name">__init__</span>(<span class="summary-sig-vararg">...</span>)</span></code>
+</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><a name="__getitem__"></a><span class="summary-sig"><span class="summary-sig-name">__getitem__</span>(<span class="summary-sig-vararg">...</span>)</span></code>
+</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><a name="__str__"></a><span class="summary-sig"><span class="summary-sig-name">__str__</span>(<span class="summary-sig-vararg">...</span>)</span></code>
+</td></tr>
+</table><br />
+
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+  <tr>
+    <td align="left"><font size="-2">Generated by Epydoc 2.0 on Sun Jun 27 12:36:56 2004</font></td>
+    <td align="right"><a href="http://epydoc.sourceforge.net"
+                      ><font size="-2">http://epydoc.sf.net</font></a></td>
+  </tr>
+</table>
+</body>
+</html>

+ 13 - 0
doc/api/private/frames.html

@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
+<html>
+<head>
+  <title> PyBison API Reference </title>
+</head>
+<frameset cols="20%,80%">
+  <frameset rows="30%,70%">
+    <frame src="toc.html" name="moduleListFrame">
+    <frame src="toc-everything.html" name="moduleFrame">
+  </frameset>
+  <frame src="bison-module.html" name="mainFrame">
+</frameset>
+</html>

+ 236 - 0
doc/api/private/help.html

@@ -0,0 +1,236 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>Help</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th bgcolor="#70b0f0" class="navselect">&nbsp;&nbsp;&nbsp;Help&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+    </td>
+    <td><table cellpadding="0" cellspacing="0">
+      <tr><td align="right"><font size="-2">[show&nbsp;private&nbsp;|&nbsp;<a href="../public/help.html">hide&nbsp;private</a>]</font></td></tr>
+      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="help.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
+    </table></td>
+</tr></table>
+
+<center><h2> API Documentation </h2></center>
+
+<p> This document contains the API (Application Programming Interface)
+documentation for PyBison API Reference.  Documentation for the Python
+objects defined by the project is divided into separate pages for each
+package, module, and class.  The API documentation also includes two
+pages containing information about the project as a whole: a trees
+page, and an index page.  </p>
+
+<h2> Object Documentation </h2>
+
+  <p>Each <b>Package Documentation</b> page contains: 
+  <ul>
+    <li> A description of the package. </li>
+    <li> A list of the modules and sub-packages contained by the
+    package.  </li>
+    <li> A summary of the classes defined by the package. </li>
+    <li> A summary of the functions defined by the package. </li>
+    <li> A summary of the variables defined by the package. </li>
+    <li> A detailed description of each function defined by the
+    package. </li>
+    <li> A detailed description of each variable defined by the
+    package. </li>
+  </ul></p>
+  
+  <p>Each <b>Module Documentation</b> page contains:
+  <ul>
+    <li> A description of the module. </li>
+    <li> A summary of the classes defined by the module. </li>
+    <li> A summary of the functions defined by the module. </li>
+    <li> A summary of the variables defined by the module. </li>
+    <li> A detailed description of each function defined by the
+    module. </li>
+    <li> A detailed description of each variable defined by the
+    module. </li>
+  </ul></p>
+  
+  <p>Each <b>Class Documentation</b> page contains:
+  <ul>
+    <li> A class inheritance diagram. </li>
+    <li> A list of known subclasses. </li>
+    <li> A description of the class. </li>
+    <li> A summary of the methods defined by the class. </li>
+    <li> A summary of the instance variables defined by the class. </li>
+    <li> A summary of the class (static) variables defined by the
+    class. </li> 
+    <li> A detailed description of each method defined by the
+    class. </li>
+    <li> A detailed description of each instance variable defined by the
+    class. </li> 
+    <li> A detailed description of each class (static) variable defined
+    by the class. </li> 
+  </ul></p>
+
+<h2> Project Documentation </h2>
+
+  <p> The <b>Trees</b> page contains the module and class hierarchies:
+  <ul>
+    <li> The <i>module hierarchy</i> lists every package and module, with
+    modules grouped into packages.  At the top level, and within each
+    package, modules and sub-packages are listed alphabetically. </li>
+    <li> The <i>class hierarchy</i> lists every class, grouped by base
+    class.  If a class has more than one base class, then it will be
+    listed under each base class.  At the top level, and under each base
+    class, classes are listed alphabetically. </li>
+  </ul></p>
+  
+  <p> The <b>Index</b> page contains indices of terms and
+  identifiers: 
+  <ul>
+    <li> The <i>term index</i> lists every term indexed by any object's
+    documentation.  For each term, the index provides links to each
+    place where the term is indexed. </li>
+    <li> The <i>identifier index</i> lists the (short) name of every package,
+    module, class, method, function, variable, and parameter.  For each
+    identifier, the index provides a short description, and a link to
+    its documentation. </li>
+  </ul></p>
+
+<h2> The Table of Contents </h2>
+
+<p> The table of contents occupies the two frames on the left side of
+the window.  The upper-left frame displays the <i>project
+contents</i>, and the lower-left frame displays the <i>module
+contents</i>: </p>
+
+<center>
+<table class="summary" border="1" cellspacing="0" cellpadding="3">
+  <tr heigh="30%">
+    <td align="center">
+       <font size="-1">Project<br>Contents<hr>...</font></td>
+    <td align="center" rowspan="2" width="70%">
+      API<br>Documentation<br>Frame<br><br><br>
+    </td>
+  </tr>
+  <tr>
+    <td align="center">
+      <font size="-1">Module<br>Contents<hr>&nbsp;<br>...<br>&nbsp;</font>
+    </td>
+  </tr>
+</table><br>
+</center>
+
+<p> The <b>project contents frame</b> contains a list of all packages
+and modules that are defined by the project.  Clicking on an entry
+will display its contents in the module contents frame.  Clicking on a
+special entry, labeled "Everything," will display the contents of
+the entire project. </p>
+
+<p> The <b>module contents frame</b> contains a list of every
+submodule, class, type, exception, function, and variable defined by a
+module or package.  Clicking on an entry will display its
+documentation in the API documentation frame.  Clicking on the name of
+the module, at the top of the frame, will display the documentation
+for the module itself. </p>
+
+<p> The "<b>frames</b>" and "<b>no frames</b>" buttons below the top
+navigation bar can be used to control whether the table of contents is
+displayed or not. </p>
+
+<h2> The Navigation Bar </h2>
+
+<p> A navigation bar is located at the top and bottom of every page.
+It indicates what type of page you are currently viewing, and allows
+you to go to related pages.  The following table describes the labels
+on the navigation bar.  Note that not some labels (such as
+[Parent]) are not displayed on all pages. </p>
+
+<table class="summary" border="1" cellspacing="0" cellpadding="3" width="100%">
+<tr class="summary">
+  <th>Label</th>
+  <th>Highlighted when...</th>
+  <th>Links to...</th>
+</tr>
+  <tr><td valign="top"><b>[Parent]</b></td>
+      <td valign="top"><i>(never highlighted)</i></td>
+      <td valign="top"> the parent of the current package </td></tr>
+  <tr><td valign="top"><b>[Package]</b></td>
+      <td valign="top">viewing a package</td>
+      <td valign="top">the package containing the current object
+      </td></tr>
+  <tr><td valign="top"><b>[Module]</b></td>
+      <td valign="top">viewing a module</td>
+      <td valign="top">the module containing the current object
+      </td></tr> 
+  <tr><td valign="top"><b>[Class]</b></td>
+      <td valign="top">viewing a class </td>
+      <td valign="top">the class containing the current object</td></tr>
+  <tr><td valign="top"><b>[Trees]</b></td>
+      <td valign="top">viewing the trees page</td>
+      <td valign="top"> the trees page </td></tr>
+  <tr><td valign="top"><b>[Index]</b></td>
+      <td valign="top">viewing the index page</td>
+      <td valign="top"> the index page </td></tr>
+  <tr><td valign="top"><b>[Help]</b></td>
+      <td valign="top">viewing the help page</td>
+      <td valign="top"> the help page </td></tr>
+</table>
+
+<p> The "<b>show private</b>" and "<b>hide private</b>" buttons below
+the top navigation bar can be used to control whether documentation
+for private objects is displayed.  Private objects are usually defined
+as objects whose (short) names begin with a single underscore, but do
+not end with an underscore.  For example, "<code>_x</code>",
+"<code>__pprint</code>", and "<code>epydoc.epytext._tokenize</code>"
+are private objects; but "<code>re.sub</code>",
+"<code>__init__</code>", and "<code>type_</code>" are not.  However,
+if a module defines the "<code>__all__</code>" variable, then its
+contents are used to decide which objects are private. </p>
+
+<p> A timestamp below the bottom navigation bar indicates when each
+page was last updated. </p>
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th bgcolor="#70b0f0" class="navselect">&nbsp;&nbsp;&nbsp;Help&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+  <tr>
+    <td align="left"><font size="-2">Generated by Epydoc 2.0 on Sun Jun 27 12:36:56 2004</font></td>
+    <td align="right"><a href="http://epydoc.sourceforge.net"
+                      ><font size="-2">http://epydoc.sf.net</font></a></td>
+  </tr>
+</table>
+</body>
+</html>

+ 13 - 0
doc/api/private/index.html

@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
+<html>
+<head>
+  <title> PyBison API Reference </title>
+</head>
+<frameset cols="20%,80%">
+  <frameset rows="30%,70%">
+    <frame src="toc.html" name="moduleListFrame">
+    <frame src="toc-everything.html" name="moduleFrame">
+  </frameset>
+  <frame src="bison-module.html" name="mainFrame">
+</frameset>
+</html>

+ 245 - 0
doc/api/private/indices.html

@@ -0,0 +1,245 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>Index</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th bgcolor="#70b0f0" class="navselect">&nbsp;&nbsp;&nbsp;Index&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+    </td>
+    <td><table cellpadding="0" cellspacing="0">
+      <tr><td align="right"><font size="-2">[show&nbsp;private&nbsp;|&nbsp;<a href="../public/indices.html">hide&nbsp;private</a>]</font></td></tr>
+      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="indices.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
+    </table></td>
+</tr></table>
+<br />
+
+<!-- =========== START OF IDENTIFIER INDEX =========== -->
+<table class="index" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="index">
+  <th colspan="2">Identifier Index</th></tr>
+  <tr><td width="15%"><a href="__builtin__.object-class.html"><code>object</code></a></td>
+    <td>Class in module <code>__builtin__</code></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__bases__"><code>__bases__</code></a></td>
+    <td>Variable in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__basicsize__"><code>__basicsize__</code></a></td>
+    <td>Variable in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__call__"><code>__call__</code></a></td>
+    <td>Method in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html"><code>type</code></a></td>
+    <td>Class in module <code>__builtin__</code></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__cmp__"><code>__cmp__</code></a></td>
+    <td>Method in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.object-class.html#__delattr__"><code>__delattr__</code></a></td>
+    <td>Method in class <a href="__builtin__.object-class.html"><code>__builtin__.object</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__delattr__"><code>__delattr__</code></a></td>
+    <td>Method in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__dictoffset__"><code>__dictoffset__</code></a></td>
+    <td>Variable in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__flags__"><code>__flags__</code></a></td>
+    <td>Variable in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.object-class.html#__getattribute__"><code>__getattribute__</code></a></td>
+    <td>Method in class <a href="__builtin__.object-class.html"><code>__builtin__.object</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__getattribute__"><code>__getattribute__</code></a></td>
+    <td>Method in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html#__getitem__"><code>__getitem__</code></a></td>
+    <td>Method in class <a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#__getitem__"><code>__getitem__</code></a></td>
+    <td>Method in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="exceptions.Exception-class.html#__getitem__"><code>__getitem__</code></a></td>
+    <td>Method in class <a href="exceptions.Exception-class.html"><code>exceptions.Exception</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html#__getslice__"><code>__getslice__</code></a></td>
+    <td>Method in class <a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.object-class.html#__hash__"><code>__hash__</code></a></td>
+    <td>Method in class <a href="__builtin__.object-class.html"><code>__builtin__.object</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__hash__"><code>__hash__</code></a></td>
+    <td>Method in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.object-class.html#__init__"><code>__init__</code></a></td>
+    <td>Method in class <a href="__builtin__.object-class.html"><code>__builtin__.object</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonError-class.html#__init__"><code>__init__</code></a></td>
+    <td>Method in class <a href="bison.BisonError-class.html"><code>bison.BisonError</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html#__init__"><code>__init__</code></a></td>
+    <td>Method in class <a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#__init__"><code>__init__</code></a></td>
+    <td>Method in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="exceptions.Exception-class.html#__init__"><code>__init__</code></a></td>
+    <td>Method in class <a href="exceptions.Exception-class.html"><code>exceptions.Exception</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__itemsize__"><code>__itemsize__</code></a></td>
+    <td>Variable in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html#__iter__"><code>__iter__</code></a></td>
+    <td>Method in class <a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html#__len__"><code>__len__</code></a></td>
+    <td>Method in class <a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__mro__"><code>__mro__</code></a></td>
+    <td>Variable in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__name__"><code>__name__</code></a></td>
+    <td>Variable in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__new__"><code>__new__</code></a></td>
+    <td>Method in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__new__"><code>__new__</code></a></td>
+    <td>Method in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.object-class.html#__reduce__"><code>__reduce__</code></a></td>
+    <td>Method in class <a href="__builtin__.object-class.html"><code>__builtin__.object</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.object-class.html#__reduce_ex__"><code>__reduce_ex__</code></a></td>
+    <td>Method in class <a href="__builtin__.object-class.html"><code>__builtin__.object</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.object-class.html#__repr__"><code>__repr__</code></a></td>
+    <td>Method in class <a href="__builtin__.object-class.html"><code>__builtin__.object</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__repr__"><code>__repr__</code></a></td>
+    <td>Method in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html#__repr__"><code>__repr__</code></a></td>
+    <td>Method in class <a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.object-class.html#__setattr__"><code>__setattr__</code></a></td>
+    <td>Method in class <a href="__builtin__.object-class.html"><code>__builtin__.object</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__setattr__"><code>__setattr__</code></a></td>
+    <td>Method in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.object-class.html#__str__"><code>__str__</code></a></td>
+    <td>Method in class <a href="__builtin__.object-class.html"><code>__builtin__.object</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html#__str__"><code>__str__</code></a></td>
+    <td>Method in class <a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></td></tr>
+  <tr><td width="15%"><a href="exceptions.Exception-class.html#__str__"><code>__str__</code></a></td>
+    <td>Method in class <a href="exceptions.Exception-class.html"><code>exceptions.Exception</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__subclasses__"><code>__subclasses__</code></a></td>
+    <td>Method in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__weakrefoffset__"><code>__weakrefoffset__</code></a></td>
+    <td>Variable in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="../private/bison.BisonParser-class.html#_error"><code>_error</code></a></td>
+    <td>Method in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="../private/bison.BisonParser-class.html#_globals"><code>_globals</code></a></td>
+    <td>Method in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="../private/bison.BisonParser-class.html#_handle"><code>_handle</code></a></td>
+    <td>Method in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison-module.html"><code>bison</code></a></td>
+    <td>Module</td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#bisonCFile"><code>bisonCFile</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#bisonCFile1"><code>bisonCFile1</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#bisonCmd"><code>bisonCmd</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#bisonEngineLibName"><code>bisonEngineLibName</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonError-class.html"><code>BisonError</code></a></td>
+    <td>Class in module <a href="bison-module.html"><code>bison</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#bisonFile"><code>bisonFile</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#bisonHFile"><code>bisonHFile</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#bisonHFile1"><code>bisonHFile1</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html"><code>BisonNode</code></a></td>
+    <td>Class in module <a href="bison-module.html"><code>bison</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html"><code>BisonParser</code></a></td>
+    <td>Class in module <a href="bison-module.html"><code>bison</code></a></td></tr>
+  <tr><td width="15%"><a href="bison-module.html#bisonToPython"><code>bisonToPython</code></a></td>
+    <td>Function in module <a href="bison-module.html"><code>bison</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html"><code>BisonNode</code></a></td>
+    <td>Class in module <a href="bison-module.html"><code>bison</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html#dump"><code>dump</code></a></td>
+    <td>Method in class <a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#error"><code>error</code></a></td>
+    <td>Method in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="exceptions.Exception-class.html"><code>Exception</code></a></td>
+    <td>Class in module <code>exceptions</code></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#file"><code>file</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#flexCFile"><code>flexCFile</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#flexCFile1"><code>flexCFile1</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#flexCmd"><code>flexCmd</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#flexFile"><code>flexFile</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#keepfiles"><code>keepfiles</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#last"><code>last</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#lasterror"><code>lasterror</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#loadxml"><code>loadxml</code></a></td>
+    <td>Method in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#loadxmldoc"><code>loadxmldoc</code></a></td>
+    <td>Method in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#loadxmlobj"><code>loadxmlobj</code></a></td>
+    <td>Method in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#mro"><code>mro</code></a></td>
+    <td>Method in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.object-class.html"><code>object</code></a></td>
+    <td>Class in module <code>__builtin__</code></td></tr>
+  <tr><td width="15%"><a href="bison.ParserSyntaxError-class.html"><code>ParserSyntaxError</code></a></td>
+    <td>Class in module <a href="bison-module.html"><code>bison</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#read"><code>read</code></a></td>
+    <td>Method in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison-module.html#reSpaces"><code>reSpaces</code></a></td>
+    <td>Variable in module <a href="bison-module.html"><code>bison</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#run"><code>run</code></a></td>
+    <td>Method in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html#toprettyxml"><code>toprettyxml</code></a></td>
+    <td>Method in class <a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#toprettyxml"><code>toprettyxml</code></a></td>
+    <td>Method in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html#toxml"><code>toxml</code></a></td>
+    <td>Method in class <a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#toxml"><code>toxml</code></a></td>
+    <td>Method in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html#toxmldoc"><code>toxmldoc</code></a></td>
+    <td>Method in class <a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#toxmldoc"><code>toxmldoc</code></a></td>
+    <td>Method in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html#toxmlelem"><code>toxmlelem</code></a></td>
+    <td>Method in class <a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html"><code>type</code></a></td>
+    <td>Class in module <code>__builtin__</code></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#verbose"><code>verbose</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+</table>
+<br />
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th bgcolor="#70b0f0" class="navselect">&nbsp;&nbsp;&nbsp;Index&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+  <tr>
+    <td align="left"><font size="-2">Generated by Epydoc 2.0 on Sun Jun 27 12:36:56 2004</font></td>
+    <td align="right"><a href="http://epydoc.sourceforge.net"
+                      ><font size="-2">http://epydoc.sf.net</font></a></td>
+  </tr>
+</table>
+</body>
+</html>

+ 39 - 0
doc/api/private/toc-bison-module.html

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>bison</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<center><font size="+1"><b><a target="mainFrame" href="bison-module.html">bison</a></b></font></center>
+<hr>
+
+<!-- =========== START OF CLASSES =========== -->
+<font size="+1"><b>Classes</b></font><br />
+<a target="mainFrame" href="bison.BisonError-class.html">BisonError</a><br />
+<a target="mainFrame" href="bison.BisonNode-class.html">BisonNode</a><br />
+<a target="mainFrame" href="bison.BisonParser-class.html">BisonParser</a><br />
+<br />
+
+<!-- =========== START OF EXCEPTIONS =========== -->
+<font size="+1"><b>Exceptions</b></font><br />
+<a target="mainFrame" href="bison.ParserSyntaxError-class.html">ParserSyntaxError</a><br />
+<br />
+
+<!-- =========== START OF FUNCTIONS =========== -->
+<font size="+1"><b>Functions</b></font><br />
+<a target="mainFrame" href="bison-module.html#bisonToPython">bisonToPython</a><br />
+<br />
+
+<!-- =========== START OF VARIABLES =========== -->
+<font size="+1"><b>Variables</b></font><br />
+<a target="mainFrame" href="bison-module.html#reSpaces">reSpaces</a><br />
+<br />
+
+<hr>
+<font size="-2">[show&nbsp;private&nbsp;|&nbsp;<a href="../public/toc-bison-module.html">hide&nbsp;private</a>]</font>
+</body>
+</html>

+ 39 - 0
doc/api/private/toc-everything.html

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>Everything</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<center><font size="+1"><b>Everything</b></font></center>
+<hr>
+
+<!-- =========== START OF ALL CLASSES =========== -->
+<font size="+1"><b>All&nbsp;Classes</b></font><br />
+<a target="mainFrame" href="bison.BisonError-class.html">bison.BisonError</a><br />
+<a target="mainFrame" href="bison.BisonNode-class.html">bison.BisonNode</a><br />
+<a target="mainFrame" href="bison.BisonParser-class.html">bison.BisonParser</a><br />
+<br />
+
+<!-- =========== START OF ALL EXCEPTIONS =========== -->
+<font size="+1"><b>All&nbsp;Exceptions</b></font><br />
+<a target="mainFrame" href="bison.ParserSyntaxError-class.html">bison.ParserSyntaxError</a><br />
+<br />
+
+<!-- =========== START OF ALL FUNCTIONS =========== -->
+<font size="+1"><b>All&nbsp;Functions</b></font><br />
+<a target="mainFrame" href="bison-module.html#bisonToPython">bisonToPython</a><br />
+<br />
+
+<!-- =========== START OF ALL VARIABLES =========== -->
+<font size="+1"><b>All&nbsp;Variables</b></font><br />
+<a target="mainFrame" href="bison-module.html#reSpaces">reSpaces</a><br />
+<br />
+
+<hr>
+<font size="-2">[show&nbsp;private&nbsp;|&nbsp;<a href="../public/toc-everything.html">hide&nbsp;private</a>]</font>
+</body>
+</html>

+ 25 - 0
doc/api/private/toc.html

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>Table of Contents</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<center><font size="+1"><b>Table&nbsp;of&nbsp;Contents</b></font></center>
+<hr>
+<a target="moduleFrame" href="toc-everything.html">Everything</a><br />
+
+<!-- =========== START OF PACKAGES =========== -->
+<br /><font size="+1"><b>Packages</b></font><br />
+
+<!-- =========== START OF MODULES =========== -->
+<br /><font size="+1"><b>Modules</b></font><br />
+<a target="moduleFrame" href="toc-bison-module.html">bison</a><br />
+
+<br /><hr>
+<font size="-2">[show&nbsp;private&nbsp;|&nbsp;<a href="../public/toc.html">hide&nbsp;private</a>]</font>
+</body>
+</html>

+ 92 - 0
doc/api/private/trees.html

@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>Module and Class Hierarchies</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th bgcolor="#70b0f0" class="navselect">&nbsp;&nbsp;&nbsp;Trees&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+    </td>
+    <td><table cellpadding="0" cellspacing="0">
+      <tr><td align="right"><font size="-2">[show&nbsp;private&nbsp;|&nbsp;<a href="../public/trees.html">hide&nbsp;private</a>]</font></td></tr>
+      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="trees.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
+    </table></td>
+</tr></table>
+
+<!-- =========== START OF MODULE HIERARCHY =========== -->
+<h2>Module Hierarchy</h2>
+<ul>
+<li> <b><a href="bison-module.html"><code>bison</code></a></b>: <i>Wrapper module for interfacing with Bison (yacc)</i>
+</ul>
+
+<!-- =========== START OF CLASS HIERARCHY =========== -->
+<h2>Class Hierarchy</h2>
+<ul>
+  <li> <b><a href="__builtin__.object-class.html"><code>__builtin__.object</code></a></b>: <i>
+The most base type</i>
+    <ul>
+  <li> <b><a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></b>: <i>
+Base parser class</i>
+  <li> <b><a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></b>: <i>
+type(object) -&gt; the object's type type(name, bases, dict) -&gt; a 
+new type</i>
+    </ul>
+  <li> <b><a href="bison.BisonError-class.html"><code>bison.BisonError</code></a></b>: <i>
+Flags an error to yyparse()</i>
+  <li> <b><a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></b>: <i>
+Generic class for wrapping parse targets.</i>
+  <li> <b><a href="exceptions.Exception-class.html"><code>exceptions.Exception</code></a></b>: <i>
+Common base class for all exceptions.</i>
+    <ul>
+  <li> <b><a href="bison.ParserSyntaxError-class.html"><code>bison.ParserSyntaxError</code></a></b>
+    </ul>
+</ul>
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+  <tr>
+    <td align="left"><font size="-2">Generated by Epydoc 2.0 on Sun Jun 27 12:36:56 2004</font></td>
+    <td align="right"><a href="http://epydoc.sourceforge.net"
+                      ><font size="-2">http://epydoc.sf.net</font></a></td>
+  </tr>
+</table>
+</body>
+</html>

+ 257 - 0
doc/api/public/__builtin__.object-class.html

@@ -0,0 +1,257 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>__builtin__.object</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <font size="-1"><b class="breadcrumbs">
+        Module&nbsp;__builtin__ ::
+        Class&nbsp;object
+      </b></font></br>
+    </td>
+    <td><table cellpadding="0" cellspacing="0">
+      <tr><td align="right"><font size="-2">[<a href="../private/__builtin__.object-class.html">show&nbsp;private</a>&nbsp;|&nbsp;hide&nbsp;private]</font></td></tr>
+      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="__builtin__.object-class.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
+    </table></td>
+</tr></table>
+
+<!-- =========== START OF CLASS DESCRIPTION =========== -->
+<h2 class="class">Class object</h2>
+
+<dl><dt><b>Known Subclasses:</b></dt>
+<dd>
+    <a href="bison.BisonParser-class.html"><code>BisonParser</code></a>,
+    <a href="__builtin__.type-class.html"><code>type</code></a></dd></dl>
+
+<hr/>
+
+The most base type
+<hr/>
+
+
+<!-- =========== START OF METHOD SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Method Summary</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__init__(...) initializes x; see x.__class__.__doc__ for 
+signature</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__delattr__" class="summary-sig-name"><code>__delattr__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__delattr__('name') &lt;==&gt; del x.name</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__getattribute__" class="summary-sig-name"><code>__getattribute__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__getattribute__('name') &lt;==&gt; x.name</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__hash__" class="summary-sig-name"><code>__hash__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
+<br />
+x.__hash__() &lt;==&gt; hash(x)</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__reduce__" class="summary-sig-name"><code>__reduce__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+helper for pickle</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__reduce_ex__" class="summary-sig-name"><code>__reduce_ex__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+helper for pickle</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__repr__" class="summary-sig-name"><code>__repr__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
+<br />
+x.__repr__() &lt;==&gt; repr(x)</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__setattr__" class="summary-sig-name"><code>__setattr__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__setattr__('name', value) &lt;==&gt; x.name = value</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__str__" class="summary-sig-name"><code>__str__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
+<br />
+x.__str__() &lt;==&gt; str(x)</td></tr>
+<tr bgcolor="#e8f0f8" class="group">
+  <th colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;Inherited from type</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.type-class.html#__new__" class="summary-sig-name"><code>__new__</code></a>(<span class=summary-sig-arg>T</span>,
+          <span class=summary-sig-arg>S</span>,
+          <span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+T.__new__(S, ...) -&gt; a new object with type S, a subtype of T</td></tr>
+</table><br />
+
+
+<!-- =========== START OF CLASS VARIABLE SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Class Variable Summary</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>type</code></font></td>
+  <td><a name="__class__"></a><b><code>__class__</code></b> = <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+</table><br />
+
+
+<!-- =========== START OF METHOD DETAILS =========== -->
+<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="details">
+  <th colspan="2">Method Details</th></tr>
+</table>
+
+<a name="__init__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-vararg">...</span>)</span>
+    <br /><i>(Constructor)</i>
+  </h3>
+  x.__init__(...) initializes x; see x.__class__.__doc__ for 
+  signature
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__delattr__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__delattr__</span>(<span class="sig-vararg">...</span>)</span>
+  </h3>
+  x.__delattr__('name') &lt;==&gt; del x.name
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__getattribute__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__getattribute__</span>(<span class="sig-vararg">...</span>)</span>
+  </h3>
+  x.__getattribute__('name') &lt;==&gt; x.name
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__hash__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__hash__</span>(<span class=sig-arg>x</span>)</span>
+    <br /><i>(Hashing function)</i>
+  </h3>
+  x.__hash__() &lt;==&gt; hash(x)
+  <dl><dt></dt><dd>
+    <dl><dt><b>Returns:</b></dt>
+      <dd>
+<pre class="literalblock">
+hash(x)
+</pre>
+      </dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__reduce__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__reduce__</span>(<span class="sig-vararg">...</span>)</span>
+  </h3>
+  helper for pickle
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__reduce_ex__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__reduce_ex__</span>(<span class="sig-vararg">...</span>)</span>
+  </h3>
+  helper for pickle
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__repr__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__repr__</span>(<span class=sig-arg>x</span>)</span>
+    <br /><i>(Representation operator)</i>
+  </h3>
+  x.__repr__() &lt;==&gt; repr(x)
+  <dl><dt></dt><dd>
+    <dl><dt><b>Returns:</b></dt>
+      <dd>
+<pre class="literalblock">
+repr(x)
+</pre>
+      </dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__setattr__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__setattr__</span>(<span class="sig-vararg">...</span>)</span>
+  </h3>
+  x.__setattr__('name', value) &lt;==&gt; x.name = value
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__str__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__str__</span>(<span class=sig-arg>x</span>)</span>
+    <br /><i>(Informal representation operator)</i>
+  </h3>
+  x.__str__() &lt;==&gt; str(x)
+  <dl><dt></dt><dd>
+    <dl><dt><b>Returns:</b></dt>
+      <dd>
+<pre class="literalblock">
+str(x)
+</pre>
+      </dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+<br />
+
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+  <tr>
+    <td align="left"><font size="-2">Generated by Epydoc 2.0 on Sun Jun 27 12:36:56 2004</font></td>
+    <td align="right"><a href="http://epydoc.sourceforge.net"
+                      ><font size="-2">http://epydoc.sf.net</font></a></td>
+  </tr>
+</table>
+</body>
+</html>

+ 516 - 0
doc/api/public/__builtin__.type-class.html

@@ -0,0 +1,516 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>__builtin__.type</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <font size="-1"><b class="breadcrumbs">
+        Module&nbsp;__builtin__ ::
+        Class&nbsp;type
+      </b></font></br>
+    </td>
+    <td><table cellpadding="0" cellspacing="0">
+      <tr><td align="right"><font size="-2">[<a href="../private/__builtin__.type-class.html">show&nbsp;private</a>&nbsp;|&nbsp;hide&nbsp;private]</font></td></tr>
+      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="__builtin__.type-class.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
+    </table></td>
+</tr></table>
+
+<!-- =========== START OF CLASS DESCRIPTION =========== -->
+<h2 class="class">Class type</h2>
+
+<pre class="base-tree">
+<a href="__builtin__.object-class.html"><code>object</code></a> --+
+         |
+        <b>type</b>
+</pre><br />
+
+<hr/>
+
+type(object) -&gt; the object's type type(name, bases, dict) -&gt; a 
+new type
+<hr/>
+
+
+<!-- =========== START OF METHOD SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Method Summary</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.type-class.html#__call__" class="summary-sig-name"><code>__call__</code></a>(<span class=summary-sig-arg>x</span>,
+          <span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__call__(...) &lt;==&gt; x(...)</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.type-class.html#__cmp__" class="summary-sig-name"><code>__cmp__</code></a>(<span class=summary-sig-arg>x</span>,
+          <span class=summary-sig-arg>y</span>)</span></code>
+<br />
+x.__cmp__(y) &lt;==&gt; cmp(x,y)</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.type-class.html#__delattr__" class="summary-sig-name"><code>__delattr__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__delattr__('name') &lt;==&gt; del x.name</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.type-class.html#__getattribute__" class="summary-sig-name"><code>__getattribute__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__getattribute__('name') &lt;==&gt; x.name</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.type-class.html#__hash__" class="summary-sig-name"><code>__hash__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
+<br />
+x.__hash__() &lt;==&gt; hash(x)</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.type-class.html#__new__" class="summary-sig-name"><code>__new__</code></a>(<span class=summary-sig-arg>T</span>,
+          <span class=summary-sig-arg>S</span>,
+          <span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+T.__new__(S, ...) -&gt; a new object with type S, a subtype of T</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.type-class.html#__repr__" class="summary-sig-name"><code>__repr__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
+<br />
+x.__repr__() &lt;==&gt; repr(x)</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.type-class.html#__setattr__" class="summary-sig-name"><code>__setattr__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__setattr__('name', value) &lt;==&gt; x.name = value</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">list of immediate subclasses</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.type-class.html#__subclasses__" class="summary-sig-name"><code>__subclasses__</code></a>()</span></code>
+<br />
+__subclasses__() -&gt; list of immediate subclasses</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">list</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.type-class.html#mro" class="summary-sig-name"><code>mro</code></a>()</span></code>
+<br />
+return a type's method resolution order</td></tr>
+<tr bgcolor="#e8f0f8" class="group">
+  <th colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;Inherited from object</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__init__(...) initializes x; see x.__class__.__doc__ for 
+signature</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__reduce__" class="summary-sig-name"><code>__reduce__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+helper for pickle</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__reduce_ex__" class="summary-sig-name"><code>__reduce_ex__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+helper for pickle</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__str__" class="summary-sig-name"><code>__str__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
+<br />
+x.__str__() &lt;==&gt; str(x)</td></tr>
+</table><br />
+
+
+<!-- =========== START OF CLASS VARIABLE SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Class Variable Summary</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>type</code></font></td>
+  <td><a name="__base__"></a><b><code>__base__</code></b> = <a href="__builtin__.object-class.html"><code>__builtin__.object</code></a></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>tuple</code></font></td>
+<td><b><a href="__builtin__.type-class.html#__bases__"><code>__bases__</code></a></b> = <span title="(&lt;type 'object'&gt;,)"><code>(&lt;type&nbsp;'object'&gt;,)                           </code>
+</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>int</code></font></td>
+<td><b><a href="__builtin__.type-class.html#__basicsize__"><code>__basicsize__</code></a></b> = <span title="420">420&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>int</code></font></td>
+<td><b><a href="__builtin__.type-class.html#__dictoffset__"><code>__dictoffset__</code></a></b> = <span title="132">132&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>int</code></font></td>
+<td><b><a href="__builtin__.type-class.html#__flags__"><code>__flags__</code></a></b> = <span title="21995">21995&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>int</code></font></td>
+<td><b><a href="__builtin__.type-class.html#__itemsize__"><code>__itemsize__</code></a></b> = <span title="20">20&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>tuple</code></font></td>
+<td><b><a href="__builtin__.type-class.html#__mro__"><code>__mro__</code></a></b> = <span title="(&lt;type 'type'&gt;, &lt;type 'object'&gt;)"><code>(&lt;type&nbsp;'type'&gt;,&nbsp;&lt;type&nbsp;'object'&gt;)               </code>
+</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
+<td><b><a href="__builtin__.type-class.html#__name__"><code>__name__</code></a></b> = <span title="'type'"><code><span class="variable-quote">'</span>type<span class="variable-quote">'</span>                                        </code>
+</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>int</code></font></td>
+<td><b><a href="__builtin__.type-class.html#__weakrefoffset__"><code>__weakrefoffset__</code></a></b> = <span title="184">184&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>
+</table><br />
+
+
+<!-- =========== START OF METHOD DETAILS =========== -->
+<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="details">
+  <th colspan="2">Method Details</th></tr>
+</table>
+
+<a name="__call__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__call__</span>(<span class=sig-arg>x</span>,
+          <span class="sig-vararg">...</span>)</span>
+    <br /><i>(Call operator)</i>
+  </h3>
+  x.__call__(...) &lt;==&gt; x(...)
+  <dl><dt></dt><dd>
+    <dl><dt><b>Returns:</b></dt>
+      <dd>
+<pre class="literalblock">
+x(...)
+</pre>
+      </dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__cmp__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__cmp__</span>(<span class=sig-arg>x</span>,
+          <span class=sig-arg>y</span>)</span>
+    <br /><i>(Comparison operator)</i>
+  </h3>
+  x.__cmp__(y) &lt;==&gt; cmp(x,y)
+  <dl><dt></dt><dd>
+    <dl><dt><b>Returns:</b></dt>
+      <dd>
+<pre class="literalblock">
+cmp(x,y)
+</pre>
+      </dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__delattr__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__delattr__</span>(<span class="sig-vararg">...</span>)</span>
+  </h3>
+  x.__delattr__('name') &lt;==&gt; del x.name
+  <dl><dt></dt><dd>
+    <dl><dt><b>Overrides:</b></dt>
+      <dd><a href="__builtin__.object-class.html#__delattr__"><code>__builtin__.object.__delattr__</code></a></dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__getattribute__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__getattribute__</span>(<span class="sig-vararg">...</span>)</span>
+  </h3>
+  x.__getattribute__('name') &lt;==&gt; x.name
+  <dl><dt></dt><dd>
+    <dl><dt><b>Overrides:</b></dt>
+      <dd><a href="__builtin__.object-class.html#__getattribute__"><code>__builtin__.object.__getattribute__</code></a></dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__hash__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__hash__</span>(<span class=sig-arg>x</span>)</span>
+    <br /><i>(Hashing function)</i>
+  </h3>
+  x.__hash__() &lt;==&gt; hash(x)
+  <dl><dt></dt><dd>
+    <dl><dt><b>Returns:</b></dt>
+      <dd>
+<pre class="literalblock">
+hash(x)
+</pre>
+      </dd>
+    </dl>
+    <dl><dt><b>Overrides:</b></dt>
+      <dd><a href="__builtin__.object-class.html#__hash__"><code>__builtin__.object.__hash__</code></a></dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__new__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__new__</span>(<span class=sig-arg>T</span>,
+          <span class=sig-arg>S</span>,
+          <span class="sig-vararg">...</span>)</span>
+  </h3>
+  T.__new__(S, ...) -&gt; a new object with type S, a subtype of T
+  <dl><dt></dt><dd>
+    <dl><dt><b>Returns:</b></dt>
+      <dd>
+<pre class="literalblock">
+a new object with type S, a subtype of T
+</pre>
+      </dd>
+    </dl>
+    <dl><dt><b>Overrides:</b></dt>
+      <dd><a href="__builtin__.type-class.html#__new__"><code>__builtin__.type.__new__</code></a></dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__repr__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__repr__</span>(<span class=sig-arg>x</span>)</span>
+    <br /><i>(Representation operator)</i>
+  </h3>
+  x.__repr__() &lt;==&gt; repr(x)
+  <dl><dt></dt><dd>
+    <dl><dt><b>Returns:</b></dt>
+      <dd>
+<pre class="literalblock">
+repr(x)
+</pre>
+      </dd>
+    </dl>
+    <dl><dt><b>Overrides:</b></dt>
+      <dd><a href="__builtin__.object-class.html#__repr__"><code>__builtin__.object.__repr__</code></a></dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__setattr__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__setattr__</span>(<span class="sig-vararg">...</span>)</span>
+  </h3>
+  x.__setattr__('name', value) &lt;==&gt; x.name = value
+  <dl><dt></dt><dd>
+    <dl><dt><b>Overrides:</b></dt>
+      <dd><a href="__builtin__.object-class.html#__setattr__"><code>__builtin__.object.__setattr__</code></a></dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__subclasses__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__subclasses__</span>()</span>
+  </h3>
+  __subclasses__() -&gt; list of immediate subclasses
+  <dl><dt></dt><dd>
+    <dl><dt><b>Returns:</b></dt>
+      <dd>
+list of immediate subclasses      </dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+
+<a name="mro"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">mro</span>()</span>
+  </h3>
+  return a type's method resolution order
+  <dl><dt></dt><dd>
+    <dl><dt><b>Returns:</b></dt>
+      <dd>
+list      </dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+<br />
+
+
+<!-- =========== START OF CLASS VARIABLE DETAILS =========== -->
+<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="details">
+  <th colspan="2">Class Variable Details</th></tr>
+</table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="__bases__"></a>
+<h3>__bases__</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>tuple</code>
+
+      </dd>
+<span title="(&lt;type 'object'&gt;,)">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+(&lt;type 'object'&gt;,)                                                     </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="__basicsize__"></a>
+<h3>__basicsize__</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>int</code>
+
+      </dd>
+<span title="420">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+420&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="__dictoffset__"></a>
+<h3>__dictoffset__</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>int</code>
+
+      </dd>
+<span title="132">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+132&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="__flags__"></a>
+<h3>__flags__</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>int</code>
+
+      </dd>
+<span title="21995">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+21995&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="__itemsize__"></a>
+<h3>__itemsize__</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>int</code>
+
+      </dd>
+<span title="20">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+20&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="__mro__"></a>
+<h3>__mro__</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>tuple</code>
+
+      </dd>
+<span title="(&lt;type 'type'&gt;, &lt;type 'object'&gt;)">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+(&lt;type 'type'&gt;, &lt;type 'object'&gt;)                                       </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="__name__"></a>
+<h3>__name__</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>str</code>
+
+      </dd>
+<span title="'type'">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+<span class="variable-quote">'</span>type<span class="variable-quote">'</span>                                                                 </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="__weakrefoffset__"></a>
+<h3>__weakrefoffset__</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>int</code>
+
+      </dd>
+<span title="184">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+184&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<br />
+
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+  <tr>
+    <td align="left"><font size="-2">Generated by Epydoc 2.0 on Sun Jun 27 12:36:56 2004</font></td>
+    <td align="right"><a href="http://epydoc.sourceforge.net"
+                      ><font size="-2">http://epydoc.sf.net</font></a></td>
+  </tr>
+</table>
+</body>
+</html>

+ 204 - 0
doc/api/public/bison-module.html

@@ -0,0 +1,204 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>bison</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th bgcolor="#70b0f0" class="navselect">&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <font size="-1"><b class="breadcrumbs">
+        Module&nbsp;bison
+      </b></font></br>
+    </td>
+    <td><table cellpadding="0" cellspacing="0">
+      <tr><td align="right"><font size="-2">[<a href="../private/bison-module.html">show&nbsp;private</a>&nbsp;|&nbsp;hide&nbsp;private]</font></td></tr>
+      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="bison-module.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
+    </table></td>
+</tr></table>
+
+<!-- =========== START OF MODULE DESCRIPTION =========== -->
+<h2 class="module">Module bison</h2>
+
+<p>Wrapper module for interfacing with Bison (yacc)</p>
+<p>Written April 2004 by David McNab &lt;david&#64;freenet.org.nz&gt; 
+Copyright (c) 2004 by David McNab, all rights reserved.</p>
+<p>Released under the GNU General Public License, a copy of which should 
+appear in this distribution in the file called 'COPYING'. If this file is 
+missing, then you can obtain a copy of the GPL license document from the 
+GNU website at http://www.gnu.org.</p>
+<p>This software is released with no warranty whatsoever. Use it at your 
+own risk.</p>
+If you wish to use this software in a commercial application, and wish 
+to depart from the GPL licensing requirements, please contact the author 
+and apply for a commercial license.
+<hr/>
+
+<!-- =========== START OF CLASSES =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Classes</th></tr>
+<tr><td width="15%">
+  <b><a href="bison.BisonError-class.html"><code>BisonError</code></a></b></td>
+  <td>Flags an error to yyparse()</td></tr>
+<tr><td width="15%">
+  <b><a href="bison.BisonNode-class.html"><code>BisonNode</code></a></b></td>
+  <td>Generic class for wrapping parse targets.</td></tr>
+<tr><td width="15%">
+  <b><a href="bison.BisonParser-class.html"><code>BisonParser</code></a></b></td>
+  <td>Base parser class</td></tr>
+</table><br />
+
+
+<!-- =========== START OF EXCEPTIONS =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Exceptions</th></tr>
+<tr><td width="15%">
+  <b><a href="bison.ParserSyntaxError-class.html"><code>ParserSyntaxError</code></a></b></td>
+  <td>&nbsp;</td></tr>
+</table><br />
+
+
+<!-- =========== START OF FUNCTION SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Function Summary</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison-module.html#bisonToPython" class="summary-sig-name"><code>bisonToPython</code></a>(<span class=summary-sig-arg>bisonfileName</span>,
+          <span class=summary-sig-arg>lexfileName</span>,
+          <span class=summary-sig-arg>pyfileName</span>,
+          <span class=summary-sig-arg>generateClasses</span>)</span></code>
+<br />
+Rips the rules, tokens and precedences from a bison file, and the 
+verbatim text from a lex file and generates a boilerplate python file 
+containing a Parser class with handler methods and grammar attributes</td></tr>
+</table><br />
+
+
+<!-- =========== START OF VARIABLE SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Variable Summary</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>SRE_Pattern</code></font></td>
+<td><b><a href="bison-module.html#reSpaces"><code>reSpaces</code></a></b> = <span title="&lt;_sre.SRE_Pattern object at 0x4029a2f8&gt;"><code><span class="re"><span class="re-char">\s</span><span class="re-op">+</span></span>                                           </code>
+</span></td></tr>
+</table><br />
+
+
+<!-- =========== START OF FUNCTION DETAILS =========== -->
+<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="details">
+  <th colspan="2">Function Details</th></tr>
+</table>
+
+<a name="bisonToPython"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">bisonToPython</span>(<span class=sig-arg>bisonfileName</span>,
+          <span class=sig-arg>lexfileName</span>,
+          <span class=sig-arg>pyfileName</span>,
+          <span class=sig-arg>generateClasses</span>=<span class=sig-default>0</span>)</span>
+  </h3>
+  <p>Rips the rules, tokens and precedences from a bison file, and the 
+  verbatim text from a lex file and generates a boilerplate python file 
+  containing a Parser class with handler methods and grammar 
+  attributes</p>
+  Arguments:
+  <ul>
+    <li>
+      bisonfileName - name of input bison script
+    </li>
+    <li>
+      lexfileName - name of input flex script
+    </li>
+    <li>
+      pyfileName - name of output python file
+    </li>
+    <li>
+      generateClasses - flag - default 0 - if 1, causes a unique class 
+      to be defined for each parse target, and for the corresponding 
+      target handler method in the main Parser class to use this class 
+      when creating the node.
+    </li>
+  </ul>
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+<br />
+
+
+<!-- =========== START OF VARIABLE DETAILS =========== -->
+<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="details">
+  <th colspan="2">Variable Details</th></tr>
+</table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="reSpaces"></a>
+<h3>reSpaces</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>SRE_Pattern</code>
+
+      </dd>
+<span title="&lt;_sre.SRE_Pattern object at 0x4029a2f8&gt;">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+<span class="re"><span class="re-char">\s</span><span class="re-op">+</span></span>                                                                    </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<br />
+
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th bgcolor="#70b0f0" class="navselect">&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+  <tr>
+    <td align="left"><font size="-2">Generated by Epydoc 2.0 on Sun Jun 27 12:36:56 2004</font></td>
+    <td align="right"><a href="http://epydoc.sourceforge.net"
+                      ><font size="-2">http://epydoc.sf.net</font></a></td>
+  </tr>
+</table>
+</body>
+</html>

+ 88 - 0
doc/api/public/bison.BisonError-class.html

@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>bison.BisonError</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <font size="-1"><b class="breadcrumbs">
+        <a href="bison-module.html">Module&nbsp;bison</a> ::
+        Class&nbsp;BisonError
+      </b></font></br>
+    </td>
+    <td><table cellpadding="0" cellspacing="0">
+      <tr><td align="right"><font size="-2">[<a href="../private/bison.BisonError-class.html">show&nbsp;private</a>&nbsp;|&nbsp;hide&nbsp;private]</font></td></tr>
+      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="bison.BisonError-class.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
+    </table></td>
+</tr></table>
+
+<!-- =========== START OF CLASS DESCRIPTION =========== -->
+<h2 class="class">Class BisonError</h2>
+
+<hr/>
+
+<p>Flags an error to yyparse()</p>
+You should return this in your actions to notify a syntax error
+<hr/>
+
+
+<!-- =========== START OF METHOD SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Method Summary</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><a name="__init__"></a><span class="summary-sig"><span class="summary-sig-name">__init__</span>(<span class=summary-sig-arg>self</span>,
+          <span class=summary-sig-arg>value</span>)</span></code>
+</td></tr>
+</table><br />
+
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+  <tr>
+    <td align="left"><font size="-2">Generated by Epydoc 2.0 on Sun Jun 27 12:36:56 2004</font></td>
+    <td align="right"><a href="http://epydoc.sourceforge.net"
+                      ><font size="-2">http://epydoc.sf.net</font></a></td>
+  </tr>
+</table>
+</body>
+</html>

+ 237 - 0
doc/api/public/bison.BisonNode-class.html

@@ -0,0 +1,237 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>bison.BisonNode</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <font size="-1"><b class="breadcrumbs">
+        <a href="bison-module.html">Module&nbsp;bison</a> ::
+        Class&nbsp;BisonNode
+      </b></font></br>
+    </td>
+    <td><table cellpadding="0" cellspacing="0">
+      <tr><td align="right"><font size="-2">[<a href="../private/bison.BisonNode-class.html">show&nbsp;private</a>&nbsp;|&nbsp;hide&nbsp;private]</font></td></tr>
+      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="bison.BisonNode-class.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
+    </table></td>
+</tr></table>
+
+<!-- =========== START OF CLASS DESCRIPTION =========== -->
+<h2 class="class">Class BisonNode</h2>
+
+<hr/>
+
+<p>Generic class for wrapping parse targets.</p>
+Arguments:
+<ul>
+  <li>
+    targetname - the name of the parse target being wrapped.
+  </li>
+  <li>
+    items - optional - a list of items comprising a clause in the 
+    target rule - typically this will only be used by the PyBison 
+    callback mechanism.
+  </li>
+</ul>
+Keywords:
+<ul>
+  <li>
+    any keywords you want (except 'items'), with any type of value. 
+    keywords will be stored as attributes in the constructed object.
+  </li>
+</ul>
+<hr/>
+
+
+<!-- =========== START OF METHOD SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Method Summary</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><a name="__init__"></a><span class="summary-sig"><span class="summary-sig-name">__init__</span>(<span class=summary-sig-arg>self</span>,
+          <span class="summary-sig-kwarg">**kw</span>)</span></code>
+</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonNode-class.html#__getitem__" class="summary-sig-name"><code>__getitem__</code></a>(<span class=summary-sig-arg>self</span>,
+          <span class=summary-sig-arg>item</span>)</span></code>
+<br />
+Retrieves the ith value from this node, or child nodes</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><a name="__getslice__"></a><span class="summary-sig"><span class="summary-sig-name">__getslice__</span>(<span class=summary-sig-arg>self</span>,
+          <span class=summary-sig-arg>fromidx</span>,
+          <span class=summary-sig-arg>toidx</span>)</span></code>
+</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><a name="__iter__"></a><span class="summary-sig"><span class="summary-sig-name">__iter__</span>(<span class=summary-sig-arg>self</span>)</span></code>
+</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><a name="__len__"></a><span class="summary-sig"><span class="summary-sig-name">__len__</span>(<span class=summary-sig-arg>self</span>)</span></code>
+</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><a name="__repr__"></a><span class="summary-sig"><span class="summary-sig-name">__repr__</span>(<span class=summary-sig-arg>self</span>)</span></code>
+</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><a name="__str__"></a><span class="summary-sig"><span class="summary-sig-name">__str__</span>(<span class=summary-sig-arg>self</span>)</span></code>
+</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonNode-class.html#dump" class="summary-sig-name"><code>dump</code></a>(<span class=summary-sig-arg>self</span>,
+          <span class=summary-sig-arg>indent</span>)</span></code>
+<br />
+For debugging - prints a recursive dump of a parse tree node and its 
+children</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonNode-class.html#toprettyxml" class="summary-sig-name"><code>toprettyxml</code></a>(<span class=summary-sig-arg>self</span>,
+          <span class=summary-sig-arg>indent</span>,
+          <span class=summary-sig-arg>newl</span>,
+          <span class=summary-sig-arg>encoding</span>)</span></code>
+<br />
+returns a human-readable xml serialisation of this node and its 
+children</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonNode-class.html#toxml" class="summary-sig-name"><code>toxml</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
+<br />
+Returns an xml serialisation of this node and its children, as a raw 
+string</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonNode-class.html#toxmldoc" class="summary-sig-name"><code>toxmldoc</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
+<br />
+Returns the node and its children as an xml.dom.minidom.Document 
+object</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonNode-class.html#toxmlelem" class="summary-sig-name"><code>toxmlelem</code></a>(<span class=summary-sig-arg>self</span>,
+          <span class=summary-sig-arg>docobj</span>)</span></code>
+<br />
+Returns a DOM Element object of this node and its children</td></tr>
+</table><br />
+
+
+<!-- =========== START OF METHOD DETAILS =========== -->
+<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="details">
+  <th colspan="2">Method Details</th></tr>
+</table>
+
+<a name="__getitem__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__getitem__</span>(<span class=sig-arg>self</span>,
+          <span class=sig-arg>item</span>)</span>
+    <br /><i>(Indexing operator)</i>
+  </h3>
+  <p>Retrieves the ith value from this node, or child nodes</p>
+  <p>If the subscript is a single number, it will be used as an index 
+  into this node's children list.</p>
+  If the subscript is a list or tuple, we recursively fetch the item 
+  by using the first element as an index into this node's children, the 
+  second element as an index into that child node's children, and so 
+  on
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="dump"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">dump</span>(<span class=sig-arg>self</span>,
+          <span class=sig-arg>indent</span>=<span class=sig-default>0</span>)</span>
+  </h3>
+  For debugging - prints a recursive dump of a parse tree node and its 
+  children
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="toprettyxml"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">toprettyxml</span>(<span class=sig-arg>self</span>,
+          <span class=sig-arg>indent</span>=<span class=sig-default>'&nbsp;&nbsp;'</span>,
+          <span class=sig-arg>newl</span>=<span class=sig-default>'\n'</span>,
+          <span class=sig-arg>encoding</span>=<span class=sig-default>None</span>)</span>
+  </h3>
+  returns a human-readable xml serialisation of this node and its 
+  children
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="toxml"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">toxml</span>(<span class=sig-arg>self</span>)</span>
+  </h3>
+  <p>Returns an xml serialisation of this node and its children, as a raw 
+  string</p>
+  Called on the toplevel node, the xml is a representation of the 
+  entire parse tree.
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="toxmldoc"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">toxmldoc</span>(<span class=sig-arg>self</span>)</span>
+  </h3>
+  Returns the node and its children as an xml.dom.minidom.Document 
+  object
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="toxmlelem"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">toxmlelem</span>(<span class=sig-arg>self</span>,
+          <span class=sig-arg>docobj</span>)</span>
+  </h3>
+  Returns a DOM Element object of this node and its children
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+<br />
+
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+  <tr>
+    <td align="left"><font size="-2">Generated by Epydoc 2.0 on Sun Jun 27 12:36:56 2004</font></td>
+    <td align="right"><a href="http://epydoc.sourceforge.net"
+                      ><font size="-2">http://epydoc.sf.net</font></a></td>
+  </tr>
+</table>
+</body>
+</html>

+ 769 - 0
doc/api/public/bison.BisonParser-class.html

@@ -0,0 +1,769 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>bison.BisonParser</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <font size="-1"><b class="breadcrumbs">
+        <a href="bison-module.html">Module&nbsp;bison</a> ::
+        Class&nbsp;BisonParser
+      </b></font></br>
+    </td>
+    <td><table cellpadding="0" cellspacing="0">
+      <tr><td align="right"><font size="-2">[<a href="../private/bison.BisonParser-class.html">show&nbsp;private</a>&nbsp;|&nbsp;hide&nbsp;private]</font></td></tr>
+      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="bison.BisonParser-class.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
+    </table></td>
+</tr></table>
+
+<!-- =========== START OF CLASS DESCRIPTION =========== -->
+<h2 class="class">Class BisonParser</h2>
+
+<pre class="base-tree">
+<a href="__builtin__.object-class.html"><code>object</code></a> --+
+         |
+        <b>BisonParser</b>
+</pre><br />
+
+<hr/>
+
+<p>Base parser class</p>
+You should subclass this, and provide a bunch of methods called 
+'on_TargetName', where 'TargetName' is the name of each target in your 
+grammar (.y) file.
+<hr/>
+
+
+<!-- =========== START OF METHOD SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Method Summary</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonParser-class.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class=summary-sig-arg>self</span>,
+          <span class="summary-sig-kwarg">**kw</span>)</span></code>
+<br />
+Abstract representation of parser</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><a name="__getitem__"></a><span class="summary-sig"><span class="summary-sig-name">__getitem__</span>(<span class=summary-sig-arg>self</span>,
+          <span class=summary-sig-arg>idx</span>)</span></code>
+</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonParser-class.html#error" class="summary-sig-name"><code>error</code></a>(<span class=summary-sig-arg>self</span>,
+          <span class=summary-sig-arg>value</span>)</span></code>
+<br />
+Return the result of this method from a handler to notify a syntax 
+error</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonParser-class.html#loadxml" class="summary-sig-name"><code>loadxml</code></a>(<span class=summary-sig-arg>self</span>,
+          <span class=summary-sig-arg>raw</span>,
+          <span class=summary-sig-arg>namespace</span>)</span></code>
+<br />
+Loads a parse tree from raw xml text</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonParser-class.html#loadxmldoc" class="summary-sig-name"><code>loadxmldoc</code></a>(<span class=summary-sig-arg>self</span>,
+          <span class=summary-sig-arg>xmldoc</span>,
+          <span class=summary-sig-arg>namespace</span>)</span></code>
+<br />
+Returns a reconstituted parse tree, loaded from an 
+xml.dom.minidom.Document instance</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonParser-class.html#loadxmlobj" class="summary-sig-name"><code>loadxmlobj</code></a>(<span class=summary-sig-arg>self</span>,
+          <span class=summary-sig-arg>xmlobj</span>,
+          <span class=summary-sig-arg>namespace</span>)</span></code>
+<br />
+Returns a node object, being a parse tree, reconstituted from an 
+xml.dom.minidom.Element object</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonParser-class.html#read" class="summary-sig-name"><code>read</code></a>(<span class=summary-sig-arg>self</span>,
+          <span class=summary-sig-arg>nbytes</span>)</span></code>
+<br />
+Override this in your subclass, if you desire.</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonParser-class.html#run" class="summary-sig-name"><code>run</code></a>(<span class=summary-sig-arg>self</span>,
+          <span class="summary-sig-kwarg">**kw</span>)</span></code>
+<br />
+Runs the parser, and returns the top-most parse target.</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonParser-class.html#toprettyxml" class="summary-sig-name"><code>toprettyxml</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
+<br />
+Returns a human-readable xml representation of the parse tree</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonParser-class.html#toxml" class="summary-sig-name"><code>toxml</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
+<br />
+Serialises the parse tree and returns it as a raw xml string</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.BisonParser-class.html#toxmldoc" class="summary-sig-name"><code>toxmldoc</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
+<br />
+Returns an xml.dom.minidom.Document object containing the parse 
+tree</td></tr>
+<tr bgcolor="#e8f0f8" class="group">
+  <th colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;Inherited from object</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__delattr__" class="summary-sig-name"><code>__delattr__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__delattr__('name') &lt;==&gt; del x.name</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__getattribute__" class="summary-sig-name"><code>__getattribute__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__getattribute__('name') &lt;==&gt; x.name</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__hash__" class="summary-sig-name"><code>__hash__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
+<br />
+x.__hash__() &lt;==&gt; hash(x)</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__reduce__" class="summary-sig-name"><code>__reduce__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+helper for pickle</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__reduce_ex__" class="summary-sig-name"><code>__reduce_ex__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+helper for pickle</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__repr__" class="summary-sig-name"><code>__repr__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
+<br />
+x.__repr__() &lt;==&gt; repr(x)</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__setattr__" class="summary-sig-name"><code>__setattr__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__setattr__('name', value) &lt;==&gt; x.name = value</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__str__" class="summary-sig-name"><code>__str__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
+<br />
+x.__str__() &lt;==&gt; str(x)</td></tr>
+<tr bgcolor="#e8f0f8" class="group">
+  <th colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;Inherited from type</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.type-class.html#__new__" class="summary-sig-name"><code>__new__</code></a>(<span class=summary-sig-arg>T</span>,
+          <span class=summary-sig-arg>S</span>,
+          <span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+T.__new__(S, ...) -&gt; a new object with type S, a subtype of T</td></tr>
+</table><br />
+
+
+<!-- =========== START OF CLASS VARIABLE SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Class Variable Summary</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#bisonCFile"><code>bisonCFile</code></a></b> = <span title="'tmp.tab.c'"><code><span class="variable-quote">'</span>tmp.tab.c<span class="variable-quote">'</span>                                 </code>
+</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#bisonCFile1"><code>bisonCFile1</code></a></b> = <span title="'tmp.bison.c'"><code><span class="variable-quote">'</span>tmp.bison.c<span class="variable-quote">'</span>                              </code>
+</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>list</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#bisonCmd"><code>bisonCmd</code></a></b> = <span title="['bison', '-d', '-v', '-t']"><code>['bison',&nbsp;'-d',&nbsp;'-v',&nbsp;'-t']                   </code>
+</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>NoneType</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#bisonEngineLibName"><code>bisonEngineLibName</code></a></b> = <span title="None">None&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#bisonFile"><code>bisonFile</code></a></b> = <span title="'tmp.y'"><code><span class="variable-quote">'</span>tmp.y<span class="variable-quote">'</span>                                      </code>
+</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#bisonHFile"><code>bisonHFile</code></a></b> = <span title="'tmp.tab.h'"><code><span class="variable-quote">'</span>tmp.tab.h<span class="variable-quote">'</span>                                 </code>
+</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#bisonHFile1"><code>bisonHFile1</code></a></b> = <span title="'tokens.h'"><code><span class="variable-quote">'</span>tokens.h<span class="variable-quote">'</span>                                 </code>
+</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>classobj</code></font></td>
+  <td><a name="defaultNodeClass"></a><b><code>defaultNodeClass</code></b> = <a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>NoneType</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#file"><code>file</code></a></b> = <span title="None">None&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#flexCFile"><code>flexCFile</code></a></b> = <span title="'lex.yy.c'"><code><span class="variable-quote">'</span>lex.yy.c<span class="variable-quote">'</span>                                   </code>
+</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#flexCFile1"><code>flexCFile1</code></a></b> = <span title="'tmp.lex.c'"><code><span class="variable-quote">'</span>tmp.lex.c<span class="variable-quote">'</span>                                 </code>
+</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>list</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#flexCmd"><code>flexCmd</code></a></b> = <span title="['flex']"><code>['flex']                                       </code>
+</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#flexFile"><code>flexFile</code></a></b> = <span title="'tmp.l'"><code><span class="variable-quote">'</span>tmp.l<span class="variable-quote">'</span>                                       </code>
+</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>int</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#keepfiles"><code>keepfiles</code></a></b> = <span title="0">0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>NoneType</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#last"><code>last</code></a></b> = <span title="None">None&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>NoneType</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#lasterror"><code>lasterror</code></a></b> = <span title="None">None&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1"><code>int</code></font></td>
+<td><b><a href="bison.BisonParser-class.html#verbose"><code>verbose</code></a></b> = <span title="0">0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>
+</table><br />
+
+
+<!-- =========== START OF METHOD DETAILS =========== -->
+<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="details">
+  <th colspan="2">Method Details</th></tr>
+</table>
+
+<a name="__init__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__init__</span>(<span class=sig-arg>self</span>,
+          <span class="sig-kwarg">**kw</span>)</span>
+    <br /><i>(Constructor)</i>
+  </h3>
+  <p>Abstract representation of parser</p>
+  Keyword arguments:
+  <ul>
+    <li>
+      read - a callable accepting an int arg (nbytes) and returning a 
+      string, default is this class' read() method
+    </li>
+    <li>
+      file - a file object, or string of a pathname to open as a file, 
+      defaults to sys.stdin. Note that you can leave this blank, and pass 
+      a file keyword argument to the .run() method.
+    </li>
+    <li>
+      verbose - set to 1 to enable verbose output messages, default 
+      0
+    </li>
+    <li>
+      keepfiles - if non-zero, keeps any files generated in the course 
+      of building the parser engine; by default, all these files get 
+      deleted upon a successful engine build
+    </li>
+    <li>
+      defaultNodeClass - the class to use for creating parse nodes, 
+      default is self.defaultNodeClass (in this base class, 
+      BisonNode)
+    </li>
+  </ul>
+  <dl><dt></dt><dd>
+    <dl><dt><b>Overrides:</b></dt>
+      <dd><a href="__builtin__.object-class.html#__init__"><code>__builtin__.object.__init__</code></a></dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+
+<a name="error"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">error</span>(<span class=sig-arg>self</span>,
+          <span class=sig-arg>value</span>)</span>
+  </h3>
+  Return the result of this method from a handler to notify a syntax 
+  error
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="loadxml"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">loadxml</span>(<span class=sig-arg>self</span>,
+          <span class=sig-arg>raw</span>,
+          <span class=sig-arg>namespace</span>=<span class=sig-default>None</span>)</span>
+  </h3>
+  <p>Loads a parse tree from raw xml text</p>
+  <p>Stores it in the '.last' attribute, which is where the root node of 
+  parsed text gets stored</p>
+  Arguments:
+  <ul>
+    <li>
+      raw - string containing the raw xml
+    </li>
+    <li>
+      namespace - a dict or module object, where the node classes 
+      required for reconstituting the parse tree, can be found
+    </li>
+  </ul>
+  Returns:
+  <ul>
+    <li>
+      root node object of reconstituted parse tree
+    </li>
+  </ul>
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="loadxmldoc"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">loadxmldoc</span>(<span class=sig-arg>self</span>,
+          <span class=sig-arg>xmldoc</span>,
+          <span class=sig-arg>namespace</span>=<span class=sig-default>None</span>)</span>
+  </h3>
+  <p>Returns a reconstituted parse tree, loaded from an 
+  xml.dom.minidom.Document instance</p>
+  Arguments:
+  <ul>
+    <li>
+      xmldoc - an xml.dom.minidom.Document instance
+    </li>
+    <li>
+      namespace - a dict from which to find the classes needed to 
+      translate the document into a tree of parse nodes
+    </li>
+  </ul>
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="loadxmlobj"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">loadxmlobj</span>(<span class=sig-arg>self</span>,
+          <span class=sig-arg>xmlobj</span>,
+          <span class=sig-arg>namespace</span>=<span class=sig-default>None</span>)</span>
+  </h3>
+  <p>Returns a node object, being a parse tree, reconstituted from an 
+  xml.dom.minidom.Element object</p>
+  Arguments:
+  <ul>
+    <li>
+      xmlobj - an xml.dom.minidom.Element instance
+    </li>
+    <li>
+      namespace - a namespace from which the node classes needed for 
+      reconstituting the tree, can be found
+    </li>
+  </ul>
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="read"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">read</span>(<span class=sig-arg>self</span>,
+          <span class=sig-arg>nbytes</span>)</span>
+  </h3>
+  <p>Override this in your subclass, if you desire.</p>
+  Arguments:
+  <ul>
+    <li>
+      nbytes - the maximum length of the string which you may return. 
+      DO NOT return a string longer than this, or else Bad Things will 
+      happen.
+    </li>
+  </ul>
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="run"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">run</span>(<span class=sig-arg>self</span>,
+          <span class="sig-kwarg">**kw</span>)</span>
+  </h3>
+  <p>Runs the parser, and returns the top-most parse target.</p>
+  Keywords:
+  <ul>
+    <li>
+      file - either a string, comprising a file to open and read input 
+      from, or a Python file object
+    </li>
+    <li>
+      debug - enables garrulous parser debugging output, default 0
+    </li>
+  </ul>
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="toprettyxml"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">toprettyxml</span>(<span class=sig-arg>self</span>)</span>
+  </h3>
+  Returns a human-readable xml representation of the parse tree
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="toxml"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">toxml</span>(<span class=sig-arg>self</span>)</span>
+  </h3>
+  Serialises the parse tree and returns it as a raw xml string
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="toxmldoc"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">toxmldoc</span>(<span class=sig-arg>self</span>)</span>
+  </h3>
+  Returns an xml.dom.minidom.Document object containing the parse 
+  tree
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+<br />
+
+
+<!-- =========== START OF CLASS VARIABLE DETAILS =========== -->
+<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="details">
+  <th colspan="2">Class Variable Details</th></tr>
+</table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="bisonCFile"></a>
+<h3>bisonCFile</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>str</code>
+
+      </dd>
+<span title="'tmp.tab.c'">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+<span class="variable-quote">'</span>tmp.tab.c<span class="variable-quote">'</span>                                                            </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="bisonCFile1"></a>
+<h3>bisonCFile1</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>str</code>
+
+      </dd>
+<span title="'tmp.bison.c'">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+<span class="variable-quote">'</span>tmp.bison.c<span class="variable-quote">'</span>                                                          </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="bisonCmd"></a>
+<h3>bisonCmd</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>list</code>
+
+      </dd>
+<span title="['bison', '-d', '-v', '-t']">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+['bison', '-d', '-v', '-t']                                            </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="bisonEngineLibName"></a>
+<h3>bisonEngineLibName</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>NoneType</code>
+
+      </dd>
+<span title="None">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+None&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="bisonFile"></a>
+<h3>bisonFile</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>str</code>
+
+      </dd>
+<span title="'tmp.y'">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+<span class="variable-quote">'</span>tmp.y<span class="variable-quote">'</span>                                                                </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="bisonHFile"></a>
+<h3>bisonHFile</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>str</code>
+
+      </dd>
+<span title="'tmp.tab.h'">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+<span class="variable-quote">'</span>tmp.tab.h<span class="variable-quote">'</span>                                                            </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="bisonHFile1"></a>
+<h3>bisonHFile1</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>str</code>
+
+      </dd>
+<span title="'tokens.h'">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+<span class="variable-quote">'</span>tokens.h<span class="variable-quote">'</span>                                                             </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="file"></a>
+<h3>file</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>NoneType</code>
+
+      </dd>
+<span title="None">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+None&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="flexCFile"></a>
+<h3>flexCFile</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>str</code>
+
+      </dd>
+<span title="'lex.yy.c'">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+<span class="variable-quote">'</span>lex.yy.c<span class="variable-quote">'</span>                                                             </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="flexCFile1"></a>
+<h3>flexCFile1</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>str</code>
+
+      </dd>
+<span title="'tmp.lex.c'">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+<span class="variable-quote">'</span>tmp.lex.c<span class="variable-quote">'</span>                                                            </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="flexCmd"></a>
+<h3>flexCmd</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>list</code>
+
+      </dd>
+<span title="['flex']">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+['flex']                                                               </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="flexFile"></a>
+<h3>flexFile</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>str</code>
+
+      </dd>
+<span title="'tmp.l'">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+<span class="variable-quote">'</span>tmp.l<span class="variable-quote">'</span>                                                                </pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="keepfiles"></a>
+<h3>keepfiles</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>int</code>
+
+      </dd>
+<span title="0">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="last"></a>
+<h3>last</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>NoneType</code>
+
+      </dd>
+<span title="None">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+None&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="lasterror"></a>
+<h3>lasterror</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>NoneType</code>
+
+      </dd>
+<span title="None">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+None&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
+<a name="verbose"></a>
+<h3>verbose</h3>
+<dl>
+  <dt></dt>
+  <dd>
+    <dl>
+      <dt><b>Type:</b></dt>
+      <dd>
+          <code>int</code>
+
+      </dd>
+<span title="0">      <dt><b>Value:</b></dt>
+      <dd><table><tr><td>
+<pre class="variable">
+0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</pre>
+        </td></tr></table></dd>
+</span>    </dl>
+  </dd>
+</dl></td></tr></table>
+<br />
+
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+  <tr>
+    <td align="left"><font size="-2">Generated by Epydoc 2.0 on Sun Jun 27 12:36:56 2004</font></td>
+    <td align="right"><a href="http://epydoc.sourceforge.net"
+                      ><font size="-2">http://epydoc.sf.net</font></a></td>
+  </tr>
+</table>
+</body>
+</html>

+ 291 - 0
doc/api/public/bison.ParserEngine-class.html

@@ -0,0 +1,291 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>bison.ParserEngine</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <font size="-1"><b class="breadcrumbs">
+        <a href="bison-module.html">Module&nbsp;bison</a> ::
+        Class&nbsp;ParserEngine
+      </b></font></br>
+    </td>
+    <td><table cellpadding="0" cellspacing="0">
+      <tr><td align="right"><font size="-2">[<a href="../private/bison.ParserEngine-class.html">show&nbsp;private</a>&nbsp;|&nbsp;hide&nbsp;private]</font></td></tr>
+      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="bison.ParserEngine-class.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
+    </table></td>
+</tr></table>
+
+<!-- =========== START OF CLASS DESCRIPTION =========== -->
+<h2 class="class">Class ParserEngine</h2>
+
+<pre class="base-tree">
+<a href="__builtin__.object-class.html"><code>object</code></a> --+
+         |
+        <b>ParserEngine</b>
+</pre><br />
+
+<hr/>
+
+<p>Wraps the interface to the binary bison/lex-generated parser engine 
+dynamic library.</p>
+<p>You shouldn't need to deal with this at all.</p>
+Takes care of:
+<ul>
+  <li>
+    building the library (if the parser rules have changed)
+  </li>
+  <li>
+    loading the library and extracting the parser entry point
+  </li>
+  <li>
+    calling the entry point
+  </li>
+  <li>
+    closing the library
+  </li>
+</ul>
+Makes direct calls to the platform-dependent routines in 
+bisondynlib-[linux|windows].c
+<hr/>
+
+
+<!-- =========== START OF METHOD SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Method Summary</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.ParserEngine-class.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__init__(...) initializes x; see x.__class__.__doc__ for 
+signature</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.ParserEngine-class.html#__del__" class="summary-sig-name"><code>__del__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+Clean up and bail</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.ParserEngine-class.html#buildLib" class="summary-sig-name"><code>buildLib</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+Creates the parser engine lib</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.ParserEngine-class.html#closeLib" class="summary-sig-name"><code>closeLib</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+Does the necessary cleanups and closes the parser library</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.ParserEngine-class.html#openCurrentLib" class="summary-sig-name"><code>openCurrentLib</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+Tests if library exists and is current.</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.ParserEngine-class.html#openLib" class="summary-sig-name"><code>openLib</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+Loads the parser engine's dynamic library, and extracts the following 
+symbols:</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="bison.ParserEngine-class.html#runEngine" class="summary-sig-name"><code>runEngine</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+Runs the binary parser engine, as loaded from the lib</td></tr>
+<tr bgcolor="#e8f0f8" class="group">
+  <th colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;Inherited from object</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__delattr__" class="summary-sig-name"><code>__delattr__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__delattr__('name') &lt;==&gt; del x.name</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__getattribute__" class="summary-sig-name"><code>__getattribute__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__getattribute__('name') &lt;==&gt; x.name</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__hash__" class="summary-sig-name"><code>__hash__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
+<br />
+x.__hash__() &lt;==&gt; hash(x)</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__reduce__" class="summary-sig-name"><code>__reduce__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+helper for pickle</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__reduce_ex__" class="summary-sig-name"><code>__reduce_ex__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+helper for pickle</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__repr__" class="summary-sig-name"><code>__repr__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
+<br />
+x.__repr__() &lt;==&gt; repr(x)</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__setattr__" class="summary-sig-name"><code>__setattr__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+x.__setattr__('name', value) &lt;==&gt; x.name = value</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.object-class.html#__str__" class="summary-sig-name"><code>__str__</code></a>(<span class=summary-sig-arg>x</span>)</span></code>
+<br />
+x.__str__() &lt;==&gt; str(x)</td></tr>
+<tr bgcolor="#e8f0f8" class="group">
+  <th colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;Inherited from type</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="__builtin__.type-class.html#__new__" class="summary-sig-name"><code>__new__</code></a>(<span class=summary-sig-arg>T</span>,
+          <span class=summary-sig-arg>S</span>,
+          <span class="summary-sig-vararg">...</span>)</span></code>
+<br />
+T.__new__(S, ...) -&gt; a new object with type S, a subtype of T</td></tr>
+</table><br />
+
+
+<!-- =========== START OF METHOD DETAILS =========== -->
+<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="details">
+  <th colspan="2">Method Details</th></tr>
+</table>
+
+<a name="__init__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-vararg">...</span>)</span>
+    <br /><i>(Constructor)</i>
+  </h3>
+  x.__init__(...) initializes x; see x.__class__.__doc__ for 
+  signature
+  <dl><dt></dt><dd>
+    <dl><dt><b>Overrides:</b></dt>
+      <dd><a href="__builtin__.object-class.html#__init__"><code>__builtin__.object.__init__</code></a></dd>
+    </dl>
+  </dd></dl>
+</td></tr></table>
+
+<a name="__del__"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">__del__</span>(<span class="sig-vararg">...</span>)</span>
+    <br /><i>(Destructor)</i>
+  </h3>
+  Clean up and bail
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="buildLib"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">buildLib</span>(<span class="sig-vararg">...</span>)</span>
+  </h3>
+  <p>Creates the parser engine lib</p>
+  This consists of:
+  <ol start="1">
+    <li>
+      Ripping the tokens list, precedences, start target, handler 
+      docstrings and lex script from this Parser instance's attribs and 
+      methods
+    </li>
+    <li>
+      Creating bison and lex files
+    </li>
+    <li>
+      Compiling bison/lex files to C
+    </li>
+    <li>
+      Compiling the C files, and link into a dynamic lib
+    </li>
+  </ol>
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="closeLib"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">closeLib</span>(<span class="sig-vararg">...</span>)</span>
+  </h3>
+  Does the necessary cleanups and closes the parser library
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="openCurrentLib"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">openCurrentLib</span>(<span class="sig-vararg">...</span>)</span>
+  </h3>
+  <p>Tests if library exists and is current. If not, builds a fresh 
+  one</p>
+  Opens the library
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="openLib"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">openLib</span>(<span class="sig-vararg">...</span>)</span>
+  </h3>
+  Loads the parser engine's dynamic library, and extracts the 
+  following symbols:
+  <ul>
+    <li>
+      void *do_parse() (runs parser)
+    </li>
+    <li>
+      char *parserHash (contains hash of python parser rules)
+    </li>
+  </ul>
+  <p>Returns lib handle, plus pointer to do_parse() function, as long 
+  ints (which later need to be cast to pointers)</p>
+  Important note -this is totally linux-specific. If you want windows 
+  support, you'll have to modify these funcs to use glib instead (or 
+  create windows equivalents), in which case I'd greatly appreciate you 
+  sending me a patch.
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+
+<a name="runEngine"></a>
+<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
+  <h3><span class="sig"><span class="sig-name">runEngine</span>(<span class="sig-vararg">...</span>)</span>
+  </h3>
+  Runs the binary parser engine, as loaded from the lib
+  <dl><dt></dt><dd>
+  </dd></dl>
+</td></tr></table>
+<br />
+
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+  <tr>
+    <td align="left"><font size="-2">Generated by Epydoc 2.0 on Fri Apr 23 19:00:01 2004</font></td>
+    <td align="right"><a href="http://epydoc.sourceforge.net"
+                      ><font size="-2">http://epydoc.sf.net</font></a></td>
+  </tr>
+</table>
+</body>
+</html>

+ 97 - 0
doc/api/public/bison.ParserSyntaxError-class.html

@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>bison.ParserSyntaxError</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <font size="-1"><b class="breadcrumbs">
+        <a href="bison-module.html">Module&nbsp;bison</a> ::
+        Class&nbsp;ParserSyntaxError
+      </b></font></br>
+    </td>
+    <td><table cellpadding="0" cellspacing="0">
+      <tr><td align="right"><font size="-2">[<a href="../private/bison.ParserSyntaxError-class.html">show&nbsp;private</a>&nbsp;|&nbsp;hide&nbsp;private]</font></td></tr>
+      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="bison.ParserSyntaxError-class.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
+    </table></td>
+</tr></table>
+
+<!-- =========== START OF CLASS DESCRIPTION =========== -->
+<h2 class="class">Class ParserSyntaxError</h2>
+
+<pre class="base-tree">
+<a href="exceptions.Exception-class.html"><code>Exception</code></a> --+
+            |
+           <b>ParserSyntaxError</b>
+</pre><br />
+
+<hr/>
+
+
+<!-- =========== START OF METHOD SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Method Summary</th></tr>
+<tr bgcolor="#e8f0f8" class="group">
+  <th colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;Inherited from Exception</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="exceptions.Exception-class.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="exceptions.Exception-class.html#__getitem__" class="summary-sig-name"><code>__getitem__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><span class="summary-sig"><a href="exceptions.Exception-class.html#__str__" class="summary-sig-name"><code>__str__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code>
+</td></tr>
+</table><br />
+
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+  <tr>
+    <td align="left"><font size="-2">Generated by Epydoc 2.0 on Sun Jun 27 12:36:56 2004</font></td>
+    <td align="right"><a href="http://epydoc.sourceforge.net"
+                      ><font size="-2">http://epydoc.sf.net</font></a></td>
+  </tr>
+</table>
+</body>
+</html>

+ 97 - 0
doc/api/public/epydoc.css

@@ -0,0 +1,97 @@
+
+/* Body color */ 
+body               { background: #ffffff; color: #000000; } 
+ 
+/* Tables */ 
+table.summary, table.details, table.index
+                   { background: #e8f0f8; color: #000000; } 
+tr.summary, tr.details, tr.index
+                   { background: #70b0f0; color: #000000;  
+                     text-align: left; font-size: 120%; } 
+tr.group           { background: #c0e0f8; color: #000000;
+                     text-align: left; font-size: 120%;
+                     font-style: italic; } 
+
+/* Documentation page titles */
+h2.module          { margin-top: 0.2em; }
+h2.class           { margin-top: 0.2em; }
+ 
+/* Headings */
+h1.heading         { font-size: +140%; font-style: italic;
+                     font-weight: bold; }
+h2.heading         { font-size: +125%; font-style: italic;
+                     font-weight: bold; }
+h3.heading         { font-size: +110%; font-style: italic;
+                     font-weight: normal; }
+                    
+/* Base tree */
+pre.base-tree      { font-size: 80%; margin: 0; }
+
+/* Details Sections */
+table.func-details { background: #e8f0f8; color: #000000;
+                     border: 2px groove #c0d0d0;
+                     padding: 0 1em 0 1em; margin: 0.4em 0 0 0; }
+h3.func-detail     { background: transparent; color: #000000;
+                     margin: 0 0 1em 0; }
+
+table.var-details  { background: #e8f0f8; color: #000000;
+                     border: 2px groove #c0d0d0;
+                     padding: 0 1em 0 1em; margin: 0.4em 0 0 0; }
+h3.var-details     { background: transparent; color: #000000;
+                     margin: 0 0 1em 0; }
+
+/* Function signatures */
+.sig               { background: transparent; color: #000000;
+                     font-weight: bold; }  
+.sig-name          { background: transparent; color: #006080; }  
+.sig-arg, .sig-kwarg, .sig-vararg
+                   { background: transparent; color: #008060; }  
+.sig-default       { background: transparent; color: #602000; }  
+.summary-sig       { background: transparent; color: #000000; }  
+.summary-sig-name  { background: transparent; color: #204080; }
+.summary-sig-arg, .summary-sig-kwarg, .summary-sig-vararg
+                   { background: transparent; color: #008060; }  
+
+/* Doctest blocks */
+.py-src            { background: transparent; color: #000000; }
+.py-prompt         { background: transparent; color: #005050;
+                     font-weight: bold;}
+.py-string         { background: transparent; color: #006030; }
+.py-comment        { background: transparent; color: #003060; }
+.py-keyword        { background: transparent; color: #600000; }
+.py-output         { background: transparent; color: #404040; }
+pre.doctestblock   { background: #f4faff; color: #000000; 
+                     padding: .5em; margin: 1em;
+                     border: 1px solid #708890; }
+table pre.doctestblock
+                   { background: #dce4ec; color: #000000; 
+                     padding: .5em; margin: 1em;
+                     border: 1px solid #708890; }
+
+/* Variable values */
+pre.variable       { background: #dce4ec; color: #000000;
+                     padding: .5em; margin: 0;
+                     border: 1px solid #708890; }
+.variable-linewrap { background: transparent; color: #604000; }
+.variable-ellipsis { background: transparent; color: #604000; }
+.variable-quote    { background: transparent; color: #604000; }
+.re                { background: transparent; color: #000000; }
+.re-char           { background: transparent; color: #006030; }
+.re-op             { background: transparent; color: #600000; }
+.re-group          { background: transparent; color: #003060; }
+.re-ref            { background: transparent; color: #404040; }
+
+/* Navigation bar */ 
+table.navbar       { background: #a0c0ff; color: #0000ff;
+                     border: 2px groove #c0d0d0; }
+th.navbar          { background: #a0c0ff; color: #0000ff; } 
+th.navselect       { background: #70b0ff; color: #000000; } 
+.nomargin          { margin: 0; }
+
+/* Links */ 
+a:link             { background: transparent; color: #0000ff; }  
+a:visited          { background: transparent; color: #204080; }  
+a.navbar:link      { background: transparent; color: #0000ff; 
+                     text-decoration: none; }  
+a.navbar:visited   { background: transparent; color: #204080; 
+                     text-decoration: none; }  

+ 96 - 0
doc/api/public/exceptions.Exception-class.html

@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>exceptions.Exception</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <font size="-1"><b class="breadcrumbs">
+        Module&nbsp;exceptions ::
+        Class&nbsp;Exception
+      </b></font></br>
+    </td>
+    <td><table cellpadding="0" cellspacing="0">
+      <tr><td align="right"><font size="-2">[<a href="../private/exceptions.Exception-class.html">show&nbsp;private</a>&nbsp;|&nbsp;hide&nbsp;private]</font></td></tr>
+      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="exceptions.Exception-class.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
+    </table></td>
+</tr></table>
+
+<!-- =========== START OF CLASS DESCRIPTION =========== -->
+<h2 class="class">Class Exception</h2>
+
+<dl><dt><b>Known Subclasses:</b></dt>
+<dd>
+    <a href="bison.ParserSyntaxError-class.html"><code>ParserSyntaxError</code></a></dd></dl>
+
+<hr/>
+
+Common base class for all exceptions.
+<hr/>
+
+
+<!-- =========== START OF METHOD SUMMARY =========== -->
+<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="summary">
+  <th colspan="2">Method Summary</th></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><a name="__init__"></a><span class="summary-sig"><span class="summary-sig-name">__init__</span>(<span class="summary-sig-vararg">...</span>)</span></code>
+</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><a name="__getitem__"></a><span class="summary-sig"><span class="summary-sig-name">__getitem__</span>(<span class="summary-sig-vararg">...</span>)</span></code>
+</td></tr>
+<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
+  <td><code><a name="__str__"></a><span class="summary-sig"><span class="summary-sig-name">__str__</span>(<span class="summary-sig-vararg">...</span>)</span></code>
+</td></tr>
+</table><br />
+
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+  <tr>
+    <td align="left"><font size="-2">Generated by Epydoc 2.0 on Sun Jun 27 12:36:56 2004</font></td>
+    <td align="right"><a href="http://epydoc.sourceforge.net"
+                      ><font size="-2">http://epydoc.sf.net</font></a></td>
+  </tr>
+</table>
+</body>
+</html>

+ 13 - 0
doc/api/public/frames.html

@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
+<html>
+<head>
+  <title> PyBison API Reference </title>
+</head>
+<frameset cols="20%,80%">
+  <frameset rows="30%,70%">
+    <frame src="toc.html" name="moduleListFrame">
+    <frame src="toc-everything.html" name="moduleFrame">
+  </frameset>
+  <frame src="bison-module.html" name="mainFrame">
+</frameset>
+</html>

+ 236 - 0
doc/api/public/help.html

@@ -0,0 +1,236 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>Help</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th bgcolor="#70b0f0" class="navselect">&nbsp;&nbsp;&nbsp;Help&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+    </td>
+    <td><table cellpadding="0" cellspacing="0">
+      <tr><td align="right"><font size="-2">[<a href="../private/help.html">show&nbsp;private</a>&nbsp;|&nbsp;hide&nbsp;private]</font></td></tr>
+      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="help.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
+    </table></td>
+</tr></table>
+
+<center><h2> API Documentation </h2></center>
+
+<p> This document contains the API (Application Programming Interface)
+documentation for PyBison API Reference.  Documentation for the Python
+objects defined by the project is divided into separate pages for each
+package, module, and class.  The API documentation also includes two
+pages containing information about the project as a whole: a trees
+page, and an index page.  </p>
+
+<h2> Object Documentation </h2>
+
+  <p>Each <b>Package Documentation</b> page contains: 
+  <ul>
+    <li> A description of the package. </li>
+    <li> A list of the modules and sub-packages contained by the
+    package.  </li>
+    <li> A summary of the classes defined by the package. </li>
+    <li> A summary of the functions defined by the package. </li>
+    <li> A summary of the variables defined by the package. </li>
+    <li> A detailed description of each function defined by the
+    package. </li>
+    <li> A detailed description of each variable defined by the
+    package. </li>
+  </ul></p>
+  
+  <p>Each <b>Module Documentation</b> page contains:
+  <ul>
+    <li> A description of the module. </li>
+    <li> A summary of the classes defined by the module. </li>
+    <li> A summary of the functions defined by the module. </li>
+    <li> A summary of the variables defined by the module. </li>
+    <li> A detailed description of each function defined by the
+    module. </li>
+    <li> A detailed description of each variable defined by the
+    module. </li>
+  </ul></p>
+  
+  <p>Each <b>Class Documentation</b> page contains:
+  <ul>
+    <li> A class inheritance diagram. </li>
+    <li> A list of known subclasses. </li>
+    <li> A description of the class. </li>
+    <li> A summary of the methods defined by the class. </li>
+    <li> A summary of the instance variables defined by the class. </li>
+    <li> A summary of the class (static) variables defined by the
+    class. </li> 
+    <li> A detailed description of each method defined by the
+    class. </li>
+    <li> A detailed description of each instance variable defined by the
+    class. </li> 
+    <li> A detailed description of each class (static) variable defined
+    by the class. </li> 
+  </ul></p>
+
+<h2> Project Documentation </h2>
+
+  <p> The <b>Trees</b> page contains the module and class hierarchies:
+  <ul>
+    <li> The <i>module hierarchy</i> lists every package and module, with
+    modules grouped into packages.  At the top level, and within each
+    package, modules and sub-packages are listed alphabetically. </li>
+    <li> The <i>class hierarchy</i> lists every class, grouped by base
+    class.  If a class has more than one base class, then it will be
+    listed under each base class.  At the top level, and under each base
+    class, classes are listed alphabetically. </li>
+  </ul></p>
+  
+  <p> The <b>Index</b> page contains indices of terms and
+  identifiers: 
+  <ul>
+    <li> The <i>term index</i> lists every term indexed by any object's
+    documentation.  For each term, the index provides links to each
+    place where the term is indexed. </li>
+    <li> The <i>identifier index</i> lists the (short) name of every package,
+    module, class, method, function, variable, and parameter.  For each
+    identifier, the index provides a short description, and a link to
+    its documentation. </li>
+  </ul></p>
+
+<h2> The Table of Contents </h2>
+
+<p> The table of contents occupies the two frames on the left side of
+the window.  The upper-left frame displays the <i>project
+contents</i>, and the lower-left frame displays the <i>module
+contents</i>: </p>
+
+<center>
+<table class="summary" border="1" cellspacing="0" cellpadding="3">
+  <tr heigh="30%">
+    <td align="center">
+       <font size="-1">Project<br>Contents<hr>...</font></td>
+    <td align="center" rowspan="2" width="70%">
+      API<br>Documentation<br>Frame<br><br><br>
+    </td>
+  </tr>
+  <tr>
+    <td align="center">
+      <font size="-1">Module<br>Contents<hr>&nbsp;<br>...<br>&nbsp;</font>
+    </td>
+  </tr>
+</table><br>
+</center>
+
+<p> The <b>project contents frame</b> contains a list of all packages
+and modules that are defined by the project.  Clicking on an entry
+will display its contents in the module contents frame.  Clicking on a
+special entry, labeled "Everything," will display the contents of
+the entire project. </p>
+
+<p> The <b>module contents frame</b> contains a list of every
+submodule, class, type, exception, function, and variable defined by a
+module or package.  Clicking on an entry will display its
+documentation in the API documentation frame.  Clicking on the name of
+the module, at the top of the frame, will display the documentation
+for the module itself. </p>
+
+<p> The "<b>frames</b>" and "<b>no frames</b>" buttons below the top
+navigation bar can be used to control whether the table of contents is
+displayed or not. </p>
+
+<h2> The Navigation Bar </h2>
+
+<p> A navigation bar is located at the top and bottom of every page.
+It indicates what type of page you are currently viewing, and allows
+you to go to related pages.  The following table describes the labels
+on the navigation bar.  Note that not some labels (such as
+[Parent]) are not displayed on all pages. </p>
+
+<table class="summary" border="1" cellspacing="0" cellpadding="3" width="100%">
+<tr class="summary">
+  <th>Label</th>
+  <th>Highlighted when...</th>
+  <th>Links to...</th>
+</tr>
+  <tr><td valign="top"><b>[Parent]</b></td>
+      <td valign="top"><i>(never highlighted)</i></td>
+      <td valign="top"> the parent of the current package </td></tr>
+  <tr><td valign="top"><b>[Package]</b></td>
+      <td valign="top">viewing a package</td>
+      <td valign="top">the package containing the current object
+      </td></tr>
+  <tr><td valign="top"><b>[Module]</b></td>
+      <td valign="top">viewing a module</td>
+      <td valign="top">the module containing the current object
+      </td></tr> 
+  <tr><td valign="top"><b>[Class]</b></td>
+      <td valign="top">viewing a class </td>
+      <td valign="top">the class containing the current object</td></tr>
+  <tr><td valign="top"><b>[Trees]</b></td>
+      <td valign="top">viewing the trees page</td>
+      <td valign="top"> the trees page </td></tr>
+  <tr><td valign="top"><b>[Index]</b></td>
+      <td valign="top">viewing the index page</td>
+      <td valign="top"> the index page </td></tr>
+  <tr><td valign="top"><b>[Help]</b></td>
+      <td valign="top">viewing the help page</td>
+      <td valign="top"> the help page </td></tr>
+</table>
+
+<p> The "<b>show private</b>" and "<b>hide private</b>" buttons below
+the top navigation bar can be used to control whether documentation
+for private objects is displayed.  Private objects are usually defined
+as objects whose (short) names begin with a single underscore, but do
+not end with an underscore.  For example, "<code>_x</code>",
+"<code>__pprint</code>", and "<code>epydoc.epytext._tokenize</code>"
+are private objects; but "<code>re.sub</code>",
+"<code>__init__</code>", and "<code>type_</code>" are not.  However,
+if a module defines the "<code>__all__</code>" variable, then its
+contents are used to decide which objects are private. </p>
+
+<p> A timestamp below the bottom navigation bar indicates when each
+page was last updated. </p>
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th bgcolor="#70b0f0" class="navselect">&nbsp;&nbsp;&nbsp;Help&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+  <tr>
+    <td align="left"><font size="-2">Generated by Epydoc 2.0 on Sun Jun 27 12:36:56 2004</font></td>
+    <td align="right"><a href="http://epydoc.sourceforge.net"
+                      ><font size="-2">http://epydoc.sf.net</font></a></td>
+  </tr>
+</table>
+</body>
+</html>

+ 13 - 0
doc/api/public/index.html

@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
+<html>
+<head>
+  <title> PyBison API Reference </title>
+</head>
+<frameset cols="20%,80%">
+  <frameset rows="30%,70%">
+    <frame src="toc.html" name="moduleListFrame">
+    <frame src="toc-everything.html" name="moduleFrame">
+  </frameset>
+  <frame src="bison-module.html" name="mainFrame">
+</frameset>
+</html>

+ 239 - 0
doc/api/public/indices.html

@@ -0,0 +1,239 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>Index</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th bgcolor="#70b0f0" class="navselect">&nbsp;&nbsp;&nbsp;Index&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+    </td>
+    <td><table cellpadding="0" cellspacing="0">
+      <tr><td align="right"><font size="-2">[<a href="../private/indices.html">show&nbsp;private</a>&nbsp;|&nbsp;hide&nbsp;private]</font></td></tr>
+      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="indices.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
+    </table></td>
+</tr></table>
+<br />
+
+<!-- =========== START OF IDENTIFIER INDEX =========== -->
+<table class="index" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="index">
+  <th colspan="2">Identifier Index</th></tr>
+  <tr><td width="15%"><a href="__builtin__.object-class.html"><code>object</code></a></td>
+    <td>Class in module <code>__builtin__</code></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__bases__"><code>__bases__</code></a></td>
+    <td>Variable in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__basicsize__"><code>__basicsize__</code></a></td>
+    <td>Variable in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__call__"><code>__call__</code></a></td>
+    <td>Method in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html"><code>type</code></a></td>
+    <td>Class in module <code>__builtin__</code></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__cmp__"><code>__cmp__</code></a></td>
+    <td>Method in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.object-class.html#__delattr__"><code>__delattr__</code></a></td>
+    <td>Method in class <a href="__builtin__.object-class.html"><code>__builtin__.object</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__delattr__"><code>__delattr__</code></a></td>
+    <td>Method in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__dictoffset__"><code>__dictoffset__</code></a></td>
+    <td>Variable in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__flags__"><code>__flags__</code></a></td>
+    <td>Variable in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.object-class.html#__getattribute__"><code>__getattribute__</code></a></td>
+    <td>Method in class <a href="__builtin__.object-class.html"><code>__builtin__.object</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__getattribute__"><code>__getattribute__</code></a></td>
+    <td>Method in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html#__getitem__"><code>__getitem__</code></a></td>
+    <td>Method in class <a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#__getitem__"><code>__getitem__</code></a></td>
+    <td>Method in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="exceptions.Exception-class.html#__getitem__"><code>__getitem__</code></a></td>
+    <td>Method in class <a href="exceptions.Exception-class.html"><code>exceptions.Exception</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html#__getslice__"><code>__getslice__</code></a></td>
+    <td>Method in class <a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.object-class.html#__hash__"><code>__hash__</code></a></td>
+    <td>Method in class <a href="__builtin__.object-class.html"><code>__builtin__.object</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__hash__"><code>__hash__</code></a></td>
+    <td>Method in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.object-class.html#__init__"><code>__init__</code></a></td>
+    <td>Method in class <a href="__builtin__.object-class.html"><code>__builtin__.object</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonError-class.html#__init__"><code>__init__</code></a></td>
+    <td>Method in class <a href="bison.BisonError-class.html"><code>bison.BisonError</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html#__init__"><code>__init__</code></a></td>
+    <td>Method in class <a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#__init__"><code>__init__</code></a></td>
+    <td>Method in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="exceptions.Exception-class.html#__init__"><code>__init__</code></a></td>
+    <td>Method in class <a href="exceptions.Exception-class.html"><code>exceptions.Exception</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__itemsize__"><code>__itemsize__</code></a></td>
+    <td>Variable in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html#__iter__"><code>__iter__</code></a></td>
+    <td>Method in class <a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html#__len__"><code>__len__</code></a></td>
+    <td>Method in class <a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__mro__"><code>__mro__</code></a></td>
+    <td>Variable in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__name__"><code>__name__</code></a></td>
+    <td>Variable in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__new__"><code>__new__</code></a></td>
+    <td>Method in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__new__"><code>__new__</code></a></td>
+    <td>Method in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.object-class.html#__reduce__"><code>__reduce__</code></a></td>
+    <td>Method in class <a href="__builtin__.object-class.html"><code>__builtin__.object</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.object-class.html#__reduce_ex__"><code>__reduce_ex__</code></a></td>
+    <td>Method in class <a href="__builtin__.object-class.html"><code>__builtin__.object</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.object-class.html#__repr__"><code>__repr__</code></a></td>
+    <td>Method in class <a href="__builtin__.object-class.html"><code>__builtin__.object</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__repr__"><code>__repr__</code></a></td>
+    <td>Method in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html#__repr__"><code>__repr__</code></a></td>
+    <td>Method in class <a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.object-class.html#__setattr__"><code>__setattr__</code></a></td>
+    <td>Method in class <a href="__builtin__.object-class.html"><code>__builtin__.object</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__setattr__"><code>__setattr__</code></a></td>
+    <td>Method in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.object-class.html#__str__"><code>__str__</code></a></td>
+    <td>Method in class <a href="__builtin__.object-class.html"><code>__builtin__.object</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html#__str__"><code>__str__</code></a></td>
+    <td>Method in class <a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></td></tr>
+  <tr><td width="15%"><a href="exceptions.Exception-class.html#__str__"><code>__str__</code></a></td>
+    <td>Method in class <a href="exceptions.Exception-class.html"><code>exceptions.Exception</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__subclasses__"><code>__subclasses__</code></a></td>
+    <td>Method in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#__weakrefoffset__"><code>__weakrefoffset__</code></a></td>
+    <td>Variable in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="bison-module.html"><code>bison</code></a></td>
+    <td>Module</td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#bisonCFile"><code>bisonCFile</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#bisonCFile1"><code>bisonCFile1</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#bisonCmd"><code>bisonCmd</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#bisonEngineLibName"><code>bisonEngineLibName</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonError-class.html"><code>BisonError</code></a></td>
+    <td>Class in module <a href="bison-module.html"><code>bison</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#bisonFile"><code>bisonFile</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#bisonHFile"><code>bisonHFile</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#bisonHFile1"><code>bisonHFile1</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html"><code>BisonNode</code></a></td>
+    <td>Class in module <a href="bison-module.html"><code>bison</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html"><code>BisonParser</code></a></td>
+    <td>Class in module <a href="bison-module.html"><code>bison</code></a></td></tr>
+  <tr><td width="15%"><a href="bison-module.html#bisonToPython"><code>bisonToPython</code></a></td>
+    <td>Function in module <a href="bison-module.html"><code>bison</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html"><code>BisonNode</code></a></td>
+    <td>Class in module <a href="bison-module.html"><code>bison</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html#dump"><code>dump</code></a></td>
+    <td>Method in class <a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#error"><code>error</code></a></td>
+    <td>Method in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="exceptions.Exception-class.html"><code>Exception</code></a></td>
+    <td>Class in module <code>exceptions</code></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#file"><code>file</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#flexCFile"><code>flexCFile</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#flexCFile1"><code>flexCFile1</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#flexCmd"><code>flexCmd</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#flexFile"><code>flexFile</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#keepfiles"><code>keepfiles</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#last"><code>last</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#lasterror"><code>lasterror</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#loadxml"><code>loadxml</code></a></td>
+    <td>Method in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#loadxmldoc"><code>loadxmldoc</code></a></td>
+    <td>Method in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#loadxmlobj"><code>loadxmlobj</code></a></td>
+    <td>Method in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html#mro"><code>mro</code></a></td>
+    <td>Method in class <a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.object-class.html"><code>object</code></a></td>
+    <td>Class in module <code>__builtin__</code></td></tr>
+  <tr><td width="15%"><a href="bison.ParserSyntaxError-class.html"><code>ParserSyntaxError</code></a></td>
+    <td>Class in module <a href="bison-module.html"><code>bison</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#read"><code>read</code></a></td>
+    <td>Method in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison-module.html#reSpaces"><code>reSpaces</code></a></td>
+    <td>Variable in module <a href="bison-module.html"><code>bison</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#run"><code>run</code></a></td>
+    <td>Method in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html#toprettyxml"><code>toprettyxml</code></a></td>
+    <td>Method in class <a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#toprettyxml"><code>toprettyxml</code></a></td>
+    <td>Method in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html#toxml"><code>toxml</code></a></td>
+    <td>Method in class <a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#toxml"><code>toxml</code></a></td>
+    <td>Method in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html#toxmldoc"><code>toxmldoc</code></a></td>
+    <td>Method in class <a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#toxmldoc"><code>toxmldoc</code></a></td>
+    <td>Method in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+  <tr><td width="15%"><a href="bison.BisonNode-class.html#toxmlelem"><code>toxmlelem</code></a></td>
+    <td>Method in class <a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></td></tr>
+  <tr><td width="15%"><a href="__builtin__.type-class.html"><code>type</code></a></td>
+    <td>Class in module <code>__builtin__</code></td></tr>
+  <tr><td width="15%"><a href="bison.BisonParser-class.html#verbose"><code>verbose</code></a></td>
+    <td>Variable in class <a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></td></tr>
+</table>
+<br />
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th bgcolor="#70b0f0" class="navselect">&nbsp;&nbsp;&nbsp;Index&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+  <tr>
+    <td align="left"><font size="-2">Generated by Epydoc 2.0 on Sun Jun 27 12:36:56 2004</font></td>
+    <td align="right"><a href="http://epydoc.sourceforge.net"
+                      ><font size="-2">http://epydoc.sf.net</font></a></td>
+  </tr>
+</table>
+</body>
+</html>

+ 39 - 0
doc/api/public/toc-bison-module.html

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>bison</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<center><font size="+1"><b><a target="mainFrame" href="bison-module.html">bison</a></b></font></center>
+<hr>
+
+<!-- =========== START OF CLASSES =========== -->
+<font size="+1"><b>Classes</b></font><br />
+<a target="mainFrame" href="bison.BisonError-class.html">BisonError</a><br />
+<a target="mainFrame" href="bison.BisonNode-class.html">BisonNode</a><br />
+<a target="mainFrame" href="bison.BisonParser-class.html">BisonParser</a><br />
+<br />
+
+<!-- =========== START OF EXCEPTIONS =========== -->
+<font size="+1"><b>Exceptions</b></font><br />
+<a target="mainFrame" href="bison.ParserSyntaxError-class.html">ParserSyntaxError</a><br />
+<br />
+
+<!-- =========== START OF FUNCTIONS =========== -->
+<font size="+1"><b>Functions</b></font><br />
+<a target="mainFrame" href="bison-module.html#bisonToPython">bisonToPython</a><br />
+<br />
+
+<!-- =========== START OF VARIABLES =========== -->
+<font size="+1"><b>Variables</b></font><br />
+<a target="mainFrame" href="bison-module.html#reSpaces">reSpaces</a><br />
+<br />
+
+<hr>
+<font size="-2">[<a href="../private/toc-bison-module.html">show&nbsp;private</a>&nbsp;|&nbsp;hide&nbsp;private]</font>
+</body>
+</html>

+ 39 - 0
doc/api/public/toc-everything.html

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>Everything</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<center><font size="+1"><b>Everything</b></font></center>
+<hr>
+
+<!-- =========== START OF ALL CLASSES =========== -->
+<font size="+1"><b>All&nbsp;Classes</b></font><br />
+<a target="mainFrame" href="bison.BisonError-class.html">bison.BisonError</a><br />
+<a target="mainFrame" href="bison.BisonNode-class.html">bison.BisonNode</a><br />
+<a target="mainFrame" href="bison.BisonParser-class.html">bison.BisonParser</a><br />
+<br />
+
+<!-- =========== START OF ALL EXCEPTIONS =========== -->
+<font size="+1"><b>All&nbsp;Exceptions</b></font><br />
+<a target="mainFrame" href="bison.ParserSyntaxError-class.html">bison.ParserSyntaxError</a><br />
+<br />
+
+<!-- =========== START OF ALL FUNCTIONS =========== -->
+<font size="+1"><b>All&nbsp;Functions</b></font><br />
+<a target="mainFrame" href="bison-module.html#bisonToPython">bisonToPython</a><br />
+<br />
+
+<!-- =========== START OF ALL VARIABLES =========== -->
+<font size="+1"><b>All&nbsp;Variables</b></font><br />
+<a target="mainFrame" href="bison-module.html#reSpaces">reSpaces</a><br />
+<br />
+
+<hr>
+<font size="-2">[<a href="../private/toc-everything.html">show&nbsp;private</a>&nbsp;|&nbsp;hide&nbsp;private]</font>
+</body>
+</html>

+ 25 - 0
doc/api/public/toc.html

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>Table of Contents</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<center><font size="+1"><b>Table&nbsp;of&nbsp;Contents</b></font></center>
+<hr>
+<a target="moduleFrame" href="toc-everything.html">Everything</a><br />
+
+<!-- =========== START OF PACKAGES =========== -->
+<br /><font size="+1"><b>Packages</b></font><br />
+
+<!-- =========== START OF MODULES =========== -->
+<br /><font size="+1"><b>Modules</b></font><br />
+<a target="moduleFrame" href="toc-bison-module.html">bison</a><br />
+
+<br /><hr>
+<font size="-2">[<a href="../private/toc.html">show&nbsp;private</a>&nbsp;|&nbsp;hide&nbsp;private]</font>
+</body>
+</html>

+ 92 - 0
doc/api/public/trees.html

@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>Module and Class Hierarchies</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
+</head>
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th bgcolor="#70b0f0" class="navselect">&nbsp;&nbsp;&nbsp;Trees&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+    </td>
+    <td><table cellpadding="0" cellspacing="0">
+      <tr><td align="right"><font size="-2">[<a href="../private/trees.html">show&nbsp;private</a>&nbsp;|&nbsp;hide&nbsp;private]</font></td></tr>
+      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="trees.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
+    </table></td>
+</tr></table>
+
+<!-- =========== START OF MODULE HIERARCHY =========== -->
+<h2>Module Hierarchy</h2>
+<ul>
+<li> <b><a href="bison-module.html"><code>bison</code></a></b>: <i>Wrapper module for interfacing with Bison (yacc)</i>
+</ul>
+
+<!-- =========== START OF CLASS HIERARCHY =========== -->
+<h2>Class Hierarchy</h2>
+<ul>
+  <li> <b><a href="__builtin__.object-class.html"><code>__builtin__.object</code></a></b>: <i>
+The most base type</i>
+    <ul>
+  <li> <b><a href="bison.BisonParser-class.html"><code>bison.BisonParser</code></a></b>: <i>
+Base parser class</i>
+  <li> <b><a href="__builtin__.type-class.html"><code>__builtin__.type</code></a></b>: <i>
+type(object) -&gt; the object's type type(name, bases, dict) -&gt; a 
+new type</i>
+    </ul>
+  <li> <b><a href="bison.BisonError-class.html"><code>bison.BisonError</code></a></b>: <i>
+Flags an error to yyparse()</i>
+  <li> <b><a href="bison.BisonNode-class.html"><code>bison.BisonNode</code></a></b>: <i>
+Generic class for wrapping parse targets.</i>
+  <li> <b><a href="exceptions.Exception-class.html"><code>exceptions.Exception</code></a></b>: <i>
+Common base class for all exceptions.</i>
+    <ul>
+  <li> <b><a href="bison.ParserSyntaxError-class.html"><code>bison.ParserSyntaxError</code></a></b>
+    </ul>
+</ul>
+
+<!-- =========== START OF NAVBAR =========== -->
+<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="center">
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="bison-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+    <th class="navbar" align="right" width="100%">
+      <table border="0" cellpadding="0" cellspacing="0">
+      <tr><th class="navbar" align="center">
+        <p class="nomargin">
+          PyBison&nbsp;API&nbsp;Reference
+      </p></th></tr></table>
+    </th>
+  </tr>
+</table>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+  <tr>
+    <td align="left"><font size="-2">Generated by Epydoc 2.0 on Sun Jun 27 12:36:56 2004</font></td>
+    <td align="right"><a href="http://epydoc.sourceforge.net"
+                      ><font size="-2">http://epydoc.sf.net</font></a></td>
+  </tr>
+</table>
+</body>
+</html>

+ 138 - 0
doc/calc.py

@@ -0,0 +1,138 @@
+#!/usr/bin/env python
+"""
+A simple pybison parser program implementing a calculator
+"""
+import sys
+
+from bison import BisonParser, BisonNode
+
+class Parser(BisonParser):
+    """
+    Implements the calculator parser. Grammar rules are defined in the method docstrings.
+    Scanner rules are in the 'lexscript' attribute.
+    """
+    # ----------------------------------------------------------------
+    # lexer tokens - these must match those in your lex script (below)
+    # ----------------------------------------------------------------
+    tokens = ['NUMBER',
+              'PLUS', 'MINUS', 'TIMES', 'DIVIDE', 'POW',
+              'LPAREN', 'RPAREN',
+              'NEWLINE', 'QUIT']
+    
+    # ------------------------------
+    # precedences
+    # ------------------------------
+    precedences = (
+        ('left', ('MINUS', 'PLUS')),
+        ('left', ('TIMES', 'DIVIDE')),
+        ('left', ('NEG', )),
+        ('right', ('POW', )),
+        )
+    
+    # ------------------------------------------------------------------
+    # override default read method with a version that prompts for input
+    # ------------------------------------------------------------------
+    def read(self, nbytes):
+        try:
+            return raw_input("> ") + "\n"
+        except EOFError:
+            return ''
+    
+    # ---------------------------------------------------------------
+    # These methods are the python handlers for the bison targets.
+    # (which get called by the bison code each time the corresponding
+    # parse target is unambiguously reached)
+    #
+    # WARNING - don't touch the method docstrings unless you know what
+    # you are doing - they are in bison rule syntax, and are passed
+    # verbatim to bison to build the parser engine library.
+    # ---------------------------------------------------------------
+    
+    # Declare the start target here (by name)
+    start = "input"
+    
+    def on_input(self, target, option, names, values):
+        """
+        input :
+              | input line
+        """
+        return
+    
+    def on_line(self, target, option, names, values):
+        """
+        line : NEWLINE
+             | exp NEWLINE
+        """
+        if option == 1:
+            print values[0]
+    
+    def on_exp(self, target, option, names, values):
+        """
+        exp : NUMBER
+            | exp PLUS exp
+            | exp MINUS exp
+            | exp TIMES exp
+            | exp DIVIDE exp
+            | MINUS exp %prec NEG
+            | exp POW exp
+            | LPAREN exp RPAREN
+        """
+        #print "on_exp: got %s %s %s %s" % (target, option, names, values)
+        if option == 0:
+            return float(values[0])
+        elif option == 1:
+            return values[0] + values[2]
+        elif option == 2:
+            return values[0] - values[2]
+        elif option == 3:
+            return values[0] * values[2]
+        elif option == 4:
+            return values[0] / values[2]
+        elif option == 5:
+            return - values[1]
+        elif option == 6:
+            return values[0] ** values[2]
+        elif option == 7:
+            return values[1]
+    
+    # -----------------------------------------
+    # raw lex script, verbatim here
+    # -----------------------------------------
+    lexscript = r"""
+    %{
+    //int yylineno = 0;
+    #include <stdio.h>
+    #include <string.h>
+    #include "Python.h"
+    #define YYSTYPE void *
+    #include "tokens.h"
+    extern void *py_parser;
+    extern void (*py_input)(PyObject *parser, char *buf, int *result, int max_size);
+    #define returntoken(tok) yylval = PyString_FromString(strdup(yytext)); return (tok);
+    #define YY_INPUT(buf,result,max_size) { (*py_input)(py_parser, buf, &result, max_size); }
+    %}
+    
+    %%
+    
+    [0-9]+ { returntoken(NUMBER); }
+    "("    { returntoken(LPAREN); }
+    ")"    { returntoken(RPAREN); }
+    "+"    { returntoken(PLUS); }
+    "-"    { returntoken(MINUS); }
+    "*"    { returntoken(TIMES); }
+    "**"   { returntoken(POW); }
+    "/"    { returntoken(DIVIDE); }
+    "quit" { printf("lex: got QUIT\n"); yyterminate(); returntoken(QUIT); }
+    
+    [ \t\v\f]             {}
+    [\n]		{yylineno++; returntoken(NEWLINE); }
+    .       { printf("unknown char %c ignored, yytext=0x%lx\n", yytext[0], yytext); /* ignore bad chars */}
+    
+    %%
+    
+    yywrap() { return(1); }
+    """
+
+if __name__ == '__main__':
+    p = Parser()
+    p.run()

+ 161 - 0
doc/index.html

@@ -0,0 +1,161 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <title>PyBison - Python-based Parsing at the Speed of C</title>
+  </head>
+  <body>
+    <center>
+      <script type="text/javascript"><!--
+        google_ad_client = "pub-0243656465094951";
+        google_ad_width = 728;
+        google_ad_height = 90;
+        google_ad_format = "728x90_as";
+        google_ad_channel ="";
+        google_color_border = "DDB7BA";
+        google_color_bg = "FFF5F6";
+        google_color_link = "0000CC";
+        google_color_url = "008000";
+        google_color_text = "6F6F6F";
+        //--></script>
+      <script type="text/javascript"
+        src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
+      </script>
+    </center>
+
+
+<center>Return to <a href="http://www.freenet.org.nz/python">David's Python Resources</a></center
+
+<h1>PyBison - Python-based Parsing at the Speed of C</h1>
+
+<hr>
+
+<h2>Getting PyBison</h2>
+
+<blockquote>
+
+License: GPL
+<small><i>(but we will consider applications for licenses for
+commercial non-open-source deployment)</i></small>
+<ul>
+  <li>Download PyBison - 
+<a href="http://www.freenet.org.nz/python/pybison/pybison-0.1.8.tar.gz">pybison-0.1.8.tar.gz</a>
+      </li>
+  <li>See an <a href="calc.py">Example that implements a simple calculator</a></li>
+  <li>Read the <a href="walkthrough.html">PyBison Walkthrough Tutorial</a></li>
+  <li>Peruse the <a href="api/index.html">PyBison API Reference</a></li>
+  <li>View the <a href="CHANGELOG.txt">Change Log</a></li>
+</ul>
+
+</blockquote>
+
+<hr>
+<h2>Introduction</h2>
+
+<blockquote>
+
+PyBison is a Python binding to the Bison (yacc) and Flex (lex) parser-generator
+utilities.<br>
+<br>
+It allows parsers to be quickly and easily developed as Python class
+declarations, and for these parsers to take advantage of the fast and
+powerful C-based Bison/Flex.<br>
+<br>
+Users write a subclass of a basic Parser object, containing a set of methods
+and attributes specifying the grammar and lexical analysis rules, and taking
+callbacks for providing parser input, and receiving parser target events.<br>
+<br>
+Presently, PyBison is only working on Linux (and possibly *BSD-based) systems.
+However, in time, (or if someone volunteers to help out with probably 2 hours'
+coding for a small shim layer) it's very possible PyBison will work on Windows
+as well.<br>
+<br>
+
+</blockquote>
+
+<hr>
+
+<h2>Features</h2>
+
+<blockquote>
+
+<ul>
+  <li>Runs at near the speed of C-based parsers, due to direct hooks into bison-generated C code</li>
+  <li>Full LALR(1) grammar support</li>
+  <li>Includes a utility to convert your legacy grammar (.y) and scanner (.l) scripts into
+      python modules compatible with PyBison</li>
+  <li>Easy to understand - the walkthrough and the examples will have you writing your
+      own parsers in minutes</li>
+  <li>Comfortable and intuitive callback mechanisms</li>
+  <li>Can export parse tree to XML with a simple method call
+      <b><i style="color:#800000">(New!)</i></b></li>
+  <li>Can reconstitute a parse tree from XML <b><i style="color:#800000">(New!)</i></b></li>
+  <li>Examples include working parsers for the languages:
+      <ul>
+        <li>ANSI C</li>
+        <li>Java (1.4.2)</li>
+      </ul>
+      </li>
+</ul>
+
+
+</blockquote>
+
+
+<h2>Comparison to Other Python Parsers</h2>
+
+<blockquote>
+
+This comparison is probably very biased, since it's written by the author
+of PyBison. However, it should help you to decide whether PyBison is for you.<br>
+<br>
+
+All the other Python-based parser-construction toolkits I've seen work
+in pure Python. While this offers conveniences such as not requiring binary compilation,
+and eliminating dependencies on third-party libraries and other software, it can
+incur a savage performance penalty.<br>
+<br>
+
+I've seen some Python parser frameworks which use an idiosyncratic syntax, which I
+couldn't (or wouldn't) comfortably relate to, especially since I have a background
+of developing large yacc-based packages. In particular, I wanted to build my
+parser in genuine Python source files, rather than embedding Python code into
+a different script language.<br>
+<br>
+
+On the other hand, I found the PLY parser framework to be much more comfortably
+Pythonic, in that targets are mapped to class methods. However, I ran into a
+couple of problems with PLY, namely:
+<ul>
+  <li>speed - PLY could be very slow with generating the parse tables, and
+      with parsing its input</li>
+  <li>capacity - due to its use of named-match regular expressions (and the
+      underlying Python limitation), the lexical analysis is limited to a
+      vocabulary of 100 unique token types - insufficient for large modern
+      languages.</li>
+  <li>model - PLY is limited to SLR parsing, whereas Bison does full LALR(1)</li>
+  <li>streaming - PLY's lexer requires the full input string to be made
+      available in one chunk, making it unsuitable for parsing streams of
+      unpredictable length, whereas Bison and Flex can work from a continuous
+      stream.
+</ul>
+
+With PyBison, I've opted for a system which:
+<ul>
+  <li>Extracts grammar and lexical analysis information from user-written
+      parser classes</li>
+  <li>Generates bison and flex sources, and converts these into C sources</li>
+  <li>Compiles these into a shared loadable library, which is re-usable with
+      subsequent parsing runs (and which gets automatically rebuilt if (by
+      virtue of hashing tests) any of the grammar, precedence, tokens or
+      lexing rules change</li>
+  <li>Uses Pyrex to interface with this library, calling its yyparse() routine
+      and taking callbacks for input requests and target fulfilment events</li>  
+</ul>
+The result is a parser toolkit with a Python front end and Python's luxurious
+comfort, ease of use, but with (most of) the speed and power of traditional
+bison/yacc-based parsers.
+</blockquote>
+
+  </body>
+</html>
+

+ 1036 - 0
doc/walkthrough.html

@@ -0,0 +1,1036 @@
+<!--@+leo-ver=4-->
+<!--@+node:@file doc/walkthrough.html-->
+<!--@@language html-->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <title>PyBison Walkthrough</title>
+  </head>
+  <body>
+    <!--@    @+others-->
+    <!--@+node:body-->
+    <center>Back to <a href="index.html">PyBison Homepage</a></center>
+    
+    <h1>PyBison Walkthrough</h1>
+    
+    <!--@+others-->
+    <!--@+node:intro-->
+    <h2>0. Introduction</h2>
+    This document aims to get you up to speed with PyBison in the fastest possible
+    time, by walking you through the motions of using it, and supporting the explanations
+    with an example.<br>
+    <br>
+    <blockquote><big>
+    NOTE - recent versions of flex violate the ANSI standards.<br>
+    <br>
+    If any of the pyBison examples fail to build, remove the following line from the lex code portion of your scripts:
+    <b><blockquote>int yylineno = 0;</blockquote></b>
+    
+    Also, make sure your system is capable of looking in the local directory when trying to load .so files. If you see any errors like <b>failed to load somefilename.so</b>, just add "." to <b>LD_LIBRARY_PATH</b>, or
+    execute the command:
+    <b><blockquote>export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.</blockquote></b>
+    
+    </big></blockquote>
+    
+    <hr>
+    
+    <!--@-node:intro-->
+    <!--@+node:1. procure grammar/scanner scripts-->
+    <h2>1. Procure Grammar and Scanner Scripts</h2>
+    
+    <blockquote>
+    
+    The best place to start in building your PyBison parser is to write a grammar (.y)
+    script, and a scanner (.l) script.<br>
+    <br>
+    (Or, if possible, source these scripts from other (open source) projects).<br>
+    <br>
+    Once you're familiar with the layout of PyBison parser python modules, you can
+    skip this step, and start building each new parser from scratch, or fram a template
+    (refer to the <b>examples/template</b> directory).
+    
+    <!--@+others-->
+    <!--@+node:1.1 introducing pybison-->
+    <h3>1.1. Introducing the bison2py Utility</h3>
+    <blockquote>
+    
+    bison2py munges your new (or legacy) grammar (.y) and scanner (.l) files, and
+    generates a new Python file containing classes and unit test code for your
+    PyBison parser.<br>
+    <br>
+    To see <b>bison2py</b> in action, go into the <b>examples/java</b> directory,
+    read the README file, and generate a <b>javaparser.py</b> file from <b>javaparser.y</b>
+    and <b>javaparser.l</b> scripts.<br>
+    <br>
+    Study the generated javaparser.py file - it's
+    especially useful from a point of view of seeing what's good to put into a pybison
+    python parser file, especially when writing your own.<br>
+    <br>
+    In fact, when starting a new parser project, you might like to start by writing <b>.y</b>
+    and <b>.l</b> files yourself, and repeatedly:
+    <ol>
+      <li>Edit these files</li>
+      <li>Generate a parser from them with bison2py</li>
+      <li>Test the parser rigorously against a whole range of inputs</li>
+      <li>Remove the grammar and scanner errors as you find them</li>
+      <li>Repeat these steps as often as needed till you have a bug-free parser and scanner</li>
+    </ol>
+    
+    We suggest you may have a far easier time if you ensure you have a bug-free parser
+    script before even <i>beginning</i> to edit your target handler and parse node methods.<br>
+    <br>
+    Once you've got a stable parser, you'll have a structure to work from. You'll then be free to
+    discard or archive your .y and .l files, and tweak the grammar and scanner
+    by editing the target handler docstrings and scanner script attributes, respectively.
+    
+    </blockquote>
+    <hr>
+    
+    
+    <!--@-node:1.1 introducing pybison-->
+    <!--@+node:1.2 prepare grammar file-->
+    <h3>1.2. Preparing Your Grammar File</h3>
+    <blockquote>
+    If you're using an existing .y file (perhaps sourced from another project),
+    you'll need to massage it a bit to get it into a state where you can process
+    it automatically with bison2py.<br>
+    <br>
+    In summary, you'll need to:
+    <ul>
+      <li>Eliminate actions and comments from rules section</li>
+      <li>Replace character literals in rules, with abstract tokens</li>
+      <li>Enclose all <b>:</b>, <b>|</b> and <b>;</b> rule delimiters in whitespace.</li>
+    </ul>
+    
+    <h4>1.2.1. Strip Out Comments and Actions</h4>
+    <blockquote>
+    With your grammar (.y) file, you'll need to strip out all action statements
+    and comments from the rules section.<br>
+    <br>
+    For instance, if you're using a legacy grammar file, you'll need to convert rules like:
+    <b>
+    <pre>
+        expr: expr PLUS expr
+                { $$ = $1 + $3; } /* add the numbers now */
+             |expr MINUS expr
+                { $$ = $1 - $3; }
+             ;</pre>
+    </b>
+    to:
+    <b><pre>
+        expr : expr PLUS expr
+           | expr MINUS expr
+           ;</pre></b>
+    or:
+    <b>
+      <pre>
+        expr
+        : expr PLUS expr
+        | expr MINUS expr
+        ;</pre>
+    </b>
+    depending on what style meets your taste.<br>
+    <br>
+    The reason for this is that your pybison script will receive callbacks every time a parse
+    target is reached, which is done by automatically appending special action code to each
+    rule clause. If you don't remove all action statements, the conversion will fail.
+    </blockquote>
+    
+    <h4>1.2.2. Replace All Character Literals in Rules</h4>
+    
+    <blockquote>
+    Within the PyBison-generated parser, all targets and tokens are rendered as Python
+    objects (for people familiar with the Python/C API, type <b>PyObject *</b>)<br>
+    <br>
+    Therefore, you unfortunately lose the convenience of being able to deal in C character
+    literals in your rules.<br>
+    <br>
+    For instance, with a rule like:
+    
+    <b><pre>
+        expr : expr '+' expr
+           | expr '-' expr
+           ;</pre></b>
+    
+    you'll have to replace the <b>'+'</b> and <b>'-'</b> char literals to abstract tokens,
+    and ensure that your scanner script returns Python-wrapped tokens for these operators.
+    You should end up with a rule like:
+    
+    <b><pre>
+        expr : expr PLUS expr
+           | expr MINUS expr
+           ;</pre></b>
+    
+    And you'll need to ensure your scanner script does a <b>returntoken(PLUS);</b>
+    and <b>returntoken(MINUS);</b> for <b>'+'</b> and <b>'-'</b> respectively.
+    </blockquote>
+    
+    <h4>1.2.3. Enclose Rule Delimiters in Whitespace</h4>
+    
+    <blockquote>
+    You need to ensure that the delimiters <b>:</b>, <b>|</b> and <b>;</b> delimiters used in
+    your rules have at least one whitespace character on either side. Sorry about this, but
+    this version of PyBison has some quirks in the regular expressions used for
+    extracting/dissecting the rules, and bison2py (or the resultant parser) may fail
+    if you don't follow this step.
+    </blockquote>
+    
+    
+    And also, you'll need to have a:
+    <blockquote><b>
+      %{
+      ...
+      %}
+    </b></blockquote>
+    section in the prologue (before the first <b>%%</b>).
+    </blockquote>
+    <hr>
+    
+    <!--@-node:1.2 prepare grammar file-->
+    <!--@+node:1.3 prepare lex file-->
+    <h3>1.3. Preparing Your Tokeniser File</h3>
+    <blockquote>
+    
+    In addition to parse targets callbacks, PyBison has an input callback, so your Parser
+    object will have control over the input that is sent to the lexer.<br>
+    <br>
+    You'll have to set up your tokeniser to use this callback mechanism, and also to wrap
+    tokens as Python objects.<br>
+    <br>
+    To set this up, ensure the following lines are in the C declarations sections of your
+    lex/flex script:
+    <b><pre>
+    %{
+    #include &lt;stdio.h&gt;
+    #include &lt;string.h&gt;
+    #include "Python.h"
+    #define YYSTYPE void *
+    #include "tokens.h"
+    extern void *py_parser;
+    extern void (*py_input)(PyObject *parser, char *buf, int *result, int max_size);
+    #define returntoken(tok) yylval = PyString_FromString(strdup(yytext)); return (tok);
+    #define YY_INPUT(buf,result,max_size) {(*py_input)(py_parser, buf, &result, max_size);}
+    }%</pre></b>
+    
+    <b>&lt;quick-diversion&gt;</b>
+    <small><blockquote>
+    Let's explain each of these lines now:
+    
+    <b><pre>
+    #include &lt;stdio.h&gt;
+    #include &lt;string.h&gt;
+    #include "Python.h"</pre></b>
+    Include the standard <b>stdio.h</b> and <b>string.h</b> headers, as well as the
+    Python-C API file <b>Python.h</b>.
+    
+    <b><pre>
+    #define YYSTYPE void *</pre></b>
+    
+    All parse targets and tokens are actually of type <b>PyObject *</b>, or 'pointer to
+    Python object', but neither bison nor flex-generated code need to know this. We'll
+    just give them opaque pointers, and <b>void *</b> will suffice just fine.
+    
+    <b><pre>
+    #include "tokens.h"</pre></b>
+    
+    When PyBison first instantiates any given parser class (and auto-generates, processes,
+    compiles, links the grammar/scanner files into a dynamic lib), the bison program generates
+    a header file of token definitions, which gets renamed to <b>tokens.h</b>. Your scanner
+    script will need this file, so the token macros will be defined and resolved to the correct
+    token numbers.
+    
+    <b><pre>
+    extern void (*py_input)(PyObject *parser, char *buf, int *result, int max_size);
+    extern void *py_parser;
+    #define YY_INPUT(buf,result,max_size) {(*py_input)(py_parser, buf, &result, max_size);}</pre></b>
+    
+    These lines activate the input callback mechanism. Whenever the scanner needs more input,
+    it will call a global function called <b>py_input()</b>, which forwards the callback to
+    your Python Parser's <b>.read(nbytes)</b> method.
+    
+    <blockquote>
+    Note that if you want your scanner to use a different source of input (eg, a live TCP socket
+    connection), you can override this method in your parser class, or pass a <b>read=myreadfunction</b>
+    keyword argument when instantiating your parser (<b>myreadfunction</b> should be a callable
+    accepting a single argument <b>nbytes</b>, being the maximum number of bytes to retrieve,
+    and returning a string).
+    </blockquote>
+    
+    <b><pre>
+    #define returntoken(tok) yylval = PyString_FromString(strdup(yytext)); return (tok);</pre></b>
+    
+    A macro which wraps all tokens values as Python strings, so your parser target handlers can uplift
+    the original input text which constitutes that token.
+    
+    </blockquote></small>
+    <b>&lt;/quick-diversion&gt;</b><br><br>
+    
+    Defining the <b>YY_INPUT</b> C macro tells flex to invoke a callback every time it needs
+    input, so your <b>Parser</b> class' <b>.read()</b> method will have control over what the
+    lexer receives.<br>
+    <br>
+    Now, you'll need to change all the <b>return</b> statements in your token targets to use
+    <b>returntoken()</b> instead. For example, change:
+    <blockquote>
+      <b>
+        "(" { return LPAREN; }<br>
+      </b>
+    </blockquote>
+    to:
+    <blockquote>
+      <b>
+        "(" { returntoken(LPAREN); }<br>
+      </b>
+    </blockquote>
+    
+    Lastly, in the epilogue of your lexer file (ie, after the second '%%' line), you'll need to add a line like:
+    <b><pre>
+    yywrap() { return(1); }
+    </pre></b>
+    
+    </blockquote>
+    
+    <hr>
+    
+    <!--@-node:1.3 prepare lex file-->
+    <!--@+node:1.4 do the conversion-->
+    <h3>1.4. Doing The Conversion</h3>
+    <blockquote>
+    
+    When you're sure you've got your .y and .l files prepared properly, you can generate
+    the .py file, which will contain your pyBison <b>Parser</b> class.<br>
+    <br>
+    To do this conversion, run the command:
+    <blockquote>
+      <b>bison2py mybisonfile.y myflexfile.l mypythonfile.py</b>
+    </blockquote>
+    where <b>mybisonfile.y</b> is your grammar file, with bison/yacc declarations,
+    <b>myflexfile.l</b> is your tokeniser script, with flex/lex declarations, and
+    <b>mypythonfile.py</b> is the name of the python file you want to generate.<br>
+    <br>
+    You should now see a file <b>mypythonfile.py</b> which contains a couple of import
+    statements, plus a declaration of a class called <b>Parser</b>.
+    
+    <blockquote>
+    If your grammar is large and complex, you should consider adding a <b>-c</b>
+    argument to the bison2py command.<br>
+    <br>
+    This will cause the <b>mypythonfile.py</b> file to be generated with a bunch
+    of parse node subclasses, one per parse target, and with each grammar target
+    handler method instantiating its respective parse node class, rather
+    than the default pybison.BisonNode class.<br>
+    <br>
+    Also, it'll generate a <b>ParseNode</b> class (derived from <b>pybison.BisonNode</b>,
+    from which all these target-specific node classes are derived.
+    <br>
+    This can be extremely handy, because you can add a bunch of methods to the
+    ParseNode class, and optionally override these in your per-target node classes. Also,
+    override the constructor and/or the existing .dump() method in this class or
+    the per-target classes.<br>
+    
+    </blockquote>
+    
+    </blockquote>
+    
+    <!--@-node:1.4 do the conversion-->
+    <!--@-others-->
+    
+    </blockquote>
+    
+    <hr>
+    
+    
+    
+    <!--@-node:1. procure grammar/scanner scripts-->
+    <!--@+node:2. prepare parser class-->
+    <a name="chap2">
+    
+    <h2>2. Prepare Your Parser Class</h2>
+    
+    <blockquote>
+    
+    Now, we focus on creation of a working parser.<br>
+    <br>
+    Note here that we will be creating the parser .py file by hand from
+    scratch - not the preferred approach, but chosen here as an alternative
+    to deriving a parser module boilerplate as discussed in the previous chapter.<br>
+    <br>
+    To make this easy, we will use
+    a simple calculator example.<br>
+    <br>
+    Create a new python file, perhaps <b>mycalc.py</b>, and follow these steps:<br>
+    
+    <hr>
+    
+    <!--@+others-->
+    <!--@+node:2.1. required imports-->
+    <h3>2.1. Required Imports</h3>
+    <blockquote>
+    
+    You will need at least the following imports:
+    <blockquote>
+        <b>from bison import BisonParser, BisonNode</b>
+    </blockquote>
+    
+    <b>BisonParser</b> is the base class from which you derive your own
+    Parser class.<br>
+    <br>
+    
+    <b>BisonNode</b> is a convenient wrapper for containing the contents
+    of parse targets, and can assist you in building your parse tree.<br>
+    <br>
+    
+    </blockquote>
+    
+    <hr>
+    
+    
+    <!--@-node:2.1. required imports-->
+    <!--@+node:2.2. devise your grammar-->
+    <h3>2.2. Devise Your Grammar</h3>
+    
+    <blockquote>
+    
+    We'll base our example on the Calculator example from the standard bison/yacc manual.
+    Note that we won't use exactly the same token names:
+    <b>
+    <pre>
+    %token NUM
+    %left '-' '+'
+    %left '*' '/'
+    %left NEG     /* negation--unary minus */
+    %right '^'    /* exponentiation        */
+    
+    /* Grammar follows */
+    %%
+    input:    /* empty string */
+            | input line
+    ;
+    
+    line:     '\n'
+            | exp '\n'  { printf ("\t%.10g\n", $1); }
+    ;
+    
+    exp:      NUM                { $$ = $1;         }
+            | exp '+' exp        { $$ = $1 + $3;    }
+            | exp '-' exp        { $$ = $1 - $3;    }
+            | exp '*' exp        { $$ = $1 * $3;    }
+            | exp '/' exp        { $$ = $1 / $3;    }
+            | '-' exp  %prec NEG { $$ = -$2;        }
+            | exp '^' exp        { $$ = pow ($1, $3); }
+            | '(' exp ')'        { $$ = $2;         }
+    ;
+    </pre>
+    </b>
+    
+    However, in PyBison, you don't dump all this into a script - you declare the
+    grammar items one by one in methods of your class.
+    
+    </blockquote>
+    
+    <hr>
+    <!--@-node:2.2. devise your grammar-->
+    <!--@+node:2.3. skeleton class-->
+    <h3>2.3. Create Skeleton Parser Class</h3>
+    
+    <blockquote>
+    
+    In your calc.py file, you've already done the required imports, so
+    now you can create your skeleton class declaration:
+    
+    <b><blockquote><pre>
+    class Parser(BisonParser):
+    
+        pass
+    </pre></blockquote></b>
+    
+    </blockquote>
+    
+    <hr>
+    
+    <!--@-node:2.3. skeleton class-->
+    <!--@+node:2.4. declare tokens-->
+    <h3>2.4. Declare the Tokens</h3>
+    
+    <blockquote>
+    
+    Now, it's time to declare our tokens. To do this, we add to our class an attribute
+    called <b>tokens</b> which contains a list of our tokens.<br>
+    <br>
+    Our class now looks like this:
+    <b>
+    <blockquote>
+    <pre style="color: #808080">
+    class Parser(BisonParser):</pre>
+    <pre>
+        tokens = ['NUMBER',
+                  'PLUS', 'MINUS', 'TIMES', 'DIVIDE', 'POW',
+                  'LPAREN', 'RPAREN',
+                  'NEWLINE', 'QUIT',
+                  ]
+    </pre>
+    </blockquote>
+    </b>
+    
+    
+    </blockquote>
+    
+    <hr>
+    
+    <!--@-node:2.4. declare tokens-->
+    <!--@+node:2.5. declare precedences-->
+    <h3>2.5. Declare the Precedences</h3>
+    
+    <blockquote>
+    
+    To resolve ambiguities in our grammar, we need to declare which entities
+    have precedence, and the associativity (left/right) of these entities.<br>
+    <br>
+    We adapt this from the example, and add it as an attribute <b>precedences</b>.<br>
+    <br>
+    Our class now looks like this:
+    
+    <b><pre style="color: #808080">
+    class Parser(BisonParser):
+    
+        tokens = ['NUMBER',
+                  'PLUS', 'MINUS', 'TIMES', 'DIVIDE', 'POW',
+                  'LPAREN', 'RPAREN',
+                  'NEWLINE', 'QUIT',
+                  ]</pre>
+    <pre>
+        precedences = (
+            ('left', ('MINUS', 'PLUS')),
+            ('left', ('TIMES', 'DIVIDE')),
+            ('left', ('NEG', )),
+            ('right', ('POW', )),
+            )</pre></b>
+    
+    </blockquote>
+    
+    <hr>
+    
+    <!--@-node:2.5. declare precedences-->
+    <!--@+node:2.6. declare the start symbol-->
+    <h3>2.6. Declare the Start Symbol</h3>
+    
+    <blockquote>
+    
+    As you can see from studying the grammar above, the topmost
+    entity is <b>line</b>. We need to tell PyBison to use this,
+    by adding an attribute called <b>start</b>.
+    <br>
+    Our class now looks like this:
+    <b><pre style="color: #808080">
+    class Parser(BisonParser):
+    
+        tokens = ['NUMBER',
+                  'PLUS', 'MINUS', 'TIMES', 'DIVIDE', 'POW',
+                  'LPAREN', 'RPAREN',
+                  'NEWLINE', 'QUIT',
+                  ]
+    
+        precedences = (
+            ('left', ('MINUS', 'PLUS')),
+            ('left', ('TIMES', 'DIVIDE')),
+            ('left', ('NEG', )),
+            ('right', ('POW', )),
+            )</pre>
+    <pre>
+        start = 'input'</pre></b>
+    
+    </blockquote>
+    
+    <hr>
+    
+    <!--@-node:2.6. declare the start symbol-->
+    <!--@+node:2.7. add rules callbacks-->
+    <h3>2.7. Add Rules Callbacks</h3>
+    
+    <blockquote>
+    
+    This is the fun part. We add a method to our class for each of
+    the parse targets.<br>
+    <br>
+    For each parse target <b>sometarget</b>, we need to provide a method
+    called:
+    <b><blockquote><pre>on_sometarget(self, target, option, names, items)</pre></blockquote></b>
+    Each such callback method accepts the arguments:
+    <ul>
+      <li><b>target</b> - string - the name of the target - passed in mainly as
+          a convenience for when you're debugging your grammar.
+          </li>
+    
+      <li><b>option</b> - int - a numerical index indicating which 'clause' matched
+          the target. For example, given a rule:
+          <b><pre>
+            exp : NUMBER
+                | exp PLUS exp
+                | exp MINUS exp</pre></b>
+          If we have matched the expression <b>3 + 6</b>, the <b>option</b> argument
+          will be 1, because the clause <b>exp PLUS exp</b> occurs at position 1
+          in the list of rule clauses.</li>
+      
+      <li><b>names</b> - list of strings, being names of the terms in the matching clause.
+          For example, with the above rule, the expression <b>3 + 6</b> would produce a
+          names list <b>['exp', 'PLUS', 'exp']</b></li>
+    
+      <li><b>items</b> - list - a list of objects, being the values of the items in the
+          matching clause. Each item of this list will (in the case of token
+          matches), be a literal string of the token, or (in the case of previously
+          handled parse targets), whatever your parse target handler happened to
+          return previously. For instance, in the <b>3 + 6</b> example, assuming your <b>on_exp()</b>
+          handler returns a float value, this list would be <b>[3.0, '+', 6.0]</b></li>
+    </ul>
+    
+    We must now note a major difference from traditional yacc/bison. In yacc/bison, we
+    provide <b>{ action-stmts;... }</b> action blocks after each rule clause. But with
+    pyBison, the one parse target callback handles all possible clauses for that target.
+    The <b>option</b> argument indicates which clause actually matched.<br>
+    <br>
+    Now, with this explanation out of the way, we can get down to the business of actually
+    writing our callbacks.<br>
+    <br>
+    Our class now looks like:
+    
+    <b><pre style="color: #808080">
+    class Parser(BisonParser):
+    
+        tokens = ['NUMBER',
+                  'PLUS', 'MINUS', 'TIMES', 'DIVIDE', 'POW',
+                  'LPAREN', 'RPAREN',
+                  'NEWLINE', 'QUIT',
+                  ]
+    
+        precedences = (
+            ('left', ('MINUS', 'PLUS')),
+            ('left', ('TIMES', 'DIVIDE')),
+            ('left', ('NEG', )),
+            ('right', ('POW', )),
+            )
+    
+        start = 'input'</pre>
+    <pre>
+        def on_input(self, target, option, names, items):
+            """
+            input :
+                  | input line
+            """
+            return
+    
+        def on_line(self, target, option, names, items):
+            """
+            line : NEWLINE
+                 | exp NEWLINE
+            """
+            if option == 1:
+                print "on_line: got exp %s" % items[0]
+    
+        def on_exp(self, target, option, names, items):
+            """
+            exp : NUMBER
+                | exp PLUS exp
+                | exp MINUS exp
+                | exp TIMES exp
+                | exp DIVIDE exp
+                | MINUS exp %prec NEG
+                | exp POW exp
+                | LPAREN exp RPAREN
+            """
+            if option == 0:
+                return float(items[0])
+            elif option == 1:
+                return items[0] + items[2]
+            elif option == 2:
+                return items[0] - items[2]
+            elif option == 3:
+                return items[0] * items[2]
+            elif option == 4:
+                return items[0] / items[2]
+            elif option == 5:
+                return - items[1]
+            elif option == 6:
+                return items[0] ** items[2]
+            elif option == 7:
+                return items[1]
+    </pre></b>
+    
+    Note one important thing here - the rules, declared in our docstrings, are <b>not</b> terminated
+    by a semicolon. This is not needed (as in traditional yacc), because the rules
+    are separated into separate handler method docstrings, rather than being lumped in together.<br>
+    <br>
+    So don't put a semicolon in your grammar rule docstrings, or Bad Things might happen.
+    
+    </blockquote>
+    
+    <hr>
+    
+    <!--@-node:2.7. add rules callbacks-->
+    <!--@+node:2.8. add flex script-->
+    <h3>2.8. Add Flex Script</h3>
+    
+    <blockquote>
+    
+    Finally, we must tell pyBison how to carve up the input into tokens.<br>
+    <br>
+    Instead of having a separate flex or lex script, we embed the script
+    verbatim as attribute <b>lexscript</b>.<br>
+    <br>
+    <b>NOTE</b> - you should provide this script as a Python raw string (<b>r"""</b>)<br>
+    <br>
+    We'll use here a simple flex script which simply recognises numbers, the '+',
+    '-', '*', '/', '**' operators, and parentheses.<br>
+    <br>
+    For our lexer to work, it will need a C declarations section with the magic lines:
+    
+    <b><pre>
+    %{
+    int yylineno = 0;
+    #include &lt;stdio.h&gt;
+    #include &lt;string.h&gt;
+    #include "Python.h"
+    #define YYSTYPE void *
+    #include "tokens.h"
+    extern void *py_parser;
+    extern void (*py_input)(PyObject *parser, char *buf, int *result, int max_size);
+    #define returntoken(tok) yylval = PyString_FromString(strdup(yytext)); return (tok);
+    #define YY_INPUT(buf,result,max_size) { (*py_input)(py_parser, buf, &result, max_size); }
+    %}
+    </pre></b>
+    (refer to Section 1.3 above for an explanation of these declarations).<br>
+    <br>
+    
+    Our completed <b>Parser</b> class declaration now looks like this:
+    <b><pre>
+    class Parser(BisonParser):
+    
+        tokens = ['NUMBER',
+                  'PLUS', 'MINUS', 'TIMES', 'DIVIDE', 'POW',
+                  'LPAREN', 'RPAREN',
+                  'NEWLINE', 'QUIT']
+    
+        precedences = (
+            ('left', ('MINUS', 'PLUS')),
+            ('left', ('TIMES', 'DIVIDE')),
+            ('left', ('NEG', )),
+            ('right', ('POW', )),
+            )
+    
+        def read(self, nbytes):
+            try:
+                return raw_input("> ")
+            except EOFError:
+                return ''
+    
+        # Declare the start target here (by name)
+        start = "input"
+    
+        def on_input(self, target, option, names, items):
+            """
+            input :
+                  | input line
+            """
+            return
+    
+        def on_line(self, target, option, names, items):
+            """
+            line : NEWLINE
+                 | exp NEWLINE
+            """
+            if option == 1:
+                print items[0].value
+    
+        def on_exp(self, target, option, names, items):
+            """
+            exp : NUMBER
+                | exp PLUS exp
+                | exp MINUS exp
+                | exp TIMES exp
+                | exp DIVIDE exp
+                | MINUS exp %prec NEG
+                | exp POW exp
+                | LPAREN exp RPAREN
+            """
+            if option == 0:
+                return float(items[0])
+            elif option == 1:
+                return items[0] + items[2]
+            elif option == 2:
+                return items[0] - items[2]
+            elif option == 3:
+                return items[0] * items[2]
+            elif option == 4:
+                return items[0] / items[2]
+            elif option == 5:
+                return - items[1]
+            elif option == 6:
+                return items[0] ** items[2]
+            elif option == 7:
+                return items[1]
+    
+        lexscript = r"""
+    %{
+    int yylineno = 0;
+    #include &lt;stdio.h&gt;
+    #include &lt;string.h&gt;
+    #include "Python.h"
+    #define YYSTYPE void *
+    #include "tokens.h"
+    extern void *py_parser;
+    extern void (*py_input)(PyObject *parser, char *buf, int *result, int max_size);
+    #define returntoken(tok) yylval = PyString_FromString(strdup(yytext)); return (tok);
+    #define YY_INPUT(buf,result,max_size) { (*py_input)(py_parser, buf, &result, max_size); }
+    %}
+    
+    %%
+    
+    [0-9]+ { returntoken(NUMBER); }
+    "("    { returntoken(LPAREN); }
+    ")"    { returntoken(RPAREN); }
+    "+"    { returntoken(PLUS); }
+    "-"    { returntoken(MINUS); }
+    "*"    { returntoken(TIMES); }
+    "**"   { returntoken(POW); }
+    "/"    { returntoken(DIVIDE); }
+    "quit" { printf("lex: got QUIT\n"); yyterminate(); returntoken(QUIT); }
+    
+    [ \t\v\f]             {}
+    [\n]		{yylineno++; returntoken(NEWLINE); }
+    .       { printf("unknown char %c ignored\n", yytext[0]); /* ignore bad chars */}
+    
+    %%
+    
+    int yywrap() { return(1); }
+    """
+    </pre></b>
+    
+    <blockquote style=""color:#900000"><big><b>NOTE</b> - if you are using recent versions of flex (ie, the ones which violate
+    the ANSI standards for lex/flex), you'll have to change the lexing code above;
+    removing the line <b>int yylineno = 0;</b></big></blockquote><br>
+    <br>
+    
+    Note that we've sneaked in an additional method, <b>.read(self, nbytes)</b>.
+    This is another callback that gets invoked by the lexer whenever it needs
+    more input. <i>(quick tip - in your mycalc.py file, do an 'import readline', so
+    you get line editing and recall when the parser runs)</i>.<br>
+    <br>
+    This gives a lot of flexibility, because our Parser class gets to control
+    exactly where its input comes from - file, or a string, socket, whatever.<br>
+    <br>
+    
+    </blockquote>
+    
+    <hr>
+    
+    
+    
+    
+    <!--@-node:2.8. add flex script-->
+    <!--@+node:2.9. write runner script-->
+    <h3>2.9. Write Runner Script</h3>
+    
+    <blockquote>
+    
+    One quick last thing to do here - we just need a tiny script (say, 'runcalc.py'),
+    to import our Parser class and run it:
+    
+    <b><blockquote><pre>
+    #!/usr/bin/env python
+    import mycalc
+    p = mycalc.Parser()
+    p.run()
+    </pre></blockquote></b>
+    
+    There's a specific reason why we do this - if we made our <b>mycalc.py</b>
+    script executable, then when we first instantiate our <b>Parser</b> class,
+    PyBison will guess a name for the dynamic library to create. If running
+    mycalc.py directly, then <b>self.__class__.__module__</b> will be '__main__',
+    and our dynamic library would be created with the name <b>__main__-parser.so</b>,
+    which is pretty ugly. You could force a name for the library file by declaring
+    an additional attribute in the Parser class:
+    <b><blockquote><pre>
+    bisonEngineLibName = "mycalc-parser"
+    </pre></blockquote></b>
+    Oh, and don't forget to chmod the script to be executable.
+    </blockquote>
+    
+    <!--@-node:2.9. write runner script-->
+    <!--@-others-->
+    
+    </blockquote>
+    
+    <hr>
+    
+    <!--@-node:2. prepare parser class-->
+    <!--@+node:3. running our example-->
+    <h2>3. Run The Parser</h2>
+    
+    <blockquote>
+    
+    We're now ready to run our completed parser.<br>
+    <br>
+    Given that you have created the files <b>mycalc.py</b> and <b>runcalc.py</b>
+    in the current directory, and that you've already installed PyBison (refer INSTALL
+    file), you'll be set to go.<br>
+    <br>
+    From your shell, just type:
+    <b><blockquote><pre>
+      $ ./runcalc.py
+    </pre></blockquote></b>
+    The first time you run this parser, it might make a lot of compilation-type noises. For example, my aging Debian-based system produces:
+    <b><blockquote><pre>
+    In file included from /usr/include/python2.3/Python.h:8,
+                     from tmp.l:6:
+    /usr/include/python2.3/pyconfig.h:847:1: warning: "_POSIX_C_SOURCE" redefined
+    In file included from /usr/include/stdio.h:28,
+                     from tmp.lex.c:11:
+    /usr/include/features.h:171:1: warning: this is the location of the previous definition
+    </pre></blockquote></b>
+    All this relates to a bit of black magic which is happening in the background.<br>
+    <br>
+    The first time you instantiate your <b>mycalc.Parser</b> class, the <b>bison.BisonParser</b>
+    base class tries to load the dynamic library <b>mycalc-parser.so</b> (or, on windows, mycalc-parser.dll).<br>
+    <br>
+    If the library file is not present (or if it is out of date, determined from hashing handler docstrings and pertinent attributes in the class), PyBison attempts to build it.<br>
+    <br>
+    To build this library, PyBison:
+    <ul>
+      <li>Rips the static attributes, and handler method docstrings, from the client
+          Parser class</li>
+      <li>Generates temporary grammar (tmp.y) and tokeniser (tmp.l) files</li>
+      <li>Runs <b>bison</b> (or <b>self.bisonCmd</b>, refer source file bison.pyx) on tmp.y</li>
+      <li>Runs <b>flex</b> (or <b>self.flexCmd</b>, refer bison.pyx) on tmp.l</li>
+      <li>Compiles the resulting <b>tmp.bison.c</b> and <b>tmp.flex.c</b> files to
+          object files</li>
+      <li>Links these objects into the shared library file <b>mycalc-parser.so</b></li>
+    Subsequent instantiations of the class will not repeat this compilation, unless you
+    happen to have changed the embedded lex script, or grammar-related attributes of
+    your class.<br>
+    <hr>
+    Getting back to the point - as long as the <b>mycalc-parser.so</b> library built
+    and loaded successfully, we should now see a prompt (refer <b>.input(self, nchars)</b>
+    method in 2.8):
+    
+    <b><blockquote><pre>
+    $ ./runcalc.py
+    &gt;
+    </pre></blockquote></b>
+    At this prompt, you can type in numbers, or simple arithmetic expressions, and see the
+    result get printed out:
+    <b><blockquote><pre>
+    &gt; 2 + 3
+    5
+    &gt; 4 + 5 * 6
+    34
+    </pre></blockquote></b>
+    (note that the higher precedence of '*' has applied).
+          
+    </ul>
+    
+    </blockquote>
+    
+    <hr>
+    <!--@-node:3. running our example-->
+    <!--@+node:4. miscellaneous-->
+    <h2>4. Miscellaneous Remarks</h2>
+    
+    <blockquote>
+    
+    Just a few quick notes, to cover some of the possible gotchas.<br>
+    
+    <!--@+others-->
+    <!--@+node:4.1. plurality-->
+    <h3>4.1. Plurality</h3>
+    
+    <blockquote>
+    
+    In the present version of PyBison, you may only have one instance of
+    any given Parser class actually <i>running</i> at any one time.
+    This is because the present version of PyBison makes use of a couple
+    of global C variables to store hooks into your Parser instance.<br>
+    <br>
+    However, you can have multiple instances existing at the same time.<br>
+    <br>
+    Also, you can have several parsers running at the same time, <b><i>as long as
+    they are each instantiated from different Parser classes</i></b>.
+    
+    </blockquote>
+    
+    <hr>
+    
+    <!--@-node:4.1. plurality-->
+    <!--@+node:4.2. building a parse tree-->
+    <h3>4.2. Building A Parse Tree</h3>
+    
+    <blockquote>
+    
+    The <b>.run()</b> method of your parser object returns whatever your handler for
+    the top-level target returned.<br>
+    <br>
+    Building a whole parse tree is pretty simple.<br>
+    <br>
+    Within each parse target handler callback (your <b>.on_whateverTarget()</b> methods),
+    you need to create a new <b>BisonNode</b> instance, and store the component items
+    (the <b>items</b> argument, or whatever you want to extract from <b>items</b>) as
+    attributes, then return this BisonNode object.<br>
+    <br>
+    Then, with the BisonNode object returned from your parser's <b>.run()</b> method,
+    you'll be able to traverse the tree of the entire parse run.
+    
+    </blockquote>
+    <!--@-node:4.2. building a parse tree-->
+    <!--@-others-->
+    
+    </blockquote>
+    
+    <hr>
+    
+    <!--@-node:4. miscellaneous-->
+    <!--@+node:5. conclusion-->
+    <h2>5. Conclusion</h2>
+    
+    <blockquote>
+    
+    Through this document, we have started from scratch, and created and used a
+    complete, working parser.<br>
+    <br>
+    We have presented the options of starting with existing .y and .l scripts and
+    converting them to a boilerplate PyBison .py file, versus writing your own
+    python parser file from scratch.<br>
+    <br>
+    We have covered the requirements for building Parser classes, the attributes and
+    methods you need to declare.<br>
+    <br>
+    We have discussed the callback model, whereby instances of your Parser class
+    receive callbacks from PyBison whenever input is required, and whenver a
+    parse target has been unambiguously reached.<br>
+    <br>
+    We have briefly discussed how PyBison derives grammar and tokeniser scripts
+    from the contents of our Parser class, and how PyBison runs bison and flex on
+    these scripts, compiles the output, and links the result into a shared library,
+    which can be used in subsequent uses of the Parser to get almost the full speed
+    of C-based code, from the comfort and convenience of the Python environment.<br>
+    <br>
+    And also, we have briefly mentioned how to use PyBison to build up a parse tree
+    as an easily-traversed Python data structure.<br>
+    <br>
+    We hope this document has got you up to speed without undue head-scratching, and
+    that you're now starting to get a feel for designing and building your own
+    parsers.
+    
+    </blockquote>
+    
+    <!--@-node:5. conclusion-->
+    <!--@-others-->
+        <hr>
+        <address><a href="mailto:david@freenet.co.nz">David McNab</a></address>
+    <!-- Created: Fri Apr 23 01:27:41 NZST 2004 -->
+    <!-- hhmts start -->
+    <!-- hhmts end -->
+    <!--@-node:body-->
+    <!--@-others-->
+  </body>
+</html>
+
+<!--@-node:@file doc/walkthrough.html-->
+<!--@-leo-->

+ 16 - 0
examples/C/README

@@ -0,0 +1,16 @@
+This is a parser for ANSI C code.
+
+To generate your python parser, type:
+  bison2py c
+or, if you want parse node classes to be generated as well:
+  bison2py c -c
+
+Either of those commands will generate an executable c.py file,
+containing a Parser class, plus unit test code which by default
+reads C source from stdin.
+
+Grammar and scanner scripts were sourced from:
+
+  * http://www.lysator.liu.se/c/ANSI-C-grammar-y.html
+  * http://www.lysator.liu.se/c/ANSI-C-grammar-l.html
+

+ 189 - 0
examples/C/c.l

@@ -0,0 +1,189 @@
+D			[0-9]
+L			[a-zA-Z_]
+H			[a-fA-F0-9]
+E			[Ee][+-]?{D}+
+FS			(f|F|l|L)
+IS			(u|U|l|L)*
+
+
+%{
+
+/* this scanner sourced from: http://www.lysator.liu.se/c/ANSI-C-grammar-l.html */
+
+void count();
+int yylineno = 0;
+#include <stdio.h>
+#include <string.h>
+#include "Python.h"
+#define YYSTYPE void *
+#include "tokens.h"
+extern void *py_parser;
+extern void (*py_input)(PyObject *parser, char *buf, int *result, int max_size);
+#define returntoken(tok) /*printf("%d=%s\n", tok, yytext);*/ yylval = PyString_FromString(strdup(yytext)); return (tok);
+#define YY_INPUT(buf,result,max_size) { (*py_input)(py_parser, buf, &result, max_size); }
+
+%}
+
+
+%%
+"/*"			{ comment(); }
+
+"auto"			{ count(); returntoken(AUTO); }
+"break"			{ count(); returntoken(BREAK); }
+"case"			{ count(); returntoken(CASE); }
+"char"			{ count(); returntoken(CHAR); }
+"const"			{ count(); returntoken(CONST); }
+"continue"		{ count(); returntoken(CONTINUE); }
+"default"		{ count(); returntoken(DEFAULT); }
+"do"			{ count(); returntoken(DO); }
+"double"		{ count(); returntoken(DOUBLE); }
+"else"			{ count(); returntoken(ELSE); }
+"enum"			{ count(); returntoken(ENUM); }
+"extern"		{ count(); returntoken(EXTERN); }
+"float"			{ count(); returntoken(FLOAT); }
+"for"			{ count(); returntoken(FOR); }
+"goto"			{ count(); returntoken(GOTO); }
+"if"			{ count(); returntoken(IF); }
+"int"			{ count(); returntoken(INT); }
+"long"			{ count(); returntoken(LONG); }
+"register"		{ count(); returntoken(REGISTER); }
+"return"		{ count(); returntoken(RETURN); }
+"short"			{ count(); returntoken(SHORT); }
+"signed"		{ count(); returntoken(SIGNED); }
+"sizeof"		{ count(); returntoken(SIZEOF); }
+"static"		{ count(); returntoken(STATIC); }
+"struct"		{ count(); returntoken(STRUCT); }
+"switch"		{ count(); returntoken(SWITCH); }
+"typedef"		{ count(); returntoken(TYPEDEF); }
+"union"			{ count(); returntoken(UNION); }
+"unsigned"		{ count(); returntoken(UNSIGNED); }
+"void"			{ count(); returntoken(VOID); }
+"volatile"		{ count(); returntoken(VOLATILE); }
+"while"			{ count(); returntoken(WHILE); }
+
+{L}({L}|{D})*		{ count(); returntoken(check_type()); }
+
+0[xX]{H}+{IS}?		{ count(); returntoken(CONSTANT); }
+0{D}+{IS}?		{ count(); returntoken(CONSTANT); }
+{D}+{IS}?		{ count(); returntoken(CONSTANT); }
+L?'(\\.|[^\\'])+'	{ count(); returntoken(CONSTANT); }
+
+{D}+{E}{FS}?		{ count(); returntoken(CONSTANT); }
+{D}*"."{D}+({E})?{FS}?	{ count(); returntoken(CONSTANT); }
+{D}+"."{D}*({E})?{FS}?	{ count(); returntoken(CONSTANT); }
+
+L?\"(\\.|[^\\"])*\"	{ count(); returntoken(STRING_LITERAL); }
+
+"..."			{ count(); returntoken(ELLIPSIS); }
+">>="			{ count(); returntoken(RIGHT_ASSIGN); }
+"<<="			{ count(); returntoken(LEFT_ASSIGN); }
+"+="			{ count(); returntoken(ADD_ASSIGN); }
+"-="			{ count(); returntoken(SUB_ASSIGN); }
+"*="			{ count(); returntoken(MUL_ASSIGN); }
+"/="			{ count(); returntoken(DIV_ASSIGN); }
+"%="			{ count(); returntoken(MOD_ASSIGN); }
+"&="			{ count(); returntoken(AND_ASSIGN); }
+"^="			{ count(); returntoken(XOR_ASSIGN); }
+"|="			{ count(); returntoken(OR_ASSIGN); }
+">>"			{ count(); returntoken(RIGHT_OP); }
+"<<"			{ count(); returntoken(LEFT_OP); }
+"++"			{ count(); returntoken(INC_OP); }
+"--"			{ count(); returntoken(DEC_OP); }
+"->"			{ count(); returntoken(PTR_OP); }
+"&&"			{ count(); returntoken(BOOL_AND_OP); }
+"||"			{ count(); returntoken(BOOL_OR_OP); }
+"<="			{ count(); returntoken(LE_OP); }
+">="			{ count(); returntoken(GE_OP); }
+"=="			{ count(); returntoken(EQ_OP); }
+"!="			{ count(); returntoken(NE_OP); }
+";"			{ count(); returntoken(SEMICOLON); }
+("{"|"<%")		{ count(); returntoken(LBRACE); }
+("}"|"%>")		{ count(); returntoken(RBRACE); }
+","			{ count(); returntoken(COMMA); }
+":"			{ count(); returntoken(COLON); }
+"="			{ count(); returntoken(ASSIGN); }
+"("			{ count(); returntoken(LPAREN); }
+")"			{ count(); returntoken(RPAREN); }
+("["|"<:")		{ count(); returntoken(LBRACKET); }
+("]"|":>")		{ count(); returntoken(RBRACKET); }
+"."			{ count(); returntoken(PERIOD); }
+"&"			{ count(); returntoken(AND_OP); }
+"!"			{ count(); returntoken(BANG); }
+"~"			{ count(); returntoken(TILDE); }
+"-"			{ count(); returntoken(MINUS); }
+"+"			{ count(); returntoken(PLUS); }
+"*"			{ count(); returntoken(STAR); }
+"/"			{ count(); returntoken(SLASH); }
+"%"			{ count(); returntoken(PERCENT); }
+"<"			{ count(); returntoken(LT_OP); }
+">"			{ count(); returntoken(GT_OP); }
+"^"			{ count(); returntoken(CIRCUMFLEX); }
+"|"			{ count(); returntoken(OR_OP); }
+"?"			{ count(); returntoken(QUESTIONMARK); }
+
+[ \t\v\n\f]		{ count(); }
+.			{ /* ignore bad characters */ }
+
+%%
+
+yywrap()
+{
+	return(1);
+}
+
+
+comment()
+{
+	char c, c1;
+
+loop:
+	while ((c = input()) != '*' && c != 0)
+      /*putchar(c)*/;
+
+	if ((c1 = input()) != '/' && c != 0)
+	{
+		unput(c1);
+		goto loop;
+	}
+
+	if (c != 0)
+      /*putchar(c1)*/;
+}
+
+
+int column = 0;
+
+void count()
+{
+	int i;
+
+	for (i = 0; yytext[i] != '\0'; i++)
+		if (yytext[i] == '\n')
+			column = 0;
+		else if (yytext[i] == '\t')
+			column += 8 - (column % 8);
+		else
+			column++;
+
+	/*ECHO*/;
+}
+
+
+int check_type()
+{
+/*
+* pseudo code --- this is what it should check
+*
+*	if (yytext == type_name)
+*		return(TYPE_NAME);
+*
+*	return(IDENTIFIER);
+*/
+
+/*
+*	it actually will only return IDENTIFIER
+*/
+
+	return(IDENTIFIER);
+}
+

+ 464 - 0
examples/C/c.y

@@ -0,0 +1,464 @@
+/*
+ * This grammar sourced from:
+ *   http://www.lysator.liu.se/c/ANSI-C-grammar-y.html
+ */
+
+%{
+
+%}
+
+%token IDENTIFIER CONSTANT STRING_LITERAL SIZEOF
+%token PTR_OP INC_OP DEC_OP LEFT_OP RIGHT_OP LE_OP GE_OP EQ_OP NE_OP
+%token BOOL_AND_OP BOOL_OR_OP MUL_ASSIGN DIV_ASSIGN MOD_ASSIGN ADD_ASSIGN
+%token SUB_ASSIGN LEFT_ASSIGN RIGHT_ASSIGN AND_ASSIGN
+%token XOR_ASSIGN OR_ASSIGN TYPE_NAME
+
+%token LPAREN RPAREN LBRACKET RBRACKET LBRACE RBRACE
+%token PERIOD COMMA COLON SEMICOLON QUESTIONMARK
+%token PLUS MINUS STAR SLASH ASSIGN AND_OP OR_OP
+%token BANG TILDE PERCENT CIRCUMFLEX
+%token GT_OP LT_OP
+
+%token TYPEDEF EXTERN STATIC AUTO REGISTER
+%token CHAR SHORT INT LONG SIGNED UNSIGNED FLOAT DOUBLE CONST VOLATILE VOID
+%token STRUCT UNION ENUM ELLIPSIS
+
+%token CASE DEFAULT IF ELSE SWITCH WHILE DO FOR GOTO CONTINUE BREAK RETURN
+
+
+%left COMMA
+%right ASSIGN ADD_ASSIGN SUB_ASSIGN MUL_ASSIGN DIV_ASSIGN MOD_ASSIGN LEFT_ASSIGN RIGHT_ASSIGN AND_ASSIGN XOR_ASSIGN OR_ASSIGN
+%right QUESTIONMARK COLON
+%left BOOL_OR_OP
+%left BOOL_AND_OP
+%left OR_OP
+%left CIRCUMFLEX
+%left AND_OP
+%left EQ_OP NE_OP
+%left LT_OP GT_OP LE_OP GE_OP
+%left LEFT_OP RIGHT_OP
+%left PLUS MINUS
+%left STAR SLASH PERCENT
+%right NOT NEG
+%right INC_OP SIZEOF DEC_OP
+%left LBRACKET LPAREN PERIOD PTR_OP
+
+
+%start translation_unit
+
+%%
+
+primary_expression
+	: IDENTIFIER
+	| CONSTANT
+	| STRING_LITERAL
+	| LPAREN expression RPAREN
+	;
+
+postfix_expression
+	: primary_expression
+	| postfix_expression LBRACKET expression RBRACKET
+	| postfix_expression LPAREN RPAREN
+	| postfix_expression LPAREN argument_expression_list RPAREN
+	| postfix_expression PERIOD IDENTIFIER
+	| postfix_expression PTR_OP IDENTIFIER
+	| postfix_expression INC_OP
+	| postfix_expression DEC_OP
+	;
+
+argument_expression_list
+	: assignment_expression
+	| argument_expression_list COMMA assignment_expression
+	;
+
+unary_expression
+	: postfix_expression
+	| INC_OP unary_expression
+	| DEC_OP unary_expression
+	| unary_operator cast_expression
+	| SIZEOF unary_expression
+	| SIZEOF LPAREN type_name RPAREN
+	;
+
+unary_operator
+	: AND_OP
+	| STAR
+	| PLUS
+	| MINUS
+	| TILDE
+	| BANG
+	;
+
+cast_expression
+	: unary_expression
+	| LPAREN type_name RPAREN cast_expression
+	;
+
+multiplicative_expression
+	: cast_expression
+	| multiplicative_expression STAR cast_expression
+	| multiplicative_expression SLASH cast_expression
+	| multiplicative_expression PERCENT cast_expression
+	;
+
+additive_expression
+	: multiplicative_expression
+	| additive_expression PLUS multiplicative_expression
+	| additive_expression MINUS multiplicative_expression
+	;
+
+shift_expression
+	: additive_expression
+	| shift_expression LEFT_OP additive_expression
+	| shift_expression RIGHT_OP additive_expression
+	;
+
+relational_expression
+	: shift_expression
+	| relational_expression LT_OP shift_expression
+	| relational_expression GT_OP shift_expression
+	| relational_expression LE_OP shift_expression
+	| relational_expression GE_OP shift_expression
+	;
+
+equality_expression
+	: relational_expression
+	| equality_expression EQ_OP relational_expression
+	| equality_expression NE_OP relational_expression
+	;
+
+and_expression
+	: equality_expression
+	| and_expression AND_OP equality_expression
+	;
+
+exclusive_or_expression
+	: and_expression
+	| exclusive_or_expression CIRCUMFLEX and_expression
+	;
+
+inclusive_or_expression
+	: exclusive_or_expression
+	| inclusive_or_expression OR_OP exclusive_or_expression
+	;
+
+logical_and_expression
+	: inclusive_or_expression
+	| logical_and_expression BOOL_AND_OP inclusive_or_expression
+	;
+
+logical_or_expression
+	: logical_and_expression
+	| logical_or_expression BOOL_OR_OP logical_and_expression
+	;
+
+conditional_expression
+	: logical_or_expression
+	| logical_or_expression QUESTIONMARK expression COLON conditional_expression
+	;
+
+assignment_expression
+	: conditional_expression
+	| unary_expression assignment_operator assignment_expression
+	;
+
+assignment_operator
+	: ASSIGN
+	| MUL_ASSIGN
+	| DIV_ASSIGN
+	| MOD_ASSIGN
+	| ADD_ASSIGN
+	| SUB_ASSIGN
+	| LEFT_ASSIGN
+	| RIGHT_ASSIGN
+	| AND_ASSIGN
+	| XOR_ASSIGN
+	| OR_ASSIGN
+	;
+
+expression
+	: assignment_expression
+	| expression COMMA assignment_expression
+	;
+
+constant_expression
+	: conditional_expression
+	;
+
+declaration
+	: declaration_specifiers SEMICOLON
+	| declaration_specifiers init_declarator_list SEMICOLON
+	;
+
+declaration_specifiers
+	: storage_class_specifier
+	| storage_class_specifier declaration_specifiers
+	| type_specifier
+	| type_specifier declaration_specifiers
+	| type_qualifier
+	| type_qualifier declaration_specifiers
+	;
+
+init_declarator_list
+	: init_declarator
+	| init_declarator_list COMMA init_declarator
+	;
+
+init_declarator
+	: declarator
+	| declarator ASSIGN initializer
+	;
+
+storage_class_specifier
+	: TYPEDEF
+	| EXTERN
+	| STATIC
+	| AUTO
+	| REGISTER
+	;
+
+type_specifier
+	: VOID
+	| CHAR
+	| SHORT
+	| INT
+	| LONG
+	| FLOAT
+	| DOUBLE
+	| SIGNED
+	| UNSIGNED
+	| struct_or_union_specifier
+	| enum_specifier
+	| TYPE_NAME
+	;
+
+struct_or_union_specifier
+	: struct_or_union IDENTIFIER LBRACE struct_declaration_list RBRACE
+	| struct_or_union LBRACE struct_declaration_list RBRACE
+	| struct_or_union IDENTIFIER
+	;
+
+struct_or_union
+	: STRUCT
+	| UNION
+	;
+
+struct_declaration_list
+	: struct_declaration
+	| struct_declaration_list struct_declaration
+	;
+
+struct_declaration
+	: specifier_qualifier_list struct_declarator_list SEMICOLON
+	;
+
+specifier_qualifier_list
+	: type_specifier specifier_qualifier_list
+	| type_specifier
+	| type_qualifier specifier_qualifier_list
+	| type_qualifier
+	;
+
+struct_declarator_list
+	: struct_declarator
+	| struct_declarator_list COMMA struct_declarator
+	;
+
+struct_declarator
+	: declarator
+	| COLON constant_expression
+	| declarator COLON constant_expression
+	;
+
+enum_specifier
+	: ENUM LBRACE enumerator_list RBRACE
+	| ENUM IDENTIFIER LBRACE enumerator_list RBRACE
+	| ENUM IDENTIFIER
+	;
+
+enumerator_list
+	: enumerator
+	| enumerator_list COMMA enumerator
+	;
+
+enumerator
+	: IDENTIFIER
+	| IDENTIFIER ASSIGN constant_expression
+	;
+
+type_qualifier
+	: CONST
+	| VOLATILE
+	;
+
+declarator
+	: pointer direct_declarator
+	| direct_declarator
+	;
+
+direct_declarator
+	: IDENTIFIER
+	| LPAREN declarator RPAREN
+	| direct_declarator LBRACKET constant_expression RBRACKET
+	| direct_declarator LBRACKET RBRACKET
+	| direct_declarator LPAREN parameter_type_list RPAREN
+	| direct_declarator LPAREN identifier_list RPAREN
+	| direct_declarator LPAREN RPAREN
+	;
+
+pointer
+	: STAR
+	| STAR type_qualifier_list
+	| STAR pointer
+	| STAR type_qualifier_list pointer
+	;
+
+type_qualifier_list
+	: type_qualifier
+	| type_qualifier_list type_qualifier
+	;
+
+
+parameter_type_list
+	: parameter_list
+	| parameter_list COMMA ELLIPSIS
+	;
+
+parameter_list
+	: parameter_declaration
+	| parameter_list COMMA parameter_declaration
+	;
+
+parameter_declaration
+	: declaration_specifiers declarator
+	| declaration_specifiers abstract_declarator
+	| declaration_specifiers
+	;
+
+identifier_list
+	: IDENTIFIER
+	| identifier_list COMMA IDENTIFIER
+	;
+
+type_name
+	: specifier_qualifier_list
+	| specifier_qualifier_list abstract_declarator
+	;
+
+abstract_declarator
+	: pointer
+	| direct_abstract_declarator
+	| pointer direct_abstract_declarator
+	;
+
+direct_abstract_declarator
+	: LPAREN abstract_declarator RPAREN
+	| LBRACKET RBRACKET
+	| LBRACKET constant_expression RBRACKET
+	| direct_abstract_declarator LBRACKET RBRACKET
+	| direct_abstract_declarator LBRACKET constant_expression RBRACKET
+	| LPAREN RPAREN
+	| LPAREN parameter_type_list RPAREN
+	| direct_abstract_declarator LPAREN RPAREN
+	| direct_abstract_declarator LPAREN parameter_type_list RPAREN
+	;
+
+initializer
+	: assignment_expression
+	| LBRACE initializer_list RBRACE
+	| LBRACE initializer_list COMMA RBRACE
+	;
+
+initializer_list
+	: initializer
+	| initializer_list COMMA initializer
+	;
+
+statement
+	: labeled_statement
+	| compound_statement
+	| expression_statement
+	| selection_statement
+	| iteration_statement
+	| jump_statement
+	;
+
+labeled_statement
+	: IDENTIFIER COLON statement
+	| CASE constant_expression COLON statement
+	| DEFAULT COLON statement
+	;
+
+compound_statement
+	: LBRACE RBRACE
+	| LBRACE statement_list RBRACE
+	| LBRACE declaration_list RBRACE
+	| LBRACE declaration_list statement_list RBRACE
+	;
+
+declaration_list
+	: declaration
+	| declaration_list declaration
+	;
+
+statement_list
+	: statement
+	| statement_list statement
+	;
+
+expression_statement
+	: SEMICOLON
+	| expression SEMICOLON
+	;
+
+selection_statement
+	: IF LPAREN expression RPAREN statement
+	| IF LPAREN expression RPAREN statement ELSE statement
+	| SWITCH LPAREN expression RPAREN statement
+	;
+
+iteration_statement
+	: WHILE LPAREN expression RPAREN statement
+	| DO statement WHILE LPAREN expression RPAREN SEMICOLON
+	| FOR LPAREN expression_statement expression_statement RPAREN statement
+	| FOR LPAREN expression_statement expression_statement expression RPAREN statement
+	;
+
+jump_statement
+	: GOTO IDENTIFIER SEMICOLON
+	| CONTINUE SEMICOLON
+	| BREAK SEMICOLON
+	| RETURN SEMICOLON
+	| RETURN expression SEMICOLON
+	;
+
+translation_unit
+	: external_declaration
+	| translation_unit external_declaration
+	;
+
+external_declaration
+	: function_definition
+	| declaration
+	;
+
+function_definition
+	: declaration_specifiers declarator declaration_list compound_statement
+	| declaration_specifiers declarator compound_statement
+	| declarator declaration_list compound_statement
+	| declarator compound_statement
+	;
+
+%%
+#include <stdio.h>
+
+extern char yytext[];
+extern int column;
+
+yyerror(s)
+char *s;
+{
+	fflush(stdout);
+	printf("\n%*s\n%*s\n", column, "^", column, s);
+}
+

+ 7 - 0
examples/calc/README

@@ -0,0 +1,7 @@
+This is a minimal calculator example, as discussed in the walkthrough
+document.
+
+Provided you have installed PyBison, running the run.py script should
+trigger the creation of the calc-parser.so parser engine lib, and
+run a calculator parser which accepts expressions you type in, and
+prints out results.

+ 138 - 0
examples/calc/calc.py

@@ -0,0 +1,138 @@
+#!/usr/bin/env python
+"""
+A simple pybison parser program implementing a calculator
+"""
+import sys
+
+from bison import BisonParser, BisonNode
+
+class Parser(BisonParser):
+    """
+    Implements the calculator parser. Grammar rules are defined in the method docstrings.
+    Scanner rules are in the 'lexscript' attribute.
+    """
+    # ----------------------------------------------------------------
+    # lexer tokens - these must match those in your lex script (below)
+    # ----------------------------------------------------------------
+    tokens = ['NUMBER',
+              'PLUS', 'MINUS', 'TIMES', 'DIVIDE', 'POW',
+              'LPAREN', 'RPAREN',
+              'NEWLINE', 'QUIT']
+    
+    # ------------------------------
+    # precedences
+    # ------------------------------
+    precedences = (
+        ('left', ('MINUS', 'PLUS')),
+        ('left', ('TIMES', 'DIVIDE')),
+        ('left', ('NEG', )),
+        ('right', ('POW', )),
+        )
+    
+    # ------------------------------------------------------------------
+    # override default read method with a version that prompts for input
+    # ------------------------------------------------------------------
+    def read(self, nbytes):
+        try:
+            return raw_input("> ") + "\n"
+        except EOFError:
+            return ''
+    
+    # ---------------------------------------------------------------
+    # These methods are the python handlers for the bison targets.
+    # (which get called by the bison code each time the corresponding
+    # parse target is unambiguously reached)
+    #
+    # WARNING - don't touch the method docstrings unless you know what
+    # you are doing - they are in bison rule syntax, and are passed
+    # verbatim to bison to build the parser engine library.
+    # ---------------------------------------------------------------
+    
+    # Declare the start target here (by name)
+    start = "input"
+    
+    def on_input(self, target, option, names, values):
+        """
+        input :
+              | input line
+        """
+        return
+    
+    def on_line(self, target, option, names, values):
+        """
+        line : NEWLINE
+             | exp NEWLINE
+        """
+        if option == 1:
+            print values[0]
+    
+    def on_exp(self, target, option, names, values):
+        """
+        exp : NUMBER
+            | exp PLUS exp
+            | exp MINUS exp
+            | exp TIMES exp
+            | exp DIVIDE exp
+            | MINUS exp %prec NEG
+            | exp POW exp
+            | LPAREN exp RPAREN
+        """
+        #print "on_exp: got %s %s %s %s" % (target, option, names, values)
+        if option == 0:
+            return float(values[0])
+        elif option == 1:
+            return values[0] + values[2]
+        elif option == 2:
+            return values[0] - values[2]
+        elif option == 3:
+            return values[0] * values[2]
+        elif option == 4:
+            return values[0] / values[2]
+        elif option == 5:
+            return - values[1]
+        elif option == 6:
+            return values[0] ** values[2]
+        elif option == 7:
+            return values[1]
+    
+    # -----------------------------------------
+    # raw lex script, verbatim here
+    # -----------------------------------------
+    lexscript = r"""
+    %{
+    //int yylineno = 0;
+    #include <stdio.h>
+    #include <string.h>
+    #include "Python.h"
+    #define YYSTYPE void *
+    #include "tokens.h"
+    extern void *py_parser;
+    extern void (*py_input)(PyObject *parser, char *buf, int *result, int max_size);
+    #define returntoken(tok) yylval = PyString_FromString(strdup(yytext)); return (tok);
+    #define YY_INPUT(buf,result,max_size) { (*py_input)(py_parser, buf, &result, max_size); }
+    %}
+    
+    %%
+    
+    [0-9]+ { returntoken(NUMBER); }
+    "("    { returntoken(LPAREN); }
+    ")"    { returntoken(RPAREN); }
+    "+"    { returntoken(PLUS); }
+    "-"    { returntoken(MINUS); }
+    "*"    { returntoken(TIMES); }
+    "**"   { returntoken(POW); }
+    "/"    { returntoken(DIVIDE); }
+    "quit" { printf("lex: got QUIT\n"); yyterminate(); returntoken(QUIT); }
+    
+    [ \t\v\f]             {}
+    [\n]		{yylineno++; returntoken(NEWLINE); }
+    .       { printf("unknown char %c ignored, yytext=0x%lx\n", yytext[0], yytext); /* ignore bad chars */}
+    
+    %%
+    
+    yywrap() { return(1); }
+    """
+
+if __name__ == '__main__':
+    p = Parser()
+    p.run()

+ 8 - 0
examples/calc/run.py

@@ -0,0 +1,8 @@
+#!/usr/bin/env python
+
+import readline
+
+import calc
+
+parser = calc.Parser(verbose=0, keepfiles=0)
+parser.run()

+ 30 - 0
examples/calc1/README

@@ -0,0 +1,30 @@
+A slightly more powerful calculator that supports variables,
+plus some scientific functions like log(), sqr(), sin() etc.
+
+Most notably, this example demonstrates error handling.
+
+If/when one of your rule handlers comes across a condition
+which constitutes an error, but which the parser doesn't or can't
+pick up (eg division by zero), the handler should do:
+
+   return self.error("string-describing-the-error")
+
+This will cause the parser to go into error handling mode.
+
+Also, your rules can pick up errors, by using the magic
+target name 'error'. Within error handling code, the
+'lasterror' attribute of the parser object will be a
+3-tuple:
+
+ (line-num, msg, near-token)
+
+where:
+ - 'line-num' is the input line at which the error (most likely)
+   occured,
+
+ - 'msg' is the error message text (supplied by either your own
+   prior 'self.error(somestring)' call, or by the parser itself
+
+ - 'near-token' is a string, the input token which triggered the
+   error condition
+

+ 252 - 0
examples/calc1/calc1.py

@@ -0,0 +1,252 @@
+#!/usr/bin/env python
+"""
+A more advanced calculator example, with variable storage and scientific
+functions (courtesy of python 'math' module)
+"""
+import sys, math, readline
+
+from bison import BisonParser, BisonNode, BisonError
+
+class Parser(BisonParser):
+    """
+    Implements the calculator parser. Grammar rules are defined in the method docstrings.
+    Scanner rules are in the 'lexscript' attribute.
+    """
+    # ----------------------------------------------------------------
+    # lexer tokens - these must match those in your lex script (below)
+    # ----------------------------------------------------------------
+    tokens = ['NUMBER',
+              'PLUS', 'MINUS', 'TIMES', 'DIVIDE', 'MOD', 'POW',
+              'LPAREN', 'RPAREN',
+              'NEWLINE', 'QUIT',
+              'EQUALS', 'PI', 'E',
+              'IDENTIFIER',
+              'HELP']
+    
+    # ------------------------------
+    # precedences
+    # ------------------------------
+    precedences = (
+        ('left', ('MINUS', 'PLUS')),
+        ('left', ('TIMES', 'DIVIDE', 'MOD')),
+        ('left', ('NEG', )),
+        ('right', ('POW', )),
+        )
+    
+    # --------------------------------------------
+    # basename of binary parser engine dynamic lib
+    # --------------------------------------------
+    bisonEngineLibName = "calc1-engine"
+
+    # ------------------------------------------------------------------
+    # override default read method with a version that prompts for input
+    # ------------------------------------------------------------------
+    def read(self, nbytes):
+        try:
+            return raw_input("> ") + "\n"
+        except EOFError:
+            return ''
+
+    # -----------------------------------------------------------
+    # override default run method to set up our variables storage
+    # -----------------------------------------------------------
+    def run(self, *args, **kw):
+        self.vars = {}
+        BisonParser.run(self, *args, **kw)
+
+    # ---------------------------------------------------------------
+    # These methods are the python handlers for the bison targets.
+    # (which get called by the bison code each time the corresponding
+    # parse target is unambiguously reached)
+    #
+    # WARNING - don't touch the method docstrings unless you know what
+    # you are doing - they are in bison rule syntax, and are passed
+    # verbatim to bison to build the parser engine library.
+    # ---------------------------------------------------------------
+    
+    # Declare the start target here (by name)
+    start = "input"
+    
+    def on_input(self, target, option, names, values):
+        """
+        input :
+              | input line
+        """
+        if option == 1:
+            return values[0]
+
+    def on_line(self, target, option, names, values):
+        """
+        line : NEWLINE
+             | exp NEWLINE
+             | IDENTIFIER EQUALS exp NEWLINE
+             | HELP
+             | error
+        """
+        if option == 1:
+            print values[0]
+            return values[0]
+        elif option == 2:
+            self.vars[values[0]] = values[2]
+            return values[2]
+        elif option == 3:
+            self.show_help()
+        elif option == 4:
+            line, msg, near = self.lasterror
+            print "Line %s: \"%s\" near %s" % (line, msg, repr(near))
+
+    def on_exp(self, target, option, names, values):
+        """
+        exp : number | plusexp | minusexp | timesexp | divexp       | modexp
+            | negexp | powexp  | parenexp | varexp   | functioncall | constant
+        """
+        return values[0]
+
+    def on_number(self, target, option, names, values):
+        """
+        number : NUMBER
+        """
+        return float(values[0])
+
+    def on_plusexp(self, target, option, names, values):
+        """
+        plusexp : exp PLUS exp
+        """
+        return values[0] + values[2]
+
+    def on_minusexp(self, target, option, names, values):
+        """
+        minusexp : exp MINUS exp
+        """
+        return values[0] - values[2]
+
+    def on_timesexp(self, target, option, names, values):
+        """
+        timesexp : exp TIMES exp
+        """
+        return values[0] * values[2]
+
+    def on_divexp(self, target, option, names, values):
+        """
+        divexp : exp DIVIDE exp
+        """
+        try:
+            return values[0] / values[2]
+        except:
+            return self.error("Division by zero error")
+
+    def on_modexp(self, target, option, names, values):
+        """
+        modexp : exp MOD exp
+        """
+        try:
+            return values[0] % values[2]
+        except:
+            return self.error("Modulus by zero error")
+
+    def on_powexp(self, target, option, names, values):
+        """
+        powexp : exp POW exp
+        """
+        return values[0] ** values[2]
+
+    def on_negexp(self, target, option, names, values):
+        """
+        negexp : MINUS exp %prec NEG
+        """
+        return values[1]
+
+    def on_parenexp(self, target, option, names, values):
+        """
+        parenexp : LPAREN exp RPAREN
+        """
+        return values[1]
+
+    def on_varexp(self, target, option, names, values):
+        """
+        varexp : IDENTIFIER
+        """
+        if self.vars.has_key(values[0]):
+            return self.vars[values[0]]
+        else:
+            return self.error("No such variable '%s'" % values[0])
+
+    def on_functioncall(self, target, option, names, values):
+        """
+        functioncall : IDENTIFIER LPAREN exp RPAREN
+        """
+        func = getattr(math, values[0], None)
+        if not callable(func):
+            return self.error("No such function '%s'" % values[0])
+        try:
+            return func(values[2])
+        except Exception, e:
+            return self.error(e.args[0])
+
+    def on_constant(self, target, option, names, values):
+        """
+        constant : PI
+                 | E
+        """
+        return getattr(math, values[0])
+
+    # -----------------------------------------
+    # Display help
+    # -----------------------------------------
+    def show_help(self):
+        print "This PyBison parser implements a basic scientific calculator"
+        print " * scientific notation now works for numbers, eg '2.3e+12'"
+        print " * you can assign values to variables, eg 'x = 23.2'"
+        print " * the constants 'pi' and 'e' are supported"
+        print " * all the python 'math' module functions are available, eg 'sin(pi/6)'"
+        print " * errors, such as division by zero, are now reported"
+
+    # -----------------------------------------
+    # raw lex script, verbatim here
+    # -----------------------------------------
+    lexscript = r"""
+    %{
+    int yylineno = 0;
+    #include <stdio.h>
+    #include <string.h>
+    #include "Python.h"
+    #define YYSTYPE void *
+    #include "tokens.h"
+    extern void *py_parser;
+    extern void (*py_input)(PyObject *parser, char *buf, int *result, int max_size);
+    #define returntoken(tok) yylval = PyString_FromString(strdup(yytext)); return (tok);
+    #define YY_INPUT(buf,result,max_size) { (*py_input)(py_parser, buf, &result, max_size); }
+    %}
+    
+    %%
+    
+    ([0-9]*\.?)([0-9]+)(e[-+]?[0-9]+)? { returntoken(NUMBER); }
+    ([0-9]+)(\.?[0-9]*)(e[-+]?[0-9]+)? { returntoken(NUMBER); }
+    "("    { returntoken(LPAREN); }
+    ")"    { returntoken(RPAREN); }
+    "+"    { returntoken(PLUS); }
+    "-"    { returntoken(MINUS); }
+    "*"    { returntoken(TIMES); }
+    "**"   { returntoken(POW); }
+    "/"    { returntoken(DIVIDE); }
+    "%"    { returntoken(MOD); }
+    "quit" { printf("lex: got QUIT\n"); yyterminate(); returntoken(QUIT); }
+    "="    { returntoken(EQUALS); }
+    "e"    { returntoken(E); }
+    "pi"   { returntoken(PI); }
+    "help" { returntoken(HELP); }
+    [a-zA-Z_][0-9a-zA-Z_]* { returntoken(IDENTIFIER); }
+    
+    [ \t\v\f]             {}
+    [\n]		{yylineno++; returntoken(NEWLINE); }
+    .       { printf("unknown char %c ignored, yytext=0x%lx\n", yytext[0], yytext); /* ignore bad chars */}
+    
+    %%
+    
+    yywrap() { return(1); }
+    """
+
+if __name__ == '__main__':
+    p = Parser(keepfiles=0)
+    print "Scientific calculator example. Type 'help' for help"
+    p.run()

+ 12 - 0
examples/java/CREDITS

@@ -0,0 +1,12 @@
+The javaparser.l and javaparser.y files herein were NOT written by
+myself (David McNab).
+
+javaparser.l was taken almost verbatim from an apparently public
+domain version, found on the website of
+Professor Dave Binkley
+(http://www.cs.loyola.edu/~binkley/)
+at the Department of Computer Science at Loyola College in Maryland
+(http://www.cs.loyola.edu/)
+
+javaparser.y was taken almost verbatim from the source code to 
+the GNU gcj java compiler.

+ 13 - 0
examples/java/HelloWorldApp.java

@@ -0,0 +1,13 @@
+public class HelloWorldApp {
+
+    public HelloWorldApp() {}
+
+    public static void main(String[] args) {
+        System.out.println("Hello, world");
+    }
+
+    public static void main() {
+        main(new String[]{});
+    }
+}
+

+ 20 - 0
examples/java/README

@@ -0,0 +1,20 @@
+This is a somewhat more advanced example, containing
+bison and lex scripts for a java source code parser.
+
+Note that there is no python file containing a Parser class. We
+have to generate one.
+
+To do this, run:
+
+ $ bison2py javaparser.y javaparser.l javaparser.py
+
+or just:
+
+ $ bison2py javaparser
+
+You should now see a file javaparser.py
+
+Then, just run the run-javaparser.py script. The
+script will instantiate a parser and run it on the
+whatever source file you give as an argument.
+

+ 180 - 0
examples/java/javaparser.l

@@ -0,0 +1,180 @@
+D            [0-9]
+N            [1-9]
+L            [a-zA-Z_$]
+H            [a-fA-F0-9]
+OC           [0-7]
+E            [Ee][+-]?{D}+
+LS           [fFdD]
+Escape       \\[ntbrf\\'"]
+Escchar      \\{D}({D}?{D})?
+Escunichar   \\u{H}{H}{H}{H}
+
+%{
+int yylineno = 0;
+#include <stdio.h>
+#include <string.h>
+#include "Python.h"
+#define YYSTYPE void *
+#include "tokens.h"
+extern void *py_parser;
+extern void (*py_input)(PyObject *parser, char *buf, int *result, int max_size);
+#define returntoken(tok) /*printf("%d=%s\n", tok, yytext);*/ yylval = PyString_FromString(strdup(yytext)); return (tok);
+#define YY_INPUT(buf,result,max_size) { (*py_input)(py_parser, buf, &result, max_size); }
+
+#include "table.h"
+
+%}
+
+%%
+
+
+{N}{D}*(l|L)?           { returntoken(INTEGER_LITERAL_TOKEN); }
+{N}{D}*(d|D)?           { returntoken(INTEGER_LITERAL_TOKEN); }
+0[xX]{H}+(l|L)?         { returntoken(INTEGER_LITERAL_TOKEN); }
+0{OC}*(l|L)?            { returntoken(INTEGER_LITERAL_TOKEN); }
+
+{D}+"."{D}*({E})?{LS}?  { returntoken(FLOATING_POINT_LITERAL_TOKEN); }
+"."{D}+({E})?{LS}?      { returntoken(FLOATING_POINT_LITERAL_TOKEN); }
+{D}+{E}{LS}?            { returntoken(FLOATING_POINT_LITERAL_TOKEN); }
+{D}{LS}                 { returntoken(FLOATING_POINT_LITERAL_TOKEN); }
+
+
+"true"                  { returntoken(BOOLEAN_LITERAL_TOKEN); }
+"false"                 { returntoken(BOOLEAN_LITERAL_TOKEN); }
+
+{L}({L}|{D})*           { returntoken(Table_Lookup(KeywordTable));}
+
+'[^'\\]'                { returntoken(CHARACTER_LITERAL_TOKEN);}
+'{Escape}'              { returntoken(CHARACTER_LITERAL_TOKEN);}
+
+
+  \"([^\"\\]|{Escape}|{Escchar}|{Escunichar})*\" { returntoken(STRING_LITERAL_TOKEN); }
+
+\/\/.*$                 {}
+\/\*                    { comment();}
+
+"("     { returntoken(OPEN_PAREN_TOKEN); }
+")"     { returntoken(CLOSE_PAREN_TOKEN); }
+"{"     { returntoken(OPEN_BRACE_TOKEN); }
+"}"     { returntoken(CLOSE_BRACE_TOKEN); }
+"["     { returntoken(OPEN_BRACKET_TOKEN); }
+"]"     { returntoken(CLOSE_BRACKET_TOKEN); }
+";"     { returntoken(SEMICOLON_TOKEN); }
+","     { returntoken(COMMA_TOKEN); }
+"."     { returntoken(PERIOD_TOKEN); }
+"="     { returntoken(ASSIGNS_TOKEN); }
+">"     { returntoken(GREATER_TOKEN); }
+"<"     { returntoken(LESS_TOKEN); }
+"!"     { returntoken(NOT_TOKEN); }
+"~"     { returntoken(TILDE_TOKEN); }
+"?"     { returntoken(CONDITIONAL_TOKEN); }
+":"     { returntoken(COLON_TOKEN); }
+"=="    { returntoken(EQ_TOKEN); }
+"<="    { returntoken(LE_TOKEN); }
+">="    { returntoken(GE_TOKEN); }
+"!="    { returntoken(NE_OP_TOKEN); }
+"||"    { returntoken(LOGICAL_OR_TOKEN); }
+"&&"    { returntoken(LOGICAL_AND_TOKEN); }
+"++"    { returntoken(INC_TOKEN); }
+"--"    { returntoken(DEC_TOKEN); }
+"+"     { returntoken(PLUS_TOKEN); }
+"-"     { returntoken(MINUS_TOKEN); }
+"*"     { returntoken(MUL_TOKEN); }
+"/"     { returntoken(DIV_TOKEN); }
+"&"     { returntoken(AND_TOKEN); }
+"|"     { returntoken(OR_TOKEN); }
+"^"     { returntoken(XOR_TOKEN); }
+"%"     { returntoken(MOD_TOKEN); }
+"<<"    { returntoken(SHL_TOKEN); }
+">>"    { returntoken(SAR_TOKEN); }
+">>>"   { returntoken(SHL_TOKEN); }
+"+="    { returntoken(ADD_ASSIGN_TOKEN); }
+"-="    { returntoken(SUB_ASSIGN_TOKEN); }
+"*="    { returntoken(MUL_ASSIGN_TOKEN); }
+"/="    { returntoken(DIV_ASSIGN_TOKEN); }
+"&="    { returntoken(AND_ASSIGN_TOKEN); }
+"|="    { returntoken(OR_ASSIGN_TOKEN); }
+"^="    { returntoken(XOR_ASSIGN_TOKEN); }
+"%="    { returntoken(MOD_ASSIGN_TOKEN); }
+"<<="   { returntoken(SHL_ASSIGN_TOKEN); }
+">>="   { returntoken(SAR_ASSIGN_TOKEN); }
+">>>="  { returntoken(SHR_ASSIGN_TOKEN); }
+
+[ \t\v\f]             {}
+[\n]		{yylineno++;}
+
+.       { printf("unknown char %c ignored\n", yytext[0]); /* ignore bad chars */}
+
+
+%%
+
+yywrap() { return(1); }
+
+/* test_main()
+{
+    int t;
+
+    for(t = yylex(), t > 0, t = yylex())
+    {
+        printf("%s\t%d\n", yytext,t);
+    }
+
+    return 0;
+}
+*/
+
+
+/* input: Table of tokens
+ * returns TokenCode of keyword if matched or 
+ * ID_TOKEN if no match is found 
+ */
+int Table_Lookup(struct KeywordToken Table[])
+{
+    struct KeywordToken *Curr;
+    int i = 0;
+
+    for (Curr = Table; Curr->Keyword != ""; Curr++)
+      {
+        //printf("Table_Lookup: yytext='%s', Curr->Keyword='%s', idx=%d\n", yytext, Curr->Keyword, i);
+
+        if (strcmp(Curr->Keyword, yytext)==0)
+          {
+            //printf("Table_Lookup: '%s' => %d\n", yytext, Curr->TokenCode);
+            return (Curr->TokenCode);
+          }
+        i++;
+      }
+    return ID_TOKEN;
+}
+
+commentold()
+{
+    char c = -1, c1;
+    while(c != 0)
+    {
+        for(c = input(); c != '*' && c!=0; c = input())
+            ;
+
+        /* now we have a star or no more chars */
+        if(c == 0 || (c1 = input() == '/'))
+            return;
+
+        if (c1 == '*')
+            unput(c1);
+    }
+}
+
+comment()
+{
+  int prev=-1, cur=-1;
+
+  while (1)
+    {
+      cur = input();
+      if (cur == '/' && prev == '*')
+        return;
+      else if (cur == 0)
+        return;
+      prev = cur;
+    }
+}

+ 954 - 0
examples/java/javaparser.y

@@ -0,0 +1,954 @@
+/* yacc grammar for JAVA language */
+/* print with     psf -p 10 -L50 -l 50 -w -E j.y > xx */
+
+%{
+#define REDUCE  /* will display the reduce rules */
+#undef  REDUCE
+
+#define PRNT_SYM
+#undef  PRNT_SYM
+
+#define YYDEBUG 1
+
+#include <stdio.h>
+
+extern FILE *yyin;
+extern int yylineno;
+extern int yydebug;
+extern char yytext[];
+
+#ifdef REDUCE
+#   define reduce(a) printf("%s\n",a)
+#else
+#   define reduce(a)
+#endif
+
+#define YYSTYPE PyObject *
+
+%}
+
+/* Things defined here have to match the order of what's in the
+   binop_lookup table.  */
+
+%token   PLUS_TOKEN         MINUS_TOKEN        MUL_TOKEN         DIV_TOKEN    MOD_TOKEN
+%token   SHL_TOKEN           SHR_TOKEN          SAR_TOKEN
+%token   AND_TOKEN          XOR_TOKEN          OR_TOKEN
+%token   LOGICAL_AND_TOKEN LOGICAL_OR_TOKEN 
+%token   EQ_TOKEN NE_OP_TOKEN GREATER_TOKEN GE_TOKEN LESS_TOKEN LE_TOKEN
+
+/* This maps to the same binop_lookup entry than the token above */
+
+%token   ADD_ASSIGN_TOKEN  SUB_ASSIGN_TOKEN MUL_ASSIGN_TOKEN DIV_ASSIGN_TOKEN
+%token   MOD_ASSIGN_TOKEN   
+%token   SHL_ASSIGN_TOKEN    SHR_ASSIGN_TOKEN   SAR_ASSIGN_TOKEN
+%token   AND_ASSIGN_TOKEN   XOR_ASSIGN_TOKEN   OR_ASSIGN_TOKEN
+
+
+/* Modifier TOKEN have to be kept in this order. Don't scramble it */
+
+%token   PUBLIC_TOKEN       PRIVATE_TOKEN         PROTECTED_TOKEN
+%token   STATIC_TOKEN       FINAL_TOKEN           SYNCHRONIZED_TOKEN
+%token   VOLATILE_TOKEN     TRANSIENT_TOKEN       NATIVE_TOKEN
+%token   PAD_TOKEN          ABSTRACT_TOKEN        MODIFIER_TOKEN
+%token   STRICT_TOKEN STRICTFP_TOKEN
+
+/* Keep those two in order, too */
+%token   DEC_TOKEN INC_TOKEN
+
+/* From now one, things can be in any order */
+
+%token   DEFAULT_TOKEN      IF_TOKEN              THROW_TOKEN
+%token   BOOLEAN_TOKEN      DO_TOKEN              IMPLEMENTS_TOKEN
+%token   THROWS_TOKEN       BREAK_TOKEN           IMPORT_TOKEN       
+%token   ELSE_TOKEN         INSTANCEOF_TOKEN      RETURN_TOKEN
+%token   VOID_TOKEN         CATCH_TOKEN           INTERFACE_TOKEN
+%token   CASE_TOKEN         EXTENDS_TOKEN         FINALLY_TOKEN
+%token   SUPER_TOKEN        WHILE_TOKEN           CLASS_TOKEN
+%token   SWITCH_TOKEN       CONST_TOKEN           TRY_TOKEN
+%token   FOR_TOKEN          NEW_TOKEN             CONTINUE_TOKEN
+%token   GOTO_TOKEN         PACKAGE_TOKEN         THIS_TOKEN
+%token   ASSERT_TOKEN
+
+%token   BYTE_TOKEN         SHORT_TOKEN           INT_TOKEN            LONG_TOKEN
+%token   CHAR_TOKEN
+
+%token   FLOAT_TOKEN        DOUBLE_TOKEN
+
+%token   ID_TOKEN
+
+%token   CONDITIONAL_TOKEN         COLON_TOKEN TILDE_TOKEN  NOT_TOKEN
+
+%token   ASSIGN_ANY_TOKEN   ASSIGNS_TOKEN
+%token   OPEN_PAREN_TOKEN  CLOSE_PAREN_TOKEN  OPEN_BRACE_TOKEN  CLOSE_BRACE_TOKEN  OPEN_BRACKET_TOKEN  CLOSE_BRACKET_TOKEN  SEMICOLON_TOKEN  COMMA_TOKEN PERIOD_TOKEN
+
+%token INTEGER_LITERAL_TOKEN   FLOATING_POINT_LITERAL_TOKEN   BOOLEAN_LITERAL_TOKEN   STRING_LITERAL_TOKEN
+%token CHARACTER_LITERAL_TOKEN    NULL_TOKEN
+
+
+%right SHL_ASSIGN_TOKEN SAR_ASSIGN_TOKEN AND_ASSIGN_TOKEN OR_ASSIGN_TOKEN XOR_ASSIGN_TOKEN
+       ASSIGNS_TOKEN ADD_ASSIGN_TOKEN SUB_ASSIGN_TOKEN MUL_ASSIGN_TOKEN DIV_ASSIGN_TOKEN MOD_ASSIGN_TOKEN
+%left  LOGICAL_OR_TOKEN
+%left  LOGICAL_AND_TOKEN   
+%left  OR_TOKEN 
+%left  XOR_TOKEN
+%left  AND_TOKEN
+%left  RELATIVEQEUAL_TOKEN NE_OP_TOKEN 
+%left  GREATER_TOKEN LESS_TOKEN GE_TOKEN LE_TOKEN
+%left  SHL_TOKEN SAR_TOKEN SHR_TOKEN
+%left  PLUS_TOKEN MINUS_TOKEN
+%left  MUL_TOKEN DIV_TOKEN MOD_TOKEN
+%nonassoc NOT_TOKEN TILDE_TOKEN 
+
+
+%start goal
+
+%%
+
+goal
+: compilation_unit
+;
+
+literal
+: INTEGER_LITERAL_TOKEN
+| FLOATING_POINT_LITERAL_TOKEN
+| BOOLEAN_LITERAL_TOKEN
+| CHARACTER_LITERAL_TOKEN
+| STRING_LITERAL_TOKEN
+| NULL_TOKEN
+;
+
+type
+: primitive_type
+| reference_type
+;
+
+primitive_type 
+: INT_TOKEN
+| LONG_TOKEN
+| FLOAT_TOKEN
+| DOUBLE_TOKEN
+| BOOLEAN_TOKEN
+| BYTE_TOKEN
+| CHAR_TOKEN
+| SHORT_TOKEN
+;
+
+reference_type
+: class_or_interface_type
+| array_type
+;
+
+class_or_interface_type
+: name
+;
+
+class_type
+: class_or_interface_type
+;
+
+interface_type
+: class_or_interface_type
+;
+
+array_type
+: primitive_type dims
+| name dims
+;
+
+name
+: simple_name
+| qualified_name
+;
+
+simple_name
+: identifier
+;
+
+qualified_name
+: name PERIOD_TOKEN identifier
+;
+
+identifier
+: ID_TOKEN
+;
+
+compilation_unit
+:
+| package_declaration
+| import_declarations
+| type_declarations
+| package_declaration import_declarations
+| package_declaration type_declarations
+| import_declarations type_declarations
+| package_declaration import_declarations type_declarations
+;
+
+import_declarations
+: import_declaration
+| import_declarations import_declaration
+;
+
+type_declarations 
+: type_declaration
+| type_declarations type_declaration
+;
+
+package_declaration 
+: PACKAGE_TOKEN name SEMICOLON_TOKEN
+;
+
+import_declaration 
+: single_type_import_declaration
+| type_import_on_demand_declaration
+;
+
+single_type_import_declaration 
+: IMPORT_TOKEN name SEMICOLON_TOKEN
+;
+
+type_import_on_demand_declaration 
+: IMPORT_TOKEN name PERIOD_TOKEN MUL_TOKEN SEMICOLON_TOKEN
+;
+
+type_declaration 
+: class_declaration
+| interface_declaration
+| empty_statement
+;
+
+modifiers 
+: modifier
+| modifiers modifier
+;
+
+modifier
+: STATIC_TOKEN
+| PUBLIC_TOKEN
+| PROTECTED_TOKEN
+| PRIVATE_TOKEN
+| ABSTRACT_TOKEN
+| FINAL_TOKEN
+| NATIVE_TOKEN
+| SYNCHRONIZED_TOKEN
+| TRANSIENT_TOKEN
+| VOLATILE_TOKEN
+;
+
+class_declaration 
+: modifiers CLASS_TOKEN identifier super interfaces class_body
+| CLASS_TOKEN identifier super interfaces class_body
+;
+
+super 
+:
+| EXTENDS_TOKEN class_type
+;
+
+interfaces 
+:
+| IMPLEMENTS_TOKEN interface_type_list
+;
+
+interface_type_list
+: interface_type
+| interface_type_list COMMA_TOKEN interface_type
+;
+
+class_body 
+: OPEN_BRACE_TOKEN CLOSE_BRACE_TOKEN
+| OPEN_BRACE_TOKEN class_body_declarations CLOSE_BRACE_TOKEN
+;
+
+class_body_declarations 
+: class_body_declaration
+| class_body_declarations class_body_declaration
+;
+
+class_body_declaration 
+: class_member_declaration
+| static_initializer
+| constructor_declaration
+| block
+;
+
+class_member_declaration 
+: field_declaration
+| method_declaration
+| class_declaration
+| interface_declaration
+| empty_statement
+;
+
+field_declaration 
+: type variable_declarators SEMICOLON_TOKEN
+| modifiers type variable_declarators SEMICOLON_TOKEN
+;
+
+variable_declarators 
+: variable_declarator
+| variable_declarators COMMA_TOKEN variable_declarator
+;
+
+variable_declarator 
+: variable_declarator_id
+| variable_declarator_id ASSIGNS_TOKEN variable_initializer
+;
+
+variable_declarator_id 
+: identifier
+| variable_declarator_id OPEN_BRACKET_TOKEN CLOSE_BRACKET_TOKEN
+;
+
+variable_initializer 
+: expression
+| array_initializer
+;
+
+method_declaration 
+: method_header method_body
+;
+
+method_header
+: type method_declarator throws
+| VOID_TOKEN method_declarator throws
+| modifiers type method_declarator throws
+| modifiers VOID_TOKEN method_declarator throws
+;
+
+method_declarator 
+: identifier OPEN_PAREN_TOKEN CLOSE_PAREN_TOKEN
+| identifier OPEN_PAREN_TOKEN formal_parameter_list CLOSE_PAREN_TOKEN
+| method_declarator OPEN_BRACKET_TOKEN CLOSE_BRACKET_TOKEN
+;
+
+formal_parameter_list 
+: formal_parameter
+| formal_parameter_list COMMA_TOKEN formal_parameter
+;
+
+formal_parameter 
+: type variable_declarator_id
+| modifiers type variable_declarator_id
+;
+
+throws 
+:
+| THROWS_TOKEN class_type_list
+;
+
+class_type_list 
+: class_type
+| class_type_list COMMA_TOKEN class_type
+;
+
+method_body 
+: block
+| SEMICOLON_TOKEN
+;
+
+static_initializer 
+: static block
+;
+
+static
+: modifiers
+;
+
+constructor_declaration 
+: constructor_header constructor_body
+;
+
+constructor_header
+: constructor_declarator throws
+|	modifiers constructor_declarator throws
+;
+
+constructor_declarator 
+: simple_name OPEN_PAREN_TOKEN CLOSE_PAREN_TOKEN
+| simple_name OPEN_PAREN_TOKEN formal_parameter_list CLOSE_PAREN_TOKEN
+;
+
+constructor_body
+: block_begin constructor_block_end
+| block_begin explicit_constructor_invocation constructor_block_end
+| block_begin block_statements constructor_block_end
+| block_begin explicit_constructor_invocation block_statements constructor_block_end
+;
+
+constructor_block_end
+: block_end
+;
+
+block_begin
+: OPEN_BRACE_TOKEN
+;
+
+block_end
+: CLOSE_BRACE_TOKEN
+;
+
+explicit_constructor_invocation 
+: this_or_super OPEN_PAREN_TOKEN CLOSE_PAREN_TOKEN SEMICOLON_TOKEN
+| this_or_super OPEN_PAREN_TOKEN argument_list CLOSE_PAREN_TOKEN SEMICOLON_TOKEN
+| name PERIOD_TOKEN SUPER_TOKEN OPEN_PAREN_TOKEN argument_list CLOSE_PAREN_TOKEN SEMICOLON_TOKEN
+| name PERIOD_TOKEN SUPER_TOKEN OPEN_PAREN_TOKEN CLOSE_PAREN_TOKEN SEMICOLON_TOKEN
+;
+
+this_or_super
+: THIS_TOKEN
+| SUPER_TOKEN
+;
+
+interface_declaration 
+: INTERFACE_TOKEN identifier interface_body
+| modifiers INTERFACE_TOKEN identifier interface_body
+| INTERFACE_TOKEN identifier extends_interfaces interface_body
+| modifiers INTERFACE_TOKEN identifier extends_interfaces interface_body
+;
+
+extends_interfaces 
+: EXTENDS_TOKEN interface_type
+| extends_interfaces COMMA_TOKEN interface_type
+;
+
+interface_body 
+: OPEN_BRACE_TOKEN CLOSE_BRACE_TOKEN
+| OPEN_BRACE_TOKEN interface_member_declarations CLOSE_BRACE_TOKEN
+;
+
+interface_member_declarations 
+: interface_member_declaration
+| interface_member_declarations interface_member_declaration
+;
+
+interface_member_declaration 
+: constant_declaration
+| abstract_method_declaration
+| class_declaration
+| interface_declaration
+;
+
+constant_declaration 
+: field_declaration
+;
+
+abstract_method_declaration 
+: method_header SEMICOLON_TOKEN
+;
+
+array_initializer 
+: OPEN_BRACE_TOKEN CLOSE_BRACE_TOKEN
+| OPEN_BRACE_TOKEN COMMA_TOKEN CLOSE_BRACE_TOKEN
+| OPEN_BRACE_TOKEN variable_initializers CLOSE_BRACE_TOKEN
+| OPEN_BRACE_TOKEN variable_initializers COMMA_TOKEN CLOSE_BRACE_TOKEN
+;
+
+variable_initializers 
+: variable_initializer
+| variable_initializers COMMA_TOKEN variable_initializer
+;
+
+block 
+: OPEN_BRACE_TOKEN CLOSE_BRACE_TOKEN
+| OPEN_BRACE_TOKEN block_statements CLOSE_BRACE_TOKEN
+;
+
+block_statements 
+: block_statement
+| block_statements block_statement
+;
+
+block_statement 
+: local_variable_declaration_statement
+| statement
+| class_declaration
+;
+
+local_variable_declaration_statement 
+: local_variable_declaration SEMICOLON_TOKEN
+;
+
+local_variable_declaration 
+: type variable_declarators
+| modifiers type variable_declarators
+;
+
+statement 
+: statement_without_trailing_substatement
+| labeled_statement
+| if_then_statement
+| if_then_else_statement
+| while_statement
+| for_statement
+;
+
+statement_nsi 
+: statement_without_trailing_substatement
+| labeled_statement_nsi
+| if_then_else_statement_nsi
+| while_statement_nsi
+| for_statement_nsi
+;
+
+statement_without_trailing_substatement 
+: block
+| empty_statement
+| expression_statement
+| switch_statement
+| do_statement
+| break_statement
+| continue_statement
+| return_statement
+| synchronized_statement
+| throw_statement
+| try_statement
+| assert_statement
+;
+
+empty_statement 
+: SEMICOLON_TOKEN
+;
+
+label_decl 
+: identifier COLON_TOKEN
+;
+
+labeled_statement 
+: label_decl statement
+;
+
+labeled_statement_nsi 
+: label_decl statement_nsi
+;
+
+expression_statement 
+: statement_expression SEMICOLON_TOKEN
+| SYNCHRONIZED_TOKEN OPEN_PAREN_TOKEN argument_list CLOSE_PAREN_TOKEN block
+;
+
+statement_expression
+: assignment
+| primary
+| pre_increment_expression
+| pre_decrement_expression
+| post_increment_expression
+| post_decrement_expression
+| method_invocation
+| class_instance_creation_expression
+;
+
+if_then_statement 
+: IF_TOKEN OPEN_PAREN_TOKEN expression CLOSE_PAREN_TOKEN statement
+;
+
+if_then_else_statement 
+: IF_TOKEN OPEN_PAREN_TOKEN expression CLOSE_PAREN_TOKEN statement_nsi ELSE_TOKEN statement
+;
+
+if_then_else_statement_nsi 
+: IF_TOKEN OPEN_PAREN_TOKEN expression CLOSE_PAREN_TOKEN statement_nsi ELSE_TOKEN statement_nsi
+;
+
+switch_statement 
+: switch_expression switch_block
+;
+
+switch_expression
+: SWITCH_TOKEN OPEN_PAREN_TOKEN expression CLOSE_PAREN_TOKEN
+;
+
+switch_block 
+: OPEN_BRACE_TOKEN CLOSE_BRACE_TOKEN
+| OPEN_BRACE_TOKEN switch_labels CLOSE_BRACE_TOKEN
+| OPEN_BRACE_TOKEN switch_block_statement_groups CLOSE_BRACE_TOKEN
+| OPEN_BRACE_TOKEN switch_block_statement_groups switch_labels CLOSE_BRACE_TOKEN
+;
+
+switch_block_statement_groups
+: switch_block_statement_group
+| switch_block_statement_groups switch_block_statement_group
+;
+
+switch_block_statement_group 
+: switch_labels block_statements
+;
+
+switch_labels 
+: switch_label
+| switch_labels switch_label
+;
+
+switch_label 
+: CASE_TOKEN constant_expression COLON_TOKEN
+| DEFAULT_TOKEN COLON_TOKEN
+;
+
+while_expression 
+: WHILE_TOKEN OPEN_PAREN_TOKEN expression CLOSE_PAREN_TOKEN
+;
+
+while_statement 
+: while_expression statement
+;
+
+while_statement_nsi 
+: while_expression statement_nsi
+;
+
+do_statement_begin 
+: DO_TOKEN
+;
+
+do_statement
+: do_statement_begin statement WHILE_TOKEN OPEN_PAREN_TOKEN expression CLOSE_PAREN_TOKEN SEMICOLON_TOKEN
+;
+
+for_statement 
+: for_begin SEMICOLON_TOKEN expression SEMICOLON_TOKEN for_update CLOSE_PAREN_TOKEN statement
+| for_begin SEMICOLON_TOKEN SEMICOLON_TOKEN for_update CLOSE_PAREN_TOKEN statement
+;
+
+for_statement_nsi 
+: for_begin SEMICOLON_TOKEN expression SEMICOLON_TOKEN for_update CLOSE_PAREN_TOKEN statement_nsi
+| for_begin SEMICOLON_TOKEN SEMICOLON_TOKEN for_update CLOSE_PAREN_TOKEN statement_nsi
+;
+
+for_header 
+: FOR_TOKEN OPEN_PAREN_TOKEN
+;
+
+for_begin 
+: for_header for_init
+;
+
+for_init
+:
+| statement_expression_list
+| local_variable_declaration
+;
+
+for_update
+:
+| statement_expression_list
+;
+
+statement_expression_list 
+: statement_expression
+| statement_expression_list COMMA_TOKEN statement_expression
+;
+
+break_statement 
+: BREAK_TOKEN SEMICOLON_TOKEN
+| BREAK_TOKEN identifier SEMICOLON_TOKEN
+;
+
+continue_statement 
+: CONTINUE_TOKEN SEMICOLON_TOKEN
+| CONTINUE_TOKEN identifier SEMICOLON_TOKEN
+;
+
+return_statement 
+: RETURN_TOKEN SEMICOLON_TOKEN
+| RETURN_TOKEN expression SEMICOLON_TOKEN
+;
+
+throw_statement 
+: THROW_TOKEN expression SEMICOLON_TOKEN
+;
+
+assert_statement 
+: ASSERT_TOKEN expression COLON_TOKEN expression SEMICOLON_TOKEN
+| ASSERT_TOKEN expression SEMICOLON_TOKEN
+| ASSERT_TOKEN error
+| ASSERT_TOKEN expression error
+;
+synchronized_statement 
+: synchronized OPEN_PAREN_TOKEN expression CLOSE_PAREN_TOKEN block
+| synchronized OPEN_PAREN_TOKEN expression CLOSE_PAREN_TOKEN error
+;
+
+synchronized
+: MODIFIER_TOKEN
+;
+
+try_statement 
+: TRY_TOKEN block catches
+| TRY_TOKEN block finally
+| TRY_TOKEN block catches finally
+;
+
+catches 
+: catch_clause
+| catches catch_clause
+;
+
+catch_clause 
+: CATCH_TOKEN OPEN_PAREN_TOKEN formal_parameter CLOSE_PAREN_TOKEN block
+;
+
+finally 
+: FINALLY_TOKEN block
+;
+
+primary
+: primary_no_new_array
+| array_creation_expression
+;
+
+primary_no_new_array 
+: literal
+| THIS_TOKEN
+| OPEN_PAREN_TOKEN expression CLOSE_PAREN_TOKEN
+| class_instance_creation_expression
+| field_access
+| method_invocation
+| array_access
+| type_literals
+| name PERIOD_TOKEN THIS_TOKEN
+;
+
+type_literals 
+: name PERIOD_TOKEN CLASS_TOKEN
+| array_type PERIOD_TOKEN CLASS_TOKEN
+| primitive_type PERIOD_TOKEN CLASS_TOKEN
+| VOID_TOKEN PERIOD_TOKEN CLASS_TOKEN
+;
+
+class_instance_creation_expression 
+: NEW_TOKEN class_type OPEN_PAREN_TOKEN argument_list CLOSE_PAREN_TOKEN
+| NEW_TOKEN class_type OPEN_PAREN_TOKEN CLOSE_PAREN_TOKEN
+| anonymous_class_creation
+| something_dot_new identifier OPEN_PAREN_TOKEN CLOSE_PAREN_TOKEN
+| something_dot_new identifier OPEN_PAREN_TOKEN CLOSE_PAREN_TOKEN class_body
+| something_dot_new identifier OPEN_PAREN_TOKEN argument_list CLOSE_PAREN_TOKEN
+| something_dot_new identifier OPEN_PAREN_TOKEN argument_list CLOSE_PAREN_TOKEN class_body
+;
+
+anonymous_class_creation 
+: NEW_TOKEN class_type OPEN_PAREN_TOKEN CLOSE_PAREN_TOKEN class_body 
+| NEW_TOKEN class_type OPEN_PAREN_TOKEN argument_list CLOSE_PAREN_TOKEN class_body
+;
+
+something_dot_new
+: name PERIOD_TOKEN NEW_TOKEN
+| primary PERIOD_TOKEN NEW_TOKEN
+;
+
+argument_list 
+: expression
+| argument_list COMMA_TOKEN expression
+| argument_list COMMA_TOKEN error
+;
+
+array_creation_expression 
+: NEW_TOKEN primitive_type dim_exprs
+| NEW_TOKEN class_or_interface_type dim_exprs
+| NEW_TOKEN primitive_type dim_exprs dims
+| NEW_TOKEN class_or_interface_type dim_exprs dims
+| NEW_TOKEN class_or_interface_type dims array_initializer
+| NEW_TOKEN primitive_type dims array_initializer
+;
+
+dim_exprs 
+: dim_expr
+| dim_exprs dim_expr
+;
+
+dim_expr 
+: OPEN_BRACKET_TOKEN expression CLOSE_BRACKET_TOKEN
+;
+
+dims
+: OPEN_BRACKET_TOKEN CLOSE_BRACKET_TOKEN
+| dims OPEN_BRACKET_TOKEN CLOSE_BRACKET_TOKEN
+;
+
+field_access 
+: primary PERIOD_TOKEN identifier
+| SUPER_TOKEN PERIOD_TOKEN identifier
+;
+
+method_invocation 
+: name OPEN_PAREN_TOKEN CLOSE_PAREN_TOKEN
+| name OPEN_PAREN_TOKEN argument_list CLOSE_PAREN_TOKEN
+| primary PERIOD_TOKEN identifier OPEN_PAREN_TOKEN CLOSE_PAREN_TOKEN
+| primary PERIOD_TOKEN identifier OPEN_PAREN_TOKEN argument_list CLOSE_PAREN_TOKEN
+| SUPER_TOKEN PERIOD_TOKEN identifier OPEN_PAREN_TOKEN CLOSE_PAREN_TOKEN
+| SUPER_TOKEN PERIOD_TOKEN identifier OPEN_PAREN_TOKEN argument_list CLOSE_PAREN_TOKEN
+;
+
+array_access 
+: name OPEN_BRACKET_TOKEN expression CLOSE_BRACKET_TOKEN
+| primary_no_new_array OPEN_BRACKET_TOKEN expression CLOSE_BRACKET_TOKEN
+;
+
+postfix_expression 
+: primary
+| name
+| post_increment_expression
+| post_decrement_expression
+;
+
+post_increment_expression 
+: postfix_expression INC_TOKEN
+;
+
+post_decrement_expression 
+: postfix_expression DEC_TOKEN
+;
+
+trap_overflow_corner_case
+: pre_increment_expression
+| pre_decrement_expression
+| PLUS_TOKEN unary_expression
+| unary_expression_not_plus_minus
+;
+
+unary_expression
+: trap_overflow_corner_case
+| MINUS_TOKEN trap_overflow_corner_case
+| MINUS_TOKEN error
+;
+
+pre_increment_expression 
+: INC_TOKEN unary_expression
+;
+
+pre_decrement_expression 
+: DEC_TOKEN unary_expression
+;
+
+unary_expression_not_plus_minus 
+: postfix_expression
+| TILDE_TOKEN unary_expression
+| NOT_TOKEN unary_expression
+| cast_expression
+;
+
+cast_expression
+: OPEN_PAREN_TOKEN primitive_type dims CLOSE_PAREN_TOKEN unary_expression
+| OPEN_PAREN_TOKEN primitive_type CLOSE_PAREN_TOKEN unary_expression
+| OPEN_PAREN_TOKEN expression CLOSE_PAREN_TOKEN unary_expression_not_plus_minus
+| OPEN_PAREN_TOKEN name dims CLOSE_PAREN_TOKEN unary_expression_not_plus_minus
+;
+
+multiplicative_expression 
+: unary_expression
+| multiplicative_expression MUL_TOKEN unary_expression
+| multiplicative_expression DIV_TOKEN unary_expression
+| multiplicative_expression MOD_TOKEN unary_expression
+;
+
+additive_expression 
+: multiplicative_expression
+| additive_expression PLUS_TOKEN multiplicative_expression
+| additive_expression MINUS_TOKEN multiplicative_expression
+;
+
+shift_expression 
+: additive_expression
+| shift_expression SHL_TOKEN additive_expression
+| shift_expression SHR_TOKEN additive_expression
+| shift_expression SAR_TOKEN additive_expression
+;
+
+relational_expression 
+: shift_expression
+| relational_expression LESS_TOKEN shift_expression
+| relational_expression GREATER_TOKEN shift_expression
+| relational_expression LE_TOKEN shift_expression
+| relational_expression GE_TOKEN shift_expression
+| relational_expression INSTANCEOF_TOKEN reference_type
+;
+
+equality_expression 
+: relational_expression
+| equality_expression EQ_TOKEN relational_expression
+| equality_expression NE_OP_TOKEN relational_expression
+;
+
+and_expression 
+: equality_expression
+| and_expression AND_TOKEN equality_expression
+;
+
+exclusive_or_expression 
+: and_expression
+| exclusive_or_expression XOR_TOKEN and_expression
+;
+
+inclusive_or_expression 
+: exclusive_or_expression
+| inclusive_or_expression OR_TOKEN exclusive_or_expression
+;
+
+conditional_and_expression 
+: inclusive_or_expression
+| conditional_and_expression LOGICAL_AND_TOKEN inclusive_or_expression
+;
+
+conditional_or_expression 
+: conditional_and_expression
+| conditional_or_expression LOGICAL_OR_TOKEN conditional_and_expression
+;
+
+conditional_expression
+: conditional_or_expression
+| conditional_or_expression CONDITIONAL_TOKEN expression COLON_TOKEN conditional_expression
+;
+
+assignment_expression 
+: conditional_expression
+| assignment
+;
+
+assignment 
+: left_hand_side assignment_operator assignment_expression
+;
+
+left_hand_side 
+: name
+| field_access
+| array_access
+;
+
+assignment_operator 
+: ASSIGNS_TOKEN
+| ADD_ASSIGN_TOKEN
+| SUB_ASSIGN_TOKEN
+| MUL_ASSIGN_TOKEN
+| DIV_ASSIGN_TOKEN
+| MOD_ASSIGN_TOKEN   
+| SHL_ASSIGN_TOKEN
+| SHR_ASSIGN_TOKEN
+| SAR_ASSIGN_TOKEN
+| AND_ASSIGN_TOKEN
+| XOR_ASSIGN_TOKEN
+| OR_ASSIGN_TOKEN
+;
+
+expression 
+: assignment_expression
+;
+
+constant_expression 
+: expression
+;
+
+%%
+
+
+void print_prototype(void)
+{
+}
+
+void generate_default_constructor(char *name)
+{
+}
+    
+int yyerror(char *mesg)
+{
+     printf("line %d: %s before %s\n", yylineno, mesg, yytext);
+     exit(0);
+}
+

+ 38 - 0
examples/java/run.py

@@ -0,0 +1,38 @@
+#!/usr/bin/env python
+"""
+Runs the java parser on a small java source file
+"""
+import sys
+
+import javaparser
+
+#src = "tst.java"
+
+argv = sys.argv
+argc = len(argv)
+
+if '-v' in argv:
+    argv.remove('-v')
+    argc -= 1
+    verbose = 1
+else:
+    verbose = 0
+
+if argc == 2:
+    src = argv[1]
+else:
+    src = None
+
+src = "I2PClient.java"
+
+p = myjava.Parser(verbose=verbose)
+
+print "delmebld.py: running parser on HelloWorldApp.java"
+res = p.run(file=src)
+print "back from engine, parse tree dump follows:"
+if 0:
+    print "------------------------------------------"
+    res.dump()
+    print "------------------------------------------"
+    print "end of parse tree dump"
+

+ 68 - 0
examples/java/table.h

@@ -0,0 +1,68 @@
+//@+leo-ver=4
+//@+node:@file examples/java/table.h
+//@@language c
+#include "tokens.h"
+
+struct KeywordToken
+{
+	char * Keyword;
+	int TokenCode;
+
+};
+
+struct KeywordToken KeywordTable [] = 
+{
+
+  {"abstract", ABSTRACT_TOKEN },
+  {"boolean", BOOLEAN_TOKEN },
+  {"break", BREAK_TOKEN },
+  {"byte", BYTE_TOKEN },
+  {"case", CASE_TOKEN }, 
+  {"catch", CATCH_TOKEN },
+  {"char", CHAR_TOKEN },
+  {"class", CLASS_TOKEN },
+  {"const", CONST_TOKEN },
+  {"continue", CONTINUE_TOKEN },
+  {"default", DEFAULT_TOKEN },
+  {"do", DO_TOKEN },
+  {"double", DOUBLE_TOKEN },
+  {"else", ELSE_TOKEN },
+  {"extends", EXTENDS_TOKEN },
+  {"final", FINAL_TOKEN },
+  {"finally", FINALLY_TOKEN },
+  {"float", FLOAT_TOKEN },
+  {"for", FOR_TOKEN },
+  {"goto", GOTO_TOKEN },
+  {"if", IF_TOKEN },
+  {"implements", IMPLEMENTS_TOKEN },
+  {"import", IMPORT_TOKEN },
+  {"instanceof", INSTANCEOF_TOKEN },
+  {"int", INT_TOKEN },
+  {"interface", INTERFACE_TOKEN },
+  {"long", LONG_TOKEN },
+  {"native", NATIVE_TOKEN },
+  {"new", NEW_TOKEN },
+  {"null", NULL_TOKEN },
+  {"package", PACKAGE_TOKEN },
+  {"private", PRIVATE_TOKEN },
+  {"protected", PROTECTED_TOKEN },
+  {"public", PUBLIC_TOKEN },
+  {"return", RETURN_TOKEN },
+  {"short", SHORT_TOKEN },
+  {"static", STATIC_TOKEN },
+  {"strictfp", STRICTFP_TOKEN },
+  {"super", SUPER_TOKEN },
+  {"switch", SWITCH_TOKEN },
+  {"synchronized", SYNCHRONIZED_TOKEN },
+  {"this", THIS_TOKEN },
+  {"throw", THROW_TOKEN },
+  {"throws", THROWS_TOKEN },
+  {"transient", TRANSIENT_TOKEN },
+  {"try", TRY_TOKEN },
+  {"void", VOID_TOKEN },
+  {"volatile", VOLATILE_TOKEN },
+  {"while", WHILE_TOKEN },
+  {"", ID_TOKEN }
+};
+//@-node:@file examples/java/table.h
+//@-leo

+ 15 - 0
examples/template/README

@@ -0,0 +1,15 @@
+The 'template.py' file in this directory is a working
+but very minimal parser.
+
+You can execute the file as is - the first time you
+do so, it will automatically build and load a parser
+engine library.
+
+This parser does nothing except read a bunch of words
+from its input stream, where a word is an alphanumeric
+string.
+
+Feel free to copy this file somewhere, and tinker away
+to your heart's content. This may be for you the fastest
+way to get a comfortable 'feel' of how PyBison does things.
+

+ 202 - 0
examples/template/template.py

@@ -0,0 +1,202 @@
+#!/usr/bin/env python
+"""
+Template of a pyBison parser file
+
+This is actually a working parser, but so
+minimal as to be totally useless. Refer to the
+'.on_someTarget()' rule handler in the class
+'Parser' below for more info.
+
+You can do much worse than to copy this file
+somewhere, and tinker away to your heart's content.
+"""
+
+import sys, traceback
+
+from bison import BisonParser, BisonNode
+
+# -------------------------------------------
+# Our own custom base class for all objects
+# which get inserted into the parse tree
+# -------------------------------------------
+
+class ParseNode(BisonNode):
+    """
+    This is the base class from which all your
+    parse nodes are derived.
+    Add methods to this class as you need them
+    """
+    def __init__(self, **kw):
+        BisonNode.__init__(self, **kw)
+
+    def __str__(self):
+        """Customise as needed"""
+        return "<%s instance at 0x%x>" % (self.__class__.__name__, hash(self))
+
+    def __repr__(self):
+        """Customise as needed"""
+        return str(self)
+
+    def dump(self, indent=0):
+        """
+        Dump out human-readable, indented parse tree
+        Customise as needed - here, or in the node-specific subclasses
+        """
+        BisonNode.dump(self, indent) # alter as needed
+
+# ----------------------------------------------------
+# Now, we need to define a node class for each parse
+# target. (This is completely optional, but it can
+# turn out to be a PITA if you don't).
+# ----------------------------------------------------
+
+class someTarget_Node(ParseNode):
+    """
+    Holds a "someTarget" parse target and its components.
+    """
+    def __init__(self, **kw):
+        ParseNode.__init__(self, **kw)
+
+    def dump(self, indent=0):
+        ParseNode.dump(self, indent)
+
+
+# ----------------------------------------------------
+# Now, at last, we get to the main Parser class itself
+# ----------------------------------------------------
+
+class Parser(BisonParser):
+    """
+    Describe your parser here
+    """
+
+    # basename of binary parser engine dynamic lib
+    bisonEngineLibName = "template-engine"
+
+    # ----------------------------------------------------------------
+    # lexer tokens - these must match those in your lex script (below)
+    # ----------------------------------------------------------------
+    tokens = [ 'WORD' ]
+
+    # ------------------------------
+    # precedences
+    # ------------------------------
+    precedences = (
+        #('left', ('aTarget1', 'aTarget2',..., 'aTargetn')),
+        #('right', ('another_target1', 'another_target2',..., 'another_targetn')),
+        )
+
+    # ---------------------------------------------------------------
+    # These methods are the python handlers for the bison targets.
+    # (which get called by the bison code each time the corresponding
+    # parse target is unambiguously reached)
+    #
+    # WARNING - don't touch the method docstrings unless you know what
+    # you are doing - they are in bison rule syntax, and are passed
+    # verbatim to bison to build the parser engine library.
+    # ---------------------------------------------------------------
+
+    # Declare the start target here (by name)
+    start = "someTarget"
+
+    def on_someTarget(self, target, option, names, values):
+        """
+        someTarget
+        :
+        | someTarget WORD
+        """
+        print "on_someTarget: %s %s" % (option, repr(values))
+        node = someTarget_Node(target=target,
+                               option=option,
+                               names=names,
+                               values=values)
+        return node
+
+    # -----------------------------------------
+    # raw lex script, verbatim here
+    #
+    # the script used here in this template is one which
+    # breaks up the input stream into strings of
+    # alphanumeric 'words' and discards everything else
+    # -----------------------------------------
+    lexscript = r"""
+%{
+#include <stdio.h>
+#include <string.h>
+#include "Python.h"
+#define YYSTYPE void *
+#include "tokens.h"
+int yylineno = 0;
+int yywrap() { return(1); }
+extern void *py_parser;
+extern void (*py_input)(PyObject *parser, char *buf, int *result, int max_size);
+#define returntoken(tok) yylval = PyString_FromString(strdup(yytext)); return (tok);
+#define YY_INPUT(buf,result,max_size) { (*py_input)(py_parser, buf, &result, max_size); }
+%}
+
+%%
+
+[a-zA-Z0-9\.]+ { returntoken(WORD); }
+[ \t\n]        { /* ignore spaces/tabs/newlines */ }
+.              { printf("unknown char %c ignored\n", yytext[0]); /* ignore bad chars */}
+
+%%
+//yywrap() { return(1); }
+
+    """
+    # -----------------------------------------
+    # end raw lex script
+    # -----------------------------------------
+
+# --------------------------------------------------
+# global functions to add in unit-testing our parser
+# (same as what gets generated by bison2py)
+# --------------------------------------------------
+
+def usage():
+    print "%s: PyBison template parser" % sys.argv[0]
+    print "Usage: %s [-k] [-v] [-d] [filename]" % sys.argv[0]
+    print "  -k       Keep temporary files used in building parse engine lib"
+    print "  -v       Enable verbose messages while parser is running"
+    print "  -d       Enable garrulous debug messages from parser engine"
+    print "  filename path of a file to parse, defaults to stdin"
+
+def main(*args):
+    """
+    Unit-testing func
+    """
+
+    keepfiles = 0
+    verbose = 0
+    debug = 0
+    filename = None
+
+    for s in ["-h", "-help", "--h", "--help", "-?"]:
+        if s in args:
+            usage()
+            sys.exit(0)
+
+    if len(args) > 0:
+        if "-k" in args:
+            keepfiles = 1
+            args.remove("-k")
+        if "-v" in args:
+            verbose = 1
+            args.remove("-v")
+        if "-d" in args:
+            debug = 1
+            args.remove("-d")
+    if len(args) > 0:
+        filename = args[0]
+
+    p = Parser(verbose=verbose, keepfiles=keepfiles)
+
+    if filename == None:
+        print "(Reading from standard input - please type stuff)"
+
+    tree = p.run(file=filename, debug=debug)
+    return tree
+
+if __name__ == "__main__":
+    main(*(sys.argv[1:]))
+

+ 52 - 0
setup.py

@@ -0,0 +1,52 @@
+#@+leo-ver=4
+#@+node:@file setup.py
+"""
+Builds bison python module
+"""
+
+version = "0.1"
+
+from distutils.core import setup
+from distutils.extension import Extension
+from Pyrex.Distutils import build_ext
+
+import sys
+
+if sys.platform == 'win32':
+    print "Sorry - no windows support at this time - pybison won't work for you"
+    #sys.exit(1)
+    libs = []
+    extra_link_args = []
+    bison2pyscript = 'utils/bison2py.py'
+    bisondynlibModule = "src/c/bisondynlib-win32.c"
+elif sys.platform == 'linux2':
+    libs = ['dl']
+    extra_link_args = []
+    bison2pyscript = 'utils/bison2py'
+    bisondynlibModule = "src/c/bisondynlib-linux.c"
+else:
+    print "Sorry, your platform is presently unsupported"
+    sys.exit(1)
+
+setup(
+  name = "bison",
+  version = version,
+  description='Python bindings for bison/flex parser engine',
+  author='David McNab <david@freenet.org.nz>',
+  url='http://www.freenet.org.nz/python/pybison',
+  ext_modules=[ 
+    Extension("bison_", ["src/pyrex/bison_.pyx", bisondynlibModule],
+              libraries=libs,
+              extra_link_args=extra_link_args,
+              )
+    ],
+  packages=[],
+  package_dir={'': 'src/python'},
+  py_modules=['bison'],
+  cmdclass = {'build_ext': build_ext},
+  scripts=[bison2pyscript],
+)
+
+
+#@-node:@file setup.py
+#@-leo

+ 82 - 0
src/c/bisondynlib-linux.c

@@ -0,0 +1,82 @@
+//@+leo-ver=4
+//@+node:@file src/c/bisondynlib-linux.c
+//@@language c
+/*
+ * Linux-specific dynamic library manipulation routines
+ */
+
+#include <stdio.h>
+#include "bisondynlib.h"
+#include <dlfcn.h>
+
+void *bisondynlib_open(char *filename)
+{
+    void *handle;
+
+    dlerror();
+    handle = dlopen(filename, (RTLD_NOW|RTLD_GLOBAL));
+    return handle;
+}
+
+int bisondynlib_close(void *handle)
+{
+    return dlclose(handle);
+}
+
+char *bisondynlib_err()
+{
+    return dlerror();
+}
+
+char *bisondynlib_lookup_hash(void *handle)
+{
+    char **hash;
+    dlerror();
+    hash = dlsym(handle, "rules_hash");
+    /*
+    printf("bisondynlib_lookup_hash: hash=%s\n", *hash);
+    */
+    return *hash;
+}
+
+PyObject *bisondynlib_run(void *handle, PyObject *parser, void *cb, void *in, int debug)
+{
+    void (*pparser)(PyObject *, void *, void *, int);
+    //PyObject *result;
+
+    //printf("bisondynlib_run: looking up parser\n");
+    pparser = bisondynlib_lookup_parser(handle);
+    //printf("bisondynlib_run: calling parser, py_input=0x%lx\n", in);
+    (*pparser)(parser, cb, in, debug);
+    //printf("bisondynlib_run: back from parser\n");
+    //return result;
+    Py_INCREF(Py_None);
+    return Py_None;
+
+}
+
+/*
+ * function(void *) returns a pointer to a function(PyObject *, char *) returning PyObject*
+ */
+PyObject *(*bisondynlib_lookup_parser(void *handle))(PyObject *, void *, void *, int)
+{
+    dlerror();
+    return dlsym(handle, "do_parse");
+}
+
+/*
+ * Runs the compiler commands which build the parser/lexer into a shared lib
+ */
+ /*
+int bisondynlib_build(char *libName, char *pyincdir)
+{
+    char buf[1024];
+    sprintf(buf, "gcc -fPIC -shared -I%s tmp.bison.c tmp.lex.c -o %s", pyincdir, libName);
+    printf("Running linux build command: %s\n", buf);
+    system(buf);
+    return 0;
+}
+*/
+
+//@-node:@file src/c/bisondynlib-linux.c
+//@-leo

+ 89 - 0
src/c/bisondynlib-win32.c

@@ -0,0 +1,89 @@
+//@+leo-ver=4
+//@+node:@file src/c/bisondynlib-win32.c
+//@@language c
+/*
+ * Linux-specific dynamic library manipulation routines
+ */
+
+#include <stdio.h>
+#include "bisondynlib.h"
+
+#include "windows.h"
+
+//#include "dlluser.h"
+
+void * bisondynlib_open(char *filename)
+{
+    HINSTANCE hinstLib; 
+
+    hinstLib = LoadLibrary(filename);
+
+    return (void *)hinstLib;
+}
+
+int  bisondynlib_close(void *handle)
+{
+    return FreeLibrary((HINSTANCE)handle); 
+}
+
+char * bisondynlib_err()
+{
+    return NULL;
+}
+
+
+char * bisondynlib_lookup_hash(void *handle)
+{
+    char *hash;
+
+    hash = (char *)GetProcAddress((HINSTANCE)handle, "rules_hash"); 
+    printf("bisondynlib_lookup_hash: hash=%s\n", hash);
+    return hash;
+}
+
+PyObject * bisondynlib_run(void *handle, PyObject *parser, char *filename, void *cb)
+{
+    PyObject *(*pparser)(PyObject *, char *, void *);
+
+    //printf("bisondynlib_run: looking up parser\n");
+    pparser = bisondynlib_lookup_parser(handle);
+    //printf("bisondynlib_run: calling parser\n");
+
+    (*pparser)(parser, filename, cb);
+
+    //printf("bisondynlib_run: back from parser\n");
+    //return result;
+    Py_INCREF(Py_None);
+    return Py_None;
+
+}
+
+/*
+ * function(void *) returns a pointer to a function(PyObject *, char *) returning PyObject*
+ */
+PyObject *(*bisondynlib_lookup_parser(void *handle))(PyObject *, char *, void *)
+{
+    //void *pparser;
+    PyObject *(*pparser)(PyObject *, char *, void *);
+    
+    pparser = (PyObject *(*)(PyObject *, char *, void *))GetProcAddress((HINSTANCE)handle, "do_parse");
+
+    return pparser;
+}
+
+/*
+ * Runs the compiler commands which build the parser/lexer into a shared lib
+ */
+ /*
+int bisondynlib_build(char *libName, char *pyincdir)
+{
+    char buf[1024];
+    sprintf(buf, "gcc -fPIC -shared -I%s tmp.bison.c tmp.lex.c -o %s", pyincdir, libName);
+    printf("Running linux build command: %s\n", buf);
+    system(buf);
+    return 0;
+}
+*/
+
+//@-node:@file src/c/bisondynlib-win32.c
+//@-leo

+ 25 - 0
src/c/bisondynlib.h

@@ -0,0 +1,25 @@
+//@+leo-ver=4
+//@+node:@file src/c/bisondynlib.h
+//@@language c
+/*
+ * common interface to dynamic library routines
+ */
+
+#include <stdio.h>
+#include "Python.h"
+
+void *bisondynlib_open(char *filename);
+int bisondynlib_close(void *handle);
+char *bisondynlib_err(void);
+
+PyObject *(*bisondynlib_lookup_parser(void *handle))(PyObject *, void *, void *, int);
+
+char *bisondynlib_lookup_hash(void *handle);
+
+PyObject *bisondynlib_run(void *handle, PyObject *parser, void *cb, void *in, int debug);
+
+/*
+int bisondynlib_build(char *libName, char *pyincdir);
+*/
+//@-node:@file src/c/bisondynlib.h
+//@-leo

+ 5 - 0
src/c/win32test.c

@@ -0,0 +1,5 @@
+#include <stdio.h>
+int main(int argc, char *argv[])
+{
+	printf("Hello, world\n");
+}

+ 4256 - 0
src/pyrex/bison_.c

@@ -0,0 +1,4256 @@
+/* Generated by Pyrex 0.9.2.1 on Sun Jun 27 12:11:14 2004 */
+
+#include "Python.h"
+#include "structmember.h"
+#ifndef PY_LONG_LONG
+  #define PY_LONG_LONG LONG_LONG
+#endif
+#include "stdio.h"
+#include "string.h"
+#include "../c/bisondynlib.h"
+
+
+typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/
+typedef struct {PyObject **p; char *s; long n;} __Pyx_StringTabEntry; /*proto*/
+static PyObject *__Pyx_UnpackItem(PyObject *, int); /*proto*/
+static int __Pyx_EndUnpack(PyObject *, int); /*proto*/
+static int __Pyx_PrintItem(PyObject *); /*proto*/
+static int __Pyx_PrintNewline(void); /*proto*/
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
+static void __Pyx_ReRaise(void); /*proto*/
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
+static PyObject *__Pyx_GetExcValue(void); /*proto*/
+static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name); /*proto*/
+static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
+static int __Pyx_GetStarArgs(PyObject **args, PyObject **kwds, char *kwd_list[], int nargs, PyObject **args2, PyObject **kwds2); /*proto*/
+static void __Pyx_WriteUnraisable(char *name); /*proto*/
+static void __Pyx_AddTraceback(char *funcname); /*proto*/
+static PyTypeObject *__Pyx_ImportType(char *module_name, char *class_name, long size);  /*proto*/
+static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
+static int __Pyx_GetVtable(PyObject *dict, void **vtabptr); /*proto*/
+static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, char *modname); /*proto*/
+static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
+static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
+
+static PyObject *__pyx_m;
+static PyObject *__pyx_b;
+static int __pyx_lineno;
+static char *__pyx_filename;
+staticforward char **__pyx_f;
+
+static char __pyx_mdoc[] = "\nPyrex-generated portion of pybison\n";
+
+/* Declarations from bison_ */
+
+staticforward PyTypeObject __pyx_type_6bison__ParserEngine;
+
+struct __pyx_obj_6bison__ParserEngine {
+  PyObject_HEAD
+  PyObject *parser;
+  PyObject *parserHash;
+  PyObject *libFilename_py;
+  void (*libHandle);
+  char (*libHash);
+};
+
+static PyTypeObject *__pyx_ptype_6bison__ParserEngine = 0;
+static PyObject *__pyx_k11;
+DL_EXPORT(PyObject) *(py_callback(PyObject *,char (*),int ,int ,void (*),...)); /*proto*/
+DL_EXPORT(void) (py_input(PyObject *,char (*),int (*),int )); /*proto*/
+
+/* Implementation of bison_ */
+
+char (__pyx_k7[]) = "distutils.sysconfig";
+char (__pyx_k8[]) = "distutils.ccompiler";
+char (__pyx_k9[]) = "\\s+";
+char (__pyx_k10[]) = "[^'\"]%s[^'\"]?";
+
+static PyObject *__pyx_n_sys;
+static PyObject *__pyx_n_os;
+static PyObject *__pyx_n_sha;
+static PyObject *__pyx_n_re;
+static PyObject *__pyx_n_imp;
+static PyObject *__pyx_n_traceback;
+static PyObject *__pyx_n_distutils;
+static PyObject *__pyx_n_reSpaces;
+static PyObject *__pyx_n_unquoted;
+static PyObject *__pyx_n_cmpLines;
+static PyObject *__pyx_n_hashParserObject;
+static PyObject *__pyx_n_compile;
+
+static PyObject *__pyx_k7p;
+static PyObject *__pyx_k8p;
+static PyObject *__pyx_k9p;
+static PyObject *__pyx_k10p;
+
+static PyObject *__pyx_n_range;
+static PyObject *__pyx_n_verbose;
+static PyObject *__pyx_n__handle;
+static PyObject *__pyx_n_print_exc;
+
+static PyObject *__pyx_k12p;
+
+char (__pyx_k12[]) = "py_callback: calling handler for %s";
+
+DL_EXPORT(PyObject) *py_callback(PyObject *__pyx_v_parser,char (*__pyx_v_target),int __pyx_v_option,int __pyx_v_nargs,void (*__pyx_v_args),...) {
+  int (*__pyx_v_pargs);
+  void (*__pyx_v_objptr);
+  PyObject *__pyx_v_obj;
+  int __pyx_v_i;
+  PyObject *__pyx_v_valobj;
+  void (*__pyx_v_val);
+  char (*__pyx_v_tokval);
+  PyObject *__pyx_v_names;
+  PyObject *__pyx_v_values;
+  PyObject *__pyx_v_termname;
+  PyObject *__pyx_v_res;
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  int __pyx_4;
+  PyObject *__pyx_5 = 0;
+  Py_INCREF(__pyx_v_parser);
+  __pyx_v_obj = Py_None; Py_INCREF(__pyx_v_obj);
+  __pyx_v_valobj = Py_None; Py_INCREF(__pyx_v_valobj);
+  __pyx_v_names = Py_None; Py_INCREF(__pyx_v_names);
+  __pyx_v_values = Py_None; Py_INCREF(__pyx_v_values);
+  __pyx_v_termname = Py_None; Py_INCREF(__pyx_v_termname);
+  __pyx_v_res = Py_None; Py_INCREF(__pyx_v_res);
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":76 */
+  __pyx_v_pargs = ((int (*))(&__pyx_v_args));
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":84 */
+  /*try:*/ {
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":85 */
+    __pyx_1 = PyList_New(__pyx_v_nargs); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L2;}
+    Py_DECREF(__pyx_v_names);
+    __pyx_v_names = __pyx_1;
+    __pyx_1 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":86 */
+    __pyx_1 = PyList_New(__pyx_v_nargs); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; goto __pyx_L2;}
+    Py_DECREF(__pyx_v_values);
+    __pyx_v_values = __pyx_1;
+    __pyx_1 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":87 */
+    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_range); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; goto __pyx_L2;}
+    __pyx_2 = PyInt_FromLong(__pyx_v_nargs); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; goto __pyx_L2;}
+    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; goto __pyx_L2;}
+    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
+    __pyx_2 = 0;
+    __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; goto __pyx_L2;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    __pyx_1 = PyObject_GetIter(__pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; goto __pyx_L2;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    for (;;) {
+      __pyx_L4:;
+      __pyx_3 = PyIter_Next(__pyx_1);
+      if (!__pyx_3) {
+        if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; goto __pyx_L2;}
+        break;
+      }
+      __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; goto __pyx_L2;}
+      Py_DECREF(__pyx_3); __pyx_3 = 0;
+      __pyx_v_i = __pyx_4;
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":88 */
+      __pyx_2 = PyString_FromString(((char (*))(__pyx_v_pargs[(__pyx_v_i * 2)]))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; goto __pyx_L2;}
+      Py_DECREF(__pyx_v_termname);
+      __pyx_v_termname = __pyx_2;
+      __pyx_2 = 0;
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":89 */
+      __pyx_v_val = ((void (*))(__pyx_v_pargs[((__pyx_v_i * 2) + 1)]));
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":90 */
+      __pyx_3 = (PyObject *)__pyx_v_val;
+      Py_INCREF(__pyx_3);
+      Py_DECREF(__pyx_v_valobj);
+      __pyx_v_valobj = __pyx_3;
+      __pyx_3 = 0;
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":92 */
+      Py_INCREF(__pyx_v_termname);
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":93 */
+      Py_INCREF(__pyx_v_valobj);
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":94 */
+      PyList_SetItem(__pyx_v_names,__pyx_v_i,__pyx_v_termname);
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":95 */
+      PyList_SetItem(__pyx_v_values,__pyx_v_i,__pyx_v_valobj);
+    }
+    __pyx_L5:;
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":97 */
+    __pyx_2 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_verbose); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L2;}
+    __pyx_4 = PyObject_IsTrue(__pyx_2); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L2;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    if (__pyx_4) {
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":98 */
+      __pyx_3 = PyString_FromString(__pyx_v_target); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; goto __pyx_L2;}
+      __pyx_1 = PyNumber_Remainder(__pyx_k12p, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; goto __pyx_L2;}
+      Py_DECREF(__pyx_3); __pyx_3 = 0;
+      if (__Pyx_PrintItem(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; goto __pyx_L2;}
+      Py_DECREF(__pyx_1); __pyx_1 = 0;
+      if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; goto __pyx_L2;}
+      goto __pyx_L6;
+    }
+    __pyx_L6:;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":100 */
+    __pyx_2 = PyObject_GetAttr(__pyx_v_parser, __pyx_n__handle); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L2;}
+    __pyx_3 = PyString_FromString(__pyx_v_target); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L2;}
+    __pyx_1 = PyInt_FromLong(__pyx_v_option); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L2;}
+    __pyx_5 = PyTuple_New(4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L2;}
+    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_3);
+    PyTuple_SET_ITEM(__pyx_5, 1, __pyx_1);
+    Py_INCREF(__pyx_v_names);
+    PyTuple_SET_ITEM(__pyx_5, 2, __pyx_v_names);
+    Py_INCREF(__pyx_v_values);
+    PyTuple_SET_ITEM(__pyx_5, 3, __pyx_v_values);
+    __pyx_3 = 0;
+    __pyx_1 = 0;
+    __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L2;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    Py_DECREF(__pyx_5); __pyx_5 = 0;
+    Py_DECREF(__pyx_v_res);
+    __pyx_v_res = __pyx_3;
+    __pyx_3 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":101 */
+    Py_INCREF(__pyx_v_res);
+    __pyx_r = __pyx_v_res;
+    goto __pyx_L0;
+  }
+  goto __pyx_L3;
+  __pyx_L2:;
+  Py_XDECREF(__pyx_1); __pyx_1 = 0;
+  Py_XDECREF(__pyx_2); __pyx_2 = 0;
+  Py_XDECREF(__pyx_5); __pyx_5 = 0;
+  Py_XDECREF(__pyx_3); __pyx_3 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":102 */
+  /*except:*/ {
+    __Pyx_AddTraceback("bison_.py_callback");
+    __pyx_1 = __Pyx_GetExcValue(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":103 */
+    __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_traceback); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; goto __pyx_L1;}
+    __pyx_5 = PyObject_GetAttr(__pyx_2, __pyx_n_print_exc); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    __pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; goto __pyx_L1;}
+    __pyx_1 = PyObject_CallObject(__pyx_5, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; goto __pyx_L1;}
+    Py_DECREF(__pyx_5); __pyx_5 = 0;
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":104 */
+    Py_INCREF(Py_None);
+    __pyx_r = Py_None;
+    goto __pyx_L0;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  __pyx_r = Py_None; Py_INCREF(__pyx_r);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_5);
+  __Pyx_AddTraceback("bison_.py_callback");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_obj);
+  Py_DECREF(__pyx_v_valobj);
+  Py_DECREF(__pyx_v_names);
+  Py_DECREF(__pyx_v_values);
+  Py_DECREF(__pyx_v_termname);
+  Py_DECREF(__pyx_v_res);
+  Py_DECREF(__pyx_v_parser);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_n_read;
+static PyObject *__pyx_n_len;
+
+DL_EXPORT(void) py_input(PyObject *__pyx_v_parser,char (*__pyx_v_buf),int (*__pyx_v_result),int __pyx_v_max_size) {
+  char (*__pyx_v_buf1);
+  int __pyx_v_buflen;
+  PyObject *__pyx_v_raw;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  Py_INCREF(__pyx_v_parser);
+  __pyx_v_raw = Py_None; Py_INCREF(__pyx_v_raw);
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":114 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_read); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; goto __pyx_L1;}
+  __pyx_2 = PyInt_FromLong(__pyx_v_max_size); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
+  __pyx_2 = 0;
+  __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_v_raw);
+  __pyx_v_raw = __pyx_2;
+  __pyx_2 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":115 */
+  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_raw);
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_raw);
+  __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  __pyx_v_buflen = PyInt_AsLong(__pyx_2);
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":116 */
+  (__pyx_v_result[0]) = __pyx_v_buflen;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":117 */
+  memcpy(__pyx_v_buf,PyString_AsString(__pyx_v_raw),__pyx_v_buflen);
+
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  __Pyx_WriteUnraisable("bison_.py_input");
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_raw);
+  Py_DECREF(__pyx_v_parser);
+}
+
+static PyObject *__pyx_n_bisonEngineLibName;
+static PyObject *__pyx_n_get_suffixes;
+static PyObject *__pyx_n_openCurrentLib;
+
+static int __pyx_f_6bison__12ParserEngine___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_6bison__12ParserEngine___init__[] = "\n        Creates a ParserEngine wrapper, and builds/loads the library\n        \n        Arguments:\n            - parser - an instance of a subclass of Parser\n    \n        In the course of initialisation, we check the library\n        against the parser object\'s rules. If the lib doesn\'t\n        exist, or can\'t be loaded, or doesn\'t match, we build\n        a new library.\n        \n        Either way, we end up with a binary parser engine which\n        matches the current rules in the parser object\n        ";
+static int __pyx_f_6bison__12ParserEngine___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_parser = 0;
+  PyObject *__pyx_v_kw = 0;
+  int __pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  PyObject *__pyx_4 = 0;
+  static char *__pyx_argnames[] = {"parser",0};
+  if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 1, 0, &__pyx_v_kw) < 0) return -1;
+  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_parser)) {
+    Py_XDECREF(__pyx_args);
+    Py_XDECREF(__pyx_kwds);
+    Py_XDECREF(__pyx_v_kw);
+    return -1;
+  }
+  Py_INCREF(__pyx_v_self);
+  Py_INCREF(__pyx_v_parser);
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":181 */
+  Py_INCREF(__pyx_v_parser);
+  Py_DECREF(((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->parser);
+  ((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->parser = __pyx_v_parser;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":183 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_bisonEngineLibName); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; goto __pyx_L1;}
+  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_imp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; goto __pyx_L1;}
+  __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_get_suffixes); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; goto __pyx_L1;}
+  __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; goto __pyx_L1;}
+  __pyx_2 = PyObject_GetItem(__pyx_4, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  __pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; goto __pyx_L1;}
+  __pyx_3 = PyObject_GetItem(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_2 = PyNumber_Add(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->libFilename_py);
+  ((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->libFilename_py = __pyx_2;
+  __pyx_2 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":185 */
+  __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_hashParserObject); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; goto __pyx_L1;}
+  __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; goto __pyx_L1;}
+  Py_INCREF(((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->parser);
+  PyTuple_SET_ITEM(__pyx_1, 0, ((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->parser);
+  __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->parserHash);
+  ((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->parserHash = __pyx_3;
+  __pyx_3 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":187 */
+  __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_openCurrentLib); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; goto __pyx_L1;}
+  __pyx_4 = PyTuple_New(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; goto __pyx_L1;}
+  __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_4);
+  __Pyx_AddTraceback("bison_.ParserEngine.__init__");
+  __pyx_r = -1;
+  __pyx_L0:;
+  Py_XDECREF(__pyx_v_kw);
+  Py_DECREF(__pyx_v_self);
+  Py_DECREF(__pyx_v_parser);
+  Py_XDECREF(__pyx_args);
+  Py_XDECREF(__pyx_kwds);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_n_path;
+static PyObject *__pyx_n_isfile;
+static PyObject *__pyx_n_buildLib;
+static PyObject *__pyx_n_openLib;
+static PyObject *__pyx_n_closeLib;
+
+static PyObject *__pyx_k13p;
+static PyObject *__pyx_k14p;
+static PyObject *__pyx_k15p;
+static PyObject *__pyx_k16p;
+
+char (__pyx_k13[]) = "Hash discrepancy, need to rebuild bison lib";
+char (__pyx_k14[]) = "  current parser class: %s";
+char (__pyx_k15[]) = "         bison library: %s";
+char (__pyx_k16[]) = "Hashes match, no need to rebuild bison engine lib";
+
+static PyObject *__pyx_f_6bison__12ParserEngine_openCurrentLib(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_6bison__12ParserEngine_openCurrentLib[] = "\n        Tests if library exists and is current.\n        If not, builds a fresh one\n        \n        Opens the library and imports the parser entry point\n        ";
+static PyObject *__pyx_f_6bison__12ParserEngine_openCurrentLib(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_parser;
+  PyObject *__pyx_v_verbose;
+  PyObject *__pyx_v_libHash;
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  int __pyx_4;
+  int __pyx_5;
+  static char *__pyx_argnames[] = {0};
+  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
+  Py_INCREF(__pyx_v_self);
+  __pyx_v_parser = Py_None; Py_INCREF(__pyx_v_parser);
+  __pyx_v_verbose = Py_None; Py_INCREF(__pyx_v_verbose);
+  __pyx_v_libHash = Py_None; Py_INCREF(__pyx_v_libHash);
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":198 */
+  Py_INCREF(((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->parser);
+  Py_DECREF(__pyx_v_parser);
+  __pyx_v_parser = ((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->parser;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":199 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_verbose); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; goto __pyx_L1;}
+  Py_DECREF(__pyx_v_verbose);
+  __pyx_v_verbose = __pyx_1;
+  __pyx_1 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":201 */
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_os); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; goto __pyx_L1;}
+  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_path); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_isfile); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; goto __pyx_L1;}
+  Py_INCREF(((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->libFilename_py);
+  PyTuple_SET_ITEM(__pyx_2, 0, ((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->libFilename_py);
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_4 = PyObject_IsTrue(__pyx_3); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  __pyx_5 = (!__pyx_4);
+  if (__pyx_5) {
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":202 */
+    __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_buildLib); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; goto __pyx_L1;}
+    __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; goto __pyx_L1;}
+    __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    goto __pyx_L2;
+  }
+  __pyx_L2:;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":204 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_openLib); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; goto __pyx_L1;}
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":207 */
+  __pyx_1 = PyString_FromString(((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->libHash); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; goto __pyx_L1;}
+  Py_DECREF(__pyx_v_libHash);
+  __pyx_v_libHash = __pyx_1;
+  __pyx_1 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":208 */
+  if (PyObject_Cmp(((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->parserHash, __pyx_v_libHash, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; goto __pyx_L1;}
+  __pyx_4 = __pyx_4 != 0;
+  if (__pyx_4) {
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":209 */
+    __pyx_5 = PyObject_IsTrue(__pyx_v_verbose); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; goto __pyx_L1;}
+    if (__pyx_5) {
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":210 */
+      if (__Pyx_PrintItem(__pyx_k13p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; goto __pyx_L1;}
+      if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; goto __pyx_L1;}
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":211 */
+      __pyx_2 = PyNumber_Remainder(__pyx_k14p, ((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->parserHash); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; goto __pyx_L1;}
+      if (__Pyx_PrintItem(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; goto __pyx_L1;}
+      Py_DECREF(__pyx_2); __pyx_2 = 0;
+      if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; goto __pyx_L1;}
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":212 */
+      __pyx_3 = PyNumber_Remainder(__pyx_k15p, __pyx_v_libHash); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; goto __pyx_L1;}
+      if (__Pyx_PrintItem(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; goto __pyx_L1;}
+      Py_DECREF(__pyx_3); __pyx_3 = 0;
+      if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; goto __pyx_L1;}
+      goto __pyx_L4;
+    }
+    __pyx_L4:;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":213 */
+    __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_closeLib); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; goto __pyx_L1;}
+    __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; goto __pyx_L1;}
+    __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":214 */
+    __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_buildLib); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; goto __pyx_L1;}
+    __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; goto __pyx_L1;}
+    __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":215 */
+    __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_openLib); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; goto __pyx_L1;}
+    __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; goto __pyx_L1;}
+    __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":217 */
+    __pyx_4 = PyObject_IsTrue(__pyx_v_verbose); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; goto __pyx_L1;}
+    if (__pyx_4) {
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":218 */
+      if (__Pyx_PrintItem(__pyx_k16p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; goto __pyx_L1;}
+      if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; goto __pyx_L1;}
+      goto __pyx_L5;
+    }
+    __pyx_L5:;
+  }
+  __pyx_L3:;
+
+  __pyx_r = Py_None; Py_INCREF(__pyx_r);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  __Pyx_AddTraceback("bison_.ParserEngine.openCurrentLib");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_parser);
+  Py_DECREF(__pyx_v_verbose);
+  Py_DECREF(__pyx_v_libHash);
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_k17p;
+static PyObject *__pyx_k19p;
+
+char (__pyx_k17[]) = "Opening library %s";
+char (__pyx_k18[]) = "ParserEngine.openLib: error '%s'\n";
+char (__pyx_k19[]) = "Successfully loaded library";
+
+static PyObject *__pyx_f_6bison__12ParserEngine_openLib(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_6bison__12ParserEngine_openLib[] = "\n        Loads the parser engine\'s dynamic library,\n        and extracts the following symbols:\n    \n            - void *do_parse() (runs parser)\n            - char *parserHash (contains hash of python parser rules)\n    \n        Returns lib handle, plus pointer to do_parse() function, as long ints\n        (which later need to be cast to pointers)\n    \n        Important note -this is totally linux-specific.\n        If you want windows support, you\'ll have to modify these funcs to\n        use glib instead (or create windows equivalents), in which case I\'d\n        greatly appreciate you sending me a patch.\n        ";
+static PyObject *__pyx_f_6bison__12ParserEngine_openLib(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  char (*__pyx_v_libFilename);
+  char (*__pyx_v_err);
+  void (*__pyx_v_handle);
+  PyObject *__pyx_v_parser;
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  int __pyx_2;
+  static char *__pyx_argnames[] = {0};
+  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
+  Py_INCREF(__pyx_v_self);
+  __pyx_v_parser = Py_None; Py_INCREF(__pyx_v_parser);
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":242 */
+  __pyx_v_libFilename = PyString_AsString(((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->libFilename_py);
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":244 */
+  Py_INCREF(((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->parser);
+  Py_DECREF(__pyx_v_parser);
+  __pyx_v_parser = ((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->parser;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":246 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_verbose); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; goto __pyx_L1;}
+  __pyx_2 = PyObject_IsTrue(__pyx_1); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  if (__pyx_2) {
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":247 */
+    __pyx_1 = PyNumber_Remainder(__pyx_k17p, ((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->libFilename_py); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; goto __pyx_L1;}
+    if (__Pyx_PrintItem(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; goto __pyx_L1;}
+    goto __pyx_L2;
+  }
+  __pyx_L2:;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":248 */
+  __pyx_v_handle = bisondynlib_open(__pyx_v_libFilename);
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":249 */
+  ((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->libHandle = __pyx_v_handle;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":250 */
+  __pyx_v_err = bisondynlib_err();
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":251 */
+  __pyx_2 = (__pyx_v_err != 0);
+  if (__pyx_2) {
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":252 */
+    printf(__pyx_k18,__pyx_v_err);
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":253 */
+    __pyx_r = Py_None; Py_INCREF(__pyx_r);
+    goto __pyx_L0;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":256 */
+  ((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->libHash = bisondynlib_lookup_hash(__pyx_v_handle);
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":258 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_verbose); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; goto __pyx_L1;}
+  __pyx_2 = PyObject_IsTrue(__pyx_1); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  if (__pyx_2) {
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":259 */
+    if (__Pyx_PrintItem(__pyx_k19p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; goto __pyx_L1;}
+    if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; goto __pyx_L1;}
+    goto __pyx_L4;
+  }
+  __pyx_L4:;
+
+  __pyx_r = Py_None; Py_INCREF(__pyx_r);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("bison_.ParserEngine.openLib");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_parser);
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_n_dir;
+static PyObject *__pyx_n_startswith;
+static PyObject *__pyx_n_on_;
+static PyObject *__pyx_n_getattr;
+static PyObject *__pyx_n_append;
+static PyObject *__pyx_n_sort;
+static PyObject *__pyx_n_start;
+static PyObject *__pyx_n_tokens;
+static PyObject *__pyx_n_precedences;
+static PyObject *__pyx_n_lexscript;
+static PyObject *__pyx_n_unlink;
+static PyObject *__pyx_n_bisonFile;
+static PyObject *__pyx_n_open;
+static PyObject *__pyx_n_w;
+static PyObject *__pyx_n_write;
+static PyObject *__pyx_n_writelines;
+static PyObject *__pyx_n_join;
+static PyObject *__pyx_n___doc__;
+static PyObject *__pyx_n_strip;
+static PyObject *__pyx_n_sub;
+static PyObject *__pyx_n_split;
+static PyObject *__pyx_n_error;
+static PyObject *__pyx_n_NULL;
+static PyObject *__pyx_n_close;
+static PyObject *__pyx_n_flexFile;
+static PyObject *__pyx_n_ccompiler;
+static PyObject *__pyx_n_new_compiler;
+static PyObject *__pyx_n_set_include_dirs;
+static PyObject *__pyx_n_sysconfig;
+static PyObject *__pyx_n_get_python_inc;
+static PyObject *__pyx_n_bisonCmd;
+static PyObject *__pyx_n_repr;
+static PyObject *__pyx_n_spawn;
+static PyObject *__pyx_n_bisonCFile;
+static PyObject *__pyx_n_bisonCFile1;
+static PyObject *__pyx_n_bisonHFile;
+static PyObject *__pyx_n_bisonHFile1;
+static PyObject *__pyx_n_rename;
+static PyObject *__pyx_n_flexCmd;
+static PyObject *__pyx_n_flexCFile1;
+static PyObject *__pyx_n_flexCFile;
+static PyObject *__pyx_n_link_shared_object;
+static PyObject *__pyx_n_keepfiles;
+
+static PyObject *__pyx_k22p;
+static PyObject *__pyx_k23p;
+static PyObject *__pyx_k24p;
+static PyObject *__pyx_k25p;
+static PyObject *__pyx_k26p;
+static PyObject *__pyx_k27p;
+static PyObject *__pyx_k28p;
+static PyObject *__pyx_k29p;
+static PyObject *__pyx_k30p;
+static PyObject *__pyx_k31p;
+static PyObject *__pyx_k32p;
+static PyObject *__pyx_k33p;
+static PyObject *__pyx_k34p;
+static PyObject *__pyx_k35p;
+static PyObject *__pyx_k36p;
+static PyObject *__pyx_k38p;
+static PyObject *__pyx_k37p;
+static PyObject *__pyx_k39p;
+static PyObject *__pyx_k41p;
+static PyObject *__pyx_k40p;
+static PyObject *__pyx_k42p;
+static PyObject *__pyx_k43p;
+static PyObject *__pyx_k44p;
+static PyObject *__pyx_k45p;
+static PyObject *__pyx_k46p;
+static PyObject *__pyx_k47p;
+static PyObject *__pyx_k48p;
+static PyObject *__pyx_k49p;
+static PyObject *__pyx_k50p;
+static PyObject *__pyx_k51p;
+static PyObject *__pyx_k53p;
+static PyObject *__pyx_k54p;
+static PyObject *__pyx_k56p;
+static PyObject *__pyx_k57p;
+static PyObject *__pyx_k58p;
+static PyObject *__pyx_k59p;
+static PyObject *__pyx_k60p;
+static PyObject *__pyx_k62p;
+static PyObject *__pyx_k63p;
+static PyObject *__pyx_k64p;
+static PyObject *__pyx_k65p;
+static PyObject *__pyx_k66p;
+static PyObject *__pyx_k67p;
+static PyObject *__pyx_k68p;
+static PyObject *__pyx_k69p;
+static PyObject *__pyx_k70p;
+static PyObject *__pyx_k71p;
+static PyObject *__pyx_k72p;
+static PyObject *__pyx_k73p;
+static PyObject *__pyx_k74p;
+static PyObject *__pyx_k75p;
+static PyObject *__pyx_k76p;
+static PyObject *__pyx_k77p;
+static PyObject *__pyx_k78p;
+static PyObject *__pyx_k79p;
+static PyObject *__pyx_k80p;
+static PyObject *__pyx_k81p;
+static PyObject *__pyx_k82p;
+static PyObject *__pyx_k83p;
+static PyObject *__pyx_k84p;
+static PyObject *__pyx_k85p;
+static PyObject *__pyx_k86p;
+static PyObject *__pyx_k87p;
+static PyObject *__pyx_k88p;
+static PyObject *__pyx_k89p;
+static PyObject *__pyx_k90p;
+static PyObject *__pyx_k91p;
+static PyObject *__pyx_k92p;
+static PyObject *__pyx_k93p;
+static PyObject *__pyx_k94p;
+static PyObject *__pyx_k95p;
+static PyObject *__pyx_k96p;
+static PyObject *__pyx_k97p;
+static PyObject *__pyx_k98p;
+static PyObject *__pyx_k99p;
+static PyObject *__pyx_k100p;
+static PyObject *__pyx_k101p;
+static PyObject *__pyx_k102p;
+static PyObject *__pyx_k103p;
+static PyObject *__pyx_k104p;
+static PyObject *__pyx_k105p;
+static PyObject *__pyx_k106p;
+static PyObject *__pyx_k107p;
+static PyObject *__pyx_k108p;
+static PyObject *__pyx_k109p;
+static PyObject *__pyx_k110p;
+static PyObject *__pyx_k111p;
+static PyObject *__pyx_k113p;
+static PyObject *__pyx_k114p;
+static PyObject *__pyx_k116p;
+static PyObject *__pyx_k117p;
+static PyObject *__pyx_k118p;
+static PyObject *__pyx_k119p;
+static PyObject *__pyx_k120p;
+static PyObject *__pyx_k121p;
+static PyObject *__pyx_k122p;
+static PyObject *__pyx_k123p;
+static PyObject *__pyx_k132p;
+
+char (__pyx_k22[]) = "\n";
+char (__pyx_k23[]) = "%{";
+  char (__pyx_k24[]) = "";
+  char (__pyx_k25[]) = "#include <stdio.h>";
+  char (__pyx_k26[]) = "#include \"Python.h\"";
+  char (__pyx_k27[]) = "extern FILE *yyin;";
+  char (__pyx_k28[]) = "extern int yylineno;extern char *yytext;";
+  char (__pyx_k29[]) = "#define YYSTYPE void*";
+  char (__pyx_k30[]) = "void *(*py_callback)(void *, char *, int, int, void *, ...);";
+  char (__pyx_k31[]) = "void (*py_input)(void *, char *, int *, int);";
+  char (__pyx_k32[]) = "void *py_parser;";
+  char (__pyx_k33[]) = "char *rules_hash = \"%s\";";
+  char (__pyx_k34[]) = "";
+  char (__pyx_k35[]) = "%}";
+char (__pyx_k36[]) = "";
+char (__pyx_k37[]) = "%%token %s\n\n";
+char (__pyx_k38[]) = " ";
+char (__pyx_k39[]) = "%%start %s\n\n";
+char (__pyx_k40[]) = "%%%s  %s\n";
+char (__pyx_k41[]) = " ";
+char (__pyx_k42[]) = "\n\n%%\n\n";
+char (__pyx_k43[]) = ";";
+char (__pyx_k44[]) = "";
+char (__pyx_k45[]) = ":";
+char (__pyx_k46[]) = "|";
+char (__pyx_k47[]) = "\\|";
+char (__pyx_k48[]) = " ";
+char (__pyx_k49[]) = "%s\n    : ";
+char (__pyx_k50[]) = "";
+char (__pyx_k51[]) = "\n        {\n";
+  char (__pyx_k53[]) = "             yyerrok;\n";
+  char (__pyx_k54[]) = "          $$ = (*py_callback)(\n            py_parser, \"%s\", %s, %%s";
+  char (__pyx_k56[]) = "%prec";
+  char (__pyx_k57[]) = "\"%s\", $%d";
+  char (__pyx_k58[]) = ",\n            ";
+  char (__pyx_k59[]) = ",\n            ";
+  char (__pyx_k60[]) = "\n            );\n";
+  char (__pyx_k62[]) = "             PyObject_SetAttrString(py_parser, \"lasterror\", Py_None);\n";
+  char (__pyx_k63[]) = "             Py_INCREF(Py_None);\n";
+  char (__pyx_k64[]) = "             yyclearin;\n";
+  char (__pyx_k65[]) = "          if (PyObject_HasAttrString($$, \"_pyBisonError\"))\n";
+  char (__pyx_k66[]) = "          {\n";
+    char (__pyx_k67[]) = "             yyerror(PyString_AsString(PyObject_GetAttrString(py_parser, \"lasterror\")));\n";
+    char (__pyx_k68[]) = "             Py_INCREF(Py_None);\n";
+    char (__pyx_k69[]) = "             YYERROR;\n";
+    char (__pyx_k70[]) = "          }\n";
+  char (__pyx_k71[]) = "        }\n";
+char (__pyx_k72[]) = " ";
+char (__pyx_k73[]) = "    | ";
+char (__pyx_k74[]) = "    ;\n\n";
+char (__pyx_k75[]) = "\n\n%%\n\n";
+char (__pyx_k76[]) = "\n";
+char (__pyx_k77[]) = "void do_parse(void *parser1,";
+char (__pyx_k78[]) = "              void *(*cb)(void *, char *, int, int, void *, ...),";
+char (__pyx_k79[]) = "              void (*in)(void *, char*, int *, int),";
+char (__pyx_k80[]) = "              int debug";
+char (__pyx_k81[]) = "              )";
+char (__pyx_k82[]) = "{";
+  char (__pyx_k83[]) = "   //printf(\"Not calling yyparse\\n\");";
+  char (__pyx_k84[]) = "   //return;";
+  char (__pyx_k85[]) = "   py_callback = cb;";
+  char (__pyx_k86[]) = "   py_input = in;";
+  char (__pyx_k87[]) = "   py_parser = parser1;";
+  char (__pyx_k88[]) = "   yydebug = debug;";
+  char (__pyx_k89[]) = "   //yyin = stdin;";
+  char (__pyx_k90[]) = "   //printf(\"calling yyparse(), in=0x%lx\\n\", py_input);";
+  char (__pyx_k91[]) = "   yyparse();";
+  char (__pyx_k92[]) = "   //printf(\"Back from parser\\n\");";
+  char (__pyx_k93[]) = "}";
+char (__pyx_k94[]) = "int yyerror(char *mesg)";
+char (__pyx_k95[]) = "{";
+  char (__pyx_k96[]) = "  //printf(\"yytext=0x%lx\\n\", yytext);";
+  char (__pyx_k97[]) = "  PyObject *args = PyTuple_New(3);";
+  char (__pyx_k98[]) = "  int ret;";
+  char (__pyx_k99[]) = "";
+  char (__pyx_k100[]) = "  PyTuple_SetItem(args, 0, PyInt_FromLong(yylineno+1));";
+  char (__pyx_k101[]) = "  PyTuple_SetItem(args, 1, PyString_FromString(mesg));";
+  char (__pyx_k102[]) = "  PyTuple_SetItem(args, 2, PyString_FromString(yytext));";
+  char (__pyx_k103[]) = "";
+  char (__pyx_k104[]) = "  ret = PyObject_SetAttrString((PyObject *)py_parser, \"lasterror\", args);";
+  char (__pyx_k105[]) = "  //printf(\"PyObject_SetAttrString: %d\\n\", ret);";
+  char (__pyx_k106[]) = "";
+  char (__pyx_k107[]) = "  //printf(\"line %d: %s before %s\\n\", yylineno+1, mesg, yytext);";
+  char (__pyx_k108[]) = "  //exit(0);";
+  char (__pyx_k109[]) = "}";
+char (__pyx_k110[]) = "\n";
+char (__pyx_k111[]) = "\n";
+char (__pyx_k113[]) = "\n";
+char (__pyx_k114[]) = "\n";
+char (__pyx_k116[]) = "bisonCmd=%s";
+char (__pyx_k117[]) = "renaming bison output files";
+char (__pyx_k118[]) = "=>";
+char (__pyx_k119[]) = "=>";
+char (__pyx_k120[]) = ".bak";
+char (__pyx_k121[]) = ".bak";
+char (__pyx_k122[]) = ".bak";
+char (__pyx_k123[]) = "tmp.output";
+char (__pyx_k132[]) = "Warning: failed to delete temporary file %s";
+
+static PyObject *__pyx_f_6bison__12ParserEngine_buildLib(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_6bison__12ParserEngine_buildLib[] = "\n        Creates the parser engine lib\n        \n        This consists of:\n            1. Ripping the tokens list, precedences, start target, handler docstrings\n               and lex script from this Parser instance\'s attribs and methods\n            2. Creating bison and lex files\n            3. Compiling bison/lex files to C\n            4. Compiling the C files, and link into a dynamic lib\n        ";
+static PyObject *__pyx_f_6bison__12ParserEngine_buildLib(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  char (*__pyx_v_incdir);
+  PyObject *__pyx_v_parser;
+  PyObject *__pyx_v_attribs;
+  PyObject *__pyx_v_gHandlers;
+  PyObject *__pyx_v_a;
+  PyObject *__pyx_v_method;
+  PyObject *__pyx_v_gStart;
+  PyObject *__pyx_v_gTokens;
+  PyObject *__pyx_v_gPrecedences;
+  PyObject *__pyx_v_gLex;
+  PyObject *__pyx_v_f;
+  PyObject *__pyx_v_write;
+  PyObject *__pyx_v_writelines;
+  PyObject *__pyx_v_p;
+  PyObject *__pyx_v_rules;
+  PyObject *__pyx_v_h;
+  PyObject *__pyx_v_doc;
+  PyObject *__pyx_v_s;
+  PyObject *__pyx_v_target;
+  PyObject *__pyx_v_options;
+  PyObject *__pyx_v_tmp;
+  PyObject *__pyx_v_opts;
+  PyObject *__pyx_v_r;
+  PyObject *__pyx_v_opts1;
+  PyObject *__pyx_v_o;
+  PyObject *__pyx_v_rule;
+  PyObject *__pyx_v_idx;
+  PyObject *__pyx_v_option;
+  PyObject *__pyx_v_nterms;
+  PyObject *__pyx_v_action;
+  PyObject *__pyx_v_args;
+  PyObject *__pyx_v_i;
+  PyObject *__pyx_v_epilogue;
+  PyObject *__pyx_v_lexLines;
+  PyObject *__pyx_v_line;
+  PyObject *__pyx_v_ccompiler;
+  PyObject *__pyx_v_bisonCmd;
+  PyObject *__pyx_v_objs;
+  PyObject *__pyx_v_libFileName;
+  PyObject *__pyx_v_hitlist;
+  PyObject *__pyx_v_name;
+  PyObject *__pyx_v_fname;
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  PyObject *__pyx_4 = 0;
+  int __pyx_5;
+  PyObject *__pyx_6 = 0;
+  PyObject *__pyx_7 = 0;
+  PyObject *__pyx_8 = 0;
+  int __pyx_9;
+  static char *__pyx_argnames[] = {0};
+  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
+  Py_INCREF(__pyx_v_self);
+  __pyx_v_parser = Py_None; Py_INCREF(__pyx_v_parser);
+  __pyx_v_attribs = Py_None; Py_INCREF(__pyx_v_attribs);
+  __pyx_v_gHandlers = Py_None; Py_INCREF(__pyx_v_gHandlers);
+  __pyx_v_a = Py_None; Py_INCREF(__pyx_v_a);
+  __pyx_v_method = Py_None; Py_INCREF(__pyx_v_method);
+  __pyx_v_gStart = Py_None; Py_INCREF(__pyx_v_gStart);
+  __pyx_v_gTokens = Py_None; Py_INCREF(__pyx_v_gTokens);
+  __pyx_v_gPrecedences = Py_None; Py_INCREF(__pyx_v_gPrecedences);
+  __pyx_v_gLex = Py_None; Py_INCREF(__pyx_v_gLex);
+  __pyx_v_f = Py_None; Py_INCREF(__pyx_v_f);
+  __pyx_v_write = Py_None; Py_INCREF(__pyx_v_write);
+  __pyx_v_writelines = Py_None; Py_INCREF(__pyx_v_writelines);
+  __pyx_v_p = Py_None; Py_INCREF(__pyx_v_p);
+  __pyx_v_rules = Py_None; Py_INCREF(__pyx_v_rules);
+  __pyx_v_h = Py_None; Py_INCREF(__pyx_v_h);
+  __pyx_v_doc = Py_None; Py_INCREF(__pyx_v_doc);
+  __pyx_v_s = Py_None; Py_INCREF(__pyx_v_s);
+  __pyx_v_target = Py_None; Py_INCREF(__pyx_v_target);
+  __pyx_v_options = Py_None; Py_INCREF(__pyx_v_options);
+  __pyx_v_tmp = Py_None; Py_INCREF(__pyx_v_tmp);
+  __pyx_v_opts = Py_None; Py_INCREF(__pyx_v_opts);
+  __pyx_v_r = Py_None; Py_INCREF(__pyx_v_r);
+  __pyx_v_opts1 = Py_None; Py_INCREF(__pyx_v_opts1);
+  __pyx_v_o = Py_None; Py_INCREF(__pyx_v_o);
+  __pyx_v_rule = Py_None; Py_INCREF(__pyx_v_rule);
+  __pyx_v_idx = Py_None; Py_INCREF(__pyx_v_idx);
+  __pyx_v_option = Py_None; Py_INCREF(__pyx_v_option);
+  __pyx_v_nterms = Py_None; Py_INCREF(__pyx_v_nterms);
+  __pyx_v_action = Py_None; Py_INCREF(__pyx_v_action);
+  __pyx_v_args = Py_None; Py_INCREF(__pyx_v_args);
+  __pyx_v_i = Py_None; Py_INCREF(__pyx_v_i);
+  __pyx_v_epilogue = Py_None; Py_INCREF(__pyx_v_epilogue);
+  __pyx_v_lexLines = Py_None; Py_INCREF(__pyx_v_lexLines);
+  __pyx_v_line = Py_None; Py_INCREF(__pyx_v_line);
+  __pyx_v_ccompiler = Py_None; Py_INCREF(__pyx_v_ccompiler);
+  __pyx_v_bisonCmd = Py_None; Py_INCREF(__pyx_v_bisonCmd);
+  __pyx_v_objs = Py_None; Py_INCREF(__pyx_v_objs);
+  __pyx_v_libFileName = Py_None; Py_INCREF(__pyx_v_libFileName);
+  __pyx_v_hitlist = Py_None; Py_INCREF(__pyx_v_hitlist);
+  __pyx_v_name = Py_None; Py_INCREF(__pyx_v_name);
+  __pyx_v_fname = Py_None; Py_INCREF(__pyx_v_fname);
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":278 */
+  Py_INCREF(((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->parser);
+  Py_DECREF(__pyx_v_parser);
+  __pyx_v_parser = ((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->parser;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":281 */
+  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_dir); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_parser);
+  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_parser);
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_v_attribs);
+  __pyx_v_attribs = __pyx_3;
+  __pyx_3 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":282 */
+  __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; goto __pyx_L1;}
+  Py_DECREF(__pyx_v_gHandlers);
+  __pyx_v_gHandlers = __pyx_1;
+  __pyx_1 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":283 */
+  __pyx_2 = PyObject_GetIter(__pyx_v_attribs); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; goto __pyx_L1;}
+  for (;;) {
+    __pyx_L2:;
+    __pyx_3 = PyIter_Next(__pyx_2);
+    if (!__pyx_3) {
+      if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; goto __pyx_L1;}
+      break;
+    }
+    Py_DECREF(__pyx_v_a);
+    __pyx_v_a = __pyx_3;
+    __pyx_3 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":284 */
+    __pyx_1 = PyObject_GetAttr(__pyx_v_a, __pyx_n_startswith); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;}
+    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;}
+    Py_INCREF(__pyx_n_on_);
+    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_n_on_);
+    __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;}
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    if (__pyx_5) {
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":285 */
+      __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_getattr); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; goto __pyx_L1;}
+      __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; goto __pyx_L1;}
+      Py_INCREF(__pyx_v_parser);
+      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_parser);
+      Py_INCREF(__pyx_v_a);
+      PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_a);
+      __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; goto __pyx_L1;}
+      Py_DECREF(__pyx_1); __pyx_1 = 0;
+      Py_DECREF(__pyx_3); __pyx_3 = 0;
+      Py_DECREF(__pyx_v_method);
+      __pyx_v_method = __pyx_4;
+      __pyx_4 = 0;
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":286 */
+      __pyx_1 = PyObject_GetAttr(__pyx_v_gHandlers, __pyx_n_append); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; goto __pyx_L1;}
+      __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; goto __pyx_L1;}
+      Py_INCREF(__pyx_v_method);
+      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_method);
+      __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; goto __pyx_L1;}
+      Py_DECREF(__pyx_1); __pyx_1 = 0;
+      Py_DECREF(__pyx_3); __pyx_3 = 0;
+      Py_DECREF(__pyx_4); __pyx_4 = 0;
+      goto __pyx_L4;
+    }
+    __pyx_L4:;
+  }
+  __pyx_L3:;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":287 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_gHandlers, __pyx_n_sort); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; goto __pyx_L1;}
+  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_cmpLines); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; goto __pyx_L1;}
+  __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
+  __pyx_3 = 0;
+  __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":290 */
+  __pyx_3 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_start); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L1;}
+  Py_DECREF(__pyx_v_gStart);
+  __pyx_v_gStart = __pyx_3;
+  __pyx_3 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":291 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_tokens); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; goto __pyx_L1;}
+  Py_DECREF(__pyx_v_gTokens);
+  __pyx_v_gTokens = __pyx_1;
+  __pyx_1 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":292 */
+  __pyx_4 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_precedences); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; goto __pyx_L1;}
+  Py_DECREF(__pyx_v_gPrecedences);
+  __pyx_v_gPrecedences = __pyx_4;
+  __pyx_4 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":293 */
+  __pyx_2 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_lexscript); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; goto __pyx_L1;}
+  Py_DECREF(__pyx_v_gLex);
+  __pyx_v_gLex = __pyx_2;
+  __pyx_2 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":297 */
+  /*try:*/ {
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":298 */
+    __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_os); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; goto __pyx_L5;}
+    __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_unlink); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; goto __pyx_L5;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    __pyx_4 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_bisonFile); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; goto __pyx_L5;}
+    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; goto __pyx_L5;}
+    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4);
+    __pyx_4 = 0;
+    __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; goto __pyx_L5;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+  }
+  goto __pyx_L6;
+  __pyx_L5:;
+  Py_XDECREF(__pyx_4); __pyx_4 = 0;
+  Py_XDECREF(__pyx_1); __pyx_1 = 0;
+  Py_XDECREF(__pyx_2); __pyx_2 = 0;
+  Py_XDECREF(__pyx_3); __pyx_3 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":299 */
+  /*except:*/ {
+    __Pyx_AddTraceback("bison_.buildLib");
+    __pyx_4 = __Pyx_GetExcValue(); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; goto __pyx_L1;}
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":300 */
+    goto __pyx_L6;
+  }
+  __pyx_L6:;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":301 */
+  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_open); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; goto __pyx_L1;}
+  __pyx_2 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_bisonFile); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
+  Py_INCREF(__pyx_n_w);
+  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_n_w);
+  __pyx_2 = 0;
+  __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_v_f);
+  __pyx_v_f = __pyx_4;
+  __pyx_4 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":302 */
+  __pyx_2 = PyObject_GetAttr(__pyx_v_f, __pyx_n_write); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; goto __pyx_L1;}
+  Py_DECREF(__pyx_v_write);
+  __pyx_v_write = __pyx_2;
+  __pyx_2 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":303 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_f, __pyx_n_writelines); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; goto __pyx_L1;}
+  Py_DECREF(__pyx_v_writelines);
+  __pyx_v_writelines = __pyx_1;
+  __pyx_1 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":306 */
+  __pyx_3 = PyObject_GetAttr(__pyx_k22p, __pyx_n_join); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; goto __pyx_L1;}
+  __pyx_4 = PyNumber_Remainder(__pyx_k33p, ((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->parserHash); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; goto __pyx_L1;}
+  __pyx_2 = PyList_New(14); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; goto __pyx_L1;}
+  Py_INCREF(__pyx_k23p);
+  PyList_SET_ITEM(__pyx_2, 0, __pyx_k23p);
+  Py_INCREF(__pyx_k24p);
+  PyList_SET_ITEM(__pyx_2, 1, __pyx_k24p);
+  Py_INCREF(__pyx_k25p);
+  PyList_SET_ITEM(__pyx_2, 2, __pyx_k25p);
+  Py_INCREF(__pyx_k26p);
+  PyList_SET_ITEM(__pyx_2, 3, __pyx_k26p);
+  Py_INCREF(__pyx_k27p);
+  PyList_SET_ITEM(__pyx_2, 4, __pyx_k27p);
+  Py_INCREF(__pyx_k28p);
+  PyList_SET_ITEM(__pyx_2, 5, __pyx_k28p);
+  Py_INCREF(__pyx_k29p);
+  PyList_SET_ITEM(__pyx_2, 6, __pyx_k29p);
+  Py_INCREF(__pyx_k30p);
+  PyList_SET_ITEM(__pyx_2, 7, __pyx_k30p);
+  Py_INCREF(__pyx_k31p);
+  PyList_SET_ITEM(__pyx_2, 8, __pyx_k31p);
+  Py_INCREF(__pyx_k32p);
+  PyList_SET_ITEM(__pyx_2, 9, __pyx_k32p);
+  PyList_SET_ITEM(__pyx_2, 10, __pyx_4);
+  Py_INCREF(__pyx_k34p);
+  PyList_SET_ITEM(__pyx_2, 11, __pyx_k34p);
+  Py_INCREF(__pyx_k35p);
+  PyList_SET_ITEM(__pyx_2, 12, __pyx_k35p);
+  Py_INCREF(__pyx_k36p);
+  PyList_SET_ITEM(__pyx_2, 13, __pyx_k36p);
+  __pyx_4 = 0;
+  __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_2);
+  __pyx_2 = 0;
+  __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4);
+  __pyx_4 = 0;
+  __pyx_3 = PyObject_CallObject(__pyx_v_write, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":326 */
+  __pyx_1 = PyObject_GetAttr(__pyx_k38p, __pyx_n_join); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; goto __pyx_L1;}
+  __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_gTokens);
+  PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_gTokens);
+  __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_3 = PyNumber_Remainder(__pyx_k37p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3);
+  __pyx_3 = 0;
+  __pyx_4 = PyObject_CallObject(__pyx_v_write, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":327 */
+  __pyx_2 = PyNumber_Remainder(__pyx_k39p, __pyx_v_gStart); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
+  __pyx_2 = 0;
+  __pyx_1 = PyObject_CallObject(__pyx_v_write, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":330 */
+  __pyx_4 = PyObject_GetIter(__pyx_v_gPrecedences); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; goto __pyx_L1;}
+  for (;;) {
+    __pyx_L7:;
+    __pyx_2 = PyIter_Next(__pyx_4);
+    if (!__pyx_2) {
+      if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; goto __pyx_L1;}
+      break;
+    }
+    Py_DECREF(__pyx_v_p);
+    __pyx_v_p = __pyx_2;
+    __pyx_2 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":331 */
+    __pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; goto __pyx_L1;}
+    __pyx_1 = PyObject_GetItem(__pyx_v_p, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    __pyx_2 = PyObject_GetAttr(__pyx_k41p, __pyx_n_join); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; goto __pyx_L1;}
+    __pyx_3 = PyInt_FromLong(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; goto __pyx_L1;}
+    __pyx_6 = PyObject_GetItem(__pyx_v_p, __pyx_3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; goto __pyx_L1;}
+    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_6);
+    __pyx_6 = 0;
+    __pyx_6 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; goto __pyx_L1;}
+    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1);
+    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_6);
+    __pyx_1 = 0;
+    __pyx_6 = 0;
+    __pyx_3 = PyNumber_Remainder(__pyx_k40p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; goto __pyx_L1;}
+    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3);
+    __pyx_3 = 0;
+    __pyx_6 = PyObject_CallObject(__pyx_v_write, __pyx_1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_6); __pyx_6 = 0;
+  }
+  __pyx_L8:;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":333 */
+  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; goto __pyx_L1;}
+  Py_INCREF(__pyx_k42p);
+  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k42p);
+  __pyx_3 = PyObject_CallObject(__pyx_v_write, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":336 */
+  __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; goto __pyx_L1;}
+  Py_DECREF(__pyx_v_rules);
+  __pyx_v_rules = __pyx_1;
+  __pyx_1 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":337 */
+  __pyx_6 = PyObject_GetIter(__pyx_v_gHandlers); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; goto __pyx_L1;}
+  for (;;) {
+    __pyx_L9:;
+    __pyx_4 = PyIter_Next(__pyx_6);
+    if (!__pyx_4) {
+      if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; goto __pyx_L1;}
+      break;
+    }
+    Py_DECREF(__pyx_v_h);
+    __pyx_v_h = __pyx_4;
+    __pyx_4 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":339 */
+    __pyx_2 = PyObject_GetAttr(__pyx_v_h, __pyx_n___doc__); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; goto __pyx_L1;}
+    __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_strip); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; goto __pyx_L1;}
+    __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_v_doc);
+    __pyx_v_doc = __pyx_4;
+    __pyx_4 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":343 */
+    __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_re); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; goto __pyx_L1;}
+    __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_sub); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_unquoted); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; goto __pyx_L1;}
+    __pyx_4 = PyNumber_Remainder(__pyx_1, __pyx_k43p); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    __pyx_2 = PyTuple_New(3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; goto __pyx_L1;}
+    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4);
+    Py_INCREF(__pyx_k44p);
+    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_k44p);
+    Py_INCREF(__pyx_v_doc);
+    PyTuple_SET_ITEM(__pyx_2, 2, __pyx_v_doc);
+    __pyx_4 = 0;
+    __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    Py_DECREF(__pyx_v_doc);
+    __pyx_v_doc = __pyx_1;
+    __pyx_1 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":347 */
+    __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_re); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;}
+    __pyx_3 = PyObject_GetAttr(__pyx_4, __pyx_n_split); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;}
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_unquoted); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;}
+    __pyx_1 = PyNumber_Remainder(__pyx_2, __pyx_k45p); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;}
+    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1);
+    Py_INCREF(__pyx_v_doc);
+    PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_doc);
+    __pyx_1 = 0;
+    __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    Py_DECREF(__pyx_v_s);
+    __pyx_v_s = __pyx_2;
+    __pyx_2 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":350 */
+    __pyx_1 = __Pyx_UnpackItem(__pyx_v_s, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; goto __pyx_L1;}
+    Py_DECREF(__pyx_v_target);
+    __pyx_v_target = __pyx_1;
+    __pyx_1 = 0;
+    __pyx_3 = __Pyx_UnpackItem(__pyx_v_s, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; goto __pyx_L1;}
+    Py_DECREF(__pyx_v_options);
+    __pyx_v_options = __pyx_3;
+    __pyx_3 = 0;
+    if (__Pyx_EndUnpack(__pyx_v_s, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; goto __pyx_L1;}
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":351 */
+    __pyx_4 = PyObject_GetAttr(__pyx_v_target, __pyx_n_strip); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; goto __pyx_L1;}
+    __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; goto __pyx_L1;}
+    __pyx_1 = PyObject_CallObject(__pyx_4, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; goto __pyx_L1;}
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    Py_DECREF(__pyx_v_target);
+    __pyx_v_target = __pyx_1;
+    __pyx_1 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":353 */
+    __pyx_3 = PyObject_GetAttr(__pyx_v_options, __pyx_n_strip); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; goto __pyx_L1;}
+    __pyx_4 = PyTuple_New(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; goto __pyx_L1;}
+    __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    Py_DECREF(__pyx_v_options);
+    __pyx_v_options = __pyx_2;
+    __pyx_2 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":354 */
+    __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; goto __pyx_L1;}
+    Py_DECREF(__pyx_v_tmp);
+    __pyx_v_tmp = __pyx_1;
+    __pyx_1 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":357 */
+    __pyx_3 = PyObject_GetAttr(__pyx_v_options, __pyx_n_split); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; goto __pyx_L1;}
+    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; goto __pyx_L1;}
+    Py_INCREF(__pyx_k46p);
+    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k46p);
+    __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    Py_DECREF(__pyx_v_opts);
+    __pyx_v_opts = __pyx_2;
+    __pyx_2 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":359 */
+    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_unquoted); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; goto __pyx_L1;}
+    __pyx_3 = PyNumber_Remainder(__pyx_1, __pyx_k47p); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_v_r);
+    __pyx_v_r = __pyx_3;
+    __pyx_3 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":361 */
+    __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_re); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; goto __pyx_L1;}
+    __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_split); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; goto __pyx_L1;}
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    __pyx_1 = PyNumber_Add(__pyx_k48p, __pyx_v_options); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; goto __pyx_L1;}
+    __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; goto __pyx_L1;}
+    Py_INCREF(__pyx_v_r);
+    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_r);
+    PyTuple_SET_ITEM(__pyx_3, 1, __pyx_1);
+    __pyx_1 = 0;
+    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    Py_DECREF(__pyx_v_opts1);
+    __pyx_v_opts1 = __pyx_4;
+    __pyx_4 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":364 */
+    __pyx_1 = PyObject_GetIter(__pyx_v_opts1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; goto __pyx_L1;}
+    for (;;) {
+      __pyx_L11:;
+      __pyx_2 = PyIter_Next(__pyx_1);
+      if (!__pyx_2) {
+        if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; goto __pyx_L1;}
+        break;
+      }
+      Py_DECREF(__pyx_v_o);
+      __pyx_v_o = __pyx_2;
+      __pyx_2 = 0;
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":365 */
+      __pyx_3 = PyObject_GetAttr(__pyx_v_o, __pyx_n_strip); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
+      __pyx_4 = PyTuple_New(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
+      __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
+      Py_DECREF(__pyx_3); __pyx_3 = 0;
+      Py_DECREF(__pyx_4); __pyx_4 = 0;
+      Py_DECREF(__pyx_v_o);
+      __pyx_v_o = __pyx_2;
+      __pyx_2 = 0;
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":367 */
+      __pyx_3 = PyObject_GetAttr(__pyx_v_tmp, __pyx_n_append); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
+      __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_reSpaces); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
+      __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_split); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
+      Py_DECREF(__pyx_4); __pyx_4 = 0;
+      __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
+      Py_INCREF(__pyx_v_o);
+      PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_o);
+      __pyx_7 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
+      Py_DECREF(__pyx_2); __pyx_2 = 0;
+      Py_DECREF(__pyx_4); __pyx_4 = 0;
+      __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
+      PyTuple_SET_ITEM(__pyx_2, 0, __pyx_7);
+      __pyx_7 = 0;
+      __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
+      Py_DECREF(__pyx_3); __pyx_3 = 0;
+      Py_DECREF(__pyx_2); __pyx_2 = 0;
+      Py_DECREF(__pyx_4); __pyx_4 = 0;
+    }
+    __pyx_L12:;
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":368 */
+    Py_INCREF(__pyx_v_tmp);
+    Py_DECREF(__pyx_v_options);
+    __pyx_v_options = __pyx_v_tmp;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":370 */
+    __pyx_7 = PyObject_GetAttr(__pyx_v_rules, __pyx_n_append); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; goto __pyx_L1;}
+    __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; goto __pyx_L1;}
+    Py_INCREF(__pyx_v_target);
+    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_target);
+    Py_INCREF(__pyx_v_options);
+    PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_options);
+    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; goto __pyx_L1;}
+    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
+    __pyx_3 = 0;
+    __pyx_4 = PyObject_CallObject(__pyx_7, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; goto __pyx_L1;}
+    Py_DECREF(__pyx_7); __pyx_7 = 0;
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+  }
+  __pyx_L10:;
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":373 */
+  __pyx_1 = PyObject_GetIter(__pyx_v_rules); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; goto __pyx_L1;}
+  for (;;) {
+    __pyx_L13:;
+    __pyx_3 = PyIter_Next(__pyx_1);
+    if (!__pyx_3) {
+      if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; goto __pyx_L1;}
+      break;
+    }
+    Py_DECREF(__pyx_v_rule);
+    __pyx_v_rule = __pyx_3;
+    __pyx_3 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":374 */
+    /*try:*/ {
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":375 */
+      __pyx_7 = PyInt_FromLong(0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; goto __pyx_L15;}
+      __pyx_2 = PyObject_GetItem(__pyx_v_rule, __pyx_7); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; goto __pyx_L15;}
+      Py_DECREF(__pyx_7); __pyx_7 = 0;
+      __pyx_4 = PyNumber_Remainder(__pyx_k49p, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; goto __pyx_L15;}
+      Py_DECREF(__pyx_2); __pyx_2 = 0;
+      __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; goto __pyx_L15;}
+      PyTuple_SET_ITEM(__pyx_6, 0, __pyx_4);
+      __pyx_4 = 0;
+      __pyx_3 = PyObject_CallObject(__pyx_v_write, __pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; goto __pyx_L15;}
+      Py_DECREF(__pyx_6); __pyx_6 = 0;
+      Py_DECREF(__pyx_3); __pyx_3 = 0;
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":376 */
+      __pyx_7 = PyList_New(0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; goto __pyx_L15;}
+      Py_DECREF(__pyx_v_options);
+      __pyx_v_options = __pyx_7;
+      __pyx_7 = 0;
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":377 */
+      __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; goto __pyx_L15;}
+      Py_DECREF(__pyx_v_idx);
+      __pyx_v_idx = __pyx_2;
+      __pyx_2 = 0;
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":378 */
+      __pyx_4 = PyInt_FromLong(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; goto __pyx_L15;}
+      __pyx_6 = PyObject_GetItem(__pyx_v_rule, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; goto __pyx_L15;}
+      Py_DECREF(__pyx_4); __pyx_4 = 0;
+      __pyx_3 = PyObject_GetIter(__pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; goto __pyx_L15;}
+      Py_DECREF(__pyx_6); __pyx_6 = 0;
+      for (;;) {
+        __pyx_L17:;
+        __pyx_7 = PyIter_Next(__pyx_3);
+        if (!__pyx_7) {
+          if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; goto __pyx_L15;}
+          break;
+        }
+        Py_DECREF(__pyx_v_option);
+        __pyx_v_option = __pyx_7;
+        __pyx_7 = 0;
+
+        /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":379 */
+        __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; goto __pyx_L15;}
+        __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; goto __pyx_L15;}
+        Py_INCREF(__pyx_v_option);
+        PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_option);
+        __pyx_6 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; goto __pyx_L15;}
+        Py_DECREF(__pyx_2); __pyx_2 = 0;
+        Py_DECREF(__pyx_4); __pyx_4 = 0;
+        Py_DECREF(__pyx_v_nterms);
+        __pyx_v_nterms = __pyx_6;
+        __pyx_6 = 0;
+
+        /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":380 */
+        __pyx_7 = PyInt_FromLong(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; goto __pyx_L15;}
+        if (PyObject_Cmp(__pyx_v_nterms, __pyx_7, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; goto __pyx_L15;}
+        __pyx_5 = __pyx_5 == 0;
+        Py_DECREF(__pyx_7); __pyx_7 = 0;
+        if (__pyx_5) {
+          __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; goto __pyx_L15;}
+          __pyx_4 = PyObject_GetItem(__pyx_v_option, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; goto __pyx_L15;}
+          Py_DECREF(__pyx_2); __pyx_2 = 0;
+          if (PyObject_Cmp(__pyx_4, __pyx_k50p, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; goto __pyx_L15;}
+          __pyx_5 = __pyx_5 == 0;
+          Py_DECREF(__pyx_4); __pyx_4 = 0;
+        }
+        if (__pyx_5) {
+
+          /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":381 */
+          __pyx_6 = PyInt_FromLong(0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; goto __pyx_L15;}
+          Py_DECREF(__pyx_v_nterms);
+          __pyx_v_nterms = __pyx_6;
+          __pyx_6 = 0;
+
+          /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":382 */
+          __pyx_7 = PyList_New(0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; goto __pyx_L15;}
+          Py_DECREF(__pyx_v_option);
+          __pyx_v_option = __pyx_7;
+          __pyx_7 = 0;
+          goto __pyx_L19;
+        }
+        __pyx_L19:;
+
+        /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":383 */
+        Py_INCREF(__pyx_k51p);
+        Py_DECREF(__pyx_v_action);
+        __pyx_v_action = __pyx_k51p;
+
+        /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":384 */
+        __pyx_5 = PySequence_Contains(__pyx_v_option, __pyx_n_error); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; goto __pyx_L15;}
+        if (__pyx_5) {
+
+          /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":385 */
+          __pyx_2 = PyNumber_Add(__pyx_v_action, __pyx_k53p); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; goto __pyx_L15;}
+          Py_DECREF(__pyx_v_action);
+          __pyx_v_action = __pyx_2;
+          __pyx_2 = 0;
+          goto __pyx_L20;
+        }
+        __pyx_L20:;
+
+        /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":386 */
+        __pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L15;}
+        __pyx_6 = PyObject_GetItem(__pyx_v_rule, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L15;}
+        Py_DECREF(__pyx_4); __pyx_4 = 0;
+        __pyx_7 = PyTuple_New(2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L15;}
+        PyTuple_SET_ITEM(__pyx_7, 0, __pyx_6);
+        Py_INCREF(__pyx_v_idx);
+        PyTuple_SET_ITEM(__pyx_7, 1, __pyx_v_idx);
+        __pyx_6 = 0;
+        __pyx_2 = PyNumber_Remainder(__pyx_k54p, __pyx_7); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; goto __pyx_L15;}
+        Py_DECREF(__pyx_7); __pyx_7 = 0;
+        __pyx_4 = PyNumber_Add(__pyx_v_action, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; goto __pyx_L15;}
+        Py_DECREF(__pyx_2); __pyx_2 = 0;
+        Py_DECREF(__pyx_v_action);
+        __pyx_v_action = __pyx_4;
+        __pyx_4 = 0;
+
+        /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":388 */
+        __pyx_6 = PyList_New(0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; goto __pyx_L15;}
+        Py_DECREF(__pyx_v_args);
+        __pyx_v_args = __pyx_6;
+        __pyx_6 = 0;
+
+        /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":389 */
+        __pyx_7 = PyInt_FromLong(0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; goto __pyx_L15;}
+        if (PyObject_Cmp(__pyx_v_nterms, __pyx_7, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; goto __pyx_L15;}
+        __pyx_5 = __pyx_5 == 0;
+        Py_DECREF(__pyx_7); __pyx_7 = 0;
+        if (__pyx_5) {
+
+          /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":390 */
+          __pyx_2 = PyObject_GetAttr(__pyx_v_args, __pyx_n_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; goto __pyx_L15;}
+          __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; goto __pyx_L15;}
+          Py_INCREF(__pyx_n_NULL);
+          PyTuple_SET_ITEM(__pyx_4, 0, __pyx_n_NULL);
+          __pyx_6 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; goto __pyx_L15;}
+          Py_DECREF(__pyx_2); __pyx_2 = 0;
+          Py_DECREF(__pyx_4); __pyx_4 = 0;
+          Py_DECREF(__pyx_6); __pyx_6 = 0;
+
+          /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":391 */
+          __pyx_7 = PyInt_FromLong((-1)); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; goto __pyx_L15;}
+          Py_DECREF(__pyx_v_i);
+          __pyx_v_i = __pyx_7;
+          __pyx_7 = 0;
+          goto __pyx_L21;
+        }
+        /*else*/ {
+
+          /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":393 */
+          __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_range); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; goto __pyx_L15;}
+          __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; goto __pyx_L15;}
+          Py_INCREF(__pyx_v_nterms);
+          PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_nterms);
+          __pyx_6 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; goto __pyx_L15;}
+          Py_DECREF(__pyx_2); __pyx_2 = 0;
+          Py_DECREF(__pyx_4); __pyx_4 = 0;
+          __pyx_7 = PyObject_GetIter(__pyx_6); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; goto __pyx_L15;}
+          Py_DECREF(__pyx_6); __pyx_6 = 0;
+          for (;;) {
+            __pyx_L22:;
+            __pyx_2 = PyIter_Next(__pyx_7);
+            if (!__pyx_2) {
+              if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; goto __pyx_L15;}
+              break;
+            }
+            Py_DECREF(__pyx_v_i);
+            __pyx_v_i = __pyx_2;
+            __pyx_2 = 0;
+
+            /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":394 */
+            __pyx_4 = PyObject_GetItem(__pyx_v_option, __pyx_v_i); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; goto __pyx_L15;}
+            if (PyObject_Cmp(__pyx_4, __pyx_k56p, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; goto __pyx_L15;}
+            __pyx_5 = __pyx_5 == 0;
+            Py_DECREF(__pyx_4); __pyx_4 = 0;
+            if (__pyx_5) {
+
+              /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":395 */
+              __pyx_6 = PyInt_FromLong(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; goto __pyx_L15;}
+              __pyx_2 = PyNumber_Subtract(__pyx_v_i, __pyx_6); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; goto __pyx_L15;}
+              Py_DECREF(__pyx_6); __pyx_6 = 0;
+              Py_DECREF(__pyx_v_i);
+              __pyx_v_i = __pyx_2;
+              __pyx_2 = 0;
+
+              /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":396 */
+              goto __pyx_L23;
+              goto __pyx_L24;
+            }
+            __pyx_L24:;
+
+            /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":397 */
+            __pyx_4 = PyObject_GetAttr(__pyx_v_args, __pyx_n_append); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; goto __pyx_L15;}
+            __pyx_6 = PyObject_GetItem(__pyx_v_option, __pyx_v_i); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; goto __pyx_L15;}
+            __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; goto __pyx_L15;}
+            __pyx_8 = PyNumber_Add(__pyx_v_i, __pyx_2); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; goto __pyx_L15;}
+            Py_DECREF(__pyx_2); __pyx_2 = 0;
+            __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; goto __pyx_L15;}
+            PyTuple_SET_ITEM(__pyx_2, 0, __pyx_6);
+            PyTuple_SET_ITEM(__pyx_2, 1, __pyx_8);
+            __pyx_6 = 0;
+            __pyx_8 = 0;
+            __pyx_6 = PyNumber_Remainder(__pyx_k57p, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; goto __pyx_L15;}
+            Py_DECREF(__pyx_2); __pyx_2 = 0;
+            __pyx_8 = PyTuple_New(1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; goto __pyx_L15;}
+            PyTuple_SET_ITEM(__pyx_8, 0, __pyx_6);
+            __pyx_6 = 0;
+            __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_8); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; goto __pyx_L15;}
+            Py_DECREF(__pyx_4); __pyx_4 = 0;
+            Py_DECREF(__pyx_8); __pyx_8 = 0;
+            Py_DECREF(__pyx_2); __pyx_2 = 0;
+          }
+          __pyx_L23:;
+          Py_DECREF(__pyx_7); __pyx_7 = 0;
+        }
+        __pyx_L21:;
+
+        /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":400 */
+        __pyx_6 = PyInt_FromLong(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L15;}
+        __pyx_4 = PyNumber_Add(__pyx_v_i, __pyx_6); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L15;}
+        Py_DECREF(__pyx_6); __pyx_6 = 0;
+        __pyx_8 = PyNumber_Remainder(__pyx_v_action, __pyx_4); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L15;}
+        Py_DECREF(__pyx_4); __pyx_4 = 0;
+        Py_DECREF(__pyx_v_action);
+        __pyx_v_action = __pyx_8;
+        __pyx_8 = 0;
+
+        /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":403 */
+        __pyx_2 = PyNumber_Add(__pyx_v_action, __pyx_k58p); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; goto __pyx_L15;}
+        Py_DECREF(__pyx_v_action);
+        __pyx_v_action = __pyx_2;
+        __pyx_2 = 0;
+
+        /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":404 */
+        __pyx_7 = PyObject_GetAttr(__pyx_k59p, __pyx_n_join); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; goto __pyx_L15;}
+        __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; goto __pyx_L15;}
+        Py_INCREF(__pyx_v_args);
+        PyTuple_SET_ITEM(__pyx_6, 0, __pyx_v_args);
+        __pyx_4 = PyObject_CallObject(__pyx_7, __pyx_6); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; goto __pyx_L15;}
+        Py_DECREF(__pyx_7); __pyx_7 = 0;
+        Py_DECREF(__pyx_6); __pyx_6 = 0;
+        __pyx_8 = PyNumber_Add(__pyx_v_action, __pyx_4); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; goto __pyx_L15;}
+        Py_DECREF(__pyx_4); __pyx_4 = 0;
+        __pyx_2 = PyNumber_Add(__pyx_8, __pyx_k60p); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; goto __pyx_L15;}
+        Py_DECREF(__pyx_8); __pyx_8 = 0;
+        Py_DECREF(__pyx_v_action);
+        __pyx_v_action = __pyx_2;
+        __pyx_2 = 0;
+
+        /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":406 */
+        __pyx_5 = PySequence_Contains(__pyx_v_option, __pyx_n_error); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; goto __pyx_L15;}
+        if (__pyx_5) {
+
+          /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":407 */
+          __pyx_7 = PyNumber_Add(__pyx_v_action, __pyx_k62p); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; goto __pyx_L15;}
+          Py_DECREF(__pyx_v_action);
+          __pyx_v_action = __pyx_7;
+          __pyx_7 = 0;
+
+          /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":408 */
+          __pyx_6 = PyNumber_Add(__pyx_v_action, __pyx_k63p); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; goto __pyx_L15;}
+          Py_DECREF(__pyx_v_action);
+          __pyx_v_action = __pyx_6;
+          __pyx_6 = 0;
+
+          /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":409 */
+          __pyx_4 = PyNumber_Add(__pyx_v_action, __pyx_k64p); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; goto __pyx_L15;}
+          Py_DECREF(__pyx_v_action);
+          __pyx_v_action = __pyx_4;
+          __pyx_4 = 0;
+          goto __pyx_L25;
+        }
+        __pyx_L25:;
+
+        /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":411 */
+        __pyx_8 = PyNumber_Add(__pyx_v_action, __pyx_k65p); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; goto __pyx_L15;}
+        Py_DECREF(__pyx_v_action);
+        __pyx_v_action = __pyx_8;
+        __pyx_8 = 0;
+
+        /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":412 */
+        __pyx_2 = PyNumber_Add(__pyx_v_action, __pyx_k66p); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L15;}
+        Py_DECREF(__pyx_v_action);
+        __pyx_v_action = __pyx_2;
+        __pyx_2 = 0;
+
+        /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":413 */
+        __pyx_7 = PyNumber_Add(__pyx_v_action, __pyx_k67p); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; goto __pyx_L15;}
+        Py_DECREF(__pyx_v_action);
+        __pyx_v_action = __pyx_7;
+        __pyx_7 = 0;
+
+        /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":414 */
+        __pyx_6 = PyNumber_Add(__pyx_v_action, __pyx_k68p); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; goto __pyx_L15;}
+        Py_DECREF(__pyx_v_action);
+        __pyx_v_action = __pyx_6;
+        __pyx_6 = 0;
+
+        /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":415 */
+        __pyx_4 = PyNumber_Add(__pyx_v_action, __pyx_k69p); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; goto __pyx_L15;}
+        Py_DECREF(__pyx_v_action);
+        __pyx_v_action = __pyx_4;
+        __pyx_4 = 0;
+
+        /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":416 */
+        __pyx_8 = PyNumber_Add(__pyx_v_action, __pyx_k70p); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; goto __pyx_L15;}
+        Py_DECREF(__pyx_v_action);
+        __pyx_v_action = __pyx_8;
+        __pyx_8 = 0;
+
+        /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":417 */
+        __pyx_2 = PyNumber_Add(__pyx_v_action, __pyx_k71p); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; goto __pyx_L15;}
+        Py_DECREF(__pyx_v_action);
+        __pyx_v_action = __pyx_2;
+        __pyx_2 = 0;
+
+        /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":418 */
+        __pyx_7 = PyObject_GetAttr(__pyx_v_options, __pyx_n_append); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; goto __pyx_L15;}
+        __pyx_6 = PyObject_GetAttr(__pyx_k72p, __pyx_n_join); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; goto __pyx_L15;}
+        __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; goto __pyx_L15;}
+        Py_INCREF(__pyx_v_option);
+        PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_option);
+        __pyx_8 = PyObject_CallObject(__pyx_6, __pyx_4); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; goto __pyx_L15;}
+        Py_DECREF(__pyx_6); __pyx_6 = 0;
+        Py_DECREF(__pyx_4); __pyx_4 = 0;
+        __pyx_2 = PyNumber_Add(__pyx_8, __pyx_v_action); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; goto __pyx_L15;}
+        Py_DECREF(__pyx_8); __pyx_8 = 0;
+        __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; goto __pyx_L15;}
+        PyTuple_SET_ITEM(__pyx_6, 0, __pyx_2);
+        __pyx_2 = 0;
+        __pyx_4 = PyObject_CallObject(__pyx_7, __pyx_6); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; goto __pyx_L15;}
+        Py_DECREF(__pyx_7); __pyx_7 = 0;
+        Py_DECREF(__pyx_6); __pyx_6 = 0;
+        Py_DECREF(__pyx_4); __pyx_4 = 0;
+
+        /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":419 */
+        __pyx_8 = PyInt_FromLong(1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; goto __pyx_L15;}
+        __pyx_2 = PyNumber_Add(__pyx_v_idx, __pyx_8); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; goto __pyx_L15;}
+        Py_DECREF(__pyx_8); __pyx_8 = 0;
+        Py_DECREF(__pyx_v_idx);
+        __pyx_v_idx = __pyx_2;
+        __pyx_2 = 0;
+      }
+      __pyx_L18:;
+      Py_DECREF(__pyx_3); __pyx_3 = 0;
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":420 */
+      __pyx_7 = PyObject_GetAttr(__pyx_k73p, __pyx_n_join); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; goto __pyx_L15;}
+      __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; goto __pyx_L15;}
+      Py_INCREF(__pyx_v_options);
+      PyTuple_SET_ITEM(__pyx_6, 0, __pyx_v_options);
+      __pyx_4 = PyObject_CallObject(__pyx_7, __pyx_6); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; goto __pyx_L15;}
+      Py_DECREF(__pyx_7); __pyx_7 = 0;
+      Py_DECREF(__pyx_6); __pyx_6 = 0;
+      __pyx_8 = PyNumber_Add(__pyx_4, __pyx_k74p); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; goto __pyx_L15;}
+      Py_DECREF(__pyx_4); __pyx_4 = 0;
+      __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; goto __pyx_L15;}
+      PyTuple_SET_ITEM(__pyx_2, 0, __pyx_8);
+      __pyx_8 = 0;
+      __pyx_3 = PyObject_CallObject(__pyx_v_write, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; goto __pyx_L15;}
+      Py_DECREF(__pyx_2); __pyx_2 = 0;
+      Py_DECREF(__pyx_3); __pyx_3 = 0;
+    }
+    goto __pyx_L16;
+    __pyx_L15:;
+    Py_XDECREF(__pyx_7); __pyx_7 = 0;
+    Py_XDECREF(__pyx_6); __pyx_6 = 0;
+    Py_XDECREF(__pyx_4); __pyx_4 = 0;
+    Py_XDECREF(__pyx_8); __pyx_8 = 0;
+    Py_XDECREF(__pyx_2); __pyx_2 = 0;
+    Py_XDECREF(__pyx_3); __pyx_3 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":421 */
+    /*except:*/ {
+      __Pyx_AddTraceback("bison_.buildLib");
+      __pyx_7 = __Pyx_GetExcValue(); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; goto __pyx_L1;}
+      Py_DECREF(__pyx_7); __pyx_7 = 0;
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":422 */
+      __pyx_6 = __Pyx_GetName(__pyx_m, __pyx_n_traceback); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; goto __pyx_L1;}
+      __pyx_4 = PyObject_GetAttr(__pyx_6, __pyx_n_print_exc); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; goto __pyx_L1;}
+      Py_DECREF(__pyx_6); __pyx_6 = 0;
+      __pyx_8 = PyTuple_New(0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; goto __pyx_L1;}
+      __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_8); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; goto __pyx_L1;}
+      Py_DECREF(__pyx_4); __pyx_4 = 0;
+      Py_DECREF(__pyx_8); __pyx_8 = 0;
+      Py_DECREF(__pyx_2); __pyx_2 = 0;
+      goto __pyx_L16;
+    }
+    __pyx_L16:;
+  }
+  __pyx_L14:;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":424 */
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; goto __pyx_L1;}
+  Py_INCREF(__pyx_k75p);
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k75p);
+  __pyx_7 = PyObject_CallObject(__pyx_v_write, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_7); __pyx_7 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":461 */
+  __pyx_6 = PyObject_GetAttr(__pyx_k76p, __pyx_n_join); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; goto __pyx_L1;}
+  __pyx_4 = PyList_New(33); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; goto __pyx_L1;}
+  Py_INCREF(__pyx_k77p);
+  PyList_SET_ITEM(__pyx_4, 0, __pyx_k77p);
+  Py_INCREF(__pyx_k78p);
+  PyList_SET_ITEM(__pyx_4, 1, __pyx_k78p);
+  Py_INCREF(__pyx_k79p);
+  PyList_SET_ITEM(__pyx_4, 2, __pyx_k79p);
+  Py_INCREF(__pyx_k80p);
+  PyList_SET_ITEM(__pyx_4, 3, __pyx_k80p);
+  Py_INCREF(__pyx_k81p);
+  PyList_SET_ITEM(__pyx_4, 4, __pyx_k81p);
+  Py_INCREF(__pyx_k82p);
+  PyList_SET_ITEM(__pyx_4, 5, __pyx_k82p);
+  Py_INCREF(__pyx_k83p);
+  PyList_SET_ITEM(__pyx_4, 6, __pyx_k83p);
+  Py_INCREF(__pyx_k84p);
+  PyList_SET_ITEM(__pyx_4, 7, __pyx_k84p);
+  Py_INCREF(__pyx_k85p);
+  PyList_SET_ITEM(__pyx_4, 8, __pyx_k85p);
+  Py_INCREF(__pyx_k86p);
+  PyList_SET_ITEM(__pyx_4, 9, __pyx_k86p);
+  Py_INCREF(__pyx_k87p);
+  PyList_SET_ITEM(__pyx_4, 10, __pyx_k87p);
+  Py_INCREF(__pyx_k88p);
+  PyList_SET_ITEM(__pyx_4, 11, __pyx_k88p);
+  Py_INCREF(__pyx_k89p);
+  PyList_SET_ITEM(__pyx_4, 12, __pyx_k89p);
+  Py_INCREF(__pyx_k90p);
+  PyList_SET_ITEM(__pyx_4, 13, __pyx_k90p);
+  Py_INCREF(__pyx_k91p);
+  PyList_SET_ITEM(__pyx_4, 14, __pyx_k91p);
+  Py_INCREF(__pyx_k92p);
+  PyList_SET_ITEM(__pyx_4, 15, __pyx_k92p);
+  Py_INCREF(__pyx_k93p);
+  PyList_SET_ITEM(__pyx_4, 16, __pyx_k93p);
+  Py_INCREF(__pyx_k94p);
+  PyList_SET_ITEM(__pyx_4, 17, __pyx_k94p);
+  Py_INCREF(__pyx_k95p);
+  PyList_SET_ITEM(__pyx_4, 18, __pyx_k95p);
+  Py_INCREF(__pyx_k96p);
+  PyList_SET_ITEM(__pyx_4, 19, __pyx_k96p);
+  Py_INCREF(__pyx_k97p);
+  PyList_SET_ITEM(__pyx_4, 20, __pyx_k97p);
+  Py_INCREF(__pyx_k98p);
+  PyList_SET_ITEM(__pyx_4, 21, __pyx_k98p);
+  Py_INCREF(__pyx_k99p);
+  PyList_SET_ITEM(__pyx_4, 22, __pyx_k99p);
+  Py_INCREF(__pyx_k100p);
+  PyList_SET_ITEM(__pyx_4, 23, __pyx_k100p);
+  Py_INCREF(__pyx_k101p);
+  PyList_SET_ITEM(__pyx_4, 24, __pyx_k101p);
+  Py_INCREF(__pyx_k102p);
+  PyList_SET_ITEM(__pyx_4, 25, __pyx_k102p);
+  Py_INCREF(__pyx_k103p);
+  PyList_SET_ITEM(__pyx_4, 26, __pyx_k103p);
+  Py_INCREF(__pyx_k104p);
+  PyList_SET_ITEM(__pyx_4, 27, __pyx_k104p);
+  Py_INCREF(__pyx_k105p);
+  PyList_SET_ITEM(__pyx_4, 28, __pyx_k105p);
+  Py_INCREF(__pyx_k106p);
+  PyList_SET_ITEM(__pyx_4, 29, __pyx_k106p);
+  Py_INCREF(__pyx_k107p);
+  PyList_SET_ITEM(__pyx_4, 30, __pyx_k107p);
+  Py_INCREF(__pyx_k108p);
+  PyList_SET_ITEM(__pyx_4, 31, __pyx_k108p);
+  Py_INCREF(__pyx_k109p);
+  PyList_SET_ITEM(__pyx_4, 32, __pyx_k109p);
+  __pyx_8 = PyTuple_New(1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_8, 0, __pyx_4);
+  __pyx_4 = 0;
+  __pyx_2 = PyObject_CallObject(__pyx_6, __pyx_8); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; goto __pyx_L1;}
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  Py_DECREF(__pyx_8); __pyx_8 = 0;
+  __pyx_1 = PyNumber_Add(__pyx_2, __pyx_k110p); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_v_epilogue);
+  __pyx_v_epilogue = __pyx_1;
+  __pyx_1 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":462 */
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_epilogue);
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_epilogue);
+  __pyx_7 = PyObject_CallObject(__pyx_v_write, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_7); __pyx_7 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":465 */
+  __pyx_4 = PyObject_GetAttr(__pyx_v_f, __pyx_n_close); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; goto __pyx_L1;}
+  __pyx_6 = PyTuple_New(0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; goto __pyx_L1;}
+  __pyx_8 = PyObject_CallObject(__pyx_4, __pyx_6); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  Py_DECREF(__pyx_8); __pyx_8 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":469 */
+  /*try:*/ {
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":470 */
+    __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_os); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; goto __pyx_L26;}
+    __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_unlink); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; goto __pyx_L26;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    __pyx_3 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_flexFile); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; goto __pyx_L26;}
+    __pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; goto __pyx_L26;}
+    PyTuple_SET_ITEM(__pyx_7, 0, __pyx_3);
+    __pyx_3 = 0;
+    __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_7); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; goto __pyx_L26;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_7); __pyx_7 = 0;
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+  }
+  goto __pyx_L27;
+  __pyx_L26:;
+  Py_XDECREF(__pyx_6); __pyx_6 = 0;
+  Py_XDECREF(__pyx_8); __pyx_8 = 0;
+  Py_XDECREF(__pyx_2); __pyx_2 = 0;
+  Py_XDECREF(__pyx_3); __pyx_3 = 0;
+  Py_XDECREF(__pyx_1); __pyx_1 = 0;
+  Py_XDECREF(__pyx_7); __pyx_7 = 0;
+  Py_XDECREF(__pyx_4); __pyx_4 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":471 */
+  /*except:*/ {
+    __Pyx_AddTraceback("bison_.buildLib");
+    __pyx_6 = __Pyx_GetExcValue(); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; goto __pyx_L1;}
+    Py_DECREF(__pyx_6); __pyx_6 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":472 */
+    goto __pyx_L27;
+  }
+  __pyx_L27:;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":473 */
+  __pyx_8 = PyObject_GetAttr(__pyx_v_gLex, __pyx_n_split); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; goto __pyx_L1;}
+  Py_INCREF(__pyx_k111p);
+  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k111p);
+  __pyx_3 = PyObject_CallObject(__pyx_8, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; goto __pyx_L1;}
+  Py_DECREF(__pyx_8); __pyx_8 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_v_lexLines);
+  __pyx_v_lexLines = __pyx_3;
+  __pyx_3 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":474 */
+  __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; goto __pyx_L1;}
+  Py_DECREF(__pyx_v_tmp);
+  __pyx_v_tmp = __pyx_1;
+  __pyx_1 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":475 */
+  __pyx_7 = PyObject_GetIter(__pyx_v_lexLines); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; goto __pyx_L1;}
+  for (;;) {
+    __pyx_L28:;
+    __pyx_4 = PyIter_Next(__pyx_7);
+    if (!__pyx_4) {
+      if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; goto __pyx_L1;}
+      break;
+    }
+    Py_DECREF(__pyx_v_line);
+    __pyx_v_line = __pyx_4;
+    __pyx_4 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":476 */
+    __pyx_6 = PyObject_GetAttr(__pyx_v_tmp, __pyx_n_append); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; goto __pyx_L1;}
+    __pyx_8 = PyObject_GetAttr(__pyx_v_line, __pyx_n_strip); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; goto __pyx_L1;}
+    __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; goto __pyx_L1;}
+    __pyx_3 = PyObject_CallObject(__pyx_8, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; goto __pyx_L1;}
+    Py_DECREF(__pyx_8); __pyx_8 = 0;
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; goto __pyx_L1;}
+    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3);
+    __pyx_3 = 0;
+    __pyx_4 = PyObject_CallObject(__pyx_6, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; goto __pyx_L1;}
+    Py_DECREF(__pyx_6); __pyx_6 = 0;
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+  }
+  __pyx_L29:;
+  Py_DECREF(__pyx_7); __pyx_7 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":477 */
+  __pyx_8 = __Pyx_GetName(__pyx_b, __pyx_n_open); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; goto __pyx_L1;}
+  __pyx_2 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_flexFile); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
+  Py_INCREF(__pyx_n_w);
+  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_n_w);
+  __pyx_2 = 0;
+  __pyx_6 = PyObject_CallObject(__pyx_8, __pyx_3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; goto __pyx_L1;}
+  Py_DECREF(__pyx_8); __pyx_8 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_v_f);
+  __pyx_v_f = __pyx_6;
+  __pyx_6 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":478 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_f, __pyx_n_write); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; goto __pyx_L1;}
+  __pyx_4 = PyObject_GetAttr(__pyx_k113p, __pyx_n_join); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; goto __pyx_L1;}
+  __pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_tmp);
+  PyTuple_SET_ITEM(__pyx_7, 0, __pyx_v_tmp);
+  __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_7); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  Py_DECREF(__pyx_7); __pyx_7 = 0;
+  __pyx_8 = PyNumber_Add(__pyx_2, __pyx_k114p); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_8);
+  __pyx_8 = 0;
+  __pyx_6 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":479 */
+  __pyx_4 = PyObject_GetAttr(__pyx_v_f, __pyx_n_close); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; goto __pyx_L1;}
+  __pyx_7 = PyTuple_New(0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; goto __pyx_L1;}
+  __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_7); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  Py_DECREF(__pyx_7); __pyx_7 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":482 */
+  __pyx_8 = __Pyx_GetName(__pyx_m, __pyx_n_distutils); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; goto __pyx_L1;}
+  __pyx_1 = PyObject_GetAttr(__pyx_8, __pyx_n_ccompiler); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; goto __pyx_L1;}
+  Py_DECREF(__pyx_8); __pyx_8 = 0;
+  __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_new_compiler); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_6 = PyTuple_New(0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; goto __pyx_L1;}
+  __pyx_4 = PyDict_New(); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; goto __pyx_L1;}
+  __pyx_7 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_verbose); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_4, __pyx_n_verbose, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; goto __pyx_L1;}
+  Py_DECREF(__pyx_7); __pyx_7 = 0;
+  __pyx_2 = PyEval_CallObjectWithKeywords(__pyx_3, __pyx_6, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  Py_DECREF(__pyx_v_ccompiler);
+  __pyx_v_ccompiler = __pyx_2;
+  __pyx_2 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":483 */
+  __pyx_8 = PyObject_GetAttr(__pyx_v_ccompiler, __pyx_n_set_include_dirs); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; goto __pyx_L1;}
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_distutils); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; goto __pyx_L1;}
+  __pyx_7 = PyObject_GetAttr(__pyx_1, __pyx_n_sysconfig); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_3 = PyObject_GetAttr(__pyx_7, __pyx_n_get_python_inc); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; goto __pyx_L1;}
+  Py_DECREF(__pyx_7); __pyx_7 = 0;
+  __pyx_6 = PyTuple_New(0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; goto __pyx_L1;}
+  __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_6); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  __pyx_2 = PyList_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; goto __pyx_L1;}
+  PyList_SET_ITEM(__pyx_2, 0, __pyx_4);
+  __pyx_4 = 0;
+  __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_2);
+  __pyx_2 = 0;
+  __pyx_7 = PyObject_CallObject(__pyx_8, __pyx_1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; goto __pyx_L1;}
+  Py_DECREF(__pyx_8); __pyx_8 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_7); __pyx_7 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":488 */
+  __pyx_3 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_bisonCmd); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; goto __pyx_L1;}
+  __pyx_6 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_bisonFile); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; goto __pyx_L1;}
+  __pyx_4 = PyList_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; goto __pyx_L1;}
+  PyList_SET_ITEM(__pyx_4, 0, __pyx_6);
+  __pyx_6 = 0;
+  __pyx_2 = PyNumber_Add(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  Py_DECREF(__pyx_v_bisonCmd);
+  __pyx_v_bisonCmd = __pyx_2;
+  __pyx_2 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":489 */
+  __pyx_8 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_verbose); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; goto __pyx_L1;}
+  __pyx_5 = PyObject_IsTrue(__pyx_8); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; goto __pyx_L1;}
+  Py_DECREF(__pyx_8); __pyx_8 = 0;
+  if (__pyx_5) {
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":490 */
+    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_repr); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; goto __pyx_L1;}
+    __pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; goto __pyx_L1;}
+    Py_INCREF(__pyx_v_bisonCmd);
+    PyTuple_SET_ITEM(__pyx_7, 0, __pyx_v_bisonCmd);
+    __pyx_6 = PyObject_CallObject(__pyx_1, __pyx_7); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_7); __pyx_7 = 0;
+    __pyx_3 = PyNumber_Remainder(__pyx_k116p, __pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; goto __pyx_L1;}
+    Py_DECREF(__pyx_6); __pyx_6 = 0;
+    if (__Pyx_PrintItem(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; goto __pyx_L1;}
+    goto __pyx_L30;
+  }
+  __pyx_L30:;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":491 */
+  __pyx_4 = PyObject_GetAttr(__pyx_v_ccompiler, __pyx_n_spawn); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_bisonCmd);
+  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_bisonCmd);
+  __pyx_8 = PyObject_CallObject(__pyx_4, __pyx_2); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_8); __pyx_8 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":493 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_verbose); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; goto __pyx_L1;}
+  __pyx_5 = PyObject_IsTrue(__pyx_1); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  if (__pyx_5) {
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":494 */
+    if (__Pyx_PrintItem(__pyx_k117p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; goto __pyx_L1;}
+    if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; goto __pyx_L1;}
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":495 */
+    __pyx_7 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_bisonCFile); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; goto __pyx_L1;}
+    if (__Pyx_PrintItem(__pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; goto __pyx_L1;}
+    Py_DECREF(__pyx_7); __pyx_7 = 0;
+    if (__Pyx_PrintItem(__pyx_k118p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; goto __pyx_L1;}
+    __pyx_6 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_bisonCFile1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; goto __pyx_L1;}
+    if (__Pyx_PrintItem(__pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; goto __pyx_L1;}
+    Py_DECREF(__pyx_6); __pyx_6 = 0;
+    if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; goto __pyx_L1;}
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":496 */
+    __pyx_3 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_bisonHFile); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;}
+    if (__Pyx_PrintItem(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    if (__Pyx_PrintItem(__pyx_k119p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;}
+    __pyx_4 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_bisonHFile1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;}
+    if (__Pyx_PrintItem(__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;}
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;}
+    goto __pyx_L31;
+  }
+  __pyx_L31:;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":498 */
+  /*try:*/ {
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":499 */
+    __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_os); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; goto __pyx_L32;}
+    __pyx_8 = PyObject_GetAttr(__pyx_2, __pyx_n_unlink); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; goto __pyx_L32;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    __pyx_1 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_bisonCFile1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; goto __pyx_L32;}
+    __pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; goto __pyx_L32;}
+    PyTuple_SET_ITEM(__pyx_7, 0, __pyx_1);
+    __pyx_1 = 0;
+    __pyx_6 = PyObject_CallObject(__pyx_8, __pyx_7); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; goto __pyx_L32;}
+    Py_DECREF(__pyx_8); __pyx_8 = 0;
+    Py_DECREF(__pyx_7); __pyx_7 = 0;
+    Py_DECREF(__pyx_6); __pyx_6 = 0;
+  }
+  goto __pyx_L33;
+  __pyx_L32:;
+  Py_XDECREF(__pyx_3); __pyx_3 = 0;
+  Py_XDECREF(__pyx_4); __pyx_4 = 0;
+  Py_XDECREF(__pyx_2); __pyx_2 = 0;
+  Py_XDECREF(__pyx_1); __pyx_1 = 0;
+  Py_XDECREF(__pyx_8); __pyx_8 = 0;
+  Py_XDECREF(__pyx_7); __pyx_7 = 0;
+  Py_XDECREF(__pyx_6); __pyx_6 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":500 */
+  /*except:*/ {
+    __Pyx_AddTraceback("bison_.buildLib");
+    __pyx_3 = __Pyx_GetExcValue(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":501 */
+    goto __pyx_L33;
+  }
+  __pyx_L33:;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":502 */
+  __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_os); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; goto __pyx_L1;}
+  __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_rename); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_1 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_bisonCFile); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; goto __pyx_L1;}
+  __pyx_8 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_bisonCFile1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; goto __pyx_L1;}
+  __pyx_7 = PyTuple_New(2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_7, 0, __pyx_1);
+  PyTuple_SET_ITEM(__pyx_7, 1, __pyx_8);
+  __pyx_1 = 0;
+  __pyx_8 = 0;
+  __pyx_6 = PyObject_CallObject(__pyx_2, __pyx_7); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_7); __pyx_7 = 0;
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":503 */
+  /*try:*/ {
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":504 */
+    __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_os); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; goto __pyx_L34;}
+    __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_n_unlink); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; goto __pyx_L34;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    __pyx_1 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_bisonHFile1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; goto __pyx_L34;}
+    __pyx_8 = PyTuple_New(1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; goto __pyx_L34;}
+    PyTuple_SET_ITEM(__pyx_8, 0, __pyx_1);
+    __pyx_1 = 0;
+    __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_8); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; goto __pyx_L34;}
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    Py_DECREF(__pyx_8); __pyx_8 = 0;
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+  }
+  goto __pyx_L35;
+  __pyx_L34:;
+  Py_XDECREF(__pyx_7); __pyx_7 = 0;
+  Py_XDECREF(__pyx_6); __pyx_6 = 0;
+  Py_XDECREF(__pyx_3); __pyx_3 = 0;
+  Py_XDECREF(__pyx_1); __pyx_1 = 0;
+  Py_XDECREF(__pyx_4); __pyx_4 = 0;
+  Py_XDECREF(__pyx_8); __pyx_8 = 0;
+  Py_XDECREF(__pyx_2); __pyx_2 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":505 */
+  /*except:*/ {
+    __Pyx_AddTraceback("bison_.buildLib");
+    __pyx_7 = __Pyx_GetExcValue(); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; goto __pyx_L1;}
+    Py_DECREF(__pyx_7); __pyx_7 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":506 */
+    goto __pyx_L35;
+  }
+  __pyx_L35:;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":507 */
+  __pyx_6 = __Pyx_GetName(__pyx_m, __pyx_n_os); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; goto __pyx_L1;}
+  __pyx_3 = PyObject_GetAttr(__pyx_6, __pyx_n_rename); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; goto __pyx_L1;}
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  __pyx_1 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_bisonHFile); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; goto __pyx_L1;}
+  __pyx_4 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_bisonHFile1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; goto __pyx_L1;}
+  __pyx_8 = PyTuple_New(2); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_8, 0, __pyx_1);
+  PyTuple_SET_ITEM(__pyx_8, 1, __pyx_4);
+  __pyx_1 = 0;
+  __pyx_4 = 0;
+  __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_8); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_8); __pyx_8 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":512 */
+  __pyx_7 = PyObject_GetAttr(__pyx_v_ccompiler, __pyx_n_spawn); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; goto __pyx_L1;}
+  __pyx_6 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_flexCmd); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; goto __pyx_L1;}
+  __pyx_1 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_flexFile); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; goto __pyx_L1;}
+  __pyx_4 = PyList_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; goto __pyx_L1;}
+  PyList_SET_ITEM(__pyx_4, 0, __pyx_1);
+  __pyx_1 = 0;
+  __pyx_3 = PyNumber_Add(__pyx_6, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; goto __pyx_L1;}
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_8 = PyTuple_New(1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_8, 0, __pyx_3);
+  __pyx_3 = 0;
+  __pyx_2 = PyObject_CallObject(__pyx_7, __pyx_8); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; goto __pyx_L1;}
+  Py_DECREF(__pyx_7); __pyx_7 = 0;
+  Py_DECREF(__pyx_8); __pyx_8 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":513 */
+  /*try:*/ {
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":514 */
+    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_os); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; goto __pyx_L36;}
+    __pyx_6 = PyObject_GetAttr(__pyx_1, __pyx_n_unlink); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; goto __pyx_L36;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    __pyx_4 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_flexCFile1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; goto __pyx_L36;}
+    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; goto __pyx_L36;}
+    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4);
+    __pyx_4 = 0;
+    __pyx_7 = PyObject_CallObject(__pyx_6, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; goto __pyx_L36;}
+    Py_DECREF(__pyx_6); __pyx_6 = 0;
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    Py_DECREF(__pyx_7); __pyx_7 = 0;
+  }
+  goto __pyx_L37;
+  __pyx_L36:;
+  Py_XDECREF(__pyx_8); __pyx_8 = 0;
+  Py_XDECREF(__pyx_2); __pyx_2 = 0;
+  Py_XDECREF(__pyx_1); __pyx_1 = 0;
+  Py_XDECREF(__pyx_4); __pyx_4 = 0;
+  Py_XDECREF(__pyx_6); __pyx_6 = 0;
+  Py_XDECREF(__pyx_3); __pyx_3 = 0;
+  Py_XDECREF(__pyx_7); __pyx_7 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":515 */
+  /*except:*/ {
+    __Pyx_AddTraceback("bison_.buildLib");
+    __pyx_8 = __Pyx_GetExcValue(); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; goto __pyx_L1;}
+    Py_DECREF(__pyx_8); __pyx_8 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":516 */
+    goto __pyx_L37;
+  }
+  __pyx_L37:;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":517 */
+  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_os); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; goto __pyx_L1;}
+  __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_rename); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_4 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_flexCFile); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; goto __pyx_L1;}
+  __pyx_6 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_flexCFile1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4);
+  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_6);
+  __pyx_4 = 0;
+  __pyx_6 = 0;
+  __pyx_7 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_7); __pyx_7 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":531 */
+  __pyx_8 = PyObject_GetAttr(__pyx_v_ccompiler, __pyx_n_compile); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; goto __pyx_L1;}
+  __pyx_2 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_bisonCFile1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; goto __pyx_L1;}
+  __pyx_4 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_flexCFile1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; goto __pyx_L1;}
+  __pyx_6 = PyList_New(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; goto __pyx_L1;}
+  PyList_SET_ITEM(__pyx_6, 0, __pyx_2);
+  PyList_SET_ITEM(__pyx_6, 1, __pyx_4);
+  __pyx_2 = 0;
+  __pyx_4 = 0;
+  __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_6);
+  __pyx_6 = 0;
+  __pyx_3 = PyObject_CallObject(__pyx_8, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; goto __pyx_L1;}
+  Py_DECREF(__pyx_8); __pyx_8 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_v_objs);
+  __pyx_v_objs = __pyx_3;
+  __pyx_3 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":532 */
+  __pyx_7 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_bisonEngineLibName); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; goto __pyx_L1;}
+  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_imp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; goto __pyx_L1;}
+  __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_get_suffixes); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_6 = PyTuple_New(0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; goto __pyx_L1;}
+  __pyx_8 = PyObject_CallObject(__pyx_4, __pyx_6); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; goto __pyx_L1;}
+  __pyx_3 = PyObject_GetItem(__pyx_8, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; goto __pyx_L1;}
+  Py_DECREF(__pyx_8); __pyx_8 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; goto __pyx_L1;}
+  __pyx_4 = PyObject_GetItem(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_6 = PyNumber_Add(__pyx_7, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; goto __pyx_L1;}
+  Py_DECREF(__pyx_7); __pyx_7 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  Py_DECREF(__pyx_v_libFileName);
+  __pyx_v_libFileName = __pyx_6;
+  __pyx_6 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":533 */
+  __pyx_8 = __Pyx_GetName(__pyx_m, __pyx_n_os); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; goto __pyx_L1;}
+  __pyx_1 = PyObject_GetAttr(__pyx_8, __pyx_n_path); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; goto __pyx_L1;}
+  Py_DECREF(__pyx_8); __pyx_8 = 0;
+  __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_isfile); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_2 = PyNumber_Add(__pyx_v_libFileName, __pyx_k120p); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; goto __pyx_L1;}
+  __pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_7, 0, __pyx_2);
+  __pyx_2 = 0;
+  __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_7); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_7); __pyx_7 = 0;
+  __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  if (__pyx_5) {
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":534 */
+    /*try:*/ {
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":535 */
+      __pyx_6 = __Pyx_GetName(__pyx_m, __pyx_n_os); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; goto __pyx_L39;}
+      __pyx_8 = PyObject_GetAttr(__pyx_6, __pyx_n_unlink); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; goto __pyx_L39;}
+      Py_DECREF(__pyx_6); __pyx_6 = 0;
+      __pyx_1 = PyNumber_Add(__pyx_v_libFileName, __pyx_k121p); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; goto __pyx_L39;}
+      __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; goto __pyx_L39;}
+      PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1);
+      __pyx_1 = 0;
+      __pyx_3 = PyObject_CallObject(__pyx_8, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; goto __pyx_L39;}
+      Py_DECREF(__pyx_8); __pyx_8 = 0;
+      Py_DECREF(__pyx_2); __pyx_2 = 0;
+      Py_DECREF(__pyx_3); __pyx_3 = 0;
+    }
+    goto __pyx_L40;
+    __pyx_L39:;
+    Py_XDECREF(__pyx_7); __pyx_7 = 0;
+    Py_XDECREF(__pyx_4); __pyx_4 = 0;
+    Py_XDECREF(__pyx_6); __pyx_6 = 0;
+    Py_XDECREF(__pyx_1); __pyx_1 = 0;
+    Py_XDECREF(__pyx_8); __pyx_8 = 0;
+    Py_XDECREF(__pyx_2); __pyx_2 = 0;
+    Py_XDECREF(__pyx_3); __pyx_3 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":536 */
+    /*except:*/ {
+      __Pyx_AddTraceback("bison_.buildLib");
+      __pyx_7 = __Pyx_GetExcValue(); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; goto __pyx_L1;}
+      Py_DECREF(__pyx_7); __pyx_7 = 0;
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":537 */
+      goto __pyx_L40;
+    }
+    __pyx_L40:;
+    goto __pyx_L38;
+  }
+  __pyx_L38:;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":538 */
+  __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_os); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; goto __pyx_L1;}
+  __pyx_6 = PyObject_GetAttr(__pyx_4, __pyx_n_path); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_1 = PyObject_GetAttr(__pyx_6, __pyx_n_isfile); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; goto __pyx_L1;}
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  __pyx_8 = PyTuple_New(1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_libFileName);
+  PyTuple_SET_ITEM(__pyx_8, 0, __pyx_v_libFileName);
+  __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_8); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_8); __pyx_8 = 0;
+  __pyx_5 = PyObject_IsTrue(__pyx_2); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  if (__pyx_5) {
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":539 */
+    __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_os); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; goto __pyx_L1;}
+    __pyx_7 = PyObject_GetAttr(__pyx_3, __pyx_n_rename); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    __pyx_4 = PyNumber_Add(__pyx_v_libFileName, __pyx_k122p); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; goto __pyx_L1;}
+    __pyx_6 = PyTuple_New(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; goto __pyx_L1;}
+    Py_INCREF(__pyx_v_libFileName);
+    PyTuple_SET_ITEM(__pyx_6, 0, __pyx_v_libFileName);
+    PyTuple_SET_ITEM(__pyx_6, 1, __pyx_4);
+    __pyx_4 = 0;
+    __pyx_1 = PyObject_CallObject(__pyx_7, __pyx_6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; goto __pyx_L1;}
+    Py_DECREF(__pyx_7); __pyx_7 = 0;
+    Py_DECREF(__pyx_6); __pyx_6 = 0;
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    goto __pyx_L41;
+  }
+  __pyx_L41:;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":540 */
+  __pyx_8 = PyObject_GetAttr(__pyx_v_ccompiler, __pyx_n_link_shared_object); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_objs);
+  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_objs);
+  Py_INCREF(__pyx_v_libFileName);
+  PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_libFileName);
+  __pyx_3 = PyObject_CallObject(__pyx_8, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; goto __pyx_L1;}
+  Py_DECREF(__pyx_8); __pyx_8 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":547 */
+  __pyx_4 = PySequence_GetSlice(__pyx_v_objs, 0, 0x7fffffff); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; goto __pyx_L1;}
+  Py_DECREF(__pyx_v_hitlist);
+  __pyx_v_hitlist = __pyx_4;
+  __pyx_4 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":548 */
+  __pyx_7 = PyObject_GetAttr(__pyx_v_hitlist, __pyx_n_append); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; goto __pyx_L1;}
+  __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; goto __pyx_L1;}
+  Py_INCREF(__pyx_k123p);
+  PyTuple_SET_ITEM(__pyx_6, 0, __pyx_k123p);
+  __pyx_1 = PyObject_CallObject(__pyx_7, __pyx_6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; goto __pyx_L1;}
+  Py_DECREF(__pyx_7); __pyx_7 = 0;
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":549 */
+  __pyx_8 = __Pyx_GetName(__pyx_m, __pyx_n_os); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; goto __pyx_L1;}
+  __pyx_2 = PyObject_GetAttr(__pyx_8, __pyx_n_path); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; goto __pyx_L1;}
+  Py_DECREF(__pyx_8); __pyx_8 = 0;
+  __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_isfile); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_libFileName);
+  PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_libFileName);
+  __pyx_7 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_5 = PyObject_IsTrue(__pyx_7); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; goto __pyx_L1;}
+  Py_DECREF(__pyx_7); __pyx_7 = 0;
+  if (__pyx_5) {
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":550 */
+    __pyx_6 = PyList_New(8); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;}
+    Py_INCREF(__pyx_n_bisonFile);
+    PyList_SET_ITEM(__pyx_6, 0, __pyx_n_bisonFile);
+    Py_INCREF(__pyx_n_bisonCFile);
+    PyList_SET_ITEM(__pyx_6, 1, __pyx_n_bisonCFile);
+    Py_INCREF(__pyx_n_bisonHFile);
+    PyList_SET_ITEM(__pyx_6, 2, __pyx_n_bisonHFile);
+    Py_INCREF(__pyx_n_bisonCFile1);
+    PyList_SET_ITEM(__pyx_6, 3, __pyx_n_bisonCFile1);
+    Py_INCREF(__pyx_n_bisonHFile1);
+    PyList_SET_ITEM(__pyx_6, 4, __pyx_n_bisonHFile1);
+    Py_INCREF(__pyx_n_flexFile);
+    PyList_SET_ITEM(__pyx_6, 5, __pyx_n_flexFile);
+    Py_INCREF(__pyx_n_flexCFile);
+    PyList_SET_ITEM(__pyx_6, 6, __pyx_n_flexCFile);
+    Py_INCREF(__pyx_n_flexCFile1);
+    PyList_SET_ITEM(__pyx_6, 7, __pyx_n_flexCFile1);
+    __pyx_1 = PyNumber_Add(__pyx_6, __pyx_v_objs); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; goto __pyx_L1;}
+    Py_DECREF(__pyx_6); __pyx_6 = 0;
+    __pyx_8 = PyObject_GetIter(__pyx_1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    for (;;) {
+      __pyx_L43:;
+      __pyx_2 = PyIter_Next(__pyx_8);
+      if (!__pyx_2) {
+        if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;}
+        break;
+      }
+      Py_DECREF(__pyx_v_name);
+      __pyx_v_name = __pyx_2;
+      __pyx_2 = 0;
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":554 */
+      __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_getattr); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; goto __pyx_L1;}
+      __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; goto __pyx_L1;}
+      Py_INCREF(__pyx_v_parser);
+      PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_parser);
+      Py_INCREF(__pyx_v_name);
+      PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_name);
+      Py_INCREF(Py_None);
+      PyTuple_SET_ITEM(__pyx_4, 2, Py_None);
+      __pyx_7 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; goto __pyx_L1;}
+      Py_DECREF(__pyx_3); __pyx_3 = 0;
+      Py_DECREF(__pyx_4); __pyx_4 = 0;
+      Py_DECREF(__pyx_v_fname);
+      __pyx_v_fname = __pyx_7;
+      __pyx_7 = 0;
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":556 */
+      __pyx_6 = __pyx_v_fname;
+      Py_INCREF(__pyx_6);
+      __pyx_5 = PyObject_IsTrue(__pyx_6); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; goto __pyx_L1;}
+      if (__pyx_5) {
+        Py_DECREF(__pyx_6); __pyx_6 = 0;
+        __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_os); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; goto __pyx_L1;}
+        __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_path); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; goto __pyx_L1;}
+        Py_DECREF(__pyx_1); __pyx_1 = 0;
+        __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_isfile); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; goto __pyx_L1;}
+        Py_DECREF(__pyx_2); __pyx_2 = 0;
+        __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; goto __pyx_L1;}
+        Py_INCREF(__pyx_v_fname);
+        PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_fname);
+        __pyx_6 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; goto __pyx_L1;}
+        Py_DECREF(__pyx_3); __pyx_3 = 0;
+        Py_DECREF(__pyx_4); __pyx_4 = 0;
+      }
+      __pyx_5 = PyObject_IsTrue(__pyx_6); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; goto __pyx_L1;}
+      Py_DECREF(__pyx_6); __pyx_6 = 0;
+      if (__pyx_5) {
+
+        /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":557 */
+        __pyx_7 = PyObject_GetAttr(__pyx_v_hitlist, __pyx_n_append); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; goto __pyx_L1;}
+        __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; goto __pyx_L1;}
+        Py_INCREF(__pyx_v_fname);
+        PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_fname);
+        __pyx_2 = PyObject_CallObject(__pyx_7, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; goto __pyx_L1;}
+        Py_DECREF(__pyx_7); __pyx_7 = 0;
+        Py_DECREF(__pyx_1); __pyx_1 = 0;
+        Py_DECREF(__pyx_2); __pyx_2 = 0;
+        goto __pyx_L45;
+      }
+      __pyx_L45:;
+    }
+    __pyx_L44:;
+    Py_DECREF(__pyx_8); __pyx_8 = 0;
+    goto __pyx_L42;
+  }
+  __pyx_L42:;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":558 */
+  __pyx_3 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_keepfiles); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; goto __pyx_L1;}
+  __pyx_5 = PyObject_IsTrue(__pyx_3); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  __pyx_9 = (!__pyx_5);
+  if (__pyx_9) {
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":559 */
+    __pyx_4 = PyObject_GetIter(__pyx_v_hitlist); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; goto __pyx_L1;}
+    for (;;) {
+      __pyx_L47:;
+      __pyx_6 = PyIter_Next(__pyx_4);
+      if (!__pyx_6) {
+        if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; goto __pyx_L1;}
+        break;
+      }
+      Py_DECREF(__pyx_v_f);
+      __pyx_v_f = __pyx_6;
+      __pyx_6 = 0;
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":560 */
+      /*try:*/ {
+
+        /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":561 */
+        __pyx_7 = __Pyx_GetName(__pyx_m, __pyx_n_os); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; goto __pyx_L49;}
+        __pyx_1 = PyObject_GetAttr(__pyx_7, __pyx_n_unlink); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; goto __pyx_L49;}
+        Py_DECREF(__pyx_7); __pyx_7 = 0;
+        __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; goto __pyx_L49;}
+        Py_INCREF(__pyx_v_f);
+        PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_f);
+        __pyx_8 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; goto __pyx_L49;}
+        Py_DECREF(__pyx_1); __pyx_1 = 0;
+        Py_DECREF(__pyx_2); __pyx_2 = 0;
+        Py_DECREF(__pyx_8); __pyx_8 = 0;
+      }
+      goto __pyx_L50;
+      __pyx_L49:;
+      Py_XDECREF(__pyx_3); __pyx_3 = 0;
+      Py_XDECREF(__pyx_6); __pyx_6 = 0;
+      Py_XDECREF(__pyx_7); __pyx_7 = 0;
+      Py_XDECREF(__pyx_1); __pyx_1 = 0;
+      Py_XDECREF(__pyx_2); __pyx_2 = 0;
+      Py_XDECREF(__pyx_8); __pyx_8 = 0;
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":562 */
+      /*except:*/ {
+        __Pyx_AddTraceback("bison_.buildLib");
+        __pyx_3 = __Pyx_GetExcValue(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; goto __pyx_L1;}
+        Py_DECREF(__pyx_3); __pyx_3 = 0;
+
+        /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":563 */
+        __pyx_6 = PyNumber_Remainder(__pyx_k132p, __pyx_v_f); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; goto __pyx_L1;}
+        if (__Pyx_PrintItem(__pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; goto __pyx_L1;}
+        Py_DECREF(__pyx_6); __pyx_6 = 0;
+        if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; goto __pyx_L1;}
+        goto __pyx_L50;
+      }
+      __pyx_L50:;
+    }
+    __pyx_L48:;
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    goto __pyx_L46;
+  }
+  __pyx_L46:;
+
+  __pyx_r = Py_None; Py_INCREF(__pyx_r);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_4);
+  Py_XDECREF(__pyx_6);
+  Py_XDECREF(__pyx_7);
+  Py_XDECREF(__pyx_8);
+  __Pyx_AddTraceback("bison_.ParserEngine.buildLib");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_parser);
+  Py_DECREF(__pyx_v_attribs);
+  Py_DECREF(__pyx_v_gHandlers);
+  Py_DECREF(__pyx_v_a);
+  Py_DECREF(__pyx_v_method);
+  Py_DECREF(__pyx_v_gStart);
+  Py_DECREF(__pyx_v_gTokens);
+  Py_DECREF(__pyx_v_gPrecedences);
+  Py_DECREF(__pyx_v_gLex);
+  Py_DECREF(__pyx_v_f);
+  Py_DECREF(__pyx_v_write);
+  Py_DECREF(__pyx_v_writelines);
+  Py_DECREF(__pyx_v_p);
+  Py_DECREF(__pyx_v_rules);
+  Py_DECREF(__pyx_v_h);
+  Py_DECREF(__pyx_v_doc);
+  Py_DECREF(__pyx_v_s);
+  Py_DECREF(__pyx_v_target);
+  Py_DECREF(__pyx_v_options);
+  Py_DECREF(__pyx_v_tmp);
+  Py_DECREF(__pyx_v_opts);
+  Py_DECREF(__pyx_v_r);
+  Py_DECREF(__pyx_v_opts1);
+  Py_DECREF(__pyx_v_o);
+  Py_DECREF(__pyx_v_rule);
+  Py_DECREF(__pyx_v_idx);
+  Py_DECREF(__pyx_v_option);
+  Py_DECREF(__pyx_v_nterms);
+  Py_DECREF(__pyx_v_action);
+  Py_DECREF(__pyx_v_args);
+  Py_DECREF(__pyx_v_i);
+  Py_DECREF(__pyx_v_epilogue);
+  Py_DECREF(__pyx_v_lexLines);
+  Py_DECREF(__pyx_v_line);
+  Py_DECREF(__pyx_v_ccompiler);
+  Py_DECREF(__pyx_v_bisonCmd);
+  Py_DECREF(__pyx_v_objs);
+  Py_DECREF(__pyx_v_libFileName);
+  Py_DECREF(__pyx_v_hitlist);
+  Py_DECREF(__pyx_v_name);
+  Py_DECREF(__pyx_v_fname);
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_6bison__12ParserEngine_closeLib(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_6bison__12ParserEngine_closeLib[] = "\n        Does the necessary cleanups and closes the parser library\n        ";
+static PyObject *__pyx_f_6bison__12ParserEngine_closeLib(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_r;
+  static char *__pyx_argnames[] = {0};
+  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":572 */
+  bisondynlib_close(((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->libHandle);
+
+  __pyx_r = Py_None; Py_INCREF(__pyx_r);
+  goto __pyx_L0;
+  __pyx_L1:;
+  __Pyx_AddTraceback("bison_.ParserEngine.closeLib");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_k133p;
+static PyObject *__pyx_k134p;
+
+char (__pyx_k133[]) = "runEngine: about to call, py_input=0x%lx...";
+char (__pyx_k134[]) = "runEngine: back from parser";
+
+static PyObject *__pyx_f_6bison__12ParserEngine_runEngine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_6bison__12ParserEngine_runEngine[] = "\n        Runs the binary parser engine, as loaded from the lib\n        ";
+static PyObject *__pyx_f_6bison__12ParserEngine_runEngine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_debug = 0;
+  void (*__pyx_v_handle);
+  void (*__pyx_v_cbvoid);
+  void (*__pyx_v_invoid);
+  PyObject *__pyx_v_parser;
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  int __pyx_2;
+  PyObject *__pyx_3 = 0;
+  static char *__pyx_argnames[] = {"debug",0};
+  __pyx_v_debug = __pyx_k11;
+  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_debug)) return 0;
+  Py_INCREF(__pyx_v_self);
+  Py_INCREF(__pyx_v_debug);
+  __pyx_v_parser = Py_None; Py_INCREF(__pyx_v_parser);
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":584 */
+  __pyx_v_handle = ((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->libHandle;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":585 */
+  Py_INCREF(((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->parser);
+  Py_DECREF(__pyx_v_parser);
+  __pyx_v_parser = ((struct __pyx_obj_6bison__ParserEngine *)__pyx_v_self)->parser;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":587 */
+  __pyx_v_cbvoid = ((void (*))py_callback);
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":588 */
+  __pyx_v_invoid = ((void (*))py_input);
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":590 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_verbose); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; goto __pyx_L1;}
+  __pyx_2 = PyObject_IsTrue(__pyx_1); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  if (__pyx_2) {
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":591 */
+    __pyx_1 = PyInt_FromLong(((int )__pyx_v_invoid)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; goto __pyx_L1;}
+    __pyx_3 = PyNumber_Remainder(__pyx_k133p, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    if (__Pyx_PrintItem(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; goto __pyx_L1;}
+    goto __pyx_L2;
+  }
+  __pyx_L2:;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":592 */
+  __pyx_2 = PyInt_AsLong(__pyx_v_debug); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; goto __pyx_L1;}
+  __pyx_1 = bisondynlib_run(__pyx_v_handle,__pyx_v_parser,__pyx_v_cbvoid,__pyx_v_invoid,__pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":593 */
+  __pyx_3 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_verbose); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; goto __pyx_L1;}
+  __pyx_2 = PyObject_IsTrue(__pyx_3); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  if (__pyx_2) {
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":594 */
+    if (__Pyx_PrintItem(__pyx_k134p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; goto __pyx_L1;}
+    if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; goto __pyx_L1;}
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  __pyx_r = Py_None; Py_INCREF(__pyx_r);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_3);
+  __Pyx_AddTraceback("bison_.ParserEngine.runEngine");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_parser);
+  Py_DECREF(__pyx_v_self);
+  Py_DECREF(__pyx_v_debug);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_6bison__12ParserEngine___del__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_6bison__12ParserEngine___del__[] = "\n        Clean up and bail\n        ";
+static PyObject *__pyx_f_6bison__12ParserEngine___del__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  static char *__pyx_argnames[] = {0};
+  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":602 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_closeLib); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; goto __pyx_L1;}
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+
+  __pyx_r = Py_None; Py_INCREF(__pyx_r);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  __Pyx_AddTraceback("bison_.ParserEngine.__del__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_n_func_code;
+static PyObject *__pyx_n_co_firstlineno;
+static PyObject *__pyx_n___init__;
+static PyObject *__pyx_n_cmp;
+
+static PyObject *__pyx_f_6bison__cmpLines(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_6bison__cmpLines[] = "\n    Used as a sort() argument for sorting parse target handler methods by\n    the order of their declaration in their source file.\n    ";
+static PyObject *__pyx_f_6bison__cmpLines(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_meth1 = 0;
+  PyObject *__pyx_v_meth2 = 0;
+  PyObject *__pyx_v_line1;
+  PyObject *__pyx_v_line2;
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  static char *__pyx_argnames[] = {"meth1","meth2",0};
+  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_meth1, &__pyx_v_meth2)) return 0;
+  Py_INCREF(__pyx_v_meth1);
+  Py_INCREF(__pyx_v_meth2);
+  __pyx_v_line1 = Py_None; Py_INCREF(__pyx_v_line1);
+  __pyx_v_line2 = Py_None; Py_INCREF(__pyx_v_line2);
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":612 */
+  /*try:*/ {
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":613 */
+    __pyx_1 = PyObject_GetAttr(__pyx_v_meth1, __pyx_n_func_code); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; goto __pyx_L2;}
+    __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_co_firstlineno); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; goto __pyx_L2;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_v_line1);
+    __pyx_v_line1 = __pyx_2;
+    __pyx_2 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":614 */
+    __pyx_1 = PyObject_GetAttr(__pyx_v_meth2, __pyx_n_func_code); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; goto __pyx_L2;}
+    __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_co_firstlineno); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; goto __pyx_L2;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_v_line2);
+    __pyx_v_line2 = __pyx_2;
+    __pyx_2 = 0;
+  }
+  goto __pyx_L3;
+  __pyx_L2:;
+  Py_XDECREF(__pyx_1); __pyx_1 = 0;
+  Py_XDECREF(__pyx_2); __pyx_2 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":615 */
+  /*except:*/ {
+    __Pyx_AddTraceback("bison_.cmpLines");
+    __pyx_1 = __Pyx_GetExcValue(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":616 */
+    __pyx_2 = PyObject_GetAttr(__pyx_v_meth1, __pyx_n___init__); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; goto __pyx_L1;}
+    __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_func_code); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_co_firstlineno); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_v_line1);
+    __pyx_v_line1 = __pyx_2;
+    __pyx_2 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":617 */
+    __pyx_1 = PyObject_GetAttr(__pyx_v_meth2, __pyx_n___init__); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; goto __pyx_L1;}
+    __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_func_code); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_co_firstlineno); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    Py_DECREF(__pyx_v_line2);
+    __pyx_v_line2 = __pyx_1;
+    __pyx_1 = 0;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":619 */
+  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_cmp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; goto __pyx_L1;}
+  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_line1);
+  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_line1);
+  Py_INCREF(__pyx_v_line2);
+  PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_line2);
+  __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_r = __pyx_3;
+  __pyx_3 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(__pyx_r);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  __Pyx_AddTraceback("bison_.cmpLines");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_line1);
+  Py_DECREF(__pyx_v_line2);
+  Py_DECREF(__pyx_v_meth1);
+  Py_DECREF(__pyx_v_meth2);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_n_new;
+static PyObject *__pyx_n_update;
+static PyObject *__pyx_n_list;
+static PyObject *__pyx_n_callable;
+static PyObject *__pyx_n_hexdigest;
+
+static PyObject *__pyx_k135p;
+static PyObject *__pyx_k136p;
+
+char (__pyx_k135[]) = ",";
+char (__pyx_k136[]) = "";
+
+static PyObject *__pyx_f_6bison__hashParserObject(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_6bison__hashParserObject[] = "\n    Calculates an sha1 hex \'hash\' of the lex script\n    and grammar rules in a parser class instance.\n    \n    This is based on the raw text of the lex script attribute,\n    and the grammar rule docstrings within the handler methods.\n    \n    Used to detect if someone has changed any grammar rules or\n    lex script, and therefore, whether a shared parser lib rebuild\n    is required.\n    ";
+static PyObject *__pyx_f_6bison__hashParserObject(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_parser = 0;
+  PyObject *__pyx_v_hasher;
+  PyObject *__pyx_v_tokens;
+  PyObject *__pyx_v_direction;
+  PyObject *__pyx_v_handlerNames;
+  PyObject *__pyx_v_tmp;
+  PyObject *__pyx_v_name;
+  PyObject *__pyx_v_m;
+  PyObject *__pyx_v_attr;
+  PyObject *__pyx_v_handlers;
+  PyObject *__pyx_v_h;
+  PyObject *__pyx_v_docString;
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  PyObject *__pyx_4 = 0;
+  PyObject *__pyx_5 = 0;
+  int __pyx_6;
+  static char *__pyx_argnames[] = {"parser",0};
+  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_parser)) return 0;
+  Py_INCREF(__pyx_v_parser);
+  __pyx_v_hasher = Py_None; Py_INCREF(__pyx_v_hasher);
+  __pyx_v_tokens = Py_None; Py_INCREF(__pyx_v_tokens);
+  __pyx_v_direction = Py_None; Py_INCREF(__pyx_v_direction);
+  __pyx_v_handlerNames = Py_None; Py_INCREF(__pyx_v_handlerNames);
+  __pyx_v_tmp = Py_None; Py_INCREF(__pyx_v_tmp);
+  __pyx_v_name = Py_None; Py_INCREF(__pyx_v_name);
+  __pyx_v_m = Py_None; Py_INCREF(__pyx_v_m);
+  __pyx_v_attr = Py_None; Py_INCREF(__pyx_v_attr);
+  __pyx_v_handlers = Py_None; Py_INCREF(__pyx_v_handlers);
+  __pyx_v_h = Py_None; Py_INCREF(__pyx_v_h);
+  __pyx_v_docString = Py_None; Py_INCREF(__pyx_v_docString);
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":635 */
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_sha); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;}
+  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_new); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;}
+  __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_v_hasher);
+  __pyx_v_hasher = __pyx_3;
+  __pyx_3 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":638 */
+  __pyx_2 = PyObject_GetAttr(__pyx_v_hasher, __pyx_n_update); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; goto __pyx_L1;}
+  __pyx_1 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_lexscript); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
+  __pyx_1 = 0;
+  __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":643 */
+  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_list); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; goto __pyx_L1;}
+  __pyx_3 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_tokens); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; goto __pyx_L1;}
+  __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3);
+  __pyx_3 = 0;
+  __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_v_tokens);
+  __pyx_v_tokens = __pyx_3;
+  __pyx_3 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":644 */
+  __pyx_2 = PyObject_GetAttr(__pyx_v_hasher, __pyx_n_update); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; goto __pyx_L1;}
+  __pyx_1 = PyObject_GetAttr(__pyx_k135p, __pyx_n_join); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; goto __pyx_L1;}
+  __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_list); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; goto __pyx_L1;}
+  __pyx_4 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_tokens); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; goto __pyx_L1;}
+  __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_5, 0, __pyx_4);
+  __pyx_4 = 0;
+  __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_5); __pyx_5 = 0;
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4);
+  __pyx_4 = 0;
+  __pyx_5 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_4, 0, __pyx_5);
+  __pyx_5 = 0;
+  __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":647 */
+  __pyx_3 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_precedences); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; goto __pyx_L1;}
+  __pyx_5 = PyObject_GetIter(__pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  for (;;) {
+    __pyx_L2:;
+    __pyx_2 = PyIter_Next(__pyx_5);
+    if (!__pyx_2) {
+      if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; goto __pyx_L1;}
+      break;
+    }
+    __pyx_4 = __Pyx_UnpackItem(__pyx_2, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; goto __pyx_L1;}
+    Py_DECREF(__pyx_v_direction);
+    __pyx_v_direction = __pyx_4;
+    __pyx_4 = 0;
+    __pyx_1 = __Pyx_UnpackItem(__pyx_2, 1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; goto __pyx_L1;}
+    Py_DECREF(__pyx_v_tokens);
+    __pyx_v_tokens = __pyx_1;
+    __pyx_1 = 0;
+    if (__Pyx_EndUnpack(__pyx_2, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":648 */
+    __pyx_3 = PyObject_GetAttr(__pyx_v_hasher, __pyx_n_update); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; goto __pyx_L1;}
+    __pyx_2 = PyObject_GetAttr(__pyx_k136p, __pyx_n_join); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; goto __pyx_L1;}
+    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; goto __pyx_L1;}
+    Py_INCREF(__pyx_v_tokens);
+    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_tokens);
+    __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    __pyx_2 = PyNumber_Add(__pyx_v_direction, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; goto __pyx_L1;}
+    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2);
+    __pyx_2 = 0;
+    __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+  }
+  __pyx_L3:;
+  Py_DECREF(__pyx_5); __pyx_5 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":651 */
+  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_dir); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_parser);
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_parser);
+  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_v_handlerNames);
+  __pyx_v_handlerNames = __pyx_4;
+  __pyx_4 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":654 */
+  __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; goto __pyx_L1;}
+  Py_DECREF(__pyx_v_tmp);
+  __pyx_v_tmp = __pyx_1;
+  __pyx_1 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":655 */
+  __pyx_5 = PyObject_GetIter(__pyx_v_handlerNames); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; goto __pyx_L1;}
+  for (;;) {
+    __pyx_L4:;
+    __pyx_2 = PyIter_Next(__pyx_5);
+    if (!__pyx_2) {
+      if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; goto __pyx_L1;}
+      break;
+    }
+    Py_DECREF(__pyx_v_name);
+    __pyx_v_name = __pyx_2;
+    __pyx_2 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":656 */
+    __pyx_3 = PyObject_GetAttr(__pyx_v_name, __pyx_n_startswith); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; goto __pyx_L1;}
+    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; goto __pyx_L1;}
+    Py_INCREF(__pyx_n_on_);
+    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_n_on_);
+    __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    __pyx_6 = PyObject_IsTrue(__pyx_1); if (__pyx_6 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    if (__pyx_6) {
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":657 */
+      __pyx_2 = PyObject_GetAttr(__pyx_v_tmp, __pyx_n_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; goto __pyx_L1;}
+      __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; goto __pyx_L1;}
+      Py_INCREF(__pyx_v_name);
+      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_name);
+      __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; goto __pyx_L1;}
+      Py_DECREF(__pyx_2); __pyx_2 = 0;
+      Py_DECREF(__pyx_3); __pyx_3 = 0;
+      Py_DECREF(__pyx_4); __pyx_4 = 0;
+      goto __pyx_L6;
+    }
+    __pyx_L6:;
+  }
+  __pyx_L5:;
+  Py_DECREF(__pyx_5); __pyx_5 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":658 */
+  Py_INCREF(__pyx_v_tmp);
+  Py_DECREF(__pyx_v_handlerNames);
+  __pyx_v_handlerNames = __pyx_v_tmp;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":659 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_handlerNames, __pyx_n_sort); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; goto __pyx_L1;}
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":664 */
+  __pyx_4 = PyList_New(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; goto __pyx_L1;}
+  Py_DECREF(__pyx_v_tmp);
+  __pyx_v_tmp = __pyx_4;
+  __pyx_4 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":665 */
+  __pyx_5 = PyObject_GetIter(__pyx_v_handlerNames); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; goto __pyx_L1;}
+  for (;;) {
+    __pyx_L7:;
+    __pyx_1 = PyIter_Next(__pyx_5);
+    if (!__pyx_1) {
+      if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; goto __pyx_L1;}
+      break;
+    }
+    Py_DECREF(__pyx_v_m);
+    __pyx_v_m = __pyx_1;
+    __pyx_1 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":666 */
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_getattr); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; goto __pyx_L1;}
+    __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; goto __pyx_L1;}
+    Py_INCREF(__pyx_v_parser);
+    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_parser);
+    Py_INCREF(__pyx_v_m);
+    PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_m);
+    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    Py_DECREF(__pyx_v_attr);
+    __pyx_v_attr = __pyx_4;
+    __pyx_4 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":667 */
+    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_callable); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; goto __pyx_L1;}
+    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; goto __pyx_L1;}
+    Py_INCREF(__pyx_v_attr);
+    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_attr);
+    __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    __pyx_6 = PyObject_IsTrue(__pyx_3); if (__pyx_6 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    if (__pyx_6) {
+
+      /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":668 */
+      __pyx_4 = PyObject_GetAttr(__pyx_v_tmp, __pyx_n_append); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; goto __pyx_L1;}
+      __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; goto __pyx_L1;}
+      Py_INCREF(__pyx_v_attr);
+      PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_attr);
+      __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; goto __pyx_L1;}
+      Py_DECREF(__pyx_4); __pyx_4 = 0;
+      Py_DECREF(__pyx_1); __pyx_1 = 0;
+      Py_DECREF(__pyx_2); __pyx_2 = 0;
+      goto __pyx_L9;
+    }
+    __pyx_L9:;
+  }
+  __pyx_L8:;
+  Py_DECREF(__pyx_5); __pyx_5 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":669 */
+  Py_INCREF(__pyx_v_tmp);
+  Py_DECREF(__pyx_v_handlers);
+  __pyx_v_handlers = __pyx_v_tmp;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":672 */
+  __pyx_3 = PyObject_GetIter(__pyx_v_handlers); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; goto __pyx_L1;}
+  for (;;) {
+    __pyx_L10:;
+    __pyx_4 = PyIter_Next(__pyx_3);
+    if (!__pyx_4) {
+      if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; goto __pyx_L1;}
+      break;
+    }
+    Py_DECREF(__pyx_v_h);
+    __pyx_v_h = __pyx_4;
+    __pyx_4 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":673 */
+    __pyx_1 = PyObject_GetAttr(__pyx_v_h, __pyx_n___doc__); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; goto __pyx_L1;}
+    Py_DECREF(__pyx_v_docString);
+    __pyx_v_docString = __pyx_1;
+    __pyx_1 = 0;
+
+    /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":674 */
+    __pyx_2 = PyObject_GetAttr(__pyx_v_hasher, __pyx_n_update); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; goto __pyx_L1;}
+    __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; goto __pyx_L1;}
+    Py_INCREF(__pyx_v_docString);
+    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_docString);
+    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    Py_DECREF(__pyx_5); __pyx_5 = 0;
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+  }
+  __pyx_L11:;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":677 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_hasher, __pyx_n_hexdigest); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; goto __pyx_L1;}
+  __pyx_5 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_r = __pyx_5;
+  __pyx_5 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(__pyx_r);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_4);
+  Py_XDECREF(__pyx_5);
+  __Pyx_AddTraceback("bison_.hashParserObject");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_hasher);
+  Py_DECREF(__pyx_v_tokens);
+  Py_DECREF(__pyx_v_direction);
+  Py_DECREF(__pyx_v_handlerNames);
+  Py_DECREF(__pyx_v_tmp);
+  Py_DECREF(__pyx_v_name);
+  Py_DECREF(__pyx_v_m);
+  Py_DECREF(__pyx_v_attr);
+  Py_DECREF(__pyx_v_handlers);
+  Py_DECREF(__pyx_v_h);
+  Py_DECREF(__pyx_v_docString);
+  Py_DECREF(__pyx_v_parser);
+  return __pyx_r;
+}
+
+static __Pyx_InternTabEntry __pyx_intern_tab[] = {
+  {&__pyx_n_NULL, "NULL"},
+  {&__pyx_n___doc__, "__doc__"},
+  {&__pyx_n___init__, "__init__"},
+  {&__pyx_n__handle, "_handle"},
+  {&__pyx_n_append, "append"},
+  {&__pyx_n_bisonCFile, "bisonCFile"},
+  {&__pyx_n_bisonCFile1, "bisonCFile1"},
+  {&__pyx_n_bisonCmd, "bisonCmd"},
+  {&__pyx_n_bisonEngineLibName, "bisonEngineLibName"},
+  {&__pyx_n_bisonFile, "bisonFile"},
+  {&__pyx_n_bisonHFile, "bisonHFile"},
+  {&__pyx_n_bisonHFile1, "bisonHFile1"},
+  {&__pyx_n_buildLib, "buildLib"},
+  {&__pyx_n_callable, "callable"},
+  {&__pyx_n_ccompiler, "ccompiler"},
+  {&__pyx_n_close, "close"},
+  {&__pyx_n_closeLib, "closeLib"},
+  {&__pyx_n_cmp, "cmp"},
+  {&__pyx_n_cmpLines, "cmpLines"},
+  {&__pyx_n_co_firstlineno, "co_firstlineno"},
+  {&__pyx_n_compile, "compile"},
+  {&__pyx_n_dir, "dir"},
+  {&__pyx_n_distutils, "distutils"},
+  {&__pyx_n_error, "error"},
+  {&__pyx_n_flexCFile, "flexCFile"},
+  {&__pyx_n_flexCFile1, "flexCFile1"},
+  {&__pyx_n_flexCmd, "flexCmd"},
+  {&__pyx_n_flexFile, "flexFile"},
+  {&__pyx_n_func_code, "func_code"},
+  {&__pyx_n_get_python_inc, "get_python_inc"},
+  {&__pyx_n_get_suffixes, "get_suffixes"},
+  {&__pyx_n_getattr, "getattr"},
+  {&__pyx_n_hashParserObject, "hashParserObject"},
+  {&__pyx_n_hexdigest, "hexdigest"},
+  {&__pyx_n_imp, "imp"},
+  {&__pyx_n_isfile, "isfile"},
+  {&__pyx_n_join, "join"},
+  {&__pyx_n_keepfiles, "keepfiles"},
+  {&__pyx_n_len, "len"},
+  {&__pyx_n_lexscript, "lexscript"},
+  {&__pyx_n_link_shared_object, "link_shared_object"},
+  {&__pyx_n_list, "list"},
+  {&__pyx_n_new, "new"},
+  {&__pyx_n_new_compiler, "new_compiler"},
+  {&__pyx_n_on_, "on_"},
+  {&__pyx_n_open, "open"},
+  {&__pyx_n_openCurrentLib, "openCurrentLib"},
+  {&__pyx_n_openLib, "openLib"},
+  {&__pyx_n_os, "os"},
+  {&__pyx_n_path, "path"},
+  {&__pyx_n_precedences, "precedences"},
+  {&__pyx_n_print_exc, "print_exc"},
+  {&__pyx_n_range, "range"},
+  {&__pyx_n_re, "re"},
+  {&__pyx_n_reSpaces, "reSpaces"},
+  {&__pyx_n_read, "read"},
+  {&__pyx_n_rename, "rename"},
+  {&__pyx_n_repr, "repr"},
+  {&__pyx_n_set_include_dirs, "set_include_dirs"},
+  {&__pyx_n_sha, "sha"},
+  {&__pyx_n_sort, "sort"},
+  {&__pyx_n_spawn, "spawn"},
+  {&__pyx_n_split, "split"},
+  {&__pyx_n_start, "start"},
+  {&__pyx_n_startswith, "startswith"},
+  {&__pyx_n_strip, "strip"},
+  {&__pyx_n_sub, "sub"},
+  {&__pyx_n_sys, "sys"},
+  {&__pyx_n_sysconfig, "sysconfig"},
+  {&__pyx_n_tokens, "tokens"},
+  {&__pyx_n_traceback, "traceback"},
+  {&__pyx_n_unlink, "unlink"},
+  {&__pyx_n_unquoted, "unquoted"},
+  {&__pyx_n_update, "update"},
+  {&__pyx_n_verbose, "verbose"},
+  {&__pyx_n_w, "w"},
+  {&__pyx_n_write, "write"},
+  {&__pyx_n_writelines, "writelines"},
+  {0, 0}
+};
+
+static __Pyx_StringTabEntry __pyx_string_tab[] = {
+  {&__pyx_k7p, __pyx_k7, sizeof(__pyx_k7)},
+  {&__pyx_k8p, __pyx_k8, sizeof(__pyx_k8)},
+  {&__pyx_k9p, __pyx_k9, sizeof(__pyx_k9)},
+  {&__pyx_k10p, __pyx_k10, sizeof(__pyx_k10)},
+  {&__pyx_k12p, __pyx_k12, sizeof(__pyx_k12)},
+  {&__pyx_k13p, __pyx_k13, sizeof(__pyx_k13)},
+  {&__pyx_k14p, __pyx_k14, sizeof(__pyx_k14)},
+  {&__pyx_k15p, __pyx_k15, sizeof(__pyx_k15)},
+  {&__pyx_k16p, __pyx_k16, sizeof(__pyx_k16)},
+  {&__pyx_k17p, __pyx_k17, sizeof(__pyx_k17)},
+  {&__pyx_k19p, __pyx_k19, sizeof(__pyx_k19)},
+  {&__pyx_k22p, __pyx_k22, sizeof(__pyx_k22)},
+  {&__pyx_k23p, __pyx_k23, sizeof(__pyx_k23)},
+  {&__pyx_k24p, __pyx_k24, sizeof(__pyx_k24)},
+  {&__pyx_k25p, __pyx_k25, sizeof(__pyx_k25)},
+  {&__pyx_k26p, __pyx_k26, sizeof(__pyx_k26)},
+  {&__pyx_k27p, __pyx_k27, sizeof(__pyx_k27)},
+  {&__pyx_k28p, __pyx_k28, sizeof(__pyx_k28)},
+  {&__pyx_k29p, __pyx_k29, sizeof(__pyx_k29)},
+  {&__pyx_k30p, __pyx_k30, sizeof(__pyx_k30)},
+  {&__pyx_k31p, __pyx_k31, sizeof(__pyx_k31)},
+  {&__pyx_k32p, __pyx_k32, sizeof(__pyx_k32)},
+  {&__pyx_k33p, __pyx_k33, sizeof(__pyx_k33)},
+  {&__pyx_k34p, __pyx_k34, sizeof(__pyx_k34)},
+  {&__pyx_k35p, __pyx_k35, sizeof(__pyx_k35)},
+  {&__pyx_k36p, __pyx_k36, sizeof(__pyx_k36)},
+  {&__pyx_k38p, __pyx_k38, sizeof(__pyx_k38)},
+  {&__pyx_k37p, __pyx_k37, sizeof(__pyx_k37)},
+  {&__pyx_k39p, __pyx_k39, sizeof(__pyx_k39)},
+  {&__pyx_k41p, __pyx_k41, sizeof(__pyx_k41)},
+  {&__pyx_k40p, __pyx_k40, sizeof(__pyx_k40)},
+  {&__pyx_k42p, __pyx_k42, sizeof(__pyx_k42)},
+  {&__pyx_k43p, __pyx_k43, sizeof(__pyx_k43)},
+  {&__pyx_k44p, __pyx_k44, sizeof(__pyx_k44)},
+  {&__pyx_k45p, __pyx_k45, sizeof(__pyx_k45)},
+  {&__pyx_k46p, __pyx_k46, sizeof(__pyx_k46)},
+  {&__pyx_k47p, __pyx_k47, sizeof(__pyx_k47)},
+  {&__pyx_k48p, __pyx_k48, sizeof(__pyx_k48)},
+  {&__pyx_k49p, __pyx_k49, sizeof(__pyx_k49)},
+  {&__pyx_k50p, __pyx_k50, sizeof(__pyx_k50)},
+  {&__pyx_k51p, __pyx_k51, sizeof(__pyx_k51)},
+  {&__pyx_k53p, __pyx_k53, sizeof(__pyx_k53)},
+  {&__pyx_k54p, __pyx_k54, sizeof(__pyx_k54)},
+  {&__pyx_k56p, __pyx_k56, sizeof(__pyx_k56)},
+  {&__pyx_k57p, __pyx_k57, sizeof(__pyx_k57)},
+  {&__pyx_k58p, __pyx_k58, sizeof(__pyx_k58)},
+  {&__pyx_k59p, __pyx_k59, sizeof(__pyx_k59)},
+  {&__pyx_k60p, __pyx_k60, sizeof(__pyx_k60)},
+  {&__pyx_k62p, __pyx_k62, sizeof(__pyx_k62)},
+  {&__pyx_k63p, __pyx_k63, sizeof(__pyx_k63)},
+  {&__pyx_k64p, __pyx_k64, sizeof(__pyx_k64)},
+  {&__pyx_k65p, __pyx_k65, sizeof(__pyx_k65)},
+  {&__pyx_k66p, __pyx_k66, sizeof(__pyx_k66)},
+  {&__pyx_k67p, __pyx_k67, sizeof(__pyx_k67)},
+  {&__pyx_k68p, __pyx_k68, sizeof(__pyx_k68)},
+  {&__pyx_k69p, __pyx_k69, sizeof(__pyx_k69)},
+  {&__pyx_k70p, __pyx_k70, sizeof(__pyx_k70)},
+  {&__pyx_k71p, __pyx_k71, sizeof(__pyx_k71)},
+  {&__pyx_k72p, __pyx_k72, sizeof(__pyx_k72)},
+  {&__pyx_k73p, __pyx_k73, sizeof(__pyx_k73)},
+  {&__pyx_k74p, __pyx_k74, sizeof(__pyx_k74)},
+  {&__pyx_k75p, __pyx_k75, sizeof(__pyx_k75)},
+  {&__pyx_k76p, __pyx_k76, sizeof(__pyx_k76)},
+  {&__pyx_k77p, __pyx_k77, sizeof(__pyx_k77)},
+  {&__pyx_k78p, __pyx_k78, sizeof(__pyx_k78)},
+  {&__pyx_k79p, __pyx_k79, sizeof(__pyx_k79)},
+  {&__pyx_k80p, __pyx_k80, sizeof(__pyx_k80)},
+  {&__pyx_k81p, __pyx_k81, sizeof(__pyx_k81)},
+  {&__pyx_k82p, __pyx_k82, sizeof(__pyx_k82)},
+  {&__pyx_k83p, __pyx_k83, sizeof(__pyx_k83)},
+  {&__pyx_k84p, __pyx_k84, sizeof(__pyx_k84)},
+  {&__pyx_k85p, __pyx_k85, sizeof(__pyx_k85)},
+  {&__pyx_k86p, __pyx_k86, sizeof(__pyx_k86)},
+  {&__pyx_k87p, __pyx_k87, sizeof(__pyx_k87)},
+  {&__pyx_k88p, __pyx_k88, sizeof(__pyx_k88)},
+  {&__pyx_k89p, __pyx_k89, sizeof(__pyx_k89)},
+  {&__pyx_k90p, __pyx_k90, sizeof(__pyx_k90)},
+  {&__pyx_k91p, __pyx_k91, sizeof(__pyx_k91)},
+  {&__pyx_k92p, __pyx_k92, sizeof(__pyx_k92)},
+  {&__pyx_k93p, __pyx_k93, sizeof(__pyx_k93)},
+  {&__pyx_k94p, __pyx_k94, sizeof(__pyx_k94)},
+  {&__pyx_k95p, __pyx_k95, sizeof(__pyx_k95)},
+  {&__pyx_k96p, __pyx_k96, sizeof(__pyx_k96)},
+  {&__pyx_k97p, __pyx_k97, sizeof(__pyx_k97)},
+  {&__pyx_k98p, __pyx_k98, sizeof(__pyx_k98)},
+  {&__pyx_k99p, __pyx_k99, sizeof(__pyx_k99)},
+  {&__pyx_k100p, __pyx_k100, sizeof(__pyx_k100)},
+  {&__pyx_k101p, __pyx_k101, sizeof(__pyx_k101)},
+  {&__pyx_k102p, __pyx_k102, sizeof(__pyx_k102)},
+  {&__pyx_k103p, __pyx_k103, sizeof(__pyx_k103)},
+  {&__pyx_k104p, __pyx_k104, sizeof(__pyx_k104)},
+  {&__pyx_k105p, __pyx_k105, sizeof(__pyx_k105)},
+  {&__pyx_k106p, __pyx_k106, sizeof(__pyx_k106)},
+  {&__pyx_k107p, __pyx_k107, sizeof(__pyx_k107)},
+  {&__pyx_k108p, __pyx_k108, sizeof(__pyx_k108)},
+  {&__pyx_k109p, __pyx_k109, sizeof(__pyx_k109)},
+  {&__pyx_k110p, __pyx_k110, sizeof(__pyx_k110)},
+  {&__pyx_k111p, __pyx_k111, sizeof(__pyx_k111)},
+  {&__pyx_k113p, __pyx_k113, sizeof(__pyx_k113)},
+  {&__pyx_k114p, __pyx_k114, sizeof(__pyx_k114)},
+  {&__pyx_k116p, __pyx_k116, sizeof(__pyx_k116)},
+  {&__pyx_k117p, __pyx_k117, sizeof(__pyx_k117)},
+  {&__pyx_k118p, __pyx_k118, sizeof(__pyx_k118)},
+  {&__pyx_k119p, __pyx_k119, sizeof(__pyx_k119)},
+  {&__pyx_k120p, __pyx_k120, sizeof(__pyx_k120)},
+  {&__pyx_k121p, __pyx_k121, sizeof(__pyx_k121)},
+  {&__pyx_k122p, __pyx_k122, sizeof(__pyx_k122)},
+  {&__pyx_k123p, __pyx_k123, sizeof(__pyx_k123)},
+  {&__pyx_k132p, __pyx_k132, sizeof(__pyx_k132)},
+  {&__pyx_k133p, __pyx_k133, sizeof(__pyx_k133)},
+  {&__pyx_k134p, __pyx_k134, sizeof(__pyx_k134)},
+  {&__pyx_k135p, __pyx_k135, sizeof(__pyx_k135)},
+  {&__pyx_k136p, __pyx_k136, sizeof(__pyx_k136)},
+  {0, 0, 0}
+};
+
+static PyObject *__pyx_tp_new_6bison__ParserEngine(PyTypeObject *t, PyObject *a, PyObject *k) {
+  PyObject *o = (*t->tp_alloc)(t, 0);
+  struct __pyx_obj_6bison__ParserEngine *p = (struct __pyx_obj_6bison__ParserEngine *)o;
+  p->parser = Py_None; Py_INCREF(p->parser);
+  p->parserHash = Py_None; Py_INCREF(p->parserHash);
+  p->libFilename_py = Py_None; Py_INCREF(p->libFilename_py);
+  return o;
+}
+
+static void __pyx_tp_dealloc_6bison__ParserEngine(PyObject *o) {
+  struct __pyx_obj_6bison__ParserEngine *p = (struct __pyx_obj_6bison__ParserEngine *)o;
+  Py_XDECREF(p->parser);
+  Py_XDECREF(p->parserHash);
+  Py_XDECREF(p->libFilename_py);
+  (*o->ob_type->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_6bison__ParserEngine(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_6bison__ParserEngine *p = (struct __pyx_obj_6bison__ParserEngine *)o;
+  if (p->parser) {
+    e = (*v)(p->parser, a); if (e) return e;
+  }
+  if (p->parserHash) {
+    e = (*v)(p->parserHash, a); if (e) return e;
+  }
+  if (p->libFilename_py) {
+    e = (*v)(p->libFilename_py, a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_6bison__ParserEngine(PyObject *o) {
+  struct __pyx_obj_6bison__ParserEngine *p = (struct __pyx_obj_6bison__ParserEngine *)o;
+  Py_XDECREF(p->parser);
+  p->parser = Py_None; Py_INCREF(p->parser);
+  Py_XDECREF(p->parserHash);
+  p->parserHash = Py_None; Py_INCREF(p->parserHash);
+  Py_XDECREF(p->libFilename_py);
+  p->libFilename_py = Py_None; Py_INCREF(p->libFilename_py);
+  return 0;
+}
+
+static struct PyMethodDef __pyx_methods_6bison__ParserEngine[] = {
+  {"openCurrentLib", (PyCFunction)__pyx_f_6bison__12ParserEngine_openCurrentLib, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6bison__12ParserEngine_openCurrentLib},
+  {"openLib", (PyCFunction)__pyx_f_6bison__12ParserEngine_openLib, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6bison__12ParserEngine_openLib},
+  {"buildLib", (PyCFunction)__pyx_f_6bison__12ParserEngine_buildLib, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6bison__12ParserEngine_buildLib},
+  {"closeLib", (PyCFunction)__pyx_f_6bison__12ParserEngine_closeLib, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6bison__12ParserEngine_closeLib},
+  {"runEngine", (PyCFunction)__pyx_f_6bison__12ParserEngine_runEngine, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6bison__12ParserEngine_runEngine},
+  {"__del__", (PyCFunction)__pyx_f_6bison__12ParserEngine___del__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6bison__12ParserEngine___del__},
+  {0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number_ParserEngine = {
+  0, /*nb_add*/
+  0, /*nb_subtract*/
+  0, /*nb_multiply*/
+  0, /*nb_divide*/
+  0, /*nb_remainder*/
+  0, /*nb_divmod*/
+  0, /*nb_power*/
+  0, /*nb_negative*/
+  0, /*nb_positive*/
+  0, /*nb_absolute*/
+  0, /*nb_nonzero*/
+  0, /*nb_invert*/
+  0, /*nb_lshift*/
+  0, /*nb_rshift*/
+  0, /*nb_and*/
+  0, /*nb_xor*/
+  0, /*nb_or*/
+  0, /*nb_coerce*/
+  0, /*nb_int*/
+  0, /*nb_long*/
+  0, /*nb_float*/
+  0, /*nb_oct*/
+  0, /*nb_hex*/
+  0, /*nb_inplace_add*/
+  0, /*nb_inplace_subtract*/
+  0, /*nb_inplace_multiply*/
+  0, /*nb_inplace_divide*/
+  0, /*nb_inplace_remainder*/
+  0, /*nb_inplace_power*/
+  0, /*nb_inplace_lshift*/
+  0, /*nb_inplace_rshift*/
+  0, /*nb_inplace_and*/
+  0, /*nb_inplace_xor*/
+  0, /*nb_inplace_or*/
+  0, /*nb_floor_divide*/
+  0, /*nb_true_divide*/
+  0, /*nb_inplace_floor_divide*/
+  0, /*nb_inplace_true_divide*/
+};
+
+static PySequenceMethods __pyx_tp_as_sequence_ParserEngine = {
+  0, /*sq_length*/
+  0, /*sq_concat*/
+  0, /*sq_repeat*/
+  0, /*sq_item*/
+  0, /*sq_slice*/
+  0, /*sq_ass_item*/
+  0, /*sq_ass_slice*/
+  0, /*sq_contains*/
+  0, /*sq_inplace_concat*/
+  0, /*sq_inplace_repeat*/
+};
+
+static PyMappingMethods __pyx_tp_as_mapping_ParserEngine = {
+  0, /*mp_length*/
+  0, /*mp_subscript*/
+  0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer_ParserEngine = {
+  0, /*bf_getreadbuffer*/
+  0, /*bf_getwritebuffer*/
+  0, /*bf_getsegcount*/
+  0, /*bf_getcharbuffer*/
+};
+
+statichere PyTypeObject __pyx_type_6bison__ParserEngine = {
+  PyObject_HEAD_INIT(0)
+  0, /*ob_size*/
+  "bison_.ParserEngine", /*tp_name*/
+  sizeof(struct __pyx_obj_6bison__ParserEngine), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_6bison__ParserEngine, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  0, /*tp_compare*/
+  0, /*tp_repr*/
+  &__pyx_tp_as_number_ParserEngine, /*tp_as_number*/
+  &__pyx_tp_as_sequence_ParserEngine, /*tp_as_sequence*/
+  &__pyx_tp_as_mapping_ParserEngine, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  &__pyx_tp_as_buffer_ParserEngine, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  "\n    Wraps the interface to the binary bison/lex-generated\n    parser engine dynamic library.\n    \n    You shouldn\'t need to deal with this at all.\n\n    Takes care of:\n        - building the library (if the parser rules have changed)\n        - loading the library and extracting the parser entry point\n        - calling the entry point\n        - closing the library\n\n    Makes direct calls to the platform-dependent routines in \n    bisondynlib-[linux|windows].c\n    ", /*tp_doc*/
+  __pyx_tp_traverse_6bison__ParserEngine, /*tp_traverse*/
+  __pyx_tp_clear_6bison__ParserEngine, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_6bison__ParserEngine, /*tp_methods*/
+  0, /*tp_members*/
+  0, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  __pyx_f_6bison__12ParserEngine___init__, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_6bison__ParserEngine, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+};
+
+static struct PyMethodDef __pyx_methods[] = {
+  {"cmpLines", (PyCFunction)__pyx_f_6bison__cmpLines, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6bison__cmpLines},
+  {"hashParserObject", (PyCFunction)__pyx_f_6bison__hashParserObject, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6bison__hashParserObject},
+  {0, 0, 0, 0}
+};
+
+DL_EXPORT(void) initbison_(void); /*proto*/
+DL_EXPORT(void) initbison_(void) {
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  __pyx_m = Py_InitModule4("bison_", __pyx_methods, __pyx_mdoc, 0, PYTHON_API_VERSION);
+  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; goto __pyx_L1;};
+  __pyx_b = PyImport_AddModule("__builtin__");
+  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; goto __pyx_L1;};
+  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; goto __pyx_L1;};
+  if (__Pyx_InternStrings(__pyx_intern_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; goto __pyx_L1;};
+  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; goto __pyx_L1;};
+  __pyx_type_6bison__ParserEngine.tp_free = _PyObject_GC_Del;
+  if (PyType_Ready(&__pyx_type_6bison__ParserEngine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; goto __pyx_L1;}
+  if (PyObject_SetAttrString(__pyx_m, "ParserEngine", (PyObject *)&__pyx_type_6bison__ParserEngine) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; goto __pyx_L1;}
+  __pyx_ptype_6bison__ParserEngine = &__pyx_type_6bison__ParserEngine;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":123 */
+  __pyx_1 = __Pyx_Import(__pyx_n_sys, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; goto __pyx_L1;}
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_sys, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":123 */
+  __pyx_1 = __Pyx_Import(__pyx_n_os, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; goto __pyx_L1;}
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_os, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":123 */
+  __pyx_1 = __Pyx_Import(__pyx_n_sha, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; goto __pyx_L1;}
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_sha, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":123 */
+  __pyx_1 = __Pyx_Import(__pyx_n_re, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; goto __pyx_L1;}
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_re, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":123 */
+  __pyx_1 = __Pyx_Import(__pyx_n_imp, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; goto __pyx_L1;}
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_imp, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":123 */
+  __pyx_1 = __Pyx_Import(__pyx_n_traceback, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; goto __pyx_L1;}
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_traceback, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":124 */
+  __pyx_1 = __Pyx_Import(__pyx_k7p, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; goto __pyx_L1;}
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_distutils, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":125 */
+  __pyx_1 = __Pyx_Import(__pyx_k8p, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; goto __pyx_L1;}
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_distutils, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":130 */
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_re); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; goto __pyx_L1;}
+  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_compile); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; goto __pyx_L1;}
+  Py_INCREF(__pyx_k9p);
+  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k9p);
+  __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_reSpaces, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":133 */
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_unquoted, __pyx_k10p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; goto __pyx_L1;}
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":575 */
+  __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; goto __pyx_L1;}
+  __pyx_k11 = __pyx_2;
+  __pyx_2 = 0;
+
+  /* "/main/pywindows/myprogs/pybison/src/pyrex/bison_.pyx":623 */
+  return;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  __Pyx_AddTraceback("bison_");
+}
+
+static char *__pyx_filenames[] = {
+  "bison_.pyx",
+};
+statichere char **__pyx_f = __pyx_filenames;
+
+/* Runtime support code */
+
+static int __Pyx_GetStarArgs(
+    PyObject **args, 
+    PyObject **kwds,
+    char *kwd_list[], 
+    int nargs,
+    PyObject **args2, 
+    PyObject **kwds2)
+{
+    PyObject *x = 0, *args1 = 0, *kwds1 = 0;
+    
+    if (args2)
+        *args2 = 0;
+    if (kwds2)
+        *kwds2 = 0;
+    
+    if (args2) {
+        args1 = PyTuple_GetSlice(*args, 0, nargs);
+        if (!args1)
+            goto bad;
+        *args2 = PyTuple_GetSlice(*args, nargs, PyTuple_Size(*args));
+        if (!*args2)
+            goto bad;
+    }
+    else {
+        args1 = *args;
+        Py_INCREF(args1);
+    }
+    
+    if (kwds2) {
+        if (*kwds) {
+            char **p;
+            kwds1 = PyDict_New();
+            if (!kwds)
+                goto bad;
+            *kwds2 = PyDict_Copy(*kwds);
+            if (!*kwds2)
+                goto bad;
+            for (p = kwd_list; *p; p++) {
+                x = PyDict_GetItemString(*kwds, *p);
+                if (x) {
+                    if (PyDict_SetItemString(kwds1, *p, x) < 0)
+                        goto bad;
+                    if (PyDict_DelItemString(*kwds2, *p) < 0)
+                        goto bad;
+                }
+            }
+        }
+        else {
+            *kwds2 = PyDict_New();
+            if (!*kwds2)
+                goto bad;
+        }
+    }
+    else {
+        kwds1 = *kwds;
+        Py_XINCREF(kwds1);
+    }
+    
+    *args = args1;
+    *kwds = kwds1;
+    return 0;
+bad:
+    Py_XDECREF(args1);
+    Py_XDECREF(kwds1);
+    if (*args2)
+        Py_XDECREF(*args2);
+    if (*kwds2)
+        Py_XDECREF(*kwds2);
+    return -1;
+}
+
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) {
+    PyObject *__import__ = 0;
+    PyObject *empty_list = 0;
+    PyObject *module = 0;
+    PyObject *global_dict = 0;
+    PyObject *empty_dict = 0;
+    PyObject *list;
+    __import__ = PyObject_GetAttrString(__pyx_b, "__import__");
+    if (!__import__)
+        goto bad;
+    if (from_list)
+        list = from_list;
+    else {
+        empty_list = PyList_New(0);
+        if (!empty_list)
+            goto bad;
+        list = empty_list;
+    }
+    global_dict = PyModule_GetDict(__pyx_m);
+    if (!global_dict)
+        goto bad;
+    empty_dict = PyDict_New();
+    if (!empty_dict)
+        goto bad;
+    module = PyObject_CallFunction(__import__, "OOOO",
+        name, global_dict, empty_dict, list);
+bad:
+    Py_XDECREF(empty_list);
+    Py_XDECREF(__import__);
+    Py_XDECREF(empty_dict);
+    return module;
+}
+
+static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
+    PyObject *result;
+    result = PyObject_GetAttr(dict, name);
+    if (!result)
+        PyErr_SetObject(PyExc_NameError, name);
+    return result;
+}
+
+static PyObject *__Pyx_GetStdout(void) {
+    PyObject *f = PySys_GetObject("stdout");
+    if (!f) {
+        PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
+    }
+    return f;
+}
+
+static int __Pyx_PrintItem(PyObject *v) {
+    PyObject *f;
+    
+    if (!(f = __Pyx_GetStdout()))
+        return -1;
+    if (PyFile_SoftSpace(f, 1)) {
+        if (PyFile_WriteString(" ", f) < 0)
+            return -1;
+    }
+    if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
+        return -1;
+    if (PyString_Check(v)) {
+        char *s = PyString_AsString(v);
+        int len = PyString_Size(v);
+        if (len > 0 &&
+            isspace(Py_CHARMASK(s[len-1])) &&
+            s[len-1] != ' ')
+                PyFile_SoftSpace(f, 0);
+    }
+    return 0;
+}
+
+static int __Pyx_PrintNewline(void) {
+    PyObject *f;
+    
+    if (!(f = __Pyx_GetStdout()))
+        return -1;
+    if (PyFile_WriteString("\n", f) < 0)
+        return -1;
+    PyFile_SoftSpace(f, 0);
+    return 0;
+}
+
+static PyObject *__Pyx_GetExcValue(void) {
+    PyObject *type = 0, *value = 0, *tb = 0;
+    PyObject *result = 0;
+    PyThreadState *tstate = PyThreadState_Get();
+    PyErr_Fetch(&type, &value, &tb);
+    PyErr_NormalizeException(&type, &value, &tb);
+    if (PyErr_Occurred())
+        goto bad;
+    if (!value) {
+        value = Py_None;
+        Py_INCREF(value);
+    }
+    Py_XDECREF(tstate->exc_type);
+    Py_XDECREF(tstate->exc_value);
+    Py_XDECREF(tstate->exc_traceback);
+    tstate->exc_type = type;
+    tstate->exc_value = value;
+    tstate->exc_traceback = tb;
+    result = value;
+    Py_XINCREF(result);
+    type = 0;
+    value = 0;
+    tb = 0;
+bad:
+    Py_XDECREF(type);
+    Py_XDECREF(value);
+    Py_XDECREF(tb);
+    return result;
+}
+
+static void __Pyx_WriteUnraisable(char *name) {
+    PyObject *old_exc, *old_val, *old_tb;
+    PyObject *ctx;
+    PyErr_Fetch(&old_exc, &old_val, &old_tb);
+    ctx = PyString_FromString(name);
+    PyErr_Restore(old_exc, old_val, old_tb);
+    if (!ctx)
+        ctx = Py_None;
+    PyErr_WriteUnraisable(ctx);
+}
+
+static void __Pyx_UnpackError(void) {
+    PyErr_SetString(PyExc_ValueError, "unpack sequence of wrong size");
+}
+
+static PyObject *__Pyx_UnpackItem(PyObject *seq, int i) {
+  PyObject *item;
+  if (!(item = PySequence_GetItem(seq, i))) {
+    if (PyErr_ExceptionMatches(PyExc_IndexError))
+    	__Pyx_UnpackError();
+  }
+  return item;
+}
+
+static int __Pyx_EndUnpack(PyObject *seq, int i) {
+  PyObject *item;
+  if (item = PySequence_GetItem(seq, i)) {
+    Py_DECREF(item);
+    __Pyx_UnpackError();
+    return -1;
+  }
+  PyErr_Clear();
+    return 0;
+}
+
+static int __Pyx_InternStrings(__Pyx_InternTabEntry *t) {
+    while (t->p) {
+        *t->p = PyString_InternFromString(t->s);
+        if (!*t->p)
+            return -1;
+        ++t;
+    }
+    return 0;
+}
+
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
+    while (t->p) {
+        *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
+        if (!*t->p)
+            return -1;
+        ++t;
+    }
+    return 0;
+}
+
+#include "compile.h"
+#include "frameobject.h"
+#include "traceback.h"
+
+static void __Pyx_AddTraceback(char *funcname) {
+    PyObject *py_srcfile = 0;
+    PyObject *py_funcname = 0;
+    PyObject *py_globals = 0;
+    PyObject *empty_tuple = 0;
+    PyObject *empty_string = 0;
+    PyCodeObject *py_code = 0;
+    PyFrameObject *py_frame = 0;
+    
+    py_srcfile = PyString_FromString(__pyx_filename);
+    if (!py_srcfile) goto bad;
+    py_funcname = PyString_FromString(funcname);
+    if (!py_funcname) goto bad;
+    py_globals = PyModule_GetDict(__pyx_m);
+    if (!py_globals) goto bad;
+    empty_tuple = PyTuple_New(0);
+    if (!empty_tuple) goto bad;
+    empty_string = PyString_FromString("");
+    if (!empty_string) goto bad;
+    py_code = PyCode_New(
+        0,            /*int argcount,*/
+        0,            /*int nlocals,*/
+        0,            /*int stacksize,*/
+        0,            /*int flags,*/
+        empty_string, /*PyObject *code,*/
+        empty_tuple,  /*PyObject *consts,*/
+        empty_tuple,  /*PyObject *names,*/
+        empty_tuple,  /*PyObject *varnames,*/
+        empty_tuple,  /*PyObject *freevars,*/
+        empty_tuple,  /*PyObject *cellvars,*/
+        py_srcfile,   /*PyObject *filename,*/
+        py_funcname,  /*PyObject *name,*/
+        __pyx_lineno,   /*int firstlineno,*/
+        empty_string  /*PyObject *lnotab*/
+    );
+    if (!py_code) goto bad;
+    py_frame = PyFrame_New(
+        PyThreadState_Get(), /*PyThreadState *tstate,*/
+        py_code,             /*PyCodeObject *code,*/
+        py_globals,          /*PyObject *globals,*/
+        0                    /*PyObject *locals*/
+    );
+    if (!py_frame) goto bad;
+    py_frame->f_lineno = __pyx_lineno;
+    PyTraceBack_Here(py_frame);
+bad:
+    Py_XDECREF(py_srcfile);
+    Py_XDECREF(py_funcname);
+    Py_XDECREF(empty_tuple);
+    Py_XDECREF(empty_string);
+    Py_XDECREF(py_code);
+    Py_XDECREF(py_frame);
+}

+ 3 - 0
src/pyrex/bison_.h

@@ -0,0 +1,3 @@
+extern DL_IMPORT(PyObject) *(py_callback(PyObject *,char (*),int ,int ,void (*),...));
+extern DL_IMPORT(void) (py_input(PyObject *,char (*),int (*),int ));
+extern DL_IMPORT(void) initbison_(void);

+ 2 - 0
src/pyrex/bison_.pxi

@@ -0,0 +1,2 @@
+cdef extern object (py_callback(object ,char (*),int ,int ,void (*),...))
+cdef extern void (py_input(object ,char (*),int (*),int ))

+ 684 - 0
src/pyrex/bison_.pyx

@@ -0,0 +1,684 @@
+#@+leo-ver=4
+#@+node:@file src/pyrex/bison_.pyx
+"""
+Pyrex-generated portion of pybison
+"""
+#@+others
+#@+node:python
+cdef extern from "Python.h":
+    object PyString_FromStringAndSize(char *, int)
+    object PyString_FromString(char *)
+    char *PyString_AsString(object o)
+
+    object PyInt_FromLong(long ival)
+    long PyInt_AsLong(object io)
+
+    object PyList_New(int len)
+    int PyList_SetItem(object list, int index, object item)
+
+    void Py_INCREF(object o)
+
+    object PyObject_GetAttrString(object o, char *attr_name)
+    object PyTuple_New(int len)
+    int PyTuple_SetItem(object p, int pos, object o)
+    object PyObject_Call(object callable_object, object args, object kw)
+    object PyObject_CallObject(object callable_object, object args)
+    int PyObject_SetAttrString(object o, char *attr_name, object v)
+
+#@-node:python
+#@+node:libdl
+# use libdl for now - easy and simple - maybe switch to
+# glib or libtool if a keen windows dev sends in a patch
+
+#cdef extern from "dlfcn.h":
+#    void *dlopen(char *filename, int mode)
+#    int dlclose(void *handle)
+#    void *dlsym(void *handle, char *name)
+#    char *dlerror()
+#
+#    ctypedef enum DL_MODES:
+#        RTLD_LAZY
+#        RTLD_NOW
+#        RTLD_BINDING_MASK
+#        RTLD_NOLOAD
+#        RTLD_GLOBAL
+
+
+#@-node:libdl
+#@+node:stdio.h
+cdef extern from "stdio.h":
+    int printf(char *format,...)
+
+#@-node:stdio.h
+#@+node:string.h
+cdef extern from "string.h":
+    void *memcpy(void *dest, void *src, long n)
+#@-node:string.h
+#@+node:bisondynlib.h
+cdef extern from "../c/bisondynlib.h":
+    void *bisondynlib_open(char *filename)
+    int bisondynlib_close(void *handle)
+    char *bisondynlib_err()
+    object (*bisondynlib_lookup_parser(void *handle))(object, char *)
+    char *bisondynlib_lookup_hash(void *handle)
+    object bisondynlib_run(void *handle, object parser, void *cb, void *pyin, int debug)
+
+    #int bisondynlib_build(char *libName, char *includedir)
+
+
+#@-node:bisondynlib.h
+#@+node:py_callback
+# Callback function which is invoked by target handlers
+# within the C yyparse() function.
+
+cdef public object py_callback(object parser, char *target, int option, int nargs, void *args,...):
+    cdef int *pargs
+    pargs = <int *>(&args)
+    cdef void *objptr
+    cdef object obj
+    cdef int i
+    cdef object valobj
+    cdef void *val
+    cdef char *tokval
+
+    try:
+        names = PyList_New(nargs)
+        values = PyList_New(nargs)
+        for i in range(nargs):
+            termname = <char *>(pargs[i*2])
+            val = <void *>(pargs[i*2+1])
+            valobj = <object>val
+
+            Py_INCREF(termname)
+            Py_INCREF(valobj)
+            PyList_SetItem(names, i, termname)
+            PyList_SetItem(values, i, valobj)
+    
+        if parser.verbose:
+            print "py_callback: calling handler for %s" % PyString_FromString(target)
+    
+        res = parser._handle(target, option, names, values)
+        return res
+    except:
+        traceback.print_exc()
+        return None
+
+#@-node:py_callback
+#@+node:py_input
+# callback routine for reading input
+cdef public void py_input(object parser, char *buf, int *result, int max_size):
+    cdef char *buf1
+    cdef int buflen
+
+    #print "py_input: want to read up to %s bytes" % max_size
+    raw = parser.read(max_size)
+    buflen = PyInt_AsLong(len(raw))
+    result[0] = buflen
+    memcpy(buf, PyString_AsString(raw), buflen)
+    #print "py_input: got %s bytes" % buflen
+
+
+#@-node:py_input
+#@+node:Python imports
+import sys, os, sha, re, imp, traceback
+import distutils.sysconfig
+import distutils.ccompiler
+
+
+#@-node:Python imports
+#@+node:Python Globals
+reSpaces = re.compile("\\s+")
+
+#unquoted = r"""^|[^'"]%s[^'"]?"""
+unquoted = "[^'\"]%s[^'\"]?"
+
+#@-node:Python Globals
+#@+node:cdef class ParserEngine
+cdef class ParserEngine:
+    """
+    Wraps the interface to the binary bison/lex-generated
+    parser engine dynamic library.
+    
+    You shouldn't need to deal with this at all.
+
+    Takes care of:
+        - building the library (if the parser rules have changed)
+        - loading the library and extracting the parser entry point
+        - calling the entry point
+        - closing the library
+
+    Makes direct calls to the platform-dependent routines in 
+    bisondynlib-[linux|windows].c
+    """
+    #@    @+others
+    #@+node:C attribs
+    cdef object parser
+    cdef object parserHash # hash of current python parser object
+    cdef object libFilename_py
+    
+    cdef void *libHandle
+    
+    # rules hash str embedded in bison parser lib
+    cdef char *libHash
+    
+    #@-node:C attribs
+    #@+node:__init__
+    def __init__(self, parser, **kw):
+        """
+        Creates a ParserEngine wrapper, and builds/loads the library
+        
+        Arguments:
+            - parser - an instance of a subclass of Parser
+    
+        In the course of initialisation, we check the library
+        against the parser object's rules. If the lib doesn't
+        exist, or can't be loaded, or doesn't match, we build
+        a new library.
+        
+        Either way, we end up with a binary parser engine which
+        matches the current rules in the parser object
+        """
+        self.parser = parser
+        
+        self.libFilename_py = parser.bisonEngineLibName + imp.get_suffixes()[0][0]
+    
+        self.parserHash = hashParserObject(self.parser)
+    
+        self.openCurrentLib()
+    
+    #@-node:__init__
+    #@+node:openCurrentLib
+    def openCurrentLib(self):
+        """
+        Tests if library exists and is current.
+        If not, builds a fresh one
+        
+        Opens the library and imports the parser entry point
+        """
+        parser = self.parser
+        verbose = parser.verbose
+    
+        if not os.path.isfile(self.libFilename_py):
+            self.buildLib()
+        
+        self.openLib()
+    
+        # hash our parser spec, compare to hash val stored in lib
+        libHash = PyString_FromString(self.libHash)
+        if self.parserHash != libHash:
+            if verbose:
+                print "Hash discrepancy, need to rebuild bison lib"
+                print "  current parser class: %s" % self.parserHash
+                print "         bison library: %s" % libHash
+            self.closeLib()
+            self.buildLib()
+            self.openLib()
+        else:
+            if verbose:
+                print "Hashes match, no need to rebuild bison engine lib"
+    #@-node:openCurrentLib
+    #@+node:openLib
+    def openLib(self):
+        """
+        Loads the parser engine's dynamic library,
+        and extracts the following symbols:
+    
+            - void *do_parse() (runs parser)
+            - char *parserHash (contains hash of python parser rules)
+    
+        Returns lib handle, plus pointer to do_parse() function, as long ints
+        (which later need to be cast to pointers)
+    
+        Important note -this is totally linux-specific.
+        If you want windows support, you'll have to modify these funcs to
+        use glib instead (or create windows equivalents), in which case I'd
+        greatly appreciate you sending me a patch.
+        """
+        cdef char *libFilename
+        cdef char *err
+        cdef void *handle
+    
+        # convert python filename string to c string
+        libFilename = PyString_AsString(self.libFilename_py)
+        
+        parser = self.parser
+        
+        if parser.verbose:
+            print "Opening library %s" % self.libFilename_py
+        handle = bisondynlib_open(libFilename)
+        self.libHandle = handle
+        err = bisondynlib_err()
+        if err:
+            printf("ParserEngine.openLib: error '%s'\n", err)
+            return
+    
+        # extract symbols
+        self.libHash = bisondynlib_lookup_hash(handle)
+    
+        if parser.verbose:
+            print "Successfully loaded library"
+    
+    #@-node:openLib
+    #@+node:buildLib
+    def buildLib(self):
+        """
+        Creates the parser engine lib
+        
+        This consists of:
+            1. Ripping the tokens list, precedences, start target, handler docstrings
+               and lex script from this Parser instance's attribs and methods
+            2. Creating bison and lex files
+            3. Compiling bison/lex files to C
+            4. Compiling the C files, and link into a dynamic lib
+        """
+        cdef char *incdir
+    
+        # -------------------------------------------------
+        # rip the pertinent grammar specs from parser class
+        parser = self.parser
+    
+        # get target handler methods, in the order of appearance in the source file
+        attribs = dir(parser)
+        gHandlers = []
+        for a in attribs:
+            if a.startswith("on_"):
+                method = getattr(parser, a)
+                gHandlers.append(method)
+        gHandlers.sort(cmpLines)
+    
+        # get start symbol, tokens, precedences, lex script
+        gStart = parser.start
+        gTokens = parser.tokens
+        gPrecedences = parser.precedences
+        gLex = parser.lexscript
+        
+        # ------------------------------------------------
+        # now, can generate the grammar file
+        try:
+            os.unlink(parser.bisonFile)
+        except:
+            pass
+        f = open(parser.bisonFile, "w")
+        write = f.write
+        writelines = f.writelines
+        
+        # grammar file prologue
+        write("\n".join([
+            "%{",
+            '',
+            "#include <stdio.h>",
+            '#include "Python.h"',
+            "extern FILE *yyin;",
+            "extern int yylineno;"
+            "extern char *yytext;",
+            "#define YYSTYPE void*",
+            #'extern void *py_callback(void *, char *, int, void*, ...);',
+            'void *(*py_callback)(void *, char *, int, int, void *, ...);',
+            'void (*py_input)(void *, char *, int *, int);',
+            'void *py_parser;',
+            'char *rules_hash = "%s";' % self.parserHash,
+            '',
+            "%}",
+            '',
+            ]))
+        
+        # write out tokens and start target dec
+        write("%%token %s\n\n" % " ".join(gTokens))
+        write("%%start %s\n\n" % gStart)
+        
+        # write out precedences
+        for p in gPrecedences:
+            write("%%%s  %s\n" % (p[0], " ".join(p[1])))
+        
+        write("\n\n%%\n\n")
+    
+        # carve up docstrings
+        rules = []
+        for h in gHandlers:
+    
+            doc = h.__doc__.strip()
+    
+            # added by Eugene Oden
+            #target, options = doc.split(":")
+            doc = re.sub(unquoted % ";", "", doc)
+    
+            #print "---------------------"
+    
+            s = re.split(unquoted % ":", doc)
+            #print "s=%s" % s
+    
+            target, options = s
+            target = target.strip()
+    
+            options = options.strip()
+            tmp = []
+    
+            #print "options = %s" % repr(options)
+            opts = options.split("|")
+            #print "opts = %s" % repr(opts)
+            r = unquoted % r"\|"
+            #print "r = <%s>" % r
+            opts1 = re.split(r, " " + options)
+            #print "opts1 = %s" % repr(opts1)
+    
+            for o in opts1:
+                o = o.strip()
+    
+                tmp.append(reSpaces.split(o))
+            options = tmp
+    
+            rules.append((target, options))
+    
+        # and render rules to grammar file
+        for rule in rules:
+            try:
+                write("%s\n    : " % rule[0])
+                options = []
+                idx = 0
+                for option in rule[1]:
+                    nterms = len(option)
+                    if nterms == 1 and option[0] == '':
+                        nterms = 0
+                        option = []
+                    action = '\n        {\n'
+                    if 'error' in option:
+                        action = action + "             yyerrok;\n"
+                    action = action + '          $$ = (*py_callback)(\n            py_parser, "%s", %s, %%s' % \
+                             (rule[0], idx) # note we're deferring the substitution of 'nterms' (last arg)
+                    args = []
+                    if nterms == 0:
+                        args.append('NULL')
+                        i = -1
+                    else:
+                        for i in range(nterms):
+                            if option[i] == '%prec':
+                                i = i - 1
+                                break # hack for rules using '%prec'
+                            args.append('"%s", $%d' % (option[i], i+1))
+        
+                    # now, we have the correct terms count
+                    action = action % (i + 1)
+    
+                    # assemble the full rule + action, ad to list
+                    action = action + ",\n            "
+                    action = action + ",\n            ".join(args) + "\n            );\n"
+    
+                    if 'error' in option:
+                        action = action + "             PyObject_SetAttrString(py_parser, \"lasterror\", Py_None);\n"
+                        action = action + "             Py_INCREF(Py_None);\n"
+                        action = action + "             yyclearin;\n"
+    
+                    action = action + "          if (PyObject_HasAttrString($$, \"_pyBisonError\"))\n"
+                    action = action + "          {\n"
+                    action = action + "             yyerror(PyString_AsString(PyObject_GetAttrString(py_parser, \"lasterror\")));\n"
+                    action = action + "             Py_INCREF(Py_None);\n"
+                    action = action + "             YYERROR;\n"
+                    action = action + "          }\n"
+                    action = action + "        }\n"
+                    options.append(" ".join(option) + action)
+                    idx = idx + 1
+                write("    | ".join(options) + "    ;\n\n")
+            except:
+                traceback.print_exc()
+    
+        write("\n\n%%\n\n")
+    
+        # now generate C code
+        epilogue = "\n".join([
+            'void do_parse(void *parser1,',
+            '              void *(*cb)(void *, char *, int, int, void *, ...),',
+            '              void (*in)(void *, char*, int *, int),',
+            '              int debug',
+            '              )',
+            '{',
+            '   //printf("Not calling yyparse\\n");',
+            '   //return;',
+            '   py_callback = cb;',
+            '   py_input = in;',
+            "   py_parser = parser1;",
+            "   yydebug = debug;",
+            "   //yyin = stdin;",
+            '   //printf("calling yyparse(), in=0x%lx\\n", py_input);',
+            "   yyparse();",
+            '   //printf("Back from parser\\n");',
+            "}",
+            "int yyerror(char *mesg)",
+            "{",
+            '  //printf("yytext=0x%lx\\n", yytext);',
+            '  PyObject *args = PyTuple_New(3);',
+            '  int ret;',
+            '',
+            '  PyTuple_SetItem(args, 0, PyInt_FromLong(yylineno+1));',
+            '  PyTuple_SetItem(args, 1, PyString_FromString(mesg));',
+            '  PyTuple_SetItem(args, 2, PyString_FromString(yytext));',
+            '',
+            '  ret = PyObject_SetAttrString((PyObject *)py_parser, "lasterror", args);',
+            '  //printf("PyObject_SetAttrString: %d\\n", ret);',
+            '',
+            '  //printf("line %d: %s before %s\\n", yylineno+1, mesg, yytext);',
+            "  //exit(0);",
+            "}",
+            ]) + "\n"
+        write(epilogue)
+    
+        # done with grammar file
+        f.close()
+    
+        # -----------------------------------------------
+        # now generate the lex script
+        try:
+            os.unlink(parser.flexFile)
+        except:
+            pass
+        lexLines = gLex.split("\n")
+        tmp = []
+        for line in lexLines:
+            tmp.append(line.strip())
+        f = open(parser.flexFile, "w")
+        f.write("\n".join(tmp) + "\n")
+        f.close()
+    
+        # create and set up a compiler object
+        ccompiler = distutils.ccompiler.new_compiler(verbose=parser.verbose)
+        ccompiler.set_include_dirs([distutils.sysconfig.get_python_inc()])
+    
+        # -----------------------------------------
+        # Now run bison on the grammar file
+        #os.system("bison -d tmp.y")
+        bisonCmd = parser.bisonCmd + [parser.bisonFile]
+        if parser.verbose:
+            print "bisonCmd=%s" % repr(bisonCmd)
+        ccompiler.spawn(bisonCmd)
+    
+        if parser.verbose:
+            print "renaming bison output files"
+            print parser.bisonCFile, "=>", parser.bisonCFile1
+            print parser.bisonHFile, "=>", parser.bisonHFile1
+    
+        try:
+            os.unlink(parser.bisonCFile1)
+        except:
+            pass
+        os.rename(parser.bisonCFile, parser.bisonCFile1)
+        try:
+            os.unlink(parser.bisonHFile1)
+        except:
+            pass
+        os.rename(parser.bisonHFile, parser.bisonHFile1)
+        
+        # -----------------------------------------
+        # Now run lex on the lex file
+        #os.system("lex tmp.l")
+        ccompiler.spawn(parser.flexCmd + [parser.flexFile])
+        try:
+            os.unlink(parser.flexCFile1)
+        except:
+            pass
+        os.rename(parser.flexCFile, parser.flexCFile1)
+    
+        # -----------------------------------------
+        # Now compile the files into a shared lib
+    
+        # compile bison and lex c sources
+        #bisonObj = ccompiler.compile([parser.bisonCFile1])
+        #lexObj = ccompiler.compile([parser.flexCFile1])
+    
+        #cl /DWIN32 /G4 /Gs /Oit /MT /nologo /W3 /WX bisondynlib-win32.c /Id:\python23\include
+        #cc.compile(['bisondynlib-win32.c'], 
+        #           extra_preargs=['/DWIN32', '/G4', '/Gs', '/Oit', '/MT', '/nologo', '/W3', '/WX', '/Id:\python23\include'])
+    
+        # link 'em into a shared lib
+        objs = ccompiler.compile([parser.bisonCFile1, parser.flexCFile1])
+        libFileName = parser.bisonEngineLibName+imp.get_suffixes()[0][0]
+        if os.path.isfile(libFileName+".bak"):
+            try:
+                os.unlink(libFileName+".bak")
+            except:
+                pass
+        if os.path.isfile(libFileName):
+            os.rename(libFileName, libFileName+".bak")
+        ccompiler.link_shared_object(objs, libFileName)
+    
+        #incdir = PyString_AsString(get_python_inc())
+        #bisondynlib_build(self.libFilename_py, incdir)
+    
+        # --------------------------------------------
+        # clean up, if we succeeded
+        hitlist = objs[:]
+        hitlist.append("tmp.output")
+        if os.path.isfile(libFileName):
+            for name in ['bisonFile', 'bisonCFile', 'bisonHFile',
+                         'bisonCFile1', 'bisonHFile1', 'flexFile',
+                         'flexCFile', 'flexCFile1',
+                         ] + objs:
+                fname = getattr(parser, name, None)
+                #print "want to delete %s" % fname
+                if fname and os.path.isfile(fname):
+                    hitlist.append(fname)
+        if not parser.keepfiles:
+            for f in hitlist:
+                try:
+                    os.unlink(f)
+                except:
+                    print "Warning: failed to delete temporary file %s" % f
+    
+    
+    #@-node:buildLib
+    #@+node:closeLib
+    def closeLib(self):
+        """
+        Does the necessary cleanups and closes the parser library
+        """
+        bisondynlib_close(self.libHandle)
+    #@-node:closeLib
+    #@+node:runEngine
+    def runEngine(self, debug=0):
+        """
+        Runs the binary parser engine, as loaded from the lib
+        """
+        cdef void *handle
+    
+        cdef void *cbvoid
+        cdef void *invoid
+    
+        handle = self.libHandle
+        parser = self.parser
+    
+        cbvoid = <void *>py_callback
+        invoid = <void *>py_input
+    
+        if parser.verbose:
+            print "runEngine: about to call, py_input=0x%lx..." % (<int>invoid)
+        return bisondynlib_run(handle, parser, cbvoid, invoid, debug)
+        if parser.verbose:
+            print "runEngine: back from parser"
+    
+    #@-node:runEngine
+    #@+node:__del__
+    def __del__(self):
+        """
+        Clean up and bail
+        """
+        self.closeLib()
+    #@-node:__del__
+    #@-others
+#@-node:cdef class ParserEngine
+#@+node:cmpLines
+def cmpLines(meth1, meth2):
+    """
+    Used as a sort() argument for sorting parse target handler methods by
+    the order of their declaration in their source file.
+    """
+    try:
+        line1 = meth1.func_code.co_firstlineno
+        line2 = meth2.func_code.co_firstlineno
+    except:
+        line1 = meth1.__init__.func_code.co_firstlineno
+        line2 = meth2.__init__.func_code.co_firstlineno
+        
+    return cmp(line1, line2)
+
+#@-node:cmpLines
+#@+node:hashParserObject
+def hashParserObject(parser):
+    """
+    Calculates an sha1 hex 'hash' of the lex script
+    and grammar rules in a parser class instance.
+    
+    This is based on the raw text of the lex script attribute,
+    and the grammar rule docstrings within the handler methods.
+    
+    Used to detect if someone has changed any grammar rules or
+    lex script, and therefore, whether a shared parser lib rebuild
+    is required.
+    """
+    hasher = sha.new()
+    
+    # add the lex script
+    hasher.update(parser.lexscript)
+
+    # add the tokens
+    
+    # workaround pyrex weirdness
+    tokens = list(parser.tokens)
+    hasher.update(",".join(list(parser.tokens)))
+
+    # add the precedences
+    for direction, tokens in parser.precedences:
+        hasher.update(direction + "".join(tokens))
+        
+    # extract the parser target handler names
+    handlerNames = dir(parser)
+
+    #handlerNames = filter(lambda m: m.startswith('on_'), dir(parser))
+    tmp = []
+    for name in handlerNames:
+        if name.startswith('on_'):
+            tmp.append(name)
+    handlerNames = tmp
+    handlerNames.sort()
+
+    # extract method objects, filter down to callables
+    #handlers = [getattr(parser, m) for m in handlerNames]
+    #handlers = filter(lambda h: callable(h), handlers)
+    tmp = []
+    for m in handlerNames:
+        attr = getattr(parser, m)
+        if callable(attr):
+            tmp.append(attr)
+    handlers = tmp
+    
+    # now add in the methods' docstrings
+    for h in handlers:
+        docString = h.__doc__
+        hasher.update(docString)
+    
+    # done
+    return hasher.hexdigest()
+
+
+
+#@-node:hashParserObject
+#@-others
+#@-node:@file src/pyrex/bison_.pyx
+#@-leo

+ 938 - 0
src/python/bison.py

@@ -0,0 +1,938 @@
+#@+leo-ver=4
+#@+node:@file src/python/bison.py
+"""
+Wrapper module for interfacing with Bison (yacc)
+
+Written April 2004 by David McNab <david@freenet.org.nz>
+Copyright (c) 2004 by David McNab, all rights reserved.
+
+Released under the GNU General Public License, a copy
+of which should appear in this distribution in the file
+called 'COPYING'. If this file is missing, then you can
+obtain a copy of the GPL license document from the GNU
+website at http://www.gnu.org.
+
+This software is released with no warranty whatsoever.
+Use it at your own risk.
+
+If you wish to use this software in a commercial application,
+and wish to depart from the GPL licensing requirements,
+please contact the author and apply for a commercial license.
+"""
+#@+others
+#@+node:imports
+import sys, os, sha, re, imp, traceback, xml.dom, xml.dom.minidom, types
+import distutils.sysconfig
+import distutils.ccompiler
+
+from bison_ import ParserEngine, unquoted
+
+#@-node:imports
+#@+node:globals
+reSpaces = re.compile("\\s+")
+
+#@-node:globals
+#@+node:exceptions
+class ParserSyntaxError(Exception):
+    pass
+#@-node:exceptions
+#@+node:class BisonError
+class BisonError:
+    """
+    Flags an error to yyparse()
+
+    You should return this in your actions to notify a syntax error
+    """
+    _pyBisonError = 1
+
+    def __init__(self, value="syntax error"):
+        self.value = value
+#@-node:class BisonError
+#@+node:class BisonNode
+class BisonNode:
+    """
+    Generic class for wrapping parse targets.
+    
+    Arguments:
+        - targetname - the name of the parse target being wrapped.
+        - items - optional - a list of items comprising a clause
+          in the target rule - typically this will only be used
+          by the PyBison callback mechanism.
+    
+    Keywords:
+        - any keywords you want (except 'items'), with any type of value.
+          keywords will be stored as attributes in the constructed object.
+    """
+    #@    @+others
+    #@+node:__init__
+    def __init__(self, **kw):
+    
+        self.__dict__.update(kw)
+    
+        # ensure some default attribs
+        self.target = kw.get('target', 'UnnamedTarget')
+        self.names = kw.get('names', [])
+        self.values = kw.get('values', [])
+        self.option = kw.get('option', 0)
+    
+        # mirror this dict to simplify dumping
+        self.kw = kw
+    
+    #@-node:__init__
+    #@+node:__str__
+    def __str__(self):
+        return "<BisonNode:%s>" % self.target
+    
+    #@-node:__str__
+    #@+node:__repr__
+    def __repr__(self):
+        return str(self)
+    
+    #@-node:__repr__
+    #@+node:__getitem__
+    def __getitem__(self, item):
+        """
+        Retrieves the ith value from this node, or child nodes
+        
+        If the subscript is a single number, it will be used as an
+        index into this node's children list.
+        
+        If the subscript is a list or tuple, we recursively fetch
+        the item by using the first element as an index into this
+        node's children, the second element as an index into that
+        child node's children, and so on
+        """
+        if type(item) in [type(0), type(0L)]:
+            return self.values[item]
+        elif type(item) in [type(()), type([])]:
+            if len(item) == 0:
+                return self
+            return self.values[item[0]][item[1:]]
+        else:
+            raise TypeError("Can only index %s objects with an int or a list/tuple" % self.__class.__name__)
+    #@-node:__getitem__
+    #@+node:__len__
+    def __len__(self):
+        
+        return len(self.values)
+    #@-node:__len__
+    #@+node:__getslice__
+    def __getslice__(self, fromidx, toidx):
+        return self.values[fromidx:toidx]
+    #@-node:__getslice__
+    #@+node:__iter__
+    def __iter__(self):
+        return iter(self.values)
+    #@-node:__iter__
+    #@+node:dump
+    def dump(self, indent=0):
+        """
+        For debugging - prints a recursive dump of a parse tree node and its children
+        """
+        specialAttribs = ['option', 'target', 'names', 'values']
+        indents = " " * indent * 2
+        #print "%s%s: %s %s" % (indents, self.target, self.option, self.names)
+        print "%s%s:" % (indents, self.target)
+    
+        for name, val in self.kw.items() + zip(self.names, self.values):
+            if name in specialAttribs or name.startswith("_"):
+                continue
+            if isinstance(val, BisonNode):
+                val.dump(indent+1)
+            else:
+                print indents + "  %s=%s" % (name, val)
+    
+    #@-node:dump
+    #@+node:toxml
+    def toxml(self):
+        """
+        Returns an xml serialisation of this node and its children, as a raw string
+    
+        Called on the toplevel node, the xml is a representation of the
+        entire parse tree.
+        """
+        return self.toxmldoc().toxml()
+    
+    #@-node:toxml
+    #@+node:toprettyxml
+    def toprettyxml(self, indent='  ', newl='\n', encoding=None):
+        """
+        returns a human-readable xml serialisation of this node and its children
+        """
+        return self.toxmldoc().toprettyxml(indent=indent,
+                                           newl=newl,
+                                           encoding=encoding)
+    
+    #@-node:toprettyxml
+    #@+node:toxmldoc
+    def toxmldoc(self):
+        """
+        Returns the node and its children as an xml.dom.minidom.Document object
+        """
+        d = xml.dom.minidom.Document()
+        d.appendChild(self.toxmlelem(d))
+        return d
+    
+    #@-node:toxmldoc
+    #@+node:toxmlelem
+    def toxmlelem(self, docobj):
+        """
+        Returns a DOM Element object of this node and its children
+        """
+        specialAttribs = ['option', 'target', 'names', 'values']
+    
+        # generate an xml element obj for this node
+        x = docobj.createElement(self.target)
+    
+        # set attribs
+        for name, val in self.kw.items():
+            if name in ['names', 'values'] or name.startswith("_"):
+                continue
+            x.setAttribute(name, str(val))
+        #x.setAttribute('target', self.target)
+        #x.setAttribute('option', self.option)
+    
+        # and add the children
+        for name, val in zip(self.names, self.values):
+            if name in specialAttribs or name.startswith("_"):
+                continue
+            if isinstance(val, BisonNode):
+                x.appendChild(val.toxmlelem(docobj))
+            else:
+                sn = docobj.createElement(name)
+                sn.setAttribute('target', name)
+                tn = docobj.createTextNode(val)
+                sn.appendChild(tn)
+                x.appendChild(sn)
+    
+        # done
+        return x
+    
+    
+    #@-node:toxmlelem
+    #@-others
+#@-node:class BisonNode
+#@+node:class BisonParser
+class BisonParser(object):
+    """
+    Base parser class
+    
+    You should subclass this, and provide a bunch of methods called
+    'on_TargetName', where 'TargetName' is the name of each target in
+    your grammar (.y) file.
+    """
+    #@    @+others
+    #@+node:attributes
+    # ---------------------------------------
+    # override these if you need to
+    
+    # command and options for running yacc/bison, except for filename arg
+    bisonCmd = ["bison", "-d", "-v", '-t']
+    
+    bisonFile = "tmp.y"
+    bisonCFile = "tmp.tab.c"
+    bisonHFile = "tmp.tab.h" # name of header file generated by bison cmd
+    
+    bisonCFile1 = "tmp.bison.c" # c output file from bison gets renamed to this
+    bisonHFile1 = "tokens.h" # bison-generated header file gets renamed to this
+    
+    flexCmd = ["flex", ] # command and options for running [f]lex, except for filename arg
+    flexFile = "tmp.l"
+    flexCFile = "lex.yy.c"
+    
+    flexCFile1 = "tmp.lex.c" # c output file from lex gets renamed to this
+    
+    verbose = 0
+    
+    file = None # default to sys.stdin
+    
+    last = None # last parsed target, top of parse tree
+    
+    lasterror = None # gets set if there was an error
+    
+    keepfiles = 0 # set to 1 to keep temporary engine build files
+    
+    bisonEngineLibName = None # defaults to 'modulename-engine'
+    
+    defaultNodeClass = BisonNode # class to use by default for creating new parse nodes
+    
+    #@-node:attributes
+    #@+node:__init__
+    def __init__(self, **kw):
+        """
+        Abstract representation of parser
+        
+        Keyword arguments:
+            - read - a callable accepting an int arg (nbytes) and returning a string,
+              default is this class' read() method
+            - file - a file object, or string of a pathname to open as a file, defaults
+              to sys.stdin. Note that you can leave this blank, and pass a file keyword
+              argument to the .run() method.
+            - verbose - set to 1 to enable verbose output messages, default 0
+            - keepfiles - if non-zero, keeps any files generated in the
+              course of building the parser engine; by default, all these
+              files get deleted upon a successful engine build
+            - defaultNodeClass - the class to use for creating parse nodes, default
+              is self.defaultNodeClass (in this base class, BisonNode)
+        """
+        # setup
+        read = kw.get('read', None)
+        if read:
+            self.read = read
+    
+        fileobj = kw.get('file', None)
+        if fileobj:
+            if type(fileobj) == type(""):
+                try:
+                    fileobj = open(fileobj, "rb")
+                except:
+                    raise Exception("Cannot open input file %s" % fileobj)
+            self.file = fileobj
+        else:
+            self.file = sys.stdin
+    
+        nodeClass = kw.get('defaultNodeClass', None)
+        if nodeClass:
+            self.defaultNodeClass = nodeClass
+    
+        self.verbose = kw.get('verbose', 0)
+    
+        if kw.has_key('keepfiles'):
+            self.keepfiles = kw['keepfiles']
+    
+        # if engine lib name not declared, invent ont
+        if not self.bisonEngineLibName:
+            self.bisonEngineLibName = self.__class__.__module__ + "-parser"
+    
+        # get an engine
+        self.engine = ParserEngine(self)
+        
+    #@-node:__init__
+    #@+node:__getattr__
+    def __getitem__(self, idx):
+        return self.last[idx]
+    #@-node:__getattr__
+    #@+node:_handle
+    def _handle(self, targetname, option, names, values):
+        """
+        Callback which receives a target from parser, as a targetname
+        and list of term names and values.
+        
+        Tries to dispatch to on_TargetName() methods if they exist,
+        otherwise wraps the target in a BisonNode object
+        """
+        handler = getattr(self, "on_"+targetname, None)
+        if handler:
+            if self.verbose:
+                try:
+                    hdlrline = handler.func_code.co_firstlineno
+                except:
+                    hdlrline = handler.__init__.func_code.co_firstlineno
+                print "invoking handler at line %s for %s" % (hdlrline, targetname)
+            self.last = handler(target=targetname, option=option, names=names, values=values)
+            if self.verbose:
+                print "handler for %s returned %s" % (targetname, repr(self.last))
+        else:
+            if self.verbose:
+                print "no handler for %s, using default" % targetname
+            self.last = BisonNode(targetname, option=option, names=names, values=values)
+    
+        # reset any resulting errors (assume they've been handled)
+        #self.lasterror = None
+    
+        # assumedly the last thing parsed is at the top of the tree
+        return self.last
+    
+    
+    #@-node:_handle
+    #@+node:run
+    def run(self, **kw):
+        """
+        Runs the parser, and returns the top-most parse target.
+        
+        Keywords:
+            - file - either a string, comprising a file to open and read input from, or
+              a Python file object
+            - debug - enables garrulous parser debugging output, default 0
+        """
+        if self.verbose:
+            print "Parser.run: calling engine"
+    
+        # grab keywords
+        fileobj = kw.get('file', self.file)
+        if type(fileobj) == type(""):
+            filename = fileobj
+            try:
+                fileobj = open(fileobj, "rb")
+            except:
+                raise Exception("Cannot open input file %s" % fileobj)
+        else:
+            filename = None
+            fileobj = None
+    
+        read = kw.get('read', self.read)
+    
+        debug = kw.get('debug', 0)
+    
+        # back up existing attribs
+        oldfile = self.file
+        oldread = self.read
+        
+        # plug in new ones, if given
+        if fileobj:
+            self.file = fileobj
+        if read:
+            self.read = read
+    
+        # do the parsing job, spew if error
+        self.lasterror = None
+        self.engine.runEngine(debug)
+    
+        if self.lasterror:
+            #print "Got error: %s" % repr(self.error)
+            if filename != None:
+                raise ParserSyntaxError("%s:%d: '%s' near '%s'" % ((filename,) + self.lasterror))
+            else:
+                raise ParserSyntaxError("Line %d: '%s' near '%s'" % self.lasterror)
+    
+        # restore old values
+        self.file = oldfile
+        self.read = oldread
+    
+        if self.verbose:
+            print "Parser.run: back from engine"
+        return self.last
+    
+    
+    #@-node:run
+    #@+node:read
+    def read(self, nbytes):
+        """
+        Override this in your subclass, if you desire.
+        
+        Arguments:
+            - nbytes - the maximum length of the string which you may return.
+              DO NOT return a string longer than this, or else Bad Things will
+              happen.
+        """
+        # default to stdin
+        if self.verbose:
+            print "Parser.read: want %s bytes" % nbytes
+        bytes = self.file.readline(nbytes)
+        if self.verbose:
+            print "Parser.read: got %s bytes" % len(bytes)
+        return bytes
+    #@-node:read
+    #@+node:_error
+    def _error(self, linenum, msg, tok):
+        
+        print "Parser: line %s: syntax error '%s' before '%s'" % (linenum, msg, tok)
+    
+    
+    #@-node:_error
+    #@+node:error
+    def error(self, value):
+        """
+        Return the result of this method from a handler to notify a syntax error
+        """
+        self.lasterror = value
+        return BisonError(value)
+    #@-node:error
+    #@+node:toxml
+    def toxml(self):
+        """
+        Serialises the parse tree and returns it as a raw xml string
+        """
+        return self.last.toxml()
+    #@-node:toxml
+    #@+node:toxmldoc
+    def toxmldoc(self):
+        """
+        Returns an xml.dom.minidom.Document object containing the parse tree
+        """
+        return self.last.toxmldoc()
+    #@-node:toxmldoc
+    #@+node:toprettyxml
+    def toprettyxml(self):
+        """
+        Returns a human-readable xml representation of the parse tree
+        """
+        return self.last.toprettyxml()
+    #@-node:toprettyxml
+    #@+node:loadxml
+    def loadxml(self, raw, namespace=None):
+        """
+        Loads a parse tree from raw xml text
+    
+        Stores it in the '.last' attribute, which is where the root node
+        of parsed text gets stored
+        
+        Arguments:
+            - raw - string containing the raw xml
+            - namespace - a dict or module object, where the node classes required for
+              reconstituting the parse tree, can be found
+        
+        Returns:
+            - root node object of reconstituted parse tree
+        """
+        doc = xml.dom.minidom.parseString(raw)
+        tree = self.loadxmldoc(doc, namespace)
+        self.last = tree
+        return tree
+    #@-node:loadxml
+    #@+node:loadxmldoc
+    def loadxmldoc(self, xmldoc, namespace=None):
+        """
+        Returns a reconstituted parse tree, loaded from an
+        xml.dom.minidom.Document instance
+    
+        Arguments:
+            - xmldoc - an xml.dom.minidom.Document instance
+            - namespace - a dict from which to find the classes needed
+              to translate the document into a tree of parse nodes
+        """
+        return self.loadxmlobj(xmldoc.childNodes[0], namespace)
+    #@-node:loadxmldoc
+    #@+node:loadxmlobj
+    def loadxmlobj(self, xmlobj, namespace=None):
+        """
+        Returns a node object, being a parse tree, reconstituted from an
+        xml.dom.minidom.Element object
+    
+        Arguments:
+            - xmlobj - an xml.dom.minidom.Element instance
+            - namespace - a namespace from which the node classes
+              needed for reconstituting the tree, can be found
+        """
+        # check on namespace
+        if type(namespace) is types.ModuleType:
+            namespace = namespace.__dict__
+        elif namespace == None:
+            namespace = globals()
+    
+        objname = xmlobj.tagName
+        classname = objname + "_Node"
+        classobj = namespace.get(classname, None)
+    
+        namespacekeys = namespace.keys()
+    
+        # barf if node is not a known parse node or token
+        if (not classobj) and objname not in self.tokens:
+            raise Exception("Cannot reconstitute %s: can't find required node class or token %s" % (
+                objname, classname))
+    
+        if classobj:
+            nodeobj = classobj()
+    
+            # add the attribs
+            for k,v in xmlobj.attributes.items():
+                setattr(nodeobj, k, v)
+    
+        else:
+            nodeobj = None
+    
+        #print "----------------"
+        #print "objname=%s" % repr(objname)
+        #print "classname=%s" % repr(classname)
+        #print "classobj=%s" % repr(classobj)
+        #print "nodeobj=%s" % repr(nodeobj)
+        
+        # now add the children
+        for child in xmlobj.childNodes:
+            #print "%s attributes=%s" % (child, child.attributes.items())
+            childname = child.attributes['target'].value
+            #print "childname=%s" % childname
+            if childname + "_Node" in namespacekeys:
+                #print "we have a node for class %s" % classname
+                childobj = self.loadxmlobj(child, namespace)
+            else:
+                # it's a token
+                childobj = child.childNodes[0].nodeValue
+                #print "got token %s=%s" % (childname, childobj)
+            
+            nodeobj.names.append(childname)
+            nodeobj.values.append(childobj)
+    
+        # done
+        return nodeobj
+    
+    
+    #@-node:loadxmlobj
+    #@+node:_globals
+    def _globals(self):
+        return globals().keys()
+    #@-node:_globals
+    #@-others
+#@-node:class BisonParser
+#@+node:bisonToPython
+def bisonToPython(bisonfileName, lexfileName, pyfileName, generateClasses=0):
+    """
+    Rips the rules, tokens and precedences from a bison file, and the
+    verbatim text from a lex file and generates
+    a boilerplate python file containing a Parser class with handler
+    methods and grammar attributes
+
+    Arguments:
+        - bisonfileName - name of input bison script
+        - lexfileName - name of input flex script
+        - pyfileName - name of output python file
+        - generateClasses - flag - default 0 - if 1, causes a unique class to
+          be defined for each parse target, and for the corresponding target
+          handler method in the main Parser class to use this class when creating
+          the node.
+    """
+    # try to create output file
+    try:
+        pyfile = file(pyfileName, "w")
+    except:
+        raise Exception("Cannot create output file '%s'" % pyfileName)
+
+    # try to open/read the bison file
+    try:
+        rawBison = file(bisonfileName).read()
+    except:
+        raise Exception("Cannot open bison file %s" % bisonfileName)
+
+    # try to open/read the lex file
+    try:
+        rawLex = file(lexfileName).read()
+    except:
+        raise Exception("Cannot open lex file %s" % lexfileName)
+
+    # break up into the three '%%'-separated sections    
+    try:
+        prologue, rulesRaw, epilogue = rawBison.split("\n%%\n")
+    except:
+        raise Exception(
+            "File "+bisonfileName+" is not a properly formatted bison file"+\
+            " (needs 3 sections separated by %%%%"
+            )
+    
+    # --------------------------------------
+    # process prologue
+
+    prologue = prologue.split("%}")[-1].strip() # ditch the C code
+    prologue = re.sub("\\n([\t ]+)", " ", prologue) # join broken lines
+    
+    #prologueLines = [line.strip() for line in prologue.split("\n")]
+    lines = prologue.split("\n")
+    tmp = []
+    for line in lines:
+        tmp.append(line.strip())
+    prologueLines = tmp
+
+    prologueLines = filter(None, prologueLines)
+    tokens = []
+    precRules = []
+    for line in prologueLines:
+        words = reSpaces.split(line)
+        kwd = words[0]
+        args = words[1:]
+        if kwd == '%token':
+            tokens.extend(args)
+        elif kwd in ['%left', '%right', '%nonassoc']:
+            precRules.append((kwd, args))
+        elif kwd == '%start':
+            startTarget = args[0]
+
+    # -------------------------------------------------------------
+    # process rules
+    rulesRaw = re.sub("\\n([\t ]+)", " ", rulesRaw) # join broken lines
+
+    #rulesLines = filter(None, [r.strip() for r in rulesRaw.split(";")])
+    rulesLines = []
+    #for r in rulesRaw.split(";"):
+    for r in re.split(unquoted % ";", rulesRaw):
+
+        r = r.strip()
+        if r:
+            rulesLines.append(r)
+
+    rules = []
+    for rule in rulesLines:
+        #print "--"
+        #print repr(rule)
+
+        #tgt, terms = rule.split(":")
+        try:
+            tgt, terms = re.split(unquoted % ":", rule)
+        except ValueError:
+            print "Error in rule: %s" % rule
+            raise
+
+        tgt, terms = tgt.strip(), terms.strip()
+
+        #terms = [t.strip() for t in terms.split("|")]
+        #terms = [reSpaces.split(t) for t in terms]
+
+        tmp = []
+        #for t in terms.split("|"):
+        for t in re.split(unquoted % r"\|", terms):
+
+            t = t.strip()
+            tmp.append(reSpaces.split(t))
+        terms = tmp
+
+        rules.append((tgt, terms))
+    
+    # now we have our rulebase, we can churn out our skeleton Python file
+    pyfile.write("\n".join([
+        '#!/usr/bin/env python',
+        '',
+        '"""',
+        'PyBison file automatically generated from grammar file %s' % bisonfileName,
+        'You can edit this module, or import it and subclass the Parser class',
+        '"""',
+        '',
+        'import sys',
+        '',
+        'from bison import BisonParser, BisonNode, BisonError',
+        '',
+        'bisonFile = "%s"  # original bison file' % bisonfileName,
+        'lexFile = "%s"    # original flex file' % lexfileName,
+        '\n',
+        ]))
+
+    # if generating target classes
+    if generateClasses:
+        # create a base class for all nodes
+        pyfile.write("\n".join([
+            'class ParseNode(BisonNode):',
+            '    """',
+            '    This is the base class from which all your',
+            '    parse nodes are derived.',
+            '    Add methods to this class as you need them',
+            '    """',
+            '    def __init__(self, **kw):',
+            '        BisonNode.__init__(self, **kw)',
+            '',
+            '    def __str__(self):',
+            '        """Customise as needed"""',
+            '        return "<%s instance at 0x%x>" % (self.__class__.__name__, hash(self))',
+            '',
+            '    def __repr__(self):',
+            '        """Customise as needed"""',
+            '        return str(self)',
+            '',
+            '    def dump(self, indent=0):',
+            '        """',
+            '        Dump out human-readable, indented parse tree',
+            '        Customise as needed - here, or in the node-specific subclasses',
+            '        """',
+            '        BisonNode.dump(self, indent) # alter as needed',
+            '\n',
+            '# ------------------------------------------------------',
+            '# Define a node class for each grammar target',
+            '# ------------------------------------------------------',
+            '\n',
+            ]))
+        
+        # now spit out class decs for every parse target
+        for target, options in rules:
+            tmp = []
+            for t in options:
+                tmp.append(" ".join(t))
+
+            # totally self-indulgent grammatical pedantry
+            if target[0].lower() in ['a','e','i','o','u']:
+                plural = 'n'
+            else:
+                plural = ''
+
+            pyfile.write("\n".join([
+                'class %s_Node(ParseNode):' % target,
+                '    """',
+                '    Holds a%s "%s" parse target and its components.' % (plural, target),
+                '    """',
+                '    def __init__(self, **kw):',
+                '        ParseNode.__init__(self, **kw)',
+                '',
+                '    def dump(self, indent=0):',
+                '        ParseNode.dump(self, indent)',
+                '\n',
+                ]))
+
+        
+    # start churning out the class dec
+    pyfile.write("\n".join([
+        'class Parser(BisonParser):',
+        '    """',
+        '    bison Parser class generated automatically by bison2py from the',
+        '    grammar file "%s" and lex file "%s"' % (bisonfileName, lexfileName),
+        '',
+        '    You may (and probably should) edit the methods in this class.',
+        '    You can freely edit the rules (in the method docstrings), the',
+        '    tokens list, the start symbol, and the precedences.',
+        '',
+        '    Each time this class is instantiated, a hashing technique in the',
+        '    base class detects if you have altered any of the rules. If any',
+        '    changes are detected, a new dynamic lib for the parser engine',
+        '    will be generated automatically.',
+        '    """',
+        '\n',
+        ]))
+
+    # add the default node class
+    if not generateClasses:
+        pyfile.write("\n".join([
+            '    # -------------------------------------------------',
+            '    # Default class to use for creating new parse nodes',
+            '    # -------------------------------------------------',
+            '    defaultNodeClass = BisonNode',
+            '\n',
+            ]))
+
+    # add the name of the dynamic library we need
+    libfileName = os.path.splitext(os.path.split(pyfileName)[1])[0] + "-engine"
+    pyfile.write("\n".join([
+        '    # --------------------------------------------',
+        '    # basename of binary parser engine dynamic lib',
+        '    # --------------------------------------------',
+        '    bisonEngineLibName = "%s"' % libfileName,
+        '\n',
+        ]))
+
+    # add the tokens
+    #pyfile.write('    tokens = (%s,)\n\n' % ", ".join(['"%s"' % t for t in tokens]))
+    tmp = []
+    for t in tokens:
+        #tmp.append('"'+t+'"')
+        tmp.append(t)
+    toks = ", ".join(tmp)
+    pyfile.write('    # ----------------------------------------------------------------\n')
+    pyfile.write('    # lexer tokens - these must match those in your lex script (below)\n')
+    pyfile.write('    # ----------------------------------------------------------------\n')
+    pyfile.write('    tokens = %s\n\n' % tmp)
+
+    # add the precedences
+    pyfile.write('    # ------------------------------\n')
+    pyfile.write('    # precedences\n')
+    pyfile.write('    # ------------------------------\n')
+    pyfile.write('    precedences = (\n')
+    for prec in precRules:
+        tmp = []
+        for p in prec[1]:
+            #tmp.append('"'+p+'"')
+            tmp.append(p)
+        precline = ", ".join(tmp)
+        #pyfile.write('        ("%s", (%s,)),\n' % (
+        pyfile.write('        ("%s", %s,),\n' % (
+                prec[0][1:], # left/right/nonassoc, quote-wrapped, no '%s'
+                tmp,  # quote-wrapped targets
+                )
+            )
+    pyfile.write('        )\n\n'),
+
+    pyfile.write("\n".join([
+        '    # ---------------------------------------------------------------',
+        '    # Declare the start target here (by name)',
+        '    # ---------------------------------------------------------------',
+        '    start = "%s"' % startTarget,
+        '\n',
+        ]))
+
+    # now the interesting bit - write the rule handler methods
+    pyfile.write("\n".join([
+        '    # ---------------------------------------------------------------',
+        '    # These methods are the python handlers for the bison targets.',
+        '    # (which get called by the bison code each time the corresponding',
+        '    # parse target is unambiguously reached)',
+        '    #',
+        "    # WARNING - don't touch the method docstrings unless you know what",
+        "    # you are doing - they are in bison rule syntax, and are passed",
+        "    # verbatim to bison to build the parser engine library.",
+        '    # ---------------------------------------------------------------',
+        '\n',
+        ]))
+
+    for target, options in rules:
+        tmp = []
+        for t in options:
+            tmp.append(" ".join(t))
+
+        if generateClasses:
+            nodeClassName = target + "_Node"
+        else:
+            nodeClassName = 'self.defaultNodeClass'
+
+        pyfile.write("\n".join([
+            '    def on_%s(self, target, option, names, values):' % target,
+            '        """',
+            '        %s' % target,
+            '            : ' + "\n            | ".join(tmp),
+            '        """',
+            '        return %s(' % nodeClassName,
+            '            target="%s",'  % target,
+            '            option=option,',
+            '            names=names,',
+            '            values=values)',
+            '\n',
+            ]))
+
+    # now the ugly bit - add the raw lex script
+    pyfile.write("\n".join([
+        '    # -----------------------------------------',
+        '    # raw lex script, verbatim here',
+        '    # -----------------------------------------',
+        '    lexscript = r"""',
+        rawLex,
+        '    """',
+        '    # -----------------------------------------',
+        '    # end raw lex script',
+        '    # -----------------------------------------',
+        '',
+        '',
+        ]))
+
+    # and now, create a main for testing which either reads stdin, or a filename arg
+    pyfile.write("\n".join([
+        'def usage():',
+        '    print "%s: PyBison parser derived from %s and %s" % (sys.argv[0], bisonFile, lexFile)',
+        '    print "Usage: %s [-k] [-v] [-d] [filename]" % sys.argv[0]',
+        '    print "  -k       Keep temporary files used in building parse engine lib"',
+        '    print "  -v       Enable verbose messages while parser is running"',
+        '    print "  -d       Enable garrulous debug messages from parser engine"',
+        '    print "  filename path of a file to parse, defaults to stdin"',
+        '',
+        'def main(*args):',
+        '    """',
+        '    Unit-testing func',
+        '    """',
+        '',
+        '    keepfiles = 0',
+        '    verbose = 0',
+        '    debug = 0',
+        '    filename = None',
+        '',
+        '    for s in ["-h", "-help", "--h", "--help", "-?"]:',
+        '        if s in args:',
+        '            usage()',
+        '            sys.exit(0)',
+        '',
+        '    if len(args) > 0:',
+        '        if "-k" in args:',
+        '            keepfiles = 1',
+        '            args.remove("-k")',
+        '        if "-v" in args:',
+        '            verbose = 1',
+        '            args.remove("-v")',
+        '        if "-d" in args:',
+        '            debug = 1',
+        '            args.remove("-d")',
+        '    if len(args) > 0:',
+        '        filename = args[0]',
+        '',
+        '    p = Parser(verbose=verbose, keepfiles=keepfiles)',
+        '    tree = p.run(file=filename, debug=debug)',
+        '    return tree',
+        '',
+        'if __name__ == "__main__":',
+        '    main(*(sys.argv[1:]))',
+        '',
+        '',
+        ]))
+
+#@-node:bisonToPython
+#@-others
+#@-node:@file src/python/bison.py
+#@-leo

+ 84 - 0
utils/bison2py

@@ -0,0 +1,84 @@
+#!/usr/bin/env python
+#@+leo-ver=4
+#@+node:@file utils/bison2py
+#@@first
+#@@language python
+
+"""
+Utility which creates a boilerplate pybison-compatible
+python file from a yacc file and lex file
+
+Run it with 2 arguments - filename.y and filename.l
+Output is filename.py
+"""
+#@+others
+#@+node:imports
+import sys, os, re, getopt
+
+from bison import bisonToPython
+#@-node:imports
+#@+node:globals
+argv = sys.argv
+argc = len(argv)
+progname = argv[0]
+
+reSpaces = re.compile("\\s+")
+#@-node:globals
+#@+node:usage
+def usage(s=None):
+    """
+    Display usage info and exit
+    """
+    if s:
+        print progname+": "+s
+    
+    print "\n".join([
+        "Usage: %s [-c] basefilename" % progname,
+        "   or: %s [-c] grammarfile.y lexfile.l pyfile.py" % progname,
+        "(generates a boilerplate python file from a grammar and lex file)",
+        "The first form uses 'basefilename' as base for all files, so:",
+        "  %s fred" % progname,
+        "is equivalent to:",
+        "  %s fred.y fred.l fred.py" % progname,
+        '',
+        'The "-c" argument causes the creation of a unique node class',
+        'for each parse target - highly recommended for complex grammars',
+        ])
+    
+    sys.exit(1)
+
+#@-node:usage
+#@+node:main
+def main():
+    """
+    Command-line interface for bison2py
+    """
+    global argc, argv
+
+    if '-c' in argv:
+        generateClasses = 1
+        argv.remove('-c')
+        argc = argc - 1
+    else:
+        generateClasses = 0
+
+    if argc == 2:
+        basename = argv[1]
+        bisonfile = basename+".y"
+        lexfile = basename+".l"
+        pyfile = basename+".py"
+    elif argc == 4:
+        bisonfile, lexfile, pyfile = argv[1:4]
+    else:
+        usage("Bad argument count")
+    
+    bisonToPython(bisonfile, lexfile, pyfile, generateClasses)
+
+#@-node:main
+#@+node:MAINLINE
+if __name__ == '__main__':
+    main()
+#@-node:MAINLINE
+#@-others
+#@-node:@file utils/bison2py
+#@-leo

+ 82 - 0
utils/bison2py.py

@@ -0,0 +1,82 @@
+#@+leo-ver=4
+#@+node:@file utils/bison2py.py
+#@@language python
+
+"""
+Utility which creates a boilerplate pybison-compatible
+python file from a yacc file and lex file
+
+Run it with 2 arguments - filename.y and filename.l
+Output is filename.py
+"""
+#@+others
+#@+node:imports
+import sys, os, re, getopt
+
+from bison import bisonToPython
+#@-node:imports
+#@+node:globals
+argv = sys.argv
+argc = len(argv)
+progname = argv[0]
+
+reSpaces = re.compile("\\s+")
+#@-node:globals
+#@+node:usage
+def usage(s=None):
+    """
+    Display usage info and exit
+    """
+    if s:
+        print progname+": "+s
+    
+    print "\n".join([
+        "Usage: %s [-c] basefilename" % progname,
+        "   or: %s [-c] grammarfile.y lexfile.l pyfile.py" % progname,
+        "(generates a boilerplate python file from a grammar and lex file)",
+        "The first form uses 'basefilename' as base for all files, so:",
+        "  %s fred" % progname,
+        "is equivalent to:",
+        "  %s fred.y fred.l fred.py" % progname,
+        '',
+        'The "-c" argument causes the creation of a unique node class',
+        'for each parse target - highly recommended for complex grammars',
+        ])
+    
+    sys.exit(1)
+
+#@-node:usage
+#@+node:main
+def main():
+    """
+    Command-line interface for bison2py
+    """
+    global argc, argv
+
+    if '-c' in argv:
+        generateClasses = 1
+        argv.remove('-c')
+        argc = argc - 1
+    else:
+        generateClasses = 0
+
+    if argc == 2:
+        basename = argv[1]
+        bisonfile = basename+".y"
+        lexfile = basename+".l"
+        pyfile = basename+".py"
+    elif argc == 4:
+        bisonfile, lexfile, pyfile = argv[1:4]
+    else:
+        usage("Bad argument count")
+    
+    bisonToPython(bisonfile, lexfile, pyfile, generateClasses)
+
+#@-node:main
+#@+node:MAINLINE
+if __name__ == '__main__':
+    main()
+#@-node:MAINLINE
+#@-others
+#@-node:@file utils/bison2py.py
+#@-leo